‎2006 Nov 22 4:00 PM
Hello Everybody,
I need a help!
I want to use the <b> FM</b> "DD_CREATE_TABLE", that's way I need a example how can I use it.
Thank's in Advance.
Regards.
dav
‎2006 Nov 22 4:05 PM
Please check the following thread
https://forums.sdn.sap.com/click.jspa?searchID=147923&messageID=797696
https://forums.sdn.sap.com/click.jspa?searchID=147923&messageID=1073662
Please check the Standard Program
<b>RADCUCNT</b>
Message was edited by:
Dominic Pappaly
‎2006 Nov 22 4:05 PM
Please check the following thread
https://forums.sdn.sap.com/click.jspa?searchID=147923&messageID=797696
https://forums.sdn.sap.com/click.jspa?searchID=147923&messageID=1073662
Please check the Standard Program
<b>RADCUCNT</b>
Message was edited by:
Dominic Pappaly
‎2006 Nov 22 4:07 PM
Hello,
Find the below code.
* drop/create table DDXTF
GV_STEPCNT = GV_STEPCNT + 1.
DATA: LV_TABNAME LIKE DD02L-TABNAME.
DATA: LV_PUTREL LIKE PUTTB-SAPRELEASE.
DATA: LV_SUBSTTAB LIKE PUTTB-TABNAME.
DATA: LV_TABEX LIKE GSUGI_PA-SUBST_EXT.
DATA: RENAME_ALLOWED(3) TYPE C. "for DB2 for AIX
DATA: BEGIN OF LT_X031L OCCURS 10.
INCLUDE STRUCTURE X031L.
DATA: END OF LT_X031L.
PERFORM STEP_START_PROTOCOL.
LV_TABNAME = 'DDXTF'.
CALL FUNCTION 'DD_GET_NAMETAB'
EXPORTING
TABNAME = LV_TABNAME
TABLES
X031L_TAB = LT_X031L.
CALL FUNCTION 'DD_DROP_TABLE'
EXPORTING
TABNAME = LV_TABNAME.
CALL FUNCTION 'DD_CREATE_TABLE'
EXPORTING
TABNAME = LV_TABNAME
TAB_IND_CONTROL = 'A'
KEYFIELDS = 'X'
IMPORTING
SUBRC = LV_SUBRC
TABLES
X031L_TAB = LT_X031L.
COMMIT WORK.
PERFORM STEP_STOP_PROTOCOL.
IF LV_SAVEDDXTF = 'X'.
* restore saved entries from ddytf into ddxtf.
GV_STEPCNT = GV_STEPCNT + 1.
PERFORM STEP_START_PROTOCOL.
PERFORM RESTORE_DDYTF_DDXTF USING LV_SAVE_OK.
PERFORM STEP_STOP_PROTOCOL.
ENDIF.
* end
PERFORM WRITE_PROTOCOL.Thanks,
‎2006 Nov 23 9:30 AM
Thank's all for your Answer!
can someone explaine me:
what thas mean (LT_X031L) is that the Fields of the creatable Table????
CALL FUNCTION 'DD_CREATE_TABLE'
...
...
..
TABLES
X031L_TAB = LT_X031L.
‎2006 Nov 22 4:07 PM
Hi,
Please check this SAP programs on how to use FM DD_CREATE_TABLE.
LKEDAU09
LMCS0U01
LMCSWU06
LRSDU_SQL_INFF01
LSDB2U70
LSDTCU18
RADCSTEP
RADCUCNT
RADMASUTC
RADNTTAL
RSDCDDXT
RUTPERC1
RXDCHKDB
Hope this will help.
Regarsd,
Ferry Lianto
‎2006 Nov 22 4:08 PM
Hi,
just check standard report RSDCDDXT:
DATA: LV_TABNAME LIKE DD02L-TABNAME.
DATA: LV_SUBRC LIKE SY-SUBRC.
DATA: BEGIN OF LT_X031L OCCURS 10.
INCLUDE STRUCTURE X031L.
DATA: END OF LT_X031L.
CALL FUNCTION 'DD_CREATE_TABLE'
EXPORTING
TABNAME = LV_TABNAME
TAB_IND_CONTROL = 'A'
KEYFIELDS = 'X'
IMPORTING
SUBRC = LV_SUBRC
TABLES
X031L_TAB = LT_X031L.
COMMIT WORK.
Regards
Nicola
‎2006 Nov 23 9:59 AM
You're right, LT_X031L contains the fields of the new table and has the structure of X031L. So if you use transaction SE11 enter X031L, you can see which fields you'll have to feed with information.
Hope that helps!
Regards
Nicola
‎2006 Nov 23 11:21 AM