Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Selection screen validation for batch

Former Member
0 Likes
1,087

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?

3 REPLIES 3
Read only

Former Member
0 Likes
652

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.

Read only

0 Likes
652

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?

Read only

Former Member
0 Likes
652

Hi,

Check this link:

Regards

Adil