<?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: SE24 help needed in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788729#M650413</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Grame&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use the itab as &amp;lt;b&amp;gt;public &amp;lt;/b&amp;gt;attribute or as parameter in public methods then you must use a table type that is defined either in the DDIC or within a type-pool.&lt;/P&gt;&lt;P&gt;However, if the itab is a &amp;lt;b&amp;gt;private &amp;lt;/b&amp;gt;attribute (yet still global within the class!) then you can define your own table type in the &amp;lt;i&amp;gt;local definitions&amp;lt;/i&amp;gt; sections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Sep 2007 19:47:41 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2007-09-05T19:47:41Z</dc:date>
    <item>
      <title>SE24 help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788727#M650411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know how to declare an internal table which will be global for the class step by step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use this internal table and modify the values inside this at runtime using the methods. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me how to proceed further&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points for all helpful answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Grame Smith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 17:16:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788727#M650411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T17:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: SE24 help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788728#M650412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just create a table type in the Data Dictionary (SE11), then create an attribute of TYPE &amp;lt;createdtabletype&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 19:38:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788728#M650412</guid>
      <dc:creator>alejandro_bindi</dc:creator>
      <dc:date>2007-09-05T19:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: SE24 help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788729#M650413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Grame&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use the itab as &amp;lt;b&amp;gt;public &amp;lt;/b&amp;gt;attribute or as parameter in public methods then you must use a table type that is defined either in the DDIC or within a type-pool.&lt;/P&gt;&lt;P&gt;However, if the itab is a &amp;lt;b&amp;gt;private &amp;lt;/b&amp;gt;attribute (yet still global within the class!) then you can define your own table type in the &amp;lt;i&amp;gt;local definitions&amp;lt;/i&amp;gt; sections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 19:47:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788729#M650413</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-09-05T19:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: SE24 help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788730#M650414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please guide me how to create the type-pool, I have already created a type-pool for this purpose.. t_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I declare the internal table as an attribute SAG_DATA saying 'type table of t_data' I dont get any error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even I am able to use the internal table in methods... using exporting and importing options.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No errors during activation too but finally when I execute this class it says syntax errors during generation... when i get in to see the errors i see the errors like not able to convert types..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me on this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2007 02:41:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788730#M650414</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-06T02:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: SE24 help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788731#M650415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Grame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see HELP link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3138358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3138358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS &amp;lt;pool&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement allows you to use all the data types and constants defined in the type group &amp;lt;pool&amp;gt; in your program. You can use several type groups in the same program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let the type group HKTST be created as follows in the ABAP Dictionary:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOL hktst.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF hktst_typ1,&lt;/P&gt;&lt;P&gt;                col1(10) TYPE c,&lt;/P&gt;&lt;P&gt;                col2 TYPE i,&lt;/P&gt;&lt;P&gt;       END OF hktst_typ1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES hktst_typ2 TYPE p DECIMALS 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS hktst_eleven TYPE i VALUE 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This type group defines two data types HKTST_TYP1 and HKTST_TYP2, as well as a constant HKTST_ELEVEN with the value 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ABAP program can use this definition with the TYPE-POOLS statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS hktst.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: dat1 TYPE hktst_typ1,&lt;/P&gt;&lt;P&gt;      dat2 TYPE hktst_typ2 VALUE '1.23'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: dat2, / hktst_eleven.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1,23&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data types defined in the type group are used to declare data objects with the DATA statement and the value of the constant is, as the output shows, known in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; +++++++&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also read previous posting&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="137062"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aby&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2007 04:07:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788731#M650415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-06T04:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: SE24 help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788732#M650416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it's an INTERNAL table which doesn't imply persistence (i.e the data being stored / worked on isn't permanent) then a MUCH MUCH better idea is to use a Dynamic table even if you aren't going to use a GRID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example in your application program code something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : VAPMA.&lt;/P&gt;&lt;P&gt;TYPES:  BEGIN OF s_elements,&lt;/P&gt;&lt;P&gt;  vbeln   TYPE vapma-vbeln,&lt;/P&gt;&lt;P&gt;  posnr   TYPE vapma-posnr,&lt;/P&gt;&lt;P&gt;  matnr   TYPE vapma-matnr,&lt;/P&gt;&lt;P&gt;  kunnr   TYPE vapma-kunnr,&lt;/P&gt;&lt;P&gt;  werks   TYPE vapma-werks,&lt;/P&gt;&lt;P&gt;  vkorg   TYPE vapma-vkorg,&lt;/P&gt;&lt;P&gt;  vkbur   TYPE vapma-vkbur,&lt;/P&gt;&lt;P&gt;  status(5)  TYPE c,&lt;/P&gt;&lt;P&gt;END OF  s_elements.&lt;/P&gt;&lt;P&gt;DATA:         my_line     TYPE s_elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT z_object EXPORTING z_object = z_object.&lt;/P&gt;&lt;P&gt;CALL METHOD z_object-&amp;gt;build_dynamic_structures&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       my_line = my_line&lt;/P&gt;&lt;P&gt;       calling_program = sy-repid&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;       dy_table = dy_table&lt;/P&gt;&lt;P&gt;     CHANGING&lt;/P&gt;&lt;P&gt;       it_fldcat = it_fldcat.&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;/P&gt;&lt;P&gt;in your class definition have these methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD build_dynamic_structures.&lt;/P&gt;&lt;P&gt;    caller = calling_program.&lt;/P&gt;&lt;P&gt;    CALL METHOD me-&amp;gt;return_structure&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        my_line = my_line.&lt;/P&gt;&lt;P&gt;    CALL METHOD me-&amp;gt;create_dynamic_fcat&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        it_fldcat = it_fldcat.&lt;/P&gt;&lt;P&gt;    CALL METHOD me-&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        it_fldcat = it_fldcat&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        dy_table  = dy_table.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "build_dynamic_structures&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; METHOD return_structure.&lt;/P&gt;&lt;P&gt;    lr_rtti_struc ?= cl_abap_structdescr=&amp;gt;DESCRIBE_BY_DATA( my_line ).&lt;/P&gt;&lt;P&gt;    zogt[]  = lr_rtti_struc-&amp;gt;components.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "return_structure&lt;/P&gt;&lt;P&gt;  METHOD create_dynamic_fcat.&lt;/P&gt;&lt;P&gt;    LOOP AT zogt INTO zog.&lt;/P&gt;&lt;P&gt;      CLEAR wa_it_fldcat.&lt;/P&gt;&lt;P&gt;      wa_it_fldcat-fieldname = zog-name .&lt;/P&gt;&lt;P&gt;      wa_it_fldcat-dataTYPE = zog-TYPE_kind.&lt;/P&gt;&lt;P&gt;      wa_it_fldcat-intTYPE = zog-TYPE_kind.&lt;/P&gt;&lt;P&gt;      wa_it_fldcat-intlen = zog-length.&lt;/P&gt;&lt;P&gt;      wa_it_fldcat-decimals = zog-decimals.&lt;/P&gt;&lt;P&gt;      wa_it_fldcat-coltext = zog-name.&lt;/P&gt;&lt;P&gt;      wa_it_fldcat-lowercase = 'X'.&lt;/P&gt;&lt;P&gt;       case sy-tabix.&lt;/P&gt;&lt;P&gt;        When 2.     "edit fields if using a grid --not necessary for standard pgm&lt;/P&gt;&lt;P&gt;           wa_it_fldcat-edit = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        When 4.&lt;/P&gt;&lt;P&gt;           wa_it_fldcat-edit = 'X'.&lt;/P&gt;&lt;P&gt;        when 6.&lt;/P&gt;&lt;P&gt;           wa_it_fldcat-edit = 'X'.&lt;/P&gt;&lt;P&gt;        when others.&lt;/P&gt;&lt;P&gt;           wa_it_fldcat-edit = ' '.&lt;/P&gt;&lt;P&gt;     endcase.&lt;/P&gt;&lt;P&gt;      APPEND wa_it_fldcat TO it_fldcat .&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "create_dynamic_fcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD create_dynamic_table.&lt;/P&gt;&lt;P&gt;    CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        it_fieldcatalog = it_fldcat&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        ep_table        = dy_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now fill you dynamic table with data &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM populate_dynamic_itab.&lt;/P&gt;&lt;P&gt;ASSIGN dy_table-&amp;gt;* TO &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt; CREATE DATA dy_line LIKE LINE OF &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt; ASSIGN dy_line-&amp;gt;* TO &amp;lt;dyn_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT vbeln posnr matnr kunnr werks vkorg vkbur&lt;/P&gt;&lt;P&gt;       UP TO 200 rows&lt;/P&gt;&lt;P&gt;       FROM vapma&lt;/P&gt;&lt;P&gt;       INTO  CORRESPONDING FIELDS OF TABLE &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your data definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;dyn_table&amp;gt;    TYPE STANDARD TABLE,&lt;/P&gt;&lt;P&gt;   &amp;lt;orig_table&amp;gt;   TYPE STANDARD TABLE,&lt;/P&gt;&lt;P&gt;   &amp;lt;dyn_wa&amp;gt;      TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this will be available both to the class / methods in the class AND your application program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember in OO you can't have tables with header lines anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the dynamic table approch works best for "non persistent" data and can be used with ANY structure whether in the ddic or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;If you want to do it by the the standard method&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then proceed as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your class in the PUBLIC section (SE24) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code something like this for your internal table structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types:&lt;/P&gt;&lt;P&gt;    begin of s_matord,&lt;/P&gt;&lt;P&gt;     matnr    type vbap-matnr,&lt;/P&gt;&lt;P&gt;     arktx    type vbap-arktx,&lt;/P&gt;&lt;P&gt;     kunnr    type vapma-kunnr,&lt;/P&gt;&lt;P&gt;     vbeln    type vapma-vbeln,&lt;/P&gt;&lt;P&gt;     posnr    type vapma-posnr,&lt;/P&gt;&lt;P&gt;     audat    type vapma-audat,&lt;/P&gt;&lt;P&gt;     auart    type vapma-auart,&lt;/P&gt;&lt;P&gt;     kwmeng   type vbap-kwmeng,&lt;/P&gt;&lt;P&gt;     vrkme    type vbap-vrkme,&lt;/P&gt;&lt;P&gt;     netwr    type vbap-netwr,&lt;/P&gt;&lt;P&gt;    end of s_matord .&lt;/P&gt;&lt;P&gt;types:&lt;/P&gt;&lt;P&gt;    zmatord type standard table of s_matord .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in a method where we want to use this table&lt;/P&gt;&lt;P&gt;(method in the class is get_orders_for_material)&lt;/P&gt;&lt;P&gt;set the parameters as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material (import) type vapma-matnr&lt;/P&gt;&lt;P&gt;MATORD  (export)  type zmatord.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now in your application program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code&lt;/P&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;begin of s_matord,&lt;/P&gt;&lt;P&gt;     matnr    type vbap-matnr,&lt;/P&gt;&lt;P&gt;     arktx    type vbap-arktx,&lt;/P&gt;&lt;P&gt;     kunnr    type vapma-kunnr,&lt;/P&gt;&lt;P&gt;     vbeln    type vapma-vbeln,&lt;/P&gt;&lt;P&gt;     posnr    type vapma-posnr,&lt;/P&gt;&lt;P&gt;     audat    type vapma-audat,&lt;/P&gt;&lt;P&gt;     auart    type vapma-auart,&lt;/P&gt;&lt;P&gt;     kwmeng   type vbap-kwmeng,&lt;/P&gt;&lt;P&gt;     vrkme    type vbap-vrkme,&lt;/P&gt;&lt;P&gt;     netwr    type vbap-netwr,&lt;/P&gt;&lt;P&gt;    end of s_matord .&lt;/P&gt;&lt;P&gt;DATA: matord type table of s_matord,&lt;/P&gt;&lt;P&gt;      obj type ref to zcl_sales_order. "Your class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Instantiate our Sales order from parameter&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create object obj exporting vbeln = p_vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now when you call your method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;call method obj-&amp;gt;get_orders_for_material&lt;/P&gt;&lt;P&gt;       exporting material = p_matnr&lt;/P&gt;&lt;P&gt;       importing matord = matord.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your data will be in matord. It doesn't have a header line but you can use a field symbol or xxxx[] = yyyy[] type of construct to read the table line by line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the METHOD defined in the class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;method GET_ORDERS_FOR_MATERIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_matord type standard table of s_matord,&lt;/P&gt;&lt;P&gt;      l_matord type s_matord.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;matnr a&lt;/SUB&gt;auart a&lt;SUB&gt;vbeln a&lt;/SUB&gt;posnr a&lt;SUB&gt;audat a&lt;/SUB&gt;kunnr&lt;/P&gt;&lt;P&gt;       b&lt;SUB&gt;arktx b&lt;/SUB&gt;kwmeng b&lt;SUB&gt;vrkme b&lt;/SUB&gt;netwr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       into corresponding fields of table t_matord&lt;/P&gt;&lt;P&gt;       from ( vapma as a&lt;/P&gt;&lt;P&gt;              inner join vbap as b&lt;/P&gt;&lt;P&gt;              on a&lt;SUB&gt;vbeln eq b&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;              and a&lt;SUB&gt;posnr eq b&lt;/SUB&gt;posnr )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       where a~matnr eq material.&lt;/P&gt;&lt;P&gt;       matord[] = t_matord[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works in reverse as well --the method can READ your table that you pass to it - you need to set of course correct export / import / changing parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the method use the xxxx[] = yyyyy[] construct to get the data into a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't make this stuff more complicated than you need. I often read posts in the OO forum where people seem to make a great problem out of what should be a fairly simple solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using this approach you don't have to worry about DDIC fields or type pools either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I prefer the Dynamic table approach myself as it's totally more general but the "Classical" way still works as shown above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jimbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2007 09:22:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788732#M650416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-06T09:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: SE24 help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788733#M650417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a good solution to my problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Either goto SE24 and create table types and declare them for your internal table type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Declare local structures in your table... then create a type table for it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: t_data type table of ts_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the attributes give the type as t_data or Se12 created table type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2007 16:52:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/se24-help-needed/m-p/2788733#M650417</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-07T16:52:29Z</dc:date>
    </item>
  </channel>
</rss>

