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

doubt in structures

Former Member
0 Likes
858

Hi, I have a small doubt in structures.

Can i call structures in any main program if yes please give me an example. If we can call through internal tables even though please give me example for that too

1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
816

Hi,

You can use the structure in program.

data itab type standard table of structure_name.

data workarea type structure_name.

7 REPLIES 7
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
817

Hi,

You can use the structure in program.

data itab type standard table of structure_name.

data workarea type structure_name.

Read only

Former Member
0 Likes
816

Hi,

Sturctures are nothing but place holders only ,they do not contain any value in them.

For eg: if you see BDCMSGCOLL, this is a structure used to capture the messages in CALL TRANSACTION....

Whatever messages arises from the CALL transaction is captured in the internal table which you have declared with this structure.

You can use any structure any where in your program as a reference.

Regards

Subramanian

Read only

Former Member
0 Likes
816

Hi,

Yes you can use structures in oyur program. Like you can declare an internal table by including a structure into that.

Data: Begin of itab occurs 0.

include structure abc.

data: end of itab.

Regards,

Ram

Pls reward points if helpful.

Read only

Former Member
0 Likes
816

sorry can not get you properly. in int table you can define like this

data : begin of itab occurs 0.

include structure stpox.

data : end of itab.

here my requirement is to explode bom by CS_BOM_EXPL_MAT_V2 fn module and get the data in itab which is of type stpox.

here stpox is structure.

regards

shiba dutta

Read only

Former Member
0 Likes
816

Yeah if you have got the structure declared in SE11 than you can call in your programme...

declare the internal table type that structure...

data: itab type standard table of <structure declared> ..... with header line or use work area....

you can see that all the fields declared in teh structure comes with the internal table also.....

I hope i have satisfied you ...

Read only

former_member404244
Active Contributor
0 Likes
816

Hi pavan,

u can use .

data : itab type of structure_name.

Regards,

nagaraj

Read only

Former Member
0 Likes
816

Hi,

Structures are basically templates to hold the data.You can call/use the structures

in your programs in many ways.

1. Declararing internal table of type of that structure.

data: i_tab type standard table of stpox.

2. You can use the existing structure along with your own fields to make your own structures.

Types: begin of t_struct.

include structure stpox.

Types: end of t_struct.

3. You can use existing structures for populating the data from the internal tables.