<?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: Custom RFC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-rfc/m-p/4102891#M981144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as you fill the options in your external system, you can calculate the two dates there - format has to be YYYYMMDD. Can't see any problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;HP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jun 2008 07:47:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-27T07:47:40Z</dc:date>
    <item>
      <title>Custom RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-rfc/m-p/4102888#M981141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not a ABAP developer but working on MS SQL 2005 BI side but  I need something like this from ECC 6.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will request if anyone can guide me building a custom RFC with simple select statment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from Table_Name &lt;/P&gt;&lt;P&gt;where Field_Name between @StartDateofLastMonth and @EndDateofLastMonth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The aforesaid select statment will get the calculated startdate and enddate from sap system date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where as i have to give @Table_Name and @Field_Name from my end as variable... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more favor where i can get sample RFC for the aforesaid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 16:18:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-rfc/m-p/4102888#M981141</guid>
      <dc:creator>former_member290321</dc:creator>
      <dc:date>2008-06-26T16:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Custom RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-rfc/m-p/4102889#M981142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it is really that simle you may use function module RFC_READ_TABLE. Reads any table of the system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the documentation is available in German only. But the interface explains it sufficiently:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*"  IMPORTING
*"     VALUE(QUERY_TABLE) "table name
*"     VALUE(DELIMITER)   "delimeter for output - default is space
*"     VALUE(NO_DATA)     "retrieve field list only
*"     VALUE(ROWSKIPS)    "skips some rows - no ned to use so far
*"     VALUE(ROWCOUNT)    "max. no of selected rows
*"  TABLES
*"      OPTIONS           "WHERE CLAUSE (ABAP OPEN SQL )
*"      FIELDS            "First 30 characters for desired output fields 
*"      DATA              "selected data sepearated by DELIMETER&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;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM data_select  USING    pp_matnr TYPE matnr.
    CONSTANTS c_delim LIKE  sonv-flag VALUE '|'.
    DATA: lt_options TYPE STANDARD TABLE OF rfc_db_opt WITH HEADER LINE,
         lt_data  TYPE STANDARD TABLE OF tab512 WITH HEADER LINE.

    DATA: lt_split TYPE STANDARD TABLE OF
                                       catpaval WITH HEADER LINE.
    FIELD-SYMBOLS &amp;lt;l_value&amp;gt;.
    REFRESH: lt_options, lt_data.

    CONCATENATE '''' pp_matnr '''' INTO lt_options.
    CONCATENATE 'MATNR EQ' lt_options INTO lt_options
            SEPARATED BY space.
    APPEND lt_options.
    CONCATENATE '''' p_valdat '''' INTO lt_options.
    CONCATENATE 'AND VALTO GE ' lt_options INTO lt_options
            SEPARATED BY space.
    APPEND lt_options.

    APPEND LINES OF gt_options TO lt_options. "filled elsewhere
    

    REFRESH lt_data.
    CALL FUNCTION 'RFC_READ_TABLE'
      DESTINATION gv_dest          "RQ 2429143 &amp;lt;ins&amp;gt;
*      DESTINATION p_logsys        "RQ 2429143 &amp;lt;del&amp;gt;
      EXPORTING
        query_table                = 'DGTMD'
   delimiter                  = c_delim
*   NO_DATA                    = ' '
*   ROWSKIPS                   = 0
*   ROWCOUNT                   = 0
      TABLES
        options                    = lt_options
        fields                     = gt_fields
        data                       = lt_data
    EXCEPTIONS
      table_not_available        = 1
      table_without_data         = 2
      option_not_valid           = 3
      field_not_valid            = 4
      not_authorized             = 5
      data_buffer_exceeded       = 6
      OTHERS                     = 7
                 .
    IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    .....
    ......
  ENDFORM.                    " data_select&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Have fun,&lt;/P&gt;&lt;P&gt;Holger&lt;/P&gt;&lt;P&gt;HP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Holger Pakirnus on Jun 26, 2008 6:57 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 16:51:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-rfc/m-p/4102889#M981142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T16:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Custom RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-rfc/m-p/4102890#M981143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem with RFC_READ_TABLE is that i can't use variable in @OPTIONS from MS SQL server side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I can't auto my package to import data on monthly basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't use this in filter in@OPTIONS &lt;/P&gt;&lt;P&gt;i.e. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@OPTIONS = 'where ce1lsc0.budat between @startdateoflastmonth and @lastdateoflastmonth '&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 17:01:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-rfc/m-p/4102890#M981143</guid>
      <dc:creator>former_member290321</dc:creator>
      <dc:date>2008-06-26T17:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Custom RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-rfc/m-p/4102891#M981144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as you fill the options in your external system, you can calculate the two dates there - format has to be YYYYMMDD. Can't see any problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;HP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2008 07:47:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-rfc/m-p/4102891#M981144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-27T07:47:40Z</dc:date>
    </item>
  </channel>
</rss>

