<?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: RFC_READ_DATA OPTIONS problems in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-read-data-options-problems/m-p/5984141#M1341370</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 changed a little bit the report&lt;/P&gt;&lt;P&gt;this change solves the issue with the OPTIONS.&lt;/P&gt;&lt;P&gt;i search for data within the limits of the table GT.&lt;/P&gt;&lt;P&gt;but now there is the issue with the large amount of data that needs to be imported.&lt;/P&gt;&lt;P&gt; it imports all the lines that are between these limits and the amount of data is very large.&lt;/P&gt;&lt;P&gt;is there any other way to use these function's OPTION in order to retreive the smallest amount of data posible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;READ TABLE gt  INTO ls  INDEX 1.
      gt_rfc_opt-text = 'VBELN GE '''.
      CONCATENATE gt_rfc_opt-text ls-vbeln '''' INTO gt_rfc_opt-text.
      APPEND gt_rfc_opt.

     READ TABLE gt  INTO ls  INDEX lin.
      gt_rfc_opt-text = ' AND VBELN LE '''.
      CONCATENATE gt_rfc_opt-text  ls-vbeln'''' INTO gt_rfc_opt-text.
      APPEND gt_rfc_opt.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Emilia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Aug 2009 13:35:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-21T13:35:02Z</dc:date>
    <item>
      <title>RFC_READ_DATA OPTIONS problems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-read-data-options-problems/m-p/5984140#M1341369</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 am using the FM RFC_READ_DATA to remotely access data from another system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with OPTIONS.  What are its limits? How many entries can it have?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Emilia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.:&lt;/P&gt;&lt;P&gt;I need the data from table VBUK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to do an equivalent of the FOR ALL ENTRIES OF TABLE gt where vbeln = gt-vbeln.&lt;/P&gt;&lt;P&gt;So I loop the table gt and add each info line to the OPTIONS table (gt_rfc_opt)&lt;/P&gt;&lt;P&gt;It works just fine with a limited number of lines in gt.&lt;/P&gt;&lt;P&gt;But for much larger number the FM simply won't work.&lt;/P&gt;&lt;P&gt; It returns the exception OTHERS = 7.&lt;/P&gt;&lt;P&gt; I know that this is a problem with the OPTIONS since I have tried in both small number of entries and large.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything else I could use to get a better runtime?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*get vbuk table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLEAR: lin, count.
      DESCRIBE TABLE gt LINES lin.
     REFRESH: gt_rfc_opt, gt_rfc_fld, gt_data.

     CLEAR:gt_rfc_opt, gt_rfc_fld, gt_data.

************************************************


      READ TABLE gt  INTO ls  INDEX 1.

      gt_rfc_opt-text = 'VBELN = '''.

      CONCATENATE gt_rfc_opt-text ls-vbeln '''' INTO gt_rfc_opt-text.
      APPEND gt_rfc_opt.

      LOOP AT gt  INTO ls.

        IF count EQ 0.
          ADD 1 TO count.  
        ELSE..
          gt_rfc_opt-text = '  OR  VBELN = '''.

          CONCATENATE gt_rfc_opt-text ls-vbeln  '''' INTO gt_rfc_opt-text.
          APPEND gt_rfc_opt.

        ENDIF.
      ENDLOOP.

*******************************************************
      gt_rfc_fld-fieldname = 'VBELN'.
      APPEND gt_rfc_fld.
      gt_rfc_fld-fieldname = 'GBSTK'.
      APPEND gt_rfc_fld.


  CALL FUNCTION 'RFC_READ_TABLE'
    DESTINATION gc_rfcdest
    EXPORTING
      query_table          = VBUK
      delimiter                = ';'
    TABLES
      OPTIONS              = gt_rfc_opt
      fields                    = gt_rfc_fld
      data                     = gt_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.

else.
        LOOP AT gt_data INTO gs_data.
          CONDENSE gs_data.
          SPLIT gs_data AT ';' INTO ls2-vbeln ls2-gbstk gs_data.
          APPEND ls2 TO gt2.
        ENDLOOP.
 ENDIF&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 12:08:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-read-data-options-problems/m-p/5984140#M1341369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T12:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: RFC_READ_DATA OPTIONS problems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-read-data-options-problems/m-p/5984141#M1341370</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 changed a little bit the report&lt;/P&gt;&lt;P&gt;this change solves the issue with the OPTIONS.&lt;/P&gt;&lt;P&gt;i search for data within the limits of the table GT.&lt;/P&gt;&lt;P&gt;but now there is the issue with the large amount of data that needs to be imported.&lt;/P&gt;&lt;P&gt; it imports all the lines that are between these limits and the amount of data is very large.&lt;/P&gt;&lt;P&gt;is there any other way to use these function's OPTION in order to retreive the smallest amount of data posible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;READ TABLE gt  INTO ls  INDEX 1.
      gt_rfc_opt-text = 'VBELN GE '''.
      CONCATENATE gt_rfc_opt-text ls-vbeln '''' INTO gt_rfc_opt-text.
      APPEND gt_rfc_opt.

     READ TABLE gt  INTO ls  INDEX lin.
      gt_rfc_opt-text = ' AND VBELN LE '''.
      CONCATENATE gt_rfc_opt-text  ls-vbeln'''' INTO gt_rfc_opt-text.
      APPEND gt_rfc_opt.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Emilia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 13:35:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rfc-read-data-options-problems/m-p/5984141#M1341370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T13:35:02Z</dc:date>
    </item>
  </channel>
</rss>

