‎2008 Jul 04 7:43 PM
This is my scenario:
If program is executed in background, plant (in selection screen) is not mandatory.
If program is executed directly, plant (in selection screen) needs to be filled (mandatory).
I tried using sy-batch and coding at the AT SELECTION-SCREEN portion for validation but it seems that sy-batch is only populated after START-OF-SELECTION.
How do i code it so that if user does not execute program in background, it will prompt an error message and prompt user to fill the plant field in the selection screen?
‎2008 Jul 04 7:55 PM
HI,
use sy-batch in start-of-selection. not in at selection-screen.
start-of-selection.
if sy-batch = ' X' . (If it runs in background)
Then raise message.
endif.
This will work.
Reward If helpful.
‎2008 Jul 04 8:00 PM
Yes i can code in START-OF-SELECTION however, how do i return to selection screen so that user can enter the plant after error message is prompt?
‎2008 Jul 04 7:58 PM