<?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: Problem while working with function module RFC_READ_TABLE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-working-with-function-module-rfc-read-table/m-p/4427497#M1051180</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jyothy and Vijay, thank you for taking your valuable time to correct my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Murthy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Sep 2008 04:49:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-19T04:49:58Z</dc:date>
    <item>
      <title>Problem while working with function module RFC_READ_TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-working-with-function-module-rfc-read-table/m-p/4427494#M1051177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;                 I am facing a problem while working on the FM RFC_READ_TABLE, in which there is a tables parameter &lt;STRONG&gt;options&lt;/STRONG&gt; which is of table type, to which I am passing the condition of selection.  In the debugg mode I found the select quiry in the source code of function module is not executing the condition passed in the options parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My actual requirement is to fetch all the custom programs in a remote server, the code I have written is below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES :&lt;/P&gt;&lt;P&gt;         BEGIN OF ty_tadir,&lt;/P&gt;&lt;P&gt;           pgmid  TYPE pgmid,&lt;/P&gt;&lt;P&gt;           object TYPE  trobjtype,&lt;/P&gt;&lt;P&gt;           obj_name  TYPE  sobj_name,&lt;/P&gt;&lt;P&gt;         END OF ty_tadir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : it_tadir TYPE STANDARD TABLE OF ty_tadir,&lt;/P&gt;&lt;P&gt;        wa_tadir TYPE ty_tadir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: stmp_dokhl  like TAB512       occurs 100000 with header line.&lt;/P&gt;&lt;P&gt;  data: options1    like rfc_db_opt occurs     10 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_options1 like line of options1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: nametab1    like rfc_db_fld  occurs     10 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : W_VALUE(5)  TYPE C,&lt;/P&gt;&lt;P&gt;       W_VALUE1(20) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;W_VALUE1 =  'OBJ_NAME like'.&lt;/P&gt;&lt;P&gt;W_VALUE = 'z*'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'OBJ_NAME LIKE' ' ''' W_VALUE '''' INTO OPTIONS1-TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE W_VALUE1 W_VALUE INTO wa_OPTIONS1-TEXT SEPARATED BY SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND wa_OPTIONS1 to OPTIONS1.&lt;/P&gt;&lt;P&gt;CLEAR wa_OPTIONS1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call function 'RFC_READ_TABLE'&lt;/P&gt;&lt;P&gt;         destination                'zard'&lt;/P&gt;&lt;P&gt;         exporting&lt;/P&gt;&lt;P&gt;              query_table          = 'TADIR' "'ZBANK_GUARANTEE'&lt;/P&gt;&lt;P&gt;         tables&lt;/P&gt;&lt;P&gt;              options              = options1&lt;/P&gt;&lt;P&gt;              fields               = nametab1&lt;/P&gt;&lt;P&gt;              data                 = stmp_dokhl&lt;/P&gt;&lt;P&gt;         exceptions&lt;/P&gt;&lt;P&gt;              table_not_available  = 1&lt;/P&gt;&lt;P&gt;              table_without_data   = 2&lt;/P&gt;&lt;P&gt;              option_not_valid     = 3&lt;/P&gt;&lt;P&gt;              field_not_valid      = 4&lt;/P&gt;&lt;P&gt;              not_authorized       = 5&lt;/P&gt;&lt;P&gt;              data_buffer_exceeded = 6&lt;/P&gt;&lt;P&gt;              others               = 7 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me some inputs on this,&lt;/P&gt;&lt;P&gt;With warm regards,&lt;/P&gt;&lt;P&gt;Murthy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pr murthy on Sep 18, 2008 1:49 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pr murthy on Sep 18, 2008 2:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 11:49:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-working-with-function-module-rfc-read-table/m-p/4427494#M1051177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T11:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while working with function module RFC_READ_TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-working-with-function-module-rfc-read-table/m-p/4427495#M1051178</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 have tried this and with small change this is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES :&lt;/P&gt;&lt;P&gt;BEGIN OF ty_tadir,&lt;/P&gt;&lt;P&gt;pgmid TYPE pgmid,&lt;/P&gt;&lt;P&gt;object TYPE trobjtype,&lt;/P&gt;&lt;P&gt;obj_name TYPE sobj_name,&lt;/P&gt;&lt;P&gt;END OF ty_tadir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : it_tadir TYPE STANDARD TABLE OF ty_tadir,&lt;/P&gt;&lt;P&gt;wa_tadir TYPE ty_tadir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: stmp_dokhl like TAB512 occurs 100000 with header line.&lt;/P&gt;&lt;P&gt;data: options1 like rfc_db_opt occurs 10 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_options1 like line of options1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: nametab1 like rfc_db_fld occurs 10 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : W_VALUE(5) TYPE C,&lt;/P&gt;&lt;P&gt;W_VALUE1(20) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;W_VALUE1 = 'OBJ_NAME LIKE ''Z%'''.&lt;/P&gt;&lt;P&gt;wa_options1-text = w_value1.&lt;/P&gt;&lt;P&gt;APPEND wa_OPTIONS1 to OPTIONS1.&lt;/P&gt;&lt;P&gt;CLEAR wa_OPTIONS1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'RFC_READ_TABLE'&lt;/P&gt;&lt;P&gt;*destination 'zard'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;query_table = 'TADIR' "'ZBANK_GUARANTEE'&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;options = options1&lt;/P&gt;&lt;P&gt;fields = nametab1&lt;/P&gt;&lt;P&gt;data = stmp_dokhl&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;table_not_available = 1&lt;/P&gt;&lt;P&gt;table_without_data = 2&lt;/P&gt;&lt;P&gt;option_not_valid = 3&lt;/P&gt;&lt;P&gt;field_not_valid = 4&lt;/P&gt;&lt;P&gt;not_authorized = 5&lt;/P&gt;&lt;P&gt;data_buffer_exceeded = 6&lt;/P&gt;&lt;P&gt;others = 7 .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 12:45:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-working-with-function-module-rfc-read-table/m-p/4427495#M1051178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T12:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while working with function module RFC_READ_TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-working-with-function-module-rfc-read-table/m-p/4427496#M1051179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Modifed code..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES :
BEGIN OF TY_TADIR,
PGMID TYPE PGMID,
OBJECT TYPE TROBJTYPE,
OBJ_NAME TYPE SOBJ_NAME,
END OF TY_TADIR.

DATA : IT_TADIR TYPE STANDARD TABLE OF TY_TADIR,
WA_TADIR TYPE TY_TADIR.

DATA: STMP_DOKHL LIKE TAB512 OCCURS 100000 WITH HEADER LINE.
DATA: OPTIONS1 LIKE RFC_DB_OPT OCCURS 10 WITH HEADER LINE.

DATA: WA_OPTIONS1 LIKE LINE OF OPTIONS1.

DATA: NAMETAB1 LIKE RFC_DB_FLD OCCURS 10 WITH HEADER LINE.

START-OF-SELECTION.

  DATA : W_VALUE(5) TYPE C,
  W_VALUE1(20) TYPE C.


  W_VALUE1 = 'OBJ_NAME like'.
  W_VALUE = '''Z%'''.

  CONCATENATE 'OBJ_NAME LIKE' `  ` W_VALUE  ` ` INTO WA_OPTIONS1-TEXT.

*  CONCATENATE W_VALUE1 W_VALUE INTO WA_OPTIONS1-TEXT SEPARATED BY SPACE.

  APPEND WA_OPTIONS1 TO OPTIONS1.
  CLEAR WA_OPTIONS1.

  CALL FUNCTION 'RFC_READ_TABLE'
    EXPORTING
      QUERY_TABLE          = 'TADIR' "'ZBANK_GUARANTEE'
    TABLES
      OPTIONS              = OPTIONS1
      FIELDS               = NAMETAB1
      DATA                 = STMP_DOKHL
    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.

  BREAK-POINT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 13:10:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-working-with-function-module-rfc-read-table/m-p/4427496#M1051179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T13:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while working with function module RFC_READ_TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-working-with-function-module-rfc-read-table/m-p/4427497#M1051180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jyothy and Vijay, thank you for taking your valuable time to correct my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Murthy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2008 04:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-working-with-function-module-rfc-read-table/m-p/4427497#M1051180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-19T04:49:58Z</dc:date>
    </item>
  </channel>
</rss>

