Application Development 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: 

Call to external subroutines

Former Member
0 Kudos

Hi,

I have a requirement where I have to code dynamic actions in my RFC. My functional person gave me logic where I have to call routines from diff. std programs.I can call the routines but I am not able to pass the parameters in the call as there are no using/ changing parameters defined in called program.  During manual action at PA30 fields are auto populated but I am not able to pass them during call to routines.

It will be great if somebody can help me with the solution for this.Thanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi P J,

Sorry...i didn't understand your complete scenario but u may use this...

PERFORM <routine_name> IN PROGRAM <prog> USING <var1> CHANGING <var2>

5 REPLIES 5

Former Member
0 Kudos

Hi PJ,

I think you are trying to use the logic of standard subroutine,

You can try creating an implicit enhancement in the start of the subroutine and filled the fields .To pass the values u can use SAP Memory or ABAP memory depending on your requirements.

Regards,

~Raj

former_member386202
Active Contributor
0 Kudos

Hi,

You ca use EXPORT IMPORT TO memory ID.

Regards,

Prashant

Former Member
0 Kudos

Thanks for your response. However, let me explain the scenario little bit more:

I have to call a standard routine which needs values for fields like ( PERNR, ENDDA, BEGDA for processing logic). These values are autopopulated while a manual action from PA30. However, I am callind this routine using Perform <routine_name>(<module pool name>).

I have values to be passed to the routine in my RFC and I can pass them with Perform through using/changing parameters. However, the called FORM donot have any parameter defined. So, it will give me a dump.

I want to pass the values to the called routine but I am not sure how to do it. Please suggest.

0 Kudos

I think Raj and Prashant's replies give you your answer.

Former Member
0 Kudos

Hi P J,

Sorry...i didn't understand your complete scenario but u may use this...

PERFORM <routine_name> IN PROGRAM <prog> USING <var1> CHANGING <var2>