Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP std Structure

Former Member
0 Likes
435

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

1 REPLY 1
Read only

Former Member
0 Likes
361

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