Instead of stopping the inbound queue to enable debugging, there is another method which hasn't been documented well.
In the BUPA_CONV_EI2BAPI function module, there is the following code:
This will enable us about 30 seconds to enable debugging from SM50.
Showing posts with label Middleware. Show all posts
Showing posts with label Middleware. Show all posts
Thursday, 1 March 2018
Wednesday, 11 July 2012
SAP CRM Business Partner - Middleware debug
Had a problem with debugging the BP middleware from CRM to ECC and found the following answer in SDN:
- Put a break point in FM SMW3_MFLOW_UPDATETASKBDOC.
- Create a BP and before save type /h to activate debug, mark update debugging option.
- When stops in FM SMW3_MFLOW_UPDATETASKBDOC you must be sure to set header-dbgmode = 'X' this will make the bdoc stay stopped in SMW01.
- Go to SMW01 and type /h and process the bdoc. Put a break in FM CRM_UPLOAD_AFTER_MAP_HANDLER and be sure to change LV_SYNCHRON = 'X' this will allow you to connect in ECC.
- Put a break-point in the "CALL TRANSACTION" command. Change the mode of call transaction and you be able to debug XD* update.
NOTE: to check/resubmit BP from CRM to ECC, use txn: CRMM_BUPA_MAP
Tuesday, 22 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.
Symptom
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
Solution
Before you save the service document, enter /h and set a breakpoint in
the function module CRM_UPLOAD_BTMBDOC_START_FLOW
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:
CRM_R3_ACCOUNTING_UPLOAD passes Controlling information for service contracts and service orders
CRM_R3_SERVICECONF_UPLOAD passes Controlling information for service confirmations
CRM_R3_SRV_RESERVATION_UPLOAD is called for material reservations
CRM_R3_SALESDOCUMENT_UPLOAD is called for sales relevant information (for example, if you have sales items in a service document)
CRM_R3_SERVICE_BILLING_UPLOAD for billing of service orders in R3 (only available with the SIE add-on).
Reprocess the BDOC.
Set a breakpoint at the line IF lv_synchronous_call IS INITIAL or IF gv_synchronous_call IS INITIAL. F8 brings you to this breakpoint.
Set lv_synchronous_call/gv_synchronous_call to X and with F5 you'll enter R3 debugging. Make sure that the RFC user used for communicating between the systems is defined as a dialog user.
--
CRM_SRV_R3_LOGISTIC_UPLOAD
Y_E_CRM_R3_SRV_MVT_UPLOAD
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.
Symptom
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
Solution
Before you save the service document, enter /h and set a breakpoint in
the function module CRM_UPLOAD_BTMBDOC_START_FLOW
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:
CRM_R3_ACCOUNTING_UPLOAD passes Controlling information for service contracts and service orders
CRM_R3_SERVICECONF_UPLOAD passes Controlling information for service confirmations
CRM_R3_SRV_RESERVATION_UPLOAD is called for material reservations
CRM_R3_SALESDOCUMENT_UPLOAD is called for sales relevant information (for example, if you have sales items in a service document)
CRM_R3_SERVICE_BILLING_UPLOAD for billing of service orders in R3 (only available with the SIE add-on).
Reprocess the BDOC.
Set a breakpoint at the line IF lv_synchronous_call IS INITIAL or IF gv_synchronous_call IS INITIAL. F8 brings you to this breakpoint.
Set lv_synchronous_call/gv_synchronous_call to X and with F5 you'll enter R3 debugging. Make sure that the RFC user used for communicating between the systems is defined as a dialog user.
--
CRM_SRV_R3_LOGISTIC_UPLOAD
Y_E_CRM_R3_SRV_MVT_UPLOAD
Thursday, 12 November 2009
ABAP: Once in a blue moon..
Yup, once in a blue moon, you'll get a kind of weird requirement to work on. And today, I'm getting one too, adding a serial number to an order which originally created from CRM.
In the first place, this is all bespoke, so, standard middleware wouldn't work. The serial number is passed through CRM order in a customer field and left out when the middleware is called in. What I need is to move this serial number over to R/3 and update the batch number too, in the order!!! Easy does it? Nope!!! But there is a way!
1. In CRM, there is a BDOC exchange BADI which I could use to transfer the serial number over to R/3, the BADI is CRM_DATAEXCHANGE_BADI, use the CRM_DATAEXCH_AFTER_BAPI_FILL method to fill in missing information. I need to enhance the BAPISDITM structure to add this new serial number field.
2. On the R/3 receiving end, thing doesn't seem to be that simple. The BAPI_SALESDOCU_PROXY_UPLOAD doesn't have BADI that I could use to transfer these fields from CRM but, yes, there always be a but. There is BTE available which I could use. BTE/Process 00501020/00501021 could be use to transfer some missing information from CRM to R/3, batch number could be assigned here, no problem. I need to enhance the BAPISDITM here too and probably the VBAPKOM structure too so I could pass this to the final user exit which is, yes, to assign this serial number to the order.
3. Now, how the heck am I going to update this serial number into the order? I have never done this before, I've done updating serials into delivery document but not to an order document. This yet to be tested but this URL seems to be promising, will try this one out:
https://forums.sdn.sap.com:443/thread.jspa?threadID=1470413
Two function modules described at the end of the thread there: IWOL_WV_ADD_OBJECTS & IWOL_WV_POST_OBJECT_LIST.
Will try this and see if I could get it to work! Wish me luck!
Update 1: Success!! Got it to work in less than a day .. couldn't pass the vbapkom to the final stage so I need to use an ABAP memory to pass the final table into the final user exit before I could post it. But somehow, the serial isn't get copied to a delivery document, no idea why, someone needs to fix this for sure. Functional problem :)
Update 2: A small hitch, after they fixed the config, a short dump occurs when creating a delivery. Probably something has to do with the serial counter at VBAP. Need to take a look into this..
Update 3: Scrapped everything on the last part, doesn't seem to work!!! Yes, I could get the serial into the order but as update no 2, I have problem when creating delivery document. It wasn't the serial counter but the object type in OBJK. So, I've implemented this using a new function module SERNR_ADD_TO_AU. I added this in userexit_save_document_prepare instead. I've no problem copying the serial number into the delivery document now.
In the first place, this is all bespoke, so, standard middleware wouldn't work. The serial number is passed through CRM order in a customer field and left out when the middleware is called in. What I need is to move this serial number over to R/3 and update the batch number too, in the order!!! Easy does it? Nope!!! But there is a way!
1. In CRM, there is a BDOC exchange BADI which I could use to transfer the serial number over to R/3, the BADI is CRM_DATAEXCHANGE_BADI, use the CRM_DATAEXCH_AFTER_BAPI_FILL method to fill in missing information. I need to enhance the BAPISDITM structure to add this new serial number field.
2. On the R/3 receiving end, thing doesn't seem to be that simple. The BAPI_SALESDOCU_PROXY_UPLOAD doesn't have BADI that I could use to transfer these fields from CRM but, yes, there always be a but. There is BTE available which I could use. BTE/Process 00501020/00501021 could be use to transfer some missing information from CRM to R/3, batch number could be assigned here, no problem. I need to enhance the BAPISDITM here too and probably the VBAPKOM structure too so I could pass this to the final user exit which is, yes, to assign this serial number to the order.
3. Now, how the heck am I going to update this serial number into the order? I have never done this before, I've done updating serials into delivery document but not to an order document. This yet to be tested but this URL seems to be promising, will try this one out:
https://forums.sdn.sap.com:443/thread.jspa?threadID=1470413
Two function modules described at the end of the thread there: IWOL_WV_ADD_OBJECTS & IWOL_WV_POST_OBJECT_LIST.
Will try this and see if I could get it to work! Wish me luck!
Update 1: Success!! Got it to work in less than a day .. couldn't pass the vbapkom to the final stage so I need to use an ABAP memory to pass the final table into the final user exit before I could post it. But somehow, the serial isn't get copied to a delivery document, no idea why, someone needs to fix this for sure. Functional problem :)
Update 2: A small hitch, after they fixed the config, a short dump occurs when creating a delivery. Probably something has to do with the serial counter at VBAP. Need to take a look into this..
Update 3: Scrapped everything on the last part, doesn't seem to work!!! Yes, I could get the serial into the order but as update no 2, I have problem when creating delivery document. It wasn't the serial counter but the object type in OBJK. So, I've implemented this using a new function module SERNR_ADD_TO_AU. I added this in userexit_save_document_prepare instead. I've no problem copying the serial number into the delivery document now.
Subscribe to:
Posts (Atom)
TOUCHTAB report, regenerate all ABAPs related to changed/modified structure
I was working on S4HANA OnPremis and tried to do an enhancement to BP's additional info structure by appending fields, but decided that ...
-
I've come across many posting on the Internet (via google search), people asking on how to debug a DMEE for payment program. One of the ...
-
Was looking for the best AC wifi router to replace my Buffalo WHR-G300NH and found that TP-Link has just released an Archer C7 V2 which has ...
-
I've just subscribed to Astrill vpn service with a thought that they've openwrt scripting works as per the old twitter post that say...