Application Development 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: 

How to spot where the data did not inserted correctly (standard program enhancement)

hanafganesa
Explorer
0 Kudos
545

Hi ABAP guru.

I apologize in advance if my English is not perfect, but I am in need of some assistance with a problem that I have been facing in the enhancement section of the standard program.

The standard program for crud maintenance order has an enhancement, so that it will assign asset number and equipment number when creating new maintenance order. The problem is, when I fill asset number and equipment number, only asset number is inserted, and equipment number is not inserted. But when I didn't fill the asset number, the equipment number is inserted correctly.

I have debugged the program and find nothing weird about the flow of the program, since the program goes to many function (for example RULE_GET, RULE_PRE_READ, EXPORT_IMPORT, and BAPI_COMMIT), I can't really track where the data didn't inserted correctly. I'm new to ABAP, and I'm not sure how much detail I can provide.

Can you tell me what should I do to track where the data is not inserted correctly?

6 REPLIES 6

FredericGirod
Active Contributor
0 Kudos
484

Hi

Looks like a customizing setting, did you try to put a Notification point ? (to trace when a field has this value changed) ?

Or do you try to put a SQL trace with buffered table to find table T* corresponding to custoizing table ?

hanafganesa
Explorer
0 Kudos
484

Hi Frederic

I change the maintenance order and the message showing "Order [order_number] saved with notification [notification_number]".

I also set several session breakpoints in the function builder source code before saving the maintenance order.

himanshu_gupta13
Product and Topic Expert
Product and Topic Expert
0 Kudos
484

Hi Frederic,

You can debug the FM CO_ZV_ORDER_POST, this FM gets called during MO save. Here, inside this FM lot of checks and validation happens. You can debug the code and check the logic around the field EQUNR.

Many Thanks / Himanshu Gupta

matt
Active Contributor
484

A program enchantment? It's magic! 🙂

Sandra_Rossi
Active Contributor
484

I love it: I would also like to suggest SAP to rename "enhancement" to "enchantment" 😄

hanafganesa
Explorer
0 Kudos
484

Hi Himanshu,

Thanks for the advice! I will try it today!

And yes it works like magic to me 😂