Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8171467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:28:09+00:00 2026-06-06T21:28:09+00:00

I’ve been making a report and now it’s in the quality server. The thing

  • 0

I’ve been making a report and now it’s in the quality server. The thing is, when it was in development it was working fine, but now it repeats some of the invoice numbers, not all of them and it repeats two times for one invoice and four for another one. I don’t know if it is code problem or or something else.
here’s the code:

IF kunnr[] IS INITIAL
    AND belnr[] IS INITIAL
    AND spart IS NOT INITIAL
    AND gjahr[] IS NOT INITIAL
    AND bukrs[] IS NOT INITIAL
    AND allgstid IS INITIAL
    AND augdt[] IS NOT INITIAL
    AND budat[] IS INITIAL
    AND kbetr IS INITIAL
    AND vkorg IS INITIAL.
    SELECT c~kunnr a~belnr d~spart a~bldat a~waers c~wrbtr a~hwaer c~dmbtr
      INTO CORRESPONDING FIELDS OF TABLE lt_data
        FROM ( ( bkpf AS a
      INNER JOIN bsad AS c ON c~belnr = a~belnr )
      INNER JOIN vbrk AS d ON d~xblnr = c~belnr )
      WHERE a~gjahr IN gjahr
        AND a~bukrs IN bukrs
        AND d~spart = spart
        AND c~augdt IN augdt.
    IF sy-subrc <> 0.
      MESSAGE i425.
    ENDIF.

  ENDIF.



  LOOP AT lt_data ASSIGNING <fs_main>.


    CLEAR <fs_main>-kbetr.
    CLEAR <fs_main>-fwste.
    CLEAR <fs_main>-hwste.
    IF kbetr IS INITIAL.
      SELECT SINGLE kbetr fwste hwste
        FROM bset
        INTO (<fs_main>-kbetr, <fs_main>-fwste, <fs_main>-hwste)
        WHERE belnr = <fs_main>-belnr
        AND bukrs IN bukrs
        AND gjahr IN gjahr
        AND mwskz BETWEEN 'L0' AND 'L2'.
    ELSE.
      SELECT SINGLE kbetr fwste hwste
        FROM bset
        INTO (<fs_main>-kbetr, <fs_main>-fwste, <fs_main>-hwste)
        WHERE belnr = <fs_main>-belnr
        AND bukrs IN bukrs
        AND gjahr IN gjahr
        AND mwskz BETWEEN 'L0' AND 'L2'
        AND kbetr = kbetr.
    ENDIF.

    AT NEW kunnr.

      SELECT SINGLE name1 FROM kna1
          INTO (wa_bseg-name1)
          WHERE kunnr = <fs_main>-kunnr.


      IF sy-subrc = 0.
        FORMAT COLOR COL_TOTAL INTENSIFIED ON.

        WRITE:/ sy-uline(137), / sy-vline NO-GAP,
                        2 'Entidade: ', <fs_main>-kunnr, wa_bseg-name1,
                        137 sy-vline NO-GAP, / sy-uline(137).

      ENDIF.
    ENDAT.

    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    WRITE:/
            sy-vline NO-GAP,
            (16) <fs_main>-belnr NO-GAP,
            sy-vline NO-GAP,
            (16) <fs_main>-spart CENTERED NO-GAP,
            sy-vline NO-GAP,
            (10) <fs_main>-bldat NO-GAP,
            sy-vline NO-GAP.
    perc = <fs_main>-kbetr / 10.
    WRITE: (10) perc NO-GAP,
            sy-vline NO-GAP,
            (5) <fs_main>-waers NO-GAP,
            sy-vline NO-GAP,
            (16) <fs_main>-wrbtr NO-GAP,
            sy-vline NO-GAP,
            (16) <fs_main>-fwste NO-GAP,
            sy-vline NO-GAP,
            (5) <fs_main>-hwaer NO-GAP,
            sy-vline NO-GAP,
            (16) <fs_main>-dmbtr NO-GAP,
            sy-vline NO-GAP,
            (16) <fs_main>-hwste NO-GAP,
            sy-vline NO-GAP.
    WRITE:/ sy-uline(137).
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:28:11+00:00Added an answer on June 6, 2026 at 9:28 pm

    The problem is solved. I was using the wrong field of vbrk table. It should be vbeln, not xblnr. Thank you anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.