Skip to main content


Showing posts from June, 2010

SAP - Debugging middleware - OSS Note 847964

Just for my note and quick reference :)

UPDATE: Quick note on ABAP to recreate BDOCis called CRM_START_REQUEST_FROM_CRM.
                         FM: CRM_SRV_R3_LOGISTIC_UPLOAD is called to update PREQ etc.


You want to debug the data exchange between CRM and R3 for service documents.

Reason and Prerequisites

Data is sent to the R3 system via the CRM Middleware. The data is sent asynchronously


Before you save the service document, enter /h and set a breakpoint in
Go into the first method, CALL METHOD cl_smw_mflow=>process_outbound (line 33), and set ls_header-dbg_mode to X (line 37). With F8, you'll return to the service order.
Now click on the Doc_flow. You'll see an outbund BDOC with the date BUS_TRANS_MSG and D01.
(If you can't see the BDOC, set the user parameter CRM_USER_LEVEL to 9 in your user parameters).
Double click the BDOC.

Enter /h and set a breakpoint at one of the following function modules:

SAP/SD - Sending order/delivery/invoice via email with body text

This is surely not new, most of us ABAP developers will somehow come across this requirement in some of our project/implementation/support. For those who're on the latest SAP platform, probably you guys are lucky to have the IMPLICIT/EXPLICIT enhancement which you could do to enhance standard SAP function module. But for some of us who're still stuck with 620 or below, we're not so lucky.

Anyway, to share some of the thing that I've done to get the body text work:

You can't use body text in NACE, it just doesn't work that way. Tried it so many times and given up. SAP has a note which says that no matter what you do, it will not work for you :) SAP Note 753622.Next best thing to do is, to go ahead and change the way the standard SAP send out email in the print program, create an OTF, and just after CLOSE_FORM, use SO_NEW_DOCUMENT_ATT_SEND_API1 or BCS to send the email out. For me, this is too much too.Probably the best option, do this in FORM_OPEN subroutine in t…