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

Issue while capturing messages when running program in background

Former Member
0 Likes
631

Hi,

I have a program where we have BDC for transaction KSU5 and this is using CALL TRANSACTION method to post the documents after this we have to check a table COEP for the document no's generated in ksu5.

This program works absolutely fine in foreground printing the output on screen the document numbers that we get once we use

CALL TRANSACTION 'KSU5' USING bdcdata MODE 'E' MESSAGES INTO return.

but the same gets spoiled if we run this program in background !! the return table where I use to get the document no it shows additional data of the KSU5 transaction which is not required I am just trying to print the document no from the return table with variable msgv1 and msgv2.

Can someone explain or give solution to run this program in background and get the result printed correctly for the user.

Thanks

Sudharshan

4 REPLIES 4
Read only

Former Member
0 Likes
567

loop at return and print (write) the contents.

Read only

Former Member
0 Likes
567

Any serious updates !!

Read only

0 Likes
567

Well, that may have been serious. Most folks would read a message table for the specific message type and ID to get the correct line, then output the message variable value. Spitting out the entire table contents in background would help you pinpoint the values you need to use. Otherwise, the other technique is getting the value via paramter ID after the call if there's one available.

Read only

tushar_shukla
Active Participant
0 Likes
567

Sudarshan,

I guess your code was recorded for Online mode , try to compare it with Simulated background BDC code for the transaction and see if there is any difference for your required functionality .

You can generate 'Simulated background BDC code' by SHDB->New recording-> and then check 'Simulate background BDC code' option in popup window .

-Tushar Shukla

Edited by: TUSHAR SHUKLA on Oct 8, 2010 2:23 AM