i have an uegent requirement, iam working on table controls.
i have the below requirement, please suggest me the code.
If the FIELD1 is x - then the FIELD3 field should be mandatory. If the FIELD1 is Y
- then the FIELD4 field should be mandatory.
DO NOT ALLOW THE USER TO FILL IN BOTH FIELD 3 AND FIELD4 - only one or the other,
based on the FIELD1.
Thanks in advance.
In the PAI of that screen, write the below logic,
You will have LOOP AT ITAB and ENDLOOP in the PAI, there write a Moduel, in that one
IF FIELD1 = 'X'. IF FIELD3 is initial. Give a Success message. EXIT. " This is Mandatory Endif. ELSEIF Field1 = 'Y' . IF FIELD4 is initial. Give a Success message. EXIT. " This is Mandatory Endif. ENDIF. IF NOT FIELD3 is initial AND NOT FIELD4 is initial. Give the Success mesage EXIT