2015 Dec 23 8:34 AM
Hi all,
In my req.....need to change the status field based on the updated values of other fields in the ALV.
If not gs_final-matnr is initial or not gs_final-erdat is initial or not gs_final-ernam is initial.
gs_final-status = 'CLOSED'.
Elseif not gs_final-org_id is initial or not gs_final-item is initial.
gs_final-status = 'OPEN'.
endif.
Is that possible to use CASE statement instead of IF or ELSEIF. Since the condition is carried out inside LOOP & ENDLOOP there is performce issue.
Regards,
Meenakshi.
2015 Dec 23 9:13 AM
Hi.
Why do you think CASE will be faster than IF? Did you check your program in SAT/ST12?
I think you should provide a problem piece of code.
2015 Dec 23 9:17 AM
Hi,
CASE can only be used when the initial values are same for all cases. But here, matnr has initial value blank while date has initial value '00000000' therefore CASE cannot be used.
I suggest using field symbols instead of work area for the LOOP. It will drastically improve the loop execution time.