Skip to Content
avatar image
Former Member

Disable the select-options dynamically based on value selected in listbox

Hi friends,

I have a peculiar problem in my program.

I have a list box with two values.

1) With Ref to Reservation No.

2) Production order.

I am doing the object for Transfer Posting ( Similar to MIGO).

The contents of the listbox here are acting as the label to my select-options.

I have two select-options in my program.

1) Reservation No (s_rsnum for rsnum)

2) Production Order (s_porder for aufnr)

In runtime, based on the label selected in the listbox, the corresponding select-option should be in visible mode.

for eg: if i select "With ref to Reservation No" S_rsnum should be enabled and vice-versa.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 22, 2007 at 01:50 PM

    Hi,

    perhaps this helps:

    tables: mara.

    *

    PARAMETERS: P1 DEFAULT 'X' RADIOBUTTON GROUP PR1 USER-COMMAND DUMMY.

    PARAMETERS: P2 RADIOBUTTON GROUP PR1.

    selection-screen: skip 3.

    select-options: s_matnr for mara-matnr MODIF ID DI1.

    selection-screen: skip 3.

    select-options: s_matkl for mara-matkl MODIF ID DI2.

    *

    AT SELECTION-SCREEN OUTPUT.

    *

    IF P1 = 'X'.

    LOOP AT SCREEN.

    IF SCREEN-GROUP1 EQ 'DI1'.

    SCREEN-ACTIVE = '1'.

    SCREEN-INPUT = '1'.

    MODIFY SCREEN.

    ENDIF.

    IF SCREEN-GROUP1 EQ 'DI2'.

    SCREEN-ACTIVE = '0'.

    SCREEN-INPUT = '0'.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    ENDIF.

    *

    IF P2 = 'X'.

    LOOP AT SCREEN.

    IF SCREEN-GROUP1 EQ 'DI1'.

    SCREEN-ACTIVE = '0'.

    SCREEN-INPUT = '0'.

    MODIFY SCREEN.

    ENDIF.

    IF SCREEN-GROUP1 EQ 'DI2'.

    SCREEN-ACTIVE = '1'.

    SCREEN-INPUT = '1'.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    ENDIF.

    Regards, Dieter

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 22, 2007 at 01:36 PM

    hi santosh,

    you should do something like:

    IF listbox EQ With ref to...

    LOOP AT screen.

    IF SREEN-NAME EQ 'S_RSNUM'.

    screen-active = 0.

    MODIFY screen.

    ENDIF.

    ENDIF.

    and vice versa fopr the other field

    hope this helps

    ec

    Add comment
    10|10000 characters needed characters exceeded