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

Debugging Problem

former_member186413
Participant
0 Likes
2,594

Hi Expert,

It's great, if someone tells me how to find the location of when the exception is threw or it set up a paticular value for SY-MSGID, SY-MSGTY and etc.

The backgroud is the program calling the BAPI funcation for creating a Sale Order,  meanwhile, it usally create the deliver oder  for the sales order. but sometimes it depends on the material, the deliver order wouldn't be created.  Thus, I need to know when it sets Sy_MSG* parameter in the program, so to  ping-point the problem from the material's data.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,425

Hi,

are there any differences in the BAPI's RETURN table in both cases? Then you can get the information there. Otherwise table VBFA might help you solving your issue.

For there are many possible reasons that delivery order will not be created, the messages may differ.

Regards,

Klaus

14 REPLIES 14
Read only

arindam_m
Active Contributor
0 Likes
2,425

Hi,

Try doing it by the Breakpoint at.. feature in the breakpoint menu. You can set it for a particular message. The Other option is Watchpoints on SY-MSG parameter.

Cheers,

Arindam

Read only

0 Likes
2,425

Ya, I have used this method, but it dosn't work. It seems it detect something from the buttom of message, but never show up the location of the code.

Read only

arindam_m
Active Contributor
0 Likes
2,425

Hi,

Not clear on what location you looking for. But if you observe the Stack in desktop2 in the debugger should give you a idea of the flow that might help you to get to the exact point.

Cheers,

Arindam

Read only

Former Member
0 Likes
2,425

Hi,

Set a break point at statement Message. Thanks.

Best Regards

Ravi.

Read only

Former Member
0 Likes
2,425

Hi Hai,

When you get the error click on it it will open a window with message.

Click on the technical details ICON it will give you the MSG ID and MSG No.

Now debung the program again.

Create Watch point

SY-MSGTY = 'E'

SY-MSGNO = the message no

SY-MSGID = the message id.

Also press F9 it will open the breakpoint window

Select the Message TAB and enter the same details

Also set the UPDATE DEBUGGING feature on so it halts even if you are getting in an update function.

Regards

Read only

Former Member
0 Likes
2,425

Hi,

Activate SQL Trace using ST05 then run your Program or T-Code, after error goto ST05 and deactivate SQL trace , Now Goto Log and serach for message it will give you excat location and program name.

Regards,

Salil Chavan

Read only

Former Member
0 Likes
2,426

Hi,

are there any differences in the BAPI's RETURN table in both cases? Then you can get the information there. Otherwise table VBFA might help you solving your issue.

For there are many possible reasons that delivery order will not be created, the messages may differ.

Regards,

Klaus

Read only

0 Likes
2,425

Thanks  Klaus, your answer might close to what I want.  Another Question that I want to ask is, how you are going to solve the problem via the VBFA table?

Read only

0 Likes
2,425

VBFA has the SD document flow. Basically, you can check if any delivery was created for a particular sales order number.

Read only

former_member188827
Active Contributor
0 Likes
2,425
Read only

Former Member
0 Likes
2,425

Hi!

There a two presentations around by SAP's Olga Dolinskaja on the new feature of ABAP Debugger Scripting (requires SAP NetWeaver 7.0 EhP2) - from what you have described (exception traceability) the use of ABAP Debugger Scripting solves your problem.

Each presentation takes less than ten minutes to watch - and it's definitely worth the time.

TypeLink
basic usage demonstrationhttp://scn.sap.com/docs/DOC-10249
advanced topics demonstrationhttp://scn.sap.com/docs/DOC-10250

Regards,

   Chris

Read only

Aiolos
Active Participant
0 Likes
2,425

please use this tool to achieve your requirement

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
2,425

Hi

Basically what i think is the BAPI is filling the return table rather than throwing messages starightaway. It will be good if you can track where the return parameters are filled. Put a watchpoint or check some gloabl variable being set as indicator of error.

Nabheet

Read only

gaurab_banerji
Active Participant
0 Likes
2,425

sometimes not catching exceptions can lead to dumps. check if the FM return has exceptions and add them in the function call