‎2007 May 28 11:52 AM
I have select options in my selection screen.
1) s_a
2) s_b
Requirement:-
1) If I run the program and click the arrow on the "s_a" field, it should open multi selection screen. From that I can make multi entry or upload data from excel file.
2) If "s_a" and "s_b" is empty it sud throw an error message.
Can I do this validation in AT SELECTION-SCREEN n how?
‎2007 May 28 11:56 AM
Hi
AT SELCTION-SCREEN.
CHECK SY-UCOMM = 'ONLI' OR
SY-UCOMM = 'PRIN' OR
SY-UCOMM = 'SJOB'.
IF S_A[] IS INITIAL AND
S_B[] IS INITIAL.
* -------------> MESSAGE ERROR.
ENDIF.
Max
‎2007 May 28 11:55 AM
for 1 SELECT-OPTIONS .....VALUE-REQUEST
for 2 SELECT-OPTIONS .....OBLIGATORY
‎2007 May 28 11:56 AM
Hi
AT SELCTION-SCREEN.
CHECK SY-UCOMM = 'ONLI' OR
SY-UCOMM = 'PRIN' OR
SY-UCOMM = 'SJOB'.
IF S_A[] IS INITIAL AND
S_B[] IS INITIAL.
* -------------> MESSAGE ERROR.
ENDIF.
Max
‎2007 May 28 1:38 PM
‎2007 May 28 11:56 AM
hi abhijeet,
at selection screen u can validat eur select options and print error msg too.. like an exampl egiven below,
if s_a-low = 0
message 'error' type 'I'.
like this u can specify..
and by clicking arrow mark asub screen opens where u can select multiple values by giving the range in option green color range tab.
‎2007 May 28 11:58 AM
tables : sscrfields.
at selection-screen.
CHECK SSCRFIELDS-UCOMM = 'ONLI'.
if s_a[] is initial
SET CURSOR FIELD 'S_A-LOW'.
*error message
endif.
if s_b[] is initial
SET CURSOR FIELD 'S_B-LOW'.
*error message
endif.
‎2007 May 28 12:03 PM
hi Abhijeet,
u can do the first by just writing the sel-options as:
S_A like table-field (say vbak-vbeln). then the multiple selection comes automatically.
the second - u can do thru at selection-screen by just writing a if condition.
if s_a-low is initial and s_a-high is initial.
message e001.
endif.
Let me know if you still have any issue.
/Praveen
‎2007 May 28 12:55 PM