Skip to Content
author's profile photo Former Member
Former Member

Perform Inside a RFC function Module

Hi Experts,

I am using a perform inside an RFC function module,

In the perform I have used the select statmetns to fill the internal table , but once the perform subroutine is completed , then the internal table iniside the perform is not passing data to the table in the RFC.

Could you please suggest the method to pass the data in the internal table.

Thanks in Advance,

Regards,

Iff

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2007 at 04:53 AM

    Hi ,

    Please check the follwing

    Where is the perfom defined ?

    , are you declaring local varaibles in the subroutine to store the data ,

    pass you internal table as a parameter to the subroutine.

    Regards

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi ,

      Here is a sample code

      Data : it_1 type table of matnr ,
             v_matnr type matnr.
      
      start-of-selection.
      
      perform get_matnr using it_1.
      
      loop at it_1 into v_matnr.
      write / v_matnr.
      endloop.
      *&---------------------------------------------------------------------*
      *&      Form  get_matnr
      *&---------------------------------------------------------------------*
      *       text
      *----------------------------------------------------------------------*
      *      -->P_IT_1  text
      *----------------------------------------------------------------------*
      form get_matnr using    p_it_1 like it_1[].  "This decleration is required for tables
      
      data : it_2 type table of matnr.
      
      select matnr into table it_2
      up to 10 rows
      from mara.
      
      p_it_1[] = it_2[].
      
      endform.                    " get_matnr

      You can also define the form this way

      <b>form get_matnr using p_it_1 type table.</b>

      do revert back in case you have any queries.

      Regards

      Arun

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2007 at 04:54 AM

    Hi IFF,

    1. Declare the Internal Table Globaly in Function module.

    2. In perform statment use the internal table as parameter in TABLES statement.

    3.IN RFC FM also Use the Internal table in Tables tab.

    Now it will work.

    Pls. reward if useful

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 01, 2007 at 04:54 AM

    Hi,

    One way is to declare the internal table in the TOP include of this RFC function modules function group then after the perform this internal table will still have the data and this can be accessed in the FM.

    Another way is to pass the Internal table to the subroutine either with the help of USING or CHANGING. Create this internal table before the perform call and then populate it in the perform. ONce perform is over you will be able to access the data in the FM.

    Regards,

    Sesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2007 at 07:00 AM

    Hi Arun,

    I am passing both Itab and variables in the perform.

    and in the form part I am geeting error because I am mentioning both itab and variable parameteres.

    Regards,

    Iff

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.