Skip to Content
Former Member
Jun 28, 2017 at 07:25 AM

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.