‎2007 Jan 18 6:17 AM
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
‎2007 Jan 18 6:24 AM
Hi,
You can use the structure in program.
data itab type standard table of structure_name.
data workarea type structure_name.
‎2007 Jan 18 6:24 AM
Hi,
You can use the structure in program.
data itab type standard table of structure_name.
data workarea type structure_name.
‎2007 Jan 18 6:24 AM
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
‎2007 Jan 18 6:24 AM
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.
‎2007 Jan 18 6:25 AM
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
‎2007 Jan 18 6:26 AM
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 ...
‎2007 Jan 18 6:26 AM
Hi pavan,
u can use .
data : itab type of structure_name.
Regards,
nagaraj
‎2007 Jan 18 6:31 AM
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.