‎2009 Nov 26 9:42 AM
I want to create a database table dynamically with the content of table details stored in an internal table.
Ex:
ZTAB1 MANDT
ZTAB1 F1
ZTAB1 F2
ZTAB1 F3
ZTAB1 F4
ZTAB2 MANDT
ZTAB2 F1
ZTAB2 F2
ZTAB2 F3
The above structure will be dynamic, it can be of any structure. so, i need to create these ztables i.e. ztab1,ztab2.
For this, i am using fm:DDIF_TABL_PUT but how can i identify that the first set of fields in ztab1 should be created.
Requesting for a prompt solution.
Thanks in advance.
Rohith
‎2009 Nov 26 10:27 AM
Hi!
I think you should use another FM DD_CREATE_TABLE instead of DDIF_TABL_PUT.
DDIF_TABL_PUT is needed to create the TECHNICAL SETTINGS for what i can see
‎2009 Nov 26 10:45 AM
Hi,
U can do that easily.
Just pass the refrence tablename and refrence field names to the parameter tables.
CALL FUNCTION 'DDIF_TABL_PUT'
EXPORTING
NAME =
* DD02V_WA = ' '
* DD09L_WA = ' '
* TABLES
* DD03P_TAB =
* DD05M_TAB =
* DD08V_TAB =
* DD35V_TAB =
* DD36M_TAB =here in your case ,
pass Ztab1 and F!, F2, F3 fields
Hope this will be helpful
Regards,
Abhishak
Edited by: Abhishak Arora on Nov 26, 2009 11:46 AM