<?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: how to call a function with generic table parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-with-generic-table-parameter/m-p/1426948#M204572</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;The parameter is E_T_DATA not E_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 Jul 2006 05:11:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-01T05:11:50Z</dc:date>
    <item>
      <title>how to call a function with generic table parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-with-generic-table-parameter/m-p/1426945#M204569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to call function module RSAR_ODS_API_GET (from BW). It recive an internal table with request ids and should return in E_T_DATA "unstructured" data from the psa and in E_T_RSFIELDTXT the description of the data structure, I guess&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from sap help only thing I have reggarding how to use the function module is :&lt;/P&gt;&lt;P&gt;"You can call up the function module RSAR_ODS_API_GET with the list of request IDs given by the function module RSSM_API_REQUEST_GET. The function module RSAR_ODS_API_GET no longer recognizes InfoSources on the interface, rather it recognizes the request IDs instead. With the parameter I_T_SELECTIONS, you can restrict reading data records in the PSA table with reference to the fields of the transfer structure. In your program, the selections are filled and transferred to the parameter I_T_SELECTIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The import parameter causes the function module to output the data records in the parameter E_T_DATA. Data output is unstructured, since the function module RSAR_ODS_API_GET works generically, and therefore does not recognize the specific structure of the PSA. You can find information on the field in the PSA table using the parameter E_T_RSFIELDTXT."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately I when running de report bellow, I get a dump which says:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Function parameter "E_DATA" is unknown&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the definition of the interface E_DATA has no type, which  means it can recive any table type, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have two questions?&lt;/P&gt;&lt;P&gt;1) How to get the code working&lt;/P&gt;&lt;P&gt;2) How do I use the parameter E_T_RSFIELDTXT to parse the data returned in E_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by debuging RSSM_API_REQUEST_GET for this code I found it try to put an internal table with the struct of the database table /BIC/B0000151000 in E_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for any help&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my test report is:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;REPORT  ZTEST_PSA_API.&lt;/P&gt;&lt;P&gt;TABLES: /BIC/B0000151000 .&lt;/P&gt;&lt;P&gt;TYPE-POOLS: RSSM.&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF STC_REQ_LINE,&lt;/P&gt;&lt;P&gt;  sign(1),&lt;/P&gt;&lt;P&gt;         option(2),&lt;/P&gt;&lt;P&gt;         low  TYPE rsa_request,&lt;/P&gt;&lt;P&gt;         high TYPE rsa_request,&lt;/P&gt;&lt;P&gt;         END OF STC_REQ_LINE,&lt;/P&gt;&lt;P&gt;  IT_REQUEST TYPE STC_REQ_LINE OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lit_request TYPE RSSM_T_API_REQUEST_GET WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      lc_system TYPE RSSM_T_API_LOGSYS,&lt;/P&gt;&lt;P&gt;      lit_request1 TYPE IT_REQUEST WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lc_dtarget_name TYPE RSA_ODSNAME,&lt;/P&gt;&lt;P&gt;      lit_meta_data TYPE RSARC_T_RSFIELDTXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lt_psa_data LIKE /BIC/B0000151000 OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RSSM_API_REQUEST_GET'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    I_SOURCE    = '2LIS_13_VDITM'&lt;/P&gt;&lt;P&gt;    I_TYP       = 'D'&lt;/P&gt;&lt;P&gt;    I_DATEFROM  = '20060627'&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    E_T_REQUEST = lit_request[]&lt;/P&gt;&lt;P&gt;    E_T_LOGSYS  = lc_system&lt;/P&gt;&lt;P&gt;    EXCEPTIONS  = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE lit_request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lit_request1-sign = 'I'.&lt;/P&gt;&lt;P&gt;lit_request1-option = 'EQ'.&lt;/P&gt;&lt;P&gt;lit_request1-low = lit_request-request .&lt;/P&gt;&lt;P&gt;APPEND lit_request1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;break-point .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RSAR_ODS_API_GET'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    I_T_REQUEST = lit_request1[]&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    E_ODSNAME = lc_dtarget_name&lt;/P&gt;&lt;P&gt;    E_T_RSFIELDTXT = lit_meta_data&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    E_DATA = lt_psa_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    NO_DATA_FOUND = 1&lt;/P&gt;&lt;P&gt;    PARAMETER_FAILURE = 2&lt;/P&gt;&lt;P&gt;    REQUEST_NOT_AVAILABLE = 3&lt;/P&gt;&lt;P&gt;    NO_REQUEST_FOUND = 4&lt;/P&gt;&lt;P&gt;    NO_FIELDS_TO_ODS = 5&lt;/P&gt;&lt;P&gt;    NO_ODS_FOUND = 6&lt;/P&gt;&lt;P&gt;    PACKAGE_LOCKED_BY_LOADING = 7 .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 20:54:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-with-generic-table-parameter/m-p/1426945#M204569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-30T20:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to call a function with generic table parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-with-generic-table-parameter/m-p/1426946#M204570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to pass table parameter without "[]" :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'RSAR_ODS_API_GET'
EXPORTING
I_T_REQUEST = lit_request1
IMPORTING
E_ODSNAME = lc_dtarget_name
E_T_RSFIELDTXT = lit_meta_data
TABLES
E_DATA = lt_psa_data
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 20:57:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-with-generic-table-parameter/m-p/1426946#M204570</guid>
      <dc:creator>LucianoBentiveg</dc:creator>
      <dc:date>2006-06-30T20:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to call a function with generic table parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-with-generic-table-parameter/m-p/1426947#M204571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the advice Peluka, but I think the function parametr should have de brackets because of the header line, anyway It doesn't work either as you suggested&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Jul 2006 01:05:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-with-generic-table-parameter/m-p/1426947#M204571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-01T01:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to call a function with generic table parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-with-generic-table-parameter/m-p/1426948#M204572</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;The parameter is E_T_DATA not E_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Jul 2006 05:11:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-with-generic-table-parameter/m-p/1426948#M204572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-01T05:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to call a function with generic table parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-with-generic-table-parameter/m-p/1426949#M204573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bianchi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It' was very kind of yout to make me see this silly mistake (I rewarded 10 points)&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>Mon, 03 Jul 2006 15:57:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-function-with-generic-table-parameter/m-p/1426949#M204573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-03T15:57:17Z</dc:date>
    </item>
  </channel>
</rss>

