Skip to Content
0
Former Member
Feb 29, 2012 at 04:02 AM

Problem when creating dynamic Z-Transparent table during runtime.

54 Views

Hi All,

The below code seems not working when i try to create a Z-transparent table using DDIF_TABL_PUT, with the table structure of SPFLI using DDIF_TABL_GET.

Any mistake there? Please correct me..

DATA: t_dd03p LIKE dd03p OCCURS 0 WITH HEADER LINE,

wa_dd02v LIKE dd02v,

wa_dd09l LIKE dd09l.

START-OF-SELECTION.

CALL FUNCTION 'DDIF_TABL_GET'

EXPORTING

name = 'SPFLI'

state = 'A'

IMPORTING

dd02v_wa = wa_dd02v

dd09l_wa = wa_dd09l

TABLES

dd03p_tab = t_dd03p

EXCEPTIONS

illegal_input = 1. " Value not Allowed for Parameter

CALL FUNCTION 'DDIF_TABL_PUT'

EXPORTING

name = 'ZNEWTABLE'

dd02v_wa = wa_dd02v

dd09l_wa = wa_dd09l

TABLES

dd03p_tab = t_dd03p

EXCEPTIONS

tabl_not_found = 1 " Table Header could not be Found

name_inconsistent = 2 " Name in Sources Inconsistent with NAME

tabl_inconsistent = 3 " Inconsistent Sources

put_failure = 4 " Write Error (ROLLBACK Recommended)

put_refused = 5. " Write not Allowed

CALL FUNCTION 'DDIF_TABL_ACTIVATE'

EXPORTING

name = 'ZNEWTABLE' " ddobjname Name of the Table to be Activated

auth_chk = 'X' " ddbool_d 'X': Perform Author. Check for DB Operations

EXCEPTIONS

not_found = 1 " Table not Found

put_failure = 2. " Table could not be Written

Thank you..