2024 Jan 09 4:04 PM
So I have a SAPSCRIPT FORM named Z_FORM which as a logic of:
IF &VBRP-WERKS& = '1234' OR &VBRP-VSTEL& = '8888'.
"Logic here
ENDIF.
The print program of the Z_FORM is named Z_PROG. Assuming that the values WERKS and VSTEL is contained in a set named Z_SET. How do I apply in the SAPSCRIPT to check if the values of WERKS and VSTEL is in Z_SET? I assume that it can only be done in the print program.
2024 Jan 09 4:34 PM
I don't know if I understand "set" well. Try to search the forum: G_SET_GET_ALL_VALUES.
2024 Jan 10 8:37 AM
Hello walkerist
In my opinion putting such logic into a SAP Script form and make it dependent on hardcoded values is a bad practice. What is so special about the plant 1234 and the shipping point 8888 that the form needs to be printed differently? What are you going to do if a new plant is created that needs the same printout, or you going to modify the form?
I would suggest:
Best regards
Dominik Tylczynski
2024 Jan 10 10:25 AM
I would move this logic in the driver program not in the form. Fill a small set of variables in the driver and check the result in the form.