<?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: function module parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504156#M1654289</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;Check this thread:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="11001024"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use FM FUNCTION_IMPORT_INTERFACE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2012 17:56:27 GMT</pubDate>
    <dc:creator>RicardoRomero_1</dc:creator>
    <dc:date>2012-01-18T17:56:27Z</dc:date>
    <item>
      <title>function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504154#M1654287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I want to extract the parameters for a given function module. I found this FM RPY_FUNCTIONMODULE_READ_NEW is useful for that. But I want the parameter attributes in more detail, like whether the parameter is table or structure or variable. If structure, its components, component's dictionary type, etc. I want to know, is there any other function modules or methods, that return the parameters of FM in detail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 12:19:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504154#M1654287</guid>
      <dc:creator>former_member184611</dc:creator>
      <dc:date>2012-01-18T12:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504155#M1654288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if the type has a '-' in it that means its for a structure or a table else its a data element.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now if '-' is there then pass the first part of it to dd02L. and pick the table category&lt;/P&gt;&lt;P&gt;TRANSP	Transparent table&lt;/P&gt;&lt;P&gt;INTTAB	Structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please search a bit, we posted 3 threads for the same requirement today&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 12:29:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504155#M1654288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-18T12:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504156#M1654289</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;Check this thread:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="11001024"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use FM FUNCTION_IMPORT_INTERFACE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 17:56:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504156#M1654289</guid>
      <dc:creator>RicardoRomero_1</dc:creator>
      <dc:date>2012-01-18T17:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504157#M1654290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ricardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that link was really useful.. i found RFC_GET_FUNCTION_INTERFACE_US very useful. Still have some problems. The changing, exporting parameters may contain, structures, tables, variables. Need to differentiate between that .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 09:17:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504157#M1654290</guid>
      <dc:creator>former_member184611</dc:creator>
      <dc:date>2012-01-19T09:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504158#M1654291</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;You can find the type in table TADIR, searching by field OBJ_NAME. Here you have the field OBJECT that indicates the object type. Or as said Soumyaprakash in table DD02L.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's a table or a structure you can find all its components in table DD03L.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 09:35:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504158#M1654291</guid>
      <dc:creator>RicardoRomero_1</dc:creator>
      <dc:date>2012-01-19T09:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504159#M1654292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The changing, exporting parameters may contain, structures, tables, variables. Need to differentiate between that .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;aby, &lt;/P&gt;&lt;P&gt;that was the sole suppose of me telling you about DD02L&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 09:45:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504159#M1654292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-19T09:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504160#M1654293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have to use the FM 'RFC_GET_STRUCTURE_DEFINITION' in conjunction with the FM RFC_GET_FUNCTION_INTERFACE_US to get the desired details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 09:46:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504160#M1654293</guid>
      <dc:creator>rajesh_kumar2</dc:creator>
      <dc:date>2012-01-19T09:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504161#M1654294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ricardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finding all the components and their technical details, that I have already done using the help of RTTS classes. But the issue is, since the FM return only the structure type, i am not able to find dynamically whether its a structure or internal table. In my requirement the output table should mention whether its a structure or internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 09:51:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504161#M1654294</guid>
      <dc:creator>former_member184611</dc:creator>
      <dc:date>2012-01-19T09:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504162#M1654295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the out of RFC_GET_FUNCTION_INTERFACE_US is like this&lt;/P&gt;&lt;P&gt;PARAMCLASS                     I ==&amp;gt; i means import, E is export, T is table.. &lt;/P&gt;&lt;P&gt;PARAMETER                      WAIT&lt;/P&gt;&lt;P&gt;TABNAME                        BAPITA&lt;/P&gt;&lt;P&gt;FIELDNAME                      WAIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so a combination of paramclass and tabname can help you determine if its a table or a structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I or E and a tabname is not a 'table type' then its a structure&lt;/P&gt;&lt;P&gt;if I or E and a tabname is a 'table type' then its a table&lt;/P&gt;&lt;P&gt;if T then its a table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 10:02:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504162#M1654295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-19T10:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504163#M1654296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi soumyaprakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example, if the iput is BAPI_PO_CREATE...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In input parameter it has a structure po_header type BAPIEKKOC&lt;/P&gt;&lt;P&gt;and in Tables  po_item type BAPIEKPOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like that in changing and exporting parameter there could be tables and structures. Then how would i find whether that is a internal table or structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 10:05:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504163#M1654296</guid>
      <dc:creator>former_member184611</dc:creator>
      <dc:date>2012-01-19T10:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504164#M1654297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will give  you an example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;P PARAMETER                      TABNAME
