Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

select-options no editable

Hello All,

I want to create a SELECT-OPTION field that will have different default values, NON EDITABLE, in selection screen depending on transaction that calls the program.

Please give me some advices to complete this work.

I did something like this:

SELECT_OPTIONS: P_DEP for DBTAB-DBFIELD.

case sy-tcode.

when 'ZT1'.

P_DEP = 'VALUE1'.

when 'ZT2'.

P_DEP = 'VALUE2'.

endcase.

But it doesn't work.

Thank you,

Diana.

Tags:
Former Member
Former Member replied

Hello.

TABLES: sbook.

SELECTION-SCREEN BEGIN OF BLOCK bl01.
SELECT-OPTIONS: p_sel1 FOR sbook-carrid MODIF ID so1,
  p_sel2 FOR sbook-connid MODIF ID so2.
SELECTION-SCREEN END OF BLOCK bl01.

INITIALIZATION.
  p_sel1-low = 'AA'.
  p_sel1-high = 'BB'.
  APPEND p_sel1.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'SO1'.
      screen-input = 0.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

Regards

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question