<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dynamic DDIC structure - work at runtime with changes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ddic-structure-work-at-runtime-with-changes/m-p/3737597#M899541</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply!&lt;/P&gt;&lt;P&gt;I use another dynamic structure using RTTI at other place, but here I need a DDIC structure. &lt;/P&gt;&lt;P&gt;No other idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Apr 2008 08:44:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-24T08:44:44Z</dc:date>
    <item>
      <title>Dynamic DDIC structure - work at runtime with changes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ddic-structure-work-at-runtime-with-changes/m-p/3737595#M899539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem in a method of Web Dynpro Abap. Ich have a database structure /SME/DED_DYN and change its fields at runtime. I do that with the function DDIF_TABL_PUT and the activation with DDIF_TABL_ACTIVATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
COMMIT WORK and wait.
  CALL FUNCTION 'DDIF_TABL_PUT'
     EXPORTING
         NAME = '/SME/DED_DYN'
     TABLES
         DD03P_TAB = DD03P_TAB
         DD05M_TAB = DD05M_TAB
         DD08V_TAB = DD08V_TAB
         DD35V_TAB = DD35V_TAB
         DD36M_TAB = DD36M_TAB
 
     EXCEPTIONS
         tabl_not_found          = 1
         name_inconsistent       = 2
         tabl_inconsistent       = 3
         put_failure             = 4
         put_refused             = 5
         others                  = 6.
 
  COMMIT WORK and wait.
 
  if sy-subrc = 0.
    call function 'DDIF_TABL_ACTIVATE'
      exporting
          name =  '/SME/DED_DYN'
      IMPORTING
          rc = rc    
      exceptions
            not_found   = 1
            put_failure = 2
            others      = 3.
  endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields of the DDIC structure /SME/DED_DYN are changed at runtime dynamicly. Not their value, the fields themselves with fieldname and datatype. I need to work with these NEW fields of the DDIC structure at the same runtime. But somewhere the OLD /SME/DED_DYN is buffered I think, because the method only reads this old structure although in Transaction SE11 it changes to the NEW one at runtime correctly. I have to refresh my whole Web Dynpro Application in the browser and then it works with the new structure.What buffer could this be and how can I clear it, so that my method in WebDynpro can proceed with the new DDIC structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you understand my problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Ingmar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 09:14:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ddic-structure-work-at-runtime-with-changes/m-p/3737595#M899539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-23T09:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic DDIC structure - work at runtime with changes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ddic-structure-work-at-runtime-with-changes/m-p/3737596#M899540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess changing DDIC structures at runtime is problematic here. Why don´t you make use of dynamic structures beeing created at runtime using RTTI?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think when referencing a DDIC structure during DATA declaration changing the DDIC structure at runtime won´t change the internal data objects created with reference to this DDIC structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 09:21:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ddic-structure-work-at-runtime-with-changes/m-p/3737596#M899540</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-23T09:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic DDIC structure - work at runtime with changes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ddic-structure-work-at-runtime-with-changes/m-p/3737597#M899541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply!&lt;/P&gt;&lt;P&gt;I use another dynamic structure using RTTI at other place, but here I need a DDIC structure. &lt;/P&gt;&lt;P&gt;No other idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 08:44:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ddic-structure-work-at-runtime-with-changes/m-p/3737597#M899541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T08:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic DDIC structure - work at runtime with changes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ddic-structure-work-at-runtime-with-changes/m-p/3737598#M899542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I create a database table which name is ZTABL1 .&lt;/P&gt;&lt;P&gt;The fields of this table are MANDT and FIELDS1 .&lt;/P&gt;&lt;P&gt;Then i write the code below .&lt;/P&gt;&lt;P&gt;It changes the dbtable dynamically and the values of the fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :      DD03P_TAB LIKE  DD03P OCCURS 0 WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;DATA :      DD05M_TAB LIKE  DD05M OCCURS 0 WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;DATA :      DD08V_TAB LIKE  DD08V OCCURS 0 WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;DATA :      DD12V_TAB LIKE  DD12V OCCURS 0 WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;DATA :      DD17V_TAB LIKE  DD17V OCCURS 0 WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;DATA :      DD35V_TAB LIKE  DD35V OCCURS 0 WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;DATA :      DD36M_TAB LIKE  DD36M OCCURS 0 WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lt_fcat TYPE lvc_t_fcat ,&lt;/P&gt;&lt;P&gt;       ls_fcat TYPE lvc_s_fcat .&lt;/P&gt;&lt;P&gt;DATA : lt_table TYPE REF TO data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :  ZTABL1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DDIF_TABL_GET'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    NAME                = 'ZTABL1'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DD03P_TAB           = DD03P_TAB&lt;/P&gt;&lt;P&gt;    DD05M_TAB           = DD05M_TAB&lt;/P&gt;&lt;P&gt;    DD08V_TAB           = DD08V_TAB&lt;/P&gt;&lt;P&gt;    DD12V_TAB           = DD12V_TAB&lt;/P&gt;&lt;P&gt;    DD17V_TAB           = DD17V_TAB&lt;/P&gt;&lt;P&gt;    DD35V_TAB           = DD35V_TAB&lt;/P&gt;&lt;P&gt;    DD36M_TAB           = DD36M_TAB&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;   ILLEGAL_INPUT       = 1&lt;/P&gt;&lt;P&gt;    OTHERS              = 2&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT DD05M_TAB WHERE FIELDNAME NE 'MANDT'  .&lt;/P&gt;&lt;P&gt; DD05M_TAB-FIELDNAME = 'FIELD2' .&lt;/P&gt;&lt;P&gt; MODIFY DD05M_TAB .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT DD03P_TAB WHERE FIELDNAME NE 'MANDT'&lt;/P&gt;&lt;P&gt;                   .&lt;/P&gt;&lt;P&gt; DD03P_TAB-FIELDNAME = 'FIELD2' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MODIFY DD03P_TAB  .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT DD08V_TAB WHERE FIELDNAME NE 'MANDT' .&lt;/P&gt;&lt;P&gt; DD08V_TAB-FIELDNAME = 'FIELD2' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; APPEND DD08V_TAB .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT DD35V_TAB  WHERE FIELDNAME NE 'MANDT' .&lt;/P&gt;&lt;P&gt;  DD35V_TAB-FIELDNAME = 'FIELD2' .&lt;/P&gt;&lt;P&gt;  MODIFY DD35V_TAB .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT DD36M_TAB  WHERE FIELDNAME NE 'MANDT' .&lt;/P&gt;&lt;P&gt; DD36M_TAB-FIELDNAME = 'FIELD2' .&lt;/P&gt;&lt;P&gt; MODIFY DD36M_TAB .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DDIF_TABL_PUT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    NAME                    = 'ZTABL1'&lt;/P&gt;&lt;P&gt; TABLES&lt;/P&gt;&lt;P&gt;   DD03P_TAB               = DD03P_TAB&lt;/P&gt;&lt;P&gt;   DD05M_TAB               = DD05M_TAB&lt;/P&gt;&lt;P&gt;   DD08V_TAB               = DD08V_TAB&lt;/P&gt;&lt;P&gt;   DD35V_TAB               = DD35V_TAB&lt;/P&gt;&lt;P&gt;   DD36M_TAB               = DD36M_TAB&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   TABL_NOT_FOUND          = 1&lt;/P&gt;&lt;P&gt;   NAME_INCONSISTENT       = 2&lt;/P&gt;&lt;P&gt;   TABL_INCONSISTENT       = 3&lt;/P&gt;&lt;P&gt;   PUT_FAILURE             = 4&lt;/P&gt;&lt;P&gt;   PUT_REFUSED             = 5&lt;/P&gt;&lt;P&gt;   OTHERS                  = 6&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; COMMIT WORK AND WAIT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA  : lv_subrc like sy-subrc .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DDIF_TABL_ACTIVATE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      NAME              = 'ZTABL1'&lt;/P&gt;&lt;P&gt;      AUTH_CHK          = ' '&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     RC                = lv_subrc&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      NOT_FOUND         = 1&lt;/P&gt;&lt;P&gt;      PUT_FAILURE       = 2&lt;/P&gt;&lt;P&gt;      OTHERS            = 3&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt; COMMIT WORK AND WAIT .&lt;/P&gt;&lt;P&gt; clear : lt_fcat , lt_fcat[] .&lt;/P&gt;&lt;P&gt; LOOP AT DD03P_TAB .&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING DD03P_TAB TO ls_fcat .&lt;/P&gt;&lt;P&gt;  APPEND ls_fcat TO lt_fcat .&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt; PERFORM process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  process&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS : &amp;lt;table&amp;gt; TYPE table .&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS : &amp;lt;s_table&amp;gt; TYPE ANY .&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS : &amp;lt;f_1&amp;gt; TYPE ANY .&lt;/P&gt;&lt;P&gt;  DATA : ls_ZTABL1 type ZTABL1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;                          EXPORTING it_fieldcatalog = lt_fcat&lt;/P&gt;&lt;P&gt;                          IMPORTING ep_table = lt_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   ASSIGN lt_table-&amp;gt;* TO &amp;lt;table&amp;gt;.&lt;/P&gt;&lt;P&gt;   ASSIGN LOCAL COPY OF INITIAL LINE OF &amp;lt;table&amp;gt; TO &amp;lt;s_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT lt_fcat INTO ls_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   IF ls_fcat-fieldname = 'FIELD2' .&lt;/P&gt;&lt;P&gt;     ASSIGN COMPONENT ls_fcat-fieldname OF STRUCTURE &amp;lt;s_table&amp;gt; TO &amp;lt;f_1&amp;gt; .&lt;/P&gt;&lt;P&gt;     &amp;lt;f_1&amp;gt; = 'A' .&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING &amp;lt;s_table&amp;gt; TO ls_ZTABL1 .&lt;/P&gt;&lt;P&gt;  INSERT INTO ZTABL1 values ls_ZTABL1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " process&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 16:10:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ddic-structure-work-at-runtime-with-changes/m-p/3737598#M899542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T16:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic DDIC structure - work at runtime with changes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ddic-structure-work-at-runtime-with-changes/m-p/3737599#M899543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It may help you.I have done it to concatinate the values of PK of some table. And here i hat to change the str runtime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION ZKEY_CONCATINATE.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local Interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(IV_NAME) TYPE  DDOBJNAME&lt;/P&gt;&lt;P&gt;*"     REFERENCE(IT_BATCH) TYPE  ZCHARGTY OPTIONAL&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      ET_RETURN TYPE  BAPIRETTAB&lt;/P&gt;&lt;P&gt;*"      ET_KEY STRUCTURE  ZBROKEY&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: lt_DD03P_TAB TYPE TABLE OF DD03P.&lt;/P&gt;&lt;P&gt;  DATA: ls_return_msg LIKE LINE OF Et_return.&lt;/P&gt;&lt;P&gt;  DATA: dbtable TYPE REF TO data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF lty_column,&lt;/P&gt;&lt;P&gt;        FIELDNAME type FIELDNAME,&lt;/P&gt;&lt;P&gt;        END OF lty_column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: lt_column like TABLE OF lty_column.&lt;/P&gt;&lt;P&gt;  DATA: ls_column like LINE OF lt_column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: lv_column TYPE char50.&lt;/P&gt;&lt;P&gt;  DATA: lv_key TYPE char50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: ls_sysubrc TYPE sy-SUBRC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS: &amp;lt;fs_DD03P_TAB&amp;gt; like LINE OF lt_DD03P_TAB,&lt;/P&gt;&lt;P&gt;                 &amp;lt;fs_table&amp;gt; TYPE ANY TABLE,&lt;/P&gt;&lt;P&gt;                 &amp;lt;fs_str&amp;gt; TYPE any,&lt;/P&gt;&lt;P&gt;                 &amp;lt;val&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Get primary keys&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DDIF_TABL_GET'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      NAME          = IV_NAME&lt;/P&gt;&lt;P&gt;      STATE         = 'A'&lt;/P&gt;&lt;P&gt;      LANGU         = ' '&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      DD03P_TAB     = lt_DD03P_TAB&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      ILLEGAL_INPUT = 1&lt;/P&gt;&lt;P&gt;      OTHERS        = 2.&lt;/P&gt;&lt;P&gt;  ls_sysubrc = sy-SUBRC.&lt;/P&gt;&lt;P&gt;  case ls_sysubrc.&lt;/P&gt;&lt;P&gt;    when  0.&lt;/P&gt;&lt;P&gt;****Collection of primary keys in a structure&lt;/P&gt;&lt;P&gt;      LOOP at lt_DD03P_TAB ASSIGNING &amp;lt;fs_DD03P_TAB&amp;gt; WHERE KEYFLAG = 'X'.&lt;/P&gt;&lt;P&gt;        CONCATENATE:  '&amp;lt;fs_str&amp;gt;-'&amp;lt;fs_dd03p_tab&amp;gt;-fieldname INTO Ls_column-FIELDNAME.&lt;/P&gt;&lt;P&gt;        APPEND ls_column to lt_column.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      TRY.&lt;/P&gt;&lt;P&gt;          "Creation of BROKEY&lt;/P&gt;&lt;P&gt;          CREATE DATA dbtable TYPE TABLE OF (IV_NAME).&lt;/P&gt;&lt;P&gt;          ASSIGN dbtable-&amp;gt;* to &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          IF it_batch IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;            select * FROM (IV_NAME) INTO table &amp;lt;fs_table&amp;gt; FOR ALL ENTRIES IN it_batch WHERE charg = it_batch-batch.&lt;/P&gt;&lt;P&gt;          ELSE.&lt;/P&gt;&lt;P&gt;            select * FROM (IV_NAME) INTO table &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;          CLEAR lv_key.&lt;/P&gt;&lt;P&gt;          LOOP at &amp;lt;fs_table&amp;gt; ASSIGNING &amp;lt;fs_str&amp;gt;.&lt;/P&gt;&lt;P&gt;            LOOP AT lt_column INTO lv_column.&lt;/P&gt;&lt;P&gt;              ASSIGN (lv_column) to &amp;lt;val&amp;gt;.&lt;/P&gt;&lt;P&gt;              CONCATENATE: lv_key'&amp;amp;'&amp;lt;val&amp;gt; INTO lv_key.&lt;/P&gt;&lt;P&gt;            endloop.&lt;/P&gt;&lt;P&gt;            APPEND lv_key to et_key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            CLEAR lv_key.&lt;/P&gt;&lt;P&gt;          ENDLOOP.&lt;/P&gt;&lt;P&gt;        catch cx_root.&lt;/P&gt;&lt;P&gt;          "Error message when table does not exist&lt;/P&gt;&lt;P&gt;          ls_return_msg = text-002.&lt;/P&gt;&lt;P&gt;          APPEND ls_return_msg TO et_return.&lt;/P&gt;&lt;P&gt;      endtry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      "Error Messages&lt;/P&gt;&lt;P&gt;    when 1.&lt;/P&gt;&lt;P&gt;      ls_return_msg = text-001.&lt;/P&gt;&lt;P&gt;      APPEND ls_return_msg TO et_return.&lt;/P&gt;&lt;P&gt;    WHEN 2.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'BALW_BAPIRETURN_GET2'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          type   = sy-msgty&lt;/P&gt;&lt;P&gt;          cl     = sy-msgid&lt;/P&gt;&lt;P&gt;          number = sy-msgno&lt;/P&gt;&lt;P&gt;          par1   = sy-msgv1&lt;/P&gt;&lt;P&gt;          par2   = sy-msgv2&lt;/P&gt;&lt;P&gt;          par3   = sy-msgv3&lt;/P&gt;&lt;P&gt;          par4   = sy-msgv4&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          return = ls_return_msg.&lt;/P&gt;&lt;P&gt;      APPEND ls_return_msg TO et_return.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 02:46:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ddic-structure-work-at-runtime-with-changes/m-p/3737599#M899543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-25T02:46:42Z</dc:date>
    </item>
  </channel>
</rss>

