how to fill the select options from an internal table
dynamically ie can i use the loop in the initialization

Answer Posted / tamseel hashmi

TABLES : mara.

DATA : BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr,
END OF itab.

SELECT-OPTIONS: s_matnr FOR mara-matnr NO INTERVALS.

INITIALIZATION.

CLEAR : itab,
s_matnr.
REFRESH : itab,
s_matnr.

SELECT matnr
INTO TABLE itab
FROM mara
WHERE meins EQ 'CS'.

* fill select option.
LOOP AT itab.
s_matnr-low = itab-matnr.
s_matnr-sign = 'I'.
s_matnr-option = 'EQ'.

APPEND s_matnr.
ENDLOOP.

start-of-selection.

Is This Answer Correct ?    15 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the extract statement do in extract datasets?

641


What are table clusters?

593


What is at exit-command:?

569


What are the page windows? How many main windows will be there in a page window?

553


What are the three hierarchical levels of data types and objects?

577






What is the first thing you do after vendor setup is complete?

883


What will happen when we use fully buffered in abap?

559


What is the collect statement?

666


Differentiate between report and dialog program

592


How do you delete duplicate records from internal table?

739


How to set an Enhancement point for a custom report?

1141


What are client dependant objects in abap/sap?

672


Does every abap/4 have a modular structure? : abap modularization

694


Where do you create indexes in abap?

619


Why is pretty printer user in abap?

633