0% found this document useful (0 votes)
101 views

How To Debug The FM Which Is Called in Background Task - SAP Blogs

Uploaded by

apostolos thomas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views

How To Debug The FM Which Is Called in Background Task - SAP Blogs

Uploaded by

apostolos thomas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Community

Follow

Ask a QuestionWrite a Blog Post Login


 Like

 RSS Feed

Former Member Assigned tags


June 28, 2012
| 2 minute read
Retagging required

How to debug the FM which is called in background abap

task james zeng s blog

sap

 3  1  24,784
Similar Blog Posts

How to debug the FM which is called in background task Debugging Conditions upload from CRM
to ECC
James Zeng    Date: 2012-06-28
By
Athreya Ramakrishna Hegde Dec 07, 2015

Symptom How to debug the programs triggered by


Today I met one issue that there is one FM-AAA which be called in program BBB in background task way, now we RFC to be run in background
want to debug the FM-AAA. By
Leon Shen Sep 14, 2016

The real FM-AAA is ZVXX_IDOC_ASNPP, the caller program is IDOCS_OUTPUT_TO_OWN_FUNCTION for my real How to Debug a Background SAP
case. Workflow Method?
By
arghadip kar Dec 23, 2020

Related Questions

How to see the status of a FM IN
BACKGROUND TASK?
By
Former Member Feb 23, 2010

Debug FM called in background Task


By
Former Member Nov 15, 2005
When the program really run, the EDIPOF-FUNCTION will be replaced with ZVXX_IDOC_ASNPP in my
How To Debug RFC which is called in
situation. background task?
Follow
By
Hadi Wijaya May 10, 2012

 Like

 RSS Feed

Solution
1. Set external breakpoint in the FM-AAA (ZVXX_IDOC_ASNPP)
2. Start program-BBB (IDOCS_OUTPUT_TO_OWN_FUNCTION) in debug.
3. When you reach the breakpoint, select menu Settings, Display/Change debugger settings, select the flag
“tRFC (In Background Task): Block Sending”. This flag means that, when the commit work occurs, the
background task (FMs + parameters) is stored into database but not executed.
4. Run the t-code SM58
5. Select the background task you just created, and choose menu edit + debug LUW, the “background task”
will start interactively and the debugger will stop at predefined points by in FM AAA automatically.

My demo example:

We use one shipment to trigger one output type ZASN to call FM-IDOC_OUTPUT_SHPMNT to create the
shipment IDoc, then based on this shipment IDoc to create the customer ASN IDOC( which will call FM-
ZVXX_IDOC_ASNPP )
Follow

 Like

 RSS Feed

After the ‘commit work’ statement called, the background task created in the database

Then use SM58 to search whether any background task created

We debug this background task


Follow

 Like

Then the logic will stop at the breakpoint we set in the FM- ZVXX_IDOC_ASNPP.
 RSS Feed

Alert Moderator

3 Comments

You must be Logged on to comment or reply to a post.


Syam Babu

Follow
June 28, 2012 at 5:59 am

Dear James,
 Like
Nice Blog,it's very needful for developers.

 RSS Feed
Thanks,

Syam.
Like 0 | Share

Christian Drumm
June 29, 2012 at 8:56 am

Hello James,

nice blog. This was a feature of the debugger I didn't kow so far.

However, I'm wondering why you are not simply using an external breakpoint in the FM that you want to debug. Even if the FM is called in a background task
the external breakpoint works.

Best,

Christian
Like 0 | Share

Vitor Carlessi
May 17, 2019 at 6:52 pm

Thanks
Like 0 | Share

Find us on
Privacy Terms of Use

Follow
Legal Disclosure Copyright

Trademark Cookie Preferences

 Like
Newsletter Support

 RSS Feed

You might also like