I PO_HEADER                      BAPIEKKOC     ==&amp;gt; PO_HEADER will be a structure as BAPIEKKOC  is not in DD40L(so its not a table type)
E PURCHASEORDER                  BAPIEKKOC  ==&amp;gt; same as above
T PO_ITEMS                       BAPIEKPOC        ==&amp;gt;po_item is a internal table 
T RETURN                         BAPIRETURN        ==&amp;gt; return is a internal table  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 10:20:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504164#M1654297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-19T10:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: function module parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504165#M1654298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Soumyaprakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your great help. Your method is ok. In my case, I have to loop the  changing and export parameter table. So if I use your method I have to write the SELECT statements inside the loop, which I feel not as an optimized way. Instead, I have tried another way using the help of RTTI Classes and found helpful. Below am adding the sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lo_tabledescr TYPE REF TO cl_abap_tabledescr,
      lo_structdescr TYPE REF TO cl_abap_structdescr,
      lo_elemdescr TYPE REF TO cl_abap_elemdescr,
      lv_linetypename  TYPE string,
      t_tabdescr      TYPE abap_compdescr_tab.


CALL FUNCTION 'RPY_FUNCTIONMODULE_READ_NEW'
  EXPORTING
    functionname       = 'BAPI_PO_CREATE'
  TABLES
    import_parameter   = t_imp_para
    changing_parameter = t_cha_para
    export_parameter   = t_exp_para
    tables_parameter   = t_tab_para
    exception_list     = t_exc_list
    documentation      = t_docu
    SOURCE             = t_source.


LOOP AT t_cha_para INTO x_cha_para.

  TRY.
**If this try is success then it is a table type. If its fails it goes to next TRY for Structure type.

**Note: To create a table in Changing Parameter, the type should be a dictionary table type.

      lo_tabledescr   ?= cl_abap_typedescr=&amp;gt;describe_by_name( x_cha_para-dbfield ).
      lo_structdescr  ?= lo_tabledescr-&amp;gt;get_table_line_type( ).
      lv_linetypename = lo_structdescr-&amp;gt;get_relative_name( ).
      lo_structdescr ?= cl_abap_typedescr=&amp;gt;describe_by_name( lv_linetypename ).
       t_tabdescr[]  =  lo_structdescr-&amp;gt;components[].


    CATCH cx_root.

      TRY.
**If this try is success then it is a structure type.

          lo_structdescr ?= cl_abap_typedescr=&amp;gt;describe_by_data( x_cha_para-dbfield ).
           t_tabdescr[] = lo_structdescr-&amp;gt;components[].

        CATCH cx_root.
**If both the above TRY throws exception, it means its a variable.

          lo_elemdescr ?= cl_abap_typedescr=&amp;gt;describe_by_name( x_cha_para-dbfield ).

      ENDTRY.

  ENDTRY.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There may be other solution for this requirement. Since my issue is solved, am closing this thread. Thanks all for your great support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 10:08:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-parameter/m-p/8504165#M1654298</guid>
      <dc:creator>former_member184611</dc:creator>
      <dc:date>2012-01-30T10:08:13Z</dc:date>
    </item>
  </channel>
</rss>

