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

Function Module to create Structure

Former Member
0 Likes
1,947

Hi Guys/Gals...

Is there any function module to create Structure in the Database.,..

Can you attach the sample code also for the same..

Regards

Jiku

5 REPLIES 5
Read only

Former Member
0 Likes
1,034

Hi

Using Type Group : ABAP

You can create a strucure.

Reward if useful!

Read only

Former Member
0 Likes
1,034

Hi,

Here are the steps for creating the structure.

1) Go to transaction SE11.

2) Check the radio button "data element", enter the name of the structure Z*** or Y*** and click the create button.

3) You will be prompted to selected whether it is a data element or structure or table type. Select the structure radio button and click okay.

4) Now enter all the data elements one by one that you want in the structure. If you are creating a structure using existing data elements, all the associated component type, data type length, etc will be automatically picked up and displayed by the system. If you are creating a structure with new data element, you should first create those data elements using SE11 prior to creating the structure. The process for the data eleemnt is similar as the structure.

5) Next, save, check and activate the structure. This structure can be used in any of your function module or program.

regards

Read only

0 Likes
1,034

Thanks guys...

But I want to create it programatically..

Regards

Jiku

Read only

former_member196280
Active Contributor
0 Likes
1,034

There is no function module exists for creating structure.

Rgds,

SaiRam

Read only

0 Likes
1,034

Hello Jiku

Of course there are function modules available for creating structures. Have a look at function group <b>SDIF</b>.

If you structure consists of fields out of existing structures and tables I would recommend to read the meta-data of these structures/tables using function module <b>DDIF_TABL_GET</b>.

Collect the required fields for your structure. Next call function module <b>DDIF_TABL_PUT</b>.

Finally, activate your new structure using <b>DDIF_TABL_ACTIVATE</b>.

Regards

Uwe