we have two Quality systems named Q10 and R10 as per our landscape. there is a transaction code named HUPAST. In this transaction we added a Logic to trigger a popup based on on SCREEN-NAME field inside the LOOP AT SCREEN statement using EXPLICIT ENHANCEMENT for one of the screens. In both the systems the POPUP is getting triggered for the LAST iteration of the LOOP statement. once we confirmed in the POPUP in Q10 system the program is coming out of the loop and executing further lines whereas in R10 system after POPUP again LOOP AT SCREEN is continuing repeatedly and it is not ending.
Some body clarify me what causes the repeated execution of LOOP AT SCREEN statement. code is pasted below
LOOP AT SCREEN.
IF GF_PACK+1(1) = 'X'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
CONTINUE.
ENDIF.
CASE SCREEN-NAME.
WHEN 'GF_SCANQUANTITY'.
IF G_FLAG_QUAN IS INITIAL.
SCREEN-INPUT = 0.
ELSE.
SCREEN-INPUT = 1.
ENDIF.
MODIFY SCREEN.
WHEN 'GF_SCANCHARGE'.
IF G_FLAG_CHARGE IS INITIAL.
SCREEN-INPUT = 0.
ELSE.
SCREEN-INPUT = 1.
ENDIF.
MODIFY SCREEN.
WHEN OTHERS.
ENHANCEMENT-POINT LHU_PACKING_STATION106_04 SPOTS ES_SAPLHU_PACKING_STATION.
ENHANCEMENT 1 Z_POPUP_106_04. "active version
CASE SCREEN-NAME.
WHEN 'GF_SCANUNIT'.
IF gs_profile-plant = '3100' OR gs_profile-plant = '2200' OR
gs_profile-plant = '2300' OR gs_profile-plant = '2500' OR
gs_profile-plant = '2510' OR gs_profile-plant = '2520' OR
gs_profile-plant = '2530' OR gs_profile-plant = '2540' OR
gs_profile-plant = '2550' OR gs_profile-plant = '3500' OR
gs_profile-plant = '3510' OR gs_profile-plant = '3600' OR
gs_profile-plant = '3400'.
IF G_FLAG_QUAN IS NOT INITIAL.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
TITEL = 'Quantité'
textline1 = 'Veuillez saisir une quantité manuellement svp'
START_COLUMN = 25
START_ROW = 6.
ENDIF.
ENDIF.
ENDCASE.
ENDENHANCEMENT.
ENDCASE.
ENDLOOP.