Skip to Content

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

select options

Hello Gurus,

I am presently working for SAP implementation project.

i just want to understand if i can assign a work area for a select option.

In my program i need to assign an internal table to select option.

In SAP ecc 6.0 Occurs 0 will become obsolete.

so i ve used only Internal table with initial size 0.

If i try to assign this internal table for select option it gives me a syntax error : internal table is without header line.

If i assign the same workarea of that table it accepts.

Is this the correct way.

can i assign a work area for a select option.

will it work properly.Because we dont have test data also to test our code at present.

Anyone pls help me to find it out.

Tags:
replied

Hi

Do like this.

REPORT ztest.

TYPES : BEGIN OF ty_branch,
  branch TYPE char25, "Branch Names
END OF ty_branch.

DATA : it_branch TYPE STANDARD TABLE OF ty_branch INITIAL SIZE 0.

DATA : wa_branch LIKE LINE OF it_branch.

SELECT-OPTIONS: s_brnchs FOR wa_branch-branch NO INTERVALS.

** << Populate values for IT_BRANCH >>

LOOP AT it_branch INTO wa_branch.
  s_brnchs-option = 'EQ'.
  s_brnchs-sign = 'I'.
  s_brnchs-low = wa_branch-branch.
  append s_brnchs.
ENDLOOP.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question