Skip to Content
author's profile photo
Former Member

maodule pool

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Oct 11, 2007 at 01:40 PM

    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

    Add comment
    10|10000 characters needed characters exceeded