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

Data not available in TRFC (Debugging)

Former Member
0 Likes
1,163

Hi,

I am using call function to create TRFC. It gets created and shows up in SM58.

But when i debug the FM i can not see my data which i have passed to this FM .

Can some one faced this issue before.

CALL FUNCTION 'ZY_LINK_FAILED_ORDERS' IN BACKGROUND TASK

EXPORTING

i_s_failed_link = ls_failed_link.

i am passing my data in the variable i_s_failed_link. But when i go to sm58 and debug this values are not available.

Regards

Ansari

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
784

Hi,

Normally these back ground task RFCs will be executed by the program RSARFCSE, can u try reading the documentation available in both SM58 and this report.

Regards,

Mahesh.

3 REPLIES 3
Read only

Former Member
0 Likes
785

Hi,

Normally these back ground task RFCs will be executed by the program RSARFCSE, can u try reading the documentation available in both SM58 and this report.

Regards,

Mahesh.

Read only

Former Member
0 Likes
784

Functions executed in background task need to be debugged in a special way - these functions get executed by the system when a COMMIT is encountered in the calling program. Once executed there is no point in debugging them in SM58 as all values/variables are released.

This is what you need to do so that the background function call is blocked even if COMMIT occurs so you can debug and the parameters retain values

I just added a little elaboration from this wiki [link|http://wiki.sdn.sap.com/wiki/display/ABAP/ABAP+Debugger#ABAPDebugger-HowtodebugtRFCfunctionmodule]

Say program ABC calls FUNCTION 'XYZ' IN BACKGROUND TASK ..., and you want to debug XYZ

1. Add breakpoint in ABC before the CALL FUNCTION

2. Start ABC

3. When you reach the breakpoint, select menu Settings, Display/Change debugger settings, select the flag "tRFC (In Background Task): Block Sending".

The above setting is for new debugger, in classic debugger you need to do Settings -> Display and change all -> Check on In background task: Do not process

This flag means that, when the commit work occurs, the background task (FMs + parameters) is stored into database but not executed.

4. Run SM58

5. Select the background task, and choose menu edit + debug LUW, the "background task" will start interactively and the debugger will stop at predefined points by sap, and in FM XYZ automatically.

Read only

0 Likes
784

When i changed my import parameters to changing i started geting values inside. Does not looks like a correct solution. May be i was missing something else as well