Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RFC_READ_TABLE performance problem

hammitou_jack
Explorer
0 Likes
896

Hi all,

Iu2019m using the function RFC_READ_TABLE in CRM to reach Data of the table KNB5 form R3. The function works well except that it too slow (20 seconds). Is it possible to optimize the execution time?

Thank you.

2 REPLIES 2
Read only

Former Member
0 Likes
631

Try passing restricting selection criterion in the FM and see if performance improves.

If not run the FM in the source system and analyse the excess time being consumed.

If you feel there can be performance improvement, convert the FM to z-FM and modify accordingly.

Read only

Former Member
0 Likes
631

You have an option to pass the condition to the Function module, Similer to the where condition part of the select quiry.

Just check for how I have passed the condition ( for the selection ).

w_value1 = '( obj_name LIKE ''Y%'' OR obj_name LIKE ''Z%'' ) AND ( DEVCLASS LIKE ''Y%''' .
      wa_options11-text = w_value1 .
      append wa_options11 to it_options11.
      clear wa_options11.

      w_value1 = 'OR DEVCLASS LIKE ''Z%'' )' .
      wa_options11-text = w_value1 .
      append wa_options11 to it_options11.
      clear wa_options11.

      call function 'RFC_READ_TABLE'
        destination p_serv1
        exporting
          query_table          = 'TADIR'
        tables
          options              = it_options11
          fields               = it_nametab11
          data                 = it_stmp_dokhl1
        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.

Hope this helps,

Murthy.