Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Syntax problem by sending a itab AND a variable to a subroutine

Hi all,

Since I need to work with an import parameter from a function in a subroutine I need to pass it to this routine additional to an internal table which is already passed to the subroutine.

The current coding is:

PERFORM get_config TABLES i_mtnr_ppl_sorg CHANGING i_mtnr_ppl_sorg.

and

FORM GET_CONFIG TABLES i_sub_mtnr_sqv STRUCTURE i_mtnr_ppl_sorg CHANGING i_chg_mtnr_qsv.

Now I have been trying to do the following but it doesn't work:

PERFORM get_config TABLES i_mtnr_ppl_sorg CHANGING i_mtnr_ppl_sorg USING time_out.

FORM GET_CONFIG TABLES i_sub_mtnr_sqv STRUCTURE i_mtnr_ppl_sorg USING time_out CHANGING i_chg_mtnr_qsv.

anybody knows why?

Thanks for any comments

Tags:
replied

>

Thanks for your replay Eric, but how does the compiler know that the changing variable belongs to the table name?

if you do everything right, it will know, you should not worry about that

oh, I just checked the variable names and I see you use the same table (?) for TABLES and CHANGING as well. This definetly does not make sense and won't work. You can use it only once.

And to go into deeper, the TABLES parameter is obsolete, so pls. avoid using it. Decide if you want to change the internal table inside the subroutine and acc. to the decision, you can put into USING and or CHANGING.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question