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

dynamic parameter with an IMPORT statement

andrs_sarcevic
Contributor
0 Likes
379

Hello experts. I hope you can help me with this issue:

I have a report performing an EXPORT statement into a Buffer:

EXPORT I_USER FROM P_USER

I_NAME FROM P_NAME

I_SURNAME FROM P_SURNAM

TO DATA BUFFER V_XPARVALUES.

Then it calls the first FM where a type I program is created by using INSERT REPORT... This dynamic-generate INCLUDE has the explicits declaration for variables: I_USER, I_NAME, I_SURNAME.

Afeter the dynamic Include generation, it calls a second FM, wich has the reference to the dynamic Include created before with the data declaration. The only thing remain is to IMPORT all the data from the buffer V_XPARVALUES:

The following code lines are within a LOOP. wa_param-paramname has the name of the variable (I_USER, I_NAME I_SURNAME).

ASSIGN (wa_param-paramname) TO

FROM DATA BUFFER v_xparvalues.

but what I need to achieve is dynamic parameters in the IMPORT statement.

Had anybody came across this problem?

I hope I have been clear with the explanation.

Regards,

Andrés Sarcevic.

1 REPLY 1
Read only

andrs_sarcevic
Contributor
0 Likes
351

IMPORT/EXPORT scope didn't work out. Instead, I used CALL TRANSFORMATION and XML approach, besides some ABAP creativity.