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

Call screen from report program to bring back data

Former Member
0 Likes
792

I would like to call a transaction from my report program and return back the values from the screen of called transaction. These values normally show up on the screen of the transaction after values are entered by the user and execute is selected. I tried playing around with call transaction from the calling report, but with no luck. Any suggestions would be very much appreciated.

Kind Regards,

Jason

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
685

What you are trying to do is not really supported in ABAP. You can use ABAP to achieve this, but it will not pass these values back to you from CAL TRANSACTION automatically. If you have control over the program in which is being fired from CALL TRANSACTION, meaning, it is custom and you can put code in it, you can use the IMPORT/EXPORT statements to put the data in the transactoin in memory, then IMPORT it into your report program after the CALL TRANSACTION, this would be the only way to get the data from the called program.

You can get certain things from the messages in the CALL TRANSACTION statement, like if creating a sales order, you will usually find the sales document number in the messages.

Regards,

Rich Heilman

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
686

What you are trying to do is not really supported in ABAP. You can use ABAP to achieve this, but it will not pass these values back to you from CAL TRANSACTION automatically. If you have control over the program in which is being fired from CALL TRANSACTION, meaning, it is custom and you can put code in it, you can use the IMPORT/EXPORT statements to put the data in the transactoin in memory, then IMPORT it into your report program after the CALL TRANSACTION, this would be the only way to get the data from the called program.

You can get certain things from the messages in the CALL TRANSACTION statement, like if creating a sales order, you will usually find the sales document number in the messages.

Regards,

Rich Heilman

Read only

0 Likes
685

Okay. You are probably 100% correct, however let me bounce this off of you. Tell me if this makes sense...

What if I went the other way with BDCDATA-FVAL = FVAL in my bdc code and provided BDCDATA-FNAM = FNAM. could this be used to fetch and hold the screen field that I am after. Then I can put it into memory?

So... use BDCDATA-FNAM = FNAM to point to the field and

use FVAL=BDCDATA-FVAL to capture the value.

use FVAL to export to memory.

Thanks for your help!

Jason

Read only

0 Likes
685

No, i doesn't work like that. THE BDCDATA is only used to specify what the screen sequence is and what fields to fill in, it is one directional. The only values that may be passed back to you will be in the form of messages in the MESSAGES into MessTab extension of the call transaction. Again, these values will usually be the object(example sales document number).

Regards,

Rich Heilman