‎2007 Sep 03 2:41 PM
Hi frnds,
In the below selection screen.
SELECT-OPTIONS PMATNR FOR MARA-MATNR.
SELECT-OPTIONS PSORG FOR MVKE-VKORG NO INTERVALS.
SELECT-OPTIONS PEXCLU FOR MARA-MTART NO INTERVALS .
According to my client's requirement , when PEXCLU value is given as ZPRT or ZMAT ,then sales org PSORG must become mandatory.
I promise to reward.
‎2007 Sep 03 2:49 PM
Hi,
Code like this:
AT SELECTION-SCREEN OUTPUT.
IF PEXCLU = 'ZPRT'
OR PEXCLU = 'ZMAT'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'PSORG'.
screen-required = 'X'.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
Thanks and Regards,
Vikas Bittera.
‎2007 Sep 03 2:45 PM
hi,
validate PSORG like
if PEXCLU = 'ZPRT' or PEXCLU = 'ZMAT'.
if PSORG is initial.
raise a error message that it is mandatory
endif.
endif.
‎2007 Sep 03 2:49 PM
Hi,
Code like this:
AT SELECTION-SCREEN OUTPUT.
IF PEXCLU = 'ZPRT'
OR PEXCLU = 'ZMAT'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'PSORG'.
screen-required = 'X'.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
Thanks and Regards,
Vikas Bittera.
‎2007 Sep 03 2:51 PM
Hi,
Sorry a small mistake:
AT SELECTION-SCREEN OUTPUT.
LOOP AT PEXCLU.
IF PEXCLU-low = 'ZPRT'
OR PEXCLU-low = 'ZMAT'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'PSORG'.
screen-required = 'X'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
Thanks and Regards,
Vikas Bittera.
‎2007 Sep 03 2:49 PM
Hi
U can try this:
AT SELECTION-SCREEN.
IF NOT PEXCLU[] IS INITIAL.
IF 'ZPRT' IN PEXCLU AND
'ZMAT' IN PEXCLU.
IF PSORG[] IS INITIAL.
MESSAGE E208(00) WITH 'Insert Sales Org.'.
ENDIF.
ENDIF.
ENDIF.Max
‎2007 Sep 03 2:52 PM
at selection screen.
if PEXCLU = 'ZPRT' or PEXCLU = 'ZMAT'.
if PSORG is initial.
message e000 'please enter a value for PSORG '.
endif.
endif.
‎2007 Sep 03 2:54 PM
Hello Annapurna,
loop at screen.
if pexclu = 'ZPRT' or 'ZMAT'.
if psorg is initial.
give error message.
endif.
endif.
endloop.
Reward If Helpful
-
Sasi.