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

adding fields into table from program

Former Member
0 Likes
994

dear abapers,

how to add a field into a data base table from program. Is it possible to add fied name , data element and domain through program?.

thanx in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
909

Hi Mohan,

You can use the below FM for creating a Z table,better than creating a Ztable and then adding fields.

RS_DD_TABL_ADD

You can call this FM in your program and pass necessary fields to this FM, it will create the Z table with all the fields.

Regards,

Manish

7 REPLIES 7
Read only

Former Member
0 Likes
909

Hi Mohan,

Can you please elaborate your requirement.

1) Updating the data into Table from the program (Which means, when the program is executed upon few conditions data will be stored in the Database table ex : if the table name is VBAK, when the program is executed then data(Fields like Vbeln, vkorg...etc) will get uploaded into VBAK table)

If your requirement is different then please let me know.

From the Program you cannot create the Ztable like Data elements and Domain....except with the Help of BDC but that is not recommended unless it suits your requirement .

Hope the information is helpful..

Regards,

Kittu

Read only

Former Member
0 Likes
910

Hi Mohan,

You can use the below FM for creating a Z table,better than creating a Ztable and then adding fields.

RS_DD_TABL_ADD

You can call this FM in your program and pass necessary fields to this FM, it will create the Z table with all the fields.

Regards,

Manish

Read only

0 Likes
909

hi Manish ,

Thanx for this answer.

Is there any FM to directly add feild names from program ,without going for se11. .Need this information ,because, I have to add fieldnames dynamically from the program.

Read only

0 Likes
909

Hi Mohan,

Please try this FM..RS_DD_FIEL_EDIT

Moreover,you can go to SE80 select function group and enter SD41, hit enter..it will show you all function modules similar to the above one...you can see which one suits your requirement.

Hope it helps

Regards,

Manish

Read only

0 Likes
909

Hi Mohan,

Problem resolved???

Regards,

Manish

Read only

0 Likes
909

hi manish,

The probvlem still not solved. Actually it is not possible what i have logically told. the reason is we can not create any fields during run time. So I have to think about creating fields and table during runtime with different logic.

Read only

Former Member
0 Likes
909

Hi,

To add new fields to exixting ztable , use the function module ' RS_DD_FIEL_EDIT'.

Thanks&regards,

kavitha.