cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging CIF -BADI -/SAPAPO/CURTO

Former Member
0 Kudos

I was trying to debug the CIF and put a break point in the method CIF_IMPORT but it is not stopping at my break point.I am very new to APO and this is kind of first object i am working on. Here is the steps i did so far.

1. Create implementation to BADI /SAPAPO/CURTO

2. In method CIF_IMPORT, i put a break point.

Now i turned on the debugging mode by doing the below setps.

1.In SAP ECC, CFC2 - switched on the debugging

2. In APO, /SAPAPO/C4 - switched on Debugger

From ECC ( CFm1/CFm2), I transferred the data trhrough CIF and i am seeing the entry Queue in SMQ2 in APO.The status is NOEXEC. When i double click on that line, it is calling Function module : /SAPAPO/CIF_GEN_EVENT.

When i click on LUW for debugging, it is going through the SAP code but does not call my BADI implementation and even does not stop at the break point in my method.

Could anyone tell me what was wrong.

Thanks a Bunch.

Sunitha.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

In CFC2 setthings in ECC, put the R in Debug Column against your SAP USERID.

In APO,Put the breakpoint in DEBUGGER session, at call function which you have used in your code for Method CIF_IMPORT.

You will get one function module like '....INBOUND', after this FM you will see your code in CIF_IMPORT method.

Regards,

Saurabh

Former Member
0 Kudos

Hi Debi,Saurabh - I tried all the options you have specified above but it still did not hit the break point. But something in Settings seems to be wrong. The reason is , In Development environment in APO, when i goto SMQ2, i see 2 entries with the function modules /SAPAPO/CIF_PROD_INBOUND and /SAPAPO/CIF_GEN_EVENT.

I select the line with the FM /SAPAPO/CIF_PROD_INBOUND and click on LUW and this is taking to my code.

But some reason, In Quality system, i could see only one entry with the function module ( /SAPAPO/CIF_GEN_EVENT). When i debug this, it is not stopping at my break point in the method (CIF_IMPORT)but it is executing the code written in the method .

I am confused why i am not seeing the SMQ2 entry with the function module : /SAPAPO/CIF_PROD_INBOUND . Do you think, this is something with the BASIS settings ?

Appreciate your help.

Former Member
0 Kudos

Please check if have you put the "R" in CFC2 setting in ECC system against your Userid or not.

Put the Breakpoint on Call Method instead of Call Function, I hope it will stop in your BAdi Code.Or you can directly put the breakpoint in your code in Debugger on Some Call Function Statement.This is not related to any BASIS settings.You just have to check the /SAPAPO/C4 setthings and CFC2 thats it.When you CIF the PDS data, you will see one entry in inbound queue.

If nothing will happen after this try the below steps also.

On APO Side:

Go to /N/SAPAPO/CQ , uncheck the options for Show Only Blocked Qs and Say F8

For the Q for which you are transferring the data, Right Click and then go to SMQ1/SMQ2 ... On this screen, Options GOTO -> Qin Scheduler and Deregister the Q which is there....

Any data Transfer Now will not post to APO and it will come to Ready state.

The entry will be stuck in the /N/SAPAPO/CQ , Goto SMQ1/SMQ2 , select the entry and say debug option on the top.

In debugger, Put the breakpoint on CALL FUNCTION/CALL METHOD statements and debug using F5 function not F6/F8...

Regards,

Saurabh

Former Member
0 Kudos

Thanks Saurabh.It worked perfectly.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi,

Have followed the above mentioned steps correctly but the control is not coming to the BADI in APO in debugging mode.

We are also using the same BADI and we want to add some code in the method CIF_IMPORT. I have set the hard coded break Point in this method.

On R/3 side: we have followed the same steps mentioned above. But

On APO Side:

" For the Q for which you are transferring the data, Right Click and then go to SMQ1/SMQ2 ... On this screen, Options GOTO -> Qin Scheduler and Deregister the Q which is there.... "

After the above step we are getting the Qout Scheduler option insted Qin Scheduler option in the menu.

Please help us on the same...

Thanks and Regards,

Basu

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sunitha,

Which break-point you have put in your code? If it is hard coded BP then it should stop there.You have to set External Breakpoint in the code because it is a CIF related BAdi.

Please try the below different methods to debug this BAdi if you have maintained all the settings(CFC2 & /sapapo/c4 ) properly.

1) Please check your BAdi implementation in Active.

2) Put the hard coded breakpoint in the method CIF_IMPORT code.

3) Do the same steps again as you did already for CIFing data from ECC, then LUW for debugging and then put the breakpoint on CALL FUNCTION statement in the debugger,you will get one function module like CALL FUNCTION '001' or something like this. which will go into the method code directly.

Also check the External Debugging is ON for your userid in UserSpecific Setting>Debugging>users = your userid

I hope this will help you to reach the code in method CIF_IMPORT.

Regards,

Saurabh

Former Member
0 Kudos

Hi Sunitha,

There is another way to debug.

Put an infinite loop in your code. Sample Pseudo code for infinite loop:-

DATA : lv_test Value 1.

While lv_test NE 2.

ENDWHILE.

Now try to send the data. Goto SM50 and debug there.

It will work.

Thanks,

Debi