‎2009 Oct 08 9:18 AM
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.
‎2009 Oct 08 12:02 PM
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
‎2009 Oct 08 9:30 AM
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
‎2009 Oct 08 12:02 PM
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
‎2009 Oct 08 12:13 PM
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.
‎2009 Oct 09 11:14 AM
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
‎2009 Oct 12 11:51 AM
‎2009 Oct 14 10:22 AM
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.
‎2009 Oct 09 3:47 PM
Hi,
To add new fields to exixting ztable , use the function module ' RS_DD_FIEL_EDIT'.
Thanks®ards,
kavitha.