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

BREAKPOINT

Former Member
0 Likes
3,618

hI All.

I am trying to create a sales order and when i enter data and hit enter it comes with error message. I want to put a break point where the message is.. how could i know that point.

thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,544

hi Shejal,

Use /h and run your transaction to track where exactly you are getting that error message ..

Regards,

Santosh

22 REPLIES 22
Read only

Former Member
0 Likes
3,544

Type /h in the command line and then hit enter. Now it will enter in to debug mode.

Now, in one of the menu options of the Break Point, it will be Break Poiint at statement, you will get a pop up, type MESSAGE.

Now, you have a break point at every MESSAGE statement in the program.

Regards,

Ravi

Read only

0 Likes
3,544

Ravi,

I have tried the same number of times but it dosent stop and is directly showing the error message.

Stpes that I have done,

/h

enter into the debug mode, as you said menu options, break point and at statement typed in messages

excute

goes to required screen

enters wrong data and hit enter. pops up the error message.

In addition tot his shoud i do somethig else.

Thanks,

Read only

0 Likes
3,544

Like Ferry pointed out, it might be a system exception. try his idea.

Else, you can search for that specific message number in the MAIN program and set the break point at that specific place.

Regards,

Ravi

Read only

ferry_lianto
Active Contributor
0 Likes
3,544

Hi,

After you put '/h' at command line then run the transaction code/progam.

The system will stop then you go to breakpoints (menu) -> breakpoints at -> Statement -> type message.

OR

you go to breakpoints (menu) -> breakpoints at -> system exception.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
3,545

hi Shejal,

Use /h and run your transaction to track where exactly you are getting that error message ..

Regards,

Santosh

Read only

Former Member
0 Likes
3,544

Hi Shejal,

Double click on the message and find out the message class and message number

now goto SE91 , give the message class and goto that message number

find out the where-used-list of that message

then u will get ur program , doublick on that and put break point

Read only

Former Member
0 Likes
3,544

Hi,

check the program name in system_status and try to find the message in the program ,set a break point there.

hope this helps,

keerthi

Read only

Former Member
0 Likes
3,544

Hi Shetty,

Click on the error message that was displayed then it will show the message class and message number.

search for that message number in the program globally. then just keep a break point over there.

Regards,

Satya

Read only

Former Member
0 Likes
3,544

Hi,

You should give message instead of <b>messages</b>

Stpes that I have done,

/h

enter into the debug mode, as you said menu options, break point and at statement typed in <b>messages</b>

excute

goes to required screen

Thanks,

Naren

Read only

0 Likes
3,544

Naren,

I actually ried with Message.

Thanks,

Read only

Former Member
0 Likes
3,544

Hello,

Before Entering put /h.

Then enter.

In the menu > breakpoint>statement-->Message and enter and F8.

If useful reward,

Vasanth

Read only

Former Member
0 Likes
3,544

Hi,

Is it a standard sap message...If it is a standard sap message then message id will NOT start with 'Z' or 'Y' message ID..

Let us know the message ID and No..So that I can try getting you the program..

Thanks,

Naren

Read only

0 Likes
3,544

It is a standard SAP message.

when i enter wrong material number in MFBF and hit enter it pops out with this message.

Entry 101 does not exist in mara -check yoyr entry.

I also looked into the technical information,

Appl area 00

message number 058

I could take a screen shot of it but is there any option in SDN to paste it.

thanks,

Read only

ferry_lianto
Active Contributor
0 Likes
3,544

Hi Shejal,

If you know the message class and number.

Please go to SE91 and find where is being used and related to the program that you are working with. Then set break point there and when you run your transaction/program, the system should stop there.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
3,544

Hi,

This message is a system error message...Since the field RM61B-MATNR has been set up with foreign key relationship with MARA..

As the entry 101 is not there in MARA ...THe error message is coming..

Try doing system debugging..

Thanks,

Naren

Read only

0 Likes
3,544

I am entering the wrong number because i wont to copy the code where it is populating the error message and paste in for a custom program.

Thats the reason I am trying to get the point of error message. As suggested I have tried in SE91 and it gives many programs.

Anyways thanks,

Read only

Former Member
0 Likes
3,544

Hi,

If you are copying the code..The system will take care of giving the error message as foreign key relation is maintained for that field with the table MARA..

Thanks,

Naren

Read only

0 Likes
3,544

Yaa thats true but my concern is where is the code, I mean where is the point of message,

I was debugging the entire program and the main program - SAPLBARM, screen 800 the message is populated but i dont see the code.

It comes and stops at the BOLD line in the below specified code.

PROCESS AFTER INPUT.

MODULE exit_backflush AT EXIT-COMMAND.

  • zuerst die Werksdaten lesen note 524622

<b> CALL SUBSCREEN tabsub800. " note 524622 </b>

CALL SUBSCREEN sub800. " note 524622

CALL SUBSCREEN subhr.

MODULE get_hr_data.

CALL SUBSCREEN fco_sub.

MODULE get_fco_data.

MODULE check_input.

MODULE check_fcode.

Read only

0 Likes
3,544

Put one "Breakpoint at statement" with statement MESSAGE.

Regards.

Read only

Former Member
0 Likes
3,544

Although this seems like the best way to do this (break-point at a message), SAP often hides messages very deeply. In other words, the program finds something it doesn't like, but instead of just raising a message, it passes some parameters to a FM that calls another FM, etc. until the actual message is issued. And that really doesn't tell you much.

I think a simpler approach is to debug from the beginning. Execute high level modules one at a time until the error appears. Then go back and start again. When you come to the module that raised the error, execute it line by line, but execute any modules that are called again at the higher level (F6 I think).

You have to do this a number of times, but eventually you will see where the error originated.

Rob

Read only

0 Likes
3,544

Thanks Guys for all the help.

I am duplicating the MFBF screen ans was trying to copy the code if user enters wrong material.

Instead i changes my selection screen.

I introduces a value check in the selection screen and it gives me the message.

SELECTION-SCREEN: BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.

PARAMETERS : P_ERFMG LIKE RM61B-ERFMG,

P_MATNR LIKE RM61B-MATNR <b>VALUE CHECK</b> ,

Thank for all the time and help..

Read only

Former Member
0 Likes
3,544

Hi,

I am not able to find the code that issues a message when the foreign key check fails..I also tried with system debugging..sorry..:-((

Thanks,

Naren