Application Development 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: 

maodule pool

Former Member
0 Kudos

HI,

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.

bye,

kirthi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

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

.

ENDIF.

Regards

Sudheer

1 REPLY 1

Former Member
0 Kudos

Hi,

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

.

ENDIF.

Regards

Sudheer