Skip to Content
0

How to debug sap fiori back-end ABAP CODE

Jan 29, 2017 at 07:10 AM

151

avatar image

Hello guys,

I have sap FIORI apps, I need to debug the ABAP CODE, but when I put an external break-point on the abap code but when I run the fiori app the break point is not getting triggered.

I have next code with my break-pint

In only want to validate the value of sy-tcode when I run from Fiori, as you can see, this code only works when you enter from ME28 but not from FIORI.

Can you please help me?

Regards

abap-code.png (4.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Armin Beil
Jan 30, 2017 at 12:26 PM
2

To ensure that the user you are debugging for does actually match the user of the process is a good hint by Nic.

External debugging should be fine since the screenshot already shows an external breakpoint.

Besides the user check you could also verify that the code is actually reached when you run the Fiori App. This sounds a bit strange but sometimes it happens to the most experienced developers that they are very sure a certain piece of code is reached while it is actually not.

There are many ways to verify it is reached, e.g. use a write statement (not suitable for Fiori though..), manipulate the return values with something characteristic, create an ext. BP at an earlier position and try to step to that line you are interested in, use dynamic logpoints from ADT, ...

Best regards,
Armin

Share
10 |10000 characters needed characters left characters exceeded
Nic Teunckens Jan 30, 2017 at 10:04 AM
1

Are you using BREAK-POINTS in External Debugging mode? It this another User than your 'default' User?

There are some Blogs on both Front-Gateway-Backend Debugging (link) as well as the OData (link).

Extract from the first Blog :

"Debugging the abap backend can be done as usual with the abap debugger. It’s important to use external breakpoints instead of session breakpoints. Otherwise the debugger will not stop at your breakpoints. A helpful point in the backend debugging was, that you can switch the user for which you want to debug in the backend system. You can change the user for which you debug in the settings of e.g. T-Code SE80. We’ve used this a lot when the abap developer worked directly with the JavaScript developer to check errors/functions in the applications – we changed the breakpoints in the backend to the user of the frontend developer and checked the code directly togehter."

Hope this helps ...

Nic T.

Share
10 |10000 characters needed characters left characters exceeded