09-12-2008 3:31 PM
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
09-12-2008 3:41 PM
hi,
in the subroutine call you coded wrong order:
PERFORM get_config TABLES i_mtnr_ppl_sorg CHANGING i_mtnr_ppl_sorg USING time_out.
first USING parameters, than CHANGING parameters:
PERFORM get_config TABLES i_mtnr_ppl_sorg USING time_out CHANGING i_mtnr_ppl_sorg .
hope this helps
ec
09-12-2008 3:41 PM
hi,
in the subroutine call you coded wrong order:
PERFORM get_config TABLES i_mtnr_ppl_sorg CHANGING i_mtnr_ppl_sorg USING time_out.
first USING parameters, than CHANGING parameters:
PERFORM get_config TABLES i_mtnr_ppl_sorg USING time_out CHANGING i_mtnr_ppl_sorg .
hope this helps
ec
09-12-2008 3:51 PM
Thanks for your replay Eric, but how does the compiler know that the changing variable belongs to the table name?
09-12-2008 3:55 PM
>
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.