Skip to Content
avatar image
Former Member

Production Code Working abnormally

Hi Team,

In our Client, we have developed a program in RE-FX Module. We have tested it different cases in qualty system and found that everything is fine.

Now, The issue is program working abnormally some times,

IF zrem_ss_revenue-per_post IS NOT INITIAL.
SELECT belnr bschl hkont dmbtr FROM bseg INTO CORRESPONDING FIELDS OF TABLE it_bseg
WHERE bukrs = zrem_ss_revenue-per_post_bukrs
AND belnr = zrem_ss_revenue-per_post
AND gjahr = zrem_ss_revenue-per_post_year.
IF sy-subrc EQ 0.
CLEAR: lv_tax, lv_hecess, lv_secess.
LOOP AT it_bseg INTO wa_bseg .
IF wa_bseg-hkont = '0022021101'. "Total Tax
lv_tax = lv_tax + wa_bseg-dmbtr.
ELSEIF wa_bseg-hkont = '0022021102'. "Total SEcess
lv_secess = lv_secess + wa_bseg-dmbtr.
ELSEIF wa_bseg-hkont = '0022021103'. "Total HEcess
lv_hecess = lv_hecess + wa_bseg-dmbtr.
ELSEIF wa_bseg-hkont = '0022021104'. "Total SBcess
lv_sbcess = lv_sbcess + wa_bseg-dmbtr.
ELSEIF wa_bseg-hkont = '0022021105'.
lv_kkcess = lv_kkcess + wa_bseg-dmbtr.


The above code is working fine but some times it is giving wrong values. We have tried to put debugger, then no issue raises. The issue came only when it is executed without debugging and some times only.

Request you to help me in this if any one face the above issue.

Thanks in Advance.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jun 28, 2017 at 01:52 PM

    With the posted information I can only guess that some FI document is not yet commited to database, or database/server buffer aren't up to date.

    You should provide more information, e.g. when and where this code is implemented, etc.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 29, 2017 at 07:04 AM

    Hi Raymond,

    Thanks for your reply.

    The document is posted in RE- FX Module. When ever user done the periodic postings in the contract, a fi document is posted and at that same time we are sending an acknowledgement that document is posted to non sap system through PI(automatic process).

    Now My problem is in that acknowledgement, it contains wrong values some time (code is given above).

    Add comment
    10|10000 characters needed characters exceeded