‎2008 Dec 05 6:56 AM
Hi.
I have to create an ALV report.
among all the standard tables I have some standard SAP defined structures for eg RIHSTPO,MINST and many more...
Regarding DB table like mara i know that I have to create a structure, internal table and WA and then fetch the data from DB table and populate ITAB for generating ALV etc etc.
Now please tell me when I have Structure and not DB table, How to display data? for eg, in RIHSTPO i have to display MENGE as a column in ALV, how can I do so?
In my selection screen also I have to create a select-option field of type structure, can I write, select-options: klart for rmclf-klart . ? in this case how to declare the structure, can declare same as table? i.e. TABLES: rmclf or declaration for structure is different ?
Please explain the procedure with small sudocode.
Thanks in advance
‎2008 Dec 05 7:08 AM
Hello,
Structures are just a layout and doesnot contains any data.
If you are asking about creating a internal table which is type a already existing structure in DDIC, you can just create it just like you create a internal table like:
data: t_table type standard table of <structure_name>.
You can also create a structure in your own program as:
Structure Declaration.
types: begin of ty_struc,
matnr type matnr,
-
,
-
,
end of ty_struc.
Internal table Declaration.
data: t_table type standard table of ty_struc.
Also, you can declare the select option i.e. selection screen parameters using the fields of structure.
Hope that helps.
Thanks,
Jayant