‎2008 Aug 19 11:58 AM
hi all,
this my selection screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_ebeln FOR ekko-ebeln,
s_lifnr FOR ekko-lifnr,
s_bedat FOR ekko-bedat OBLIGATORY,
s_bukrs FOR ekko-bukrs OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
if i enter EBELN in selection screen, bedat shoulnot be mandatory.
if EBELN field is blank BEDAT should be mandatory..
how to do tat,please help me out
Regards
Suprith
‎2008 Aug 19 12:01 PM
Remove obligatory for BEDAT...
Add below code in ur program...
TABLES: SSCRFIELDS. " Fields on selection screens
Form to Validate data specified on Selection Screen
CHECK SSCRFIELDS-UCOMM EQ 'ONLI'.
PERFORM SELECTIONSCREEN_VALIDATIONS.
In this perform check whether EBELN is passed, then check whether BEDAT is passed or empty and don't trigger any message.
if EBELN is not passed check whether BEDAT has a value and if there exists no value, trigger a message.
Form looks as below...
FORM SELECTIONSCREEN_VALIDATIONS .
IF P_PCUPLD = C_PC_SELECTED.
IF SY-BATCH EQ C_PC_SELECTED.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E001(ZZ) WITH TEXT-014.
" File cannot be upload from presentation server when execute in
" Batch Mode.
ENDIF.
ENDFORM. " SELECTIONSCREEN_VALIDATIONS
Don't create multiple threads for same post...
‎2008 Aug 19 1:13 PM
hi
try this...
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_ebeln FOR ekko-ebeln,
s_bedat FOR ekko-bedat OBLIGATORY,
SELECTION-SCREEN END OF BLOCK b1.
at selection-screen on block b1
if s_ebeln is initial.
if s_bedat is initial.
message 'Enter date' type 'E'.
endif.
endif.
regards
padma
‎2008 Aug 20 9:22 AM
Use event
AT SELECTION SCREEN on s_bedat.
if bedat is empty.
message type E
endif.
Hope this helps!
Regards,
Prashant
‎2008 Aug 20 9:23 AM
Use AT SELECTION SCREEN on field.
for more help press F1 on same.
Amit.
‎2008 Sep 23 12:23 PM