Skip to Content
Technical Articles

Debugging payment medium structures

I needed to check why a ISO 20022 payment file did not contain the right information despite all the fields were populated correctly in business partner master data.

The problem I was facing was the condition in this node was not matched, so my goal was to see what value the ZBKNS field (part of the FPAYH structure) had.

 

I had a look at the DMEE tree to check for obvious errors but was not able to find the root cause immediately. I also had a look at the great document about the FPAYH, FPAYHX and FPAYP structures, but it did not help. So, I had to give the ABAP debugger a go! 🙂

In SE38, I selected SAPFPAYM program and displayed its source code. I could find an interesting include which could have listed the structure I was looking for, so I double-clicked it to go one level deeper:

 

Bingo! The structure is listed at the very beginning of the code, so I could add a session breakpoint short after the structure was being populated:

 

Going back to the main screen of SE38, I launched the report and provided all the necessary values to generate the payment medium. When I execuded it, the ABAP debugger jumped in where my session breakpoint was:

 

I double-clicked on the fpayh structure in the source code, and it also appeared on the variable panel, ready to be analyzed:

 

By double-clicking on FPAYH on the variable panel, I was able to see the content of the structure! After looking for the ZBKNS, I noticed the technical type is a string of three characters, with the last one being a space character (2000 in hexadecimal value):

 

So, it was immediately clear what the problem was: the string I expected and the one who was returned were not the same! I went back to the DMEE tree and added another condition, remembering to put a trailing space in it:

 

Problem solved! 🙂

 

This was an easy scenario, sometimes we need to deep dive into the structures by setting watchpoints and other advanced techniques to really find out where the issue is, but ABAP comes with very powerful tools which helps to live easier 🙂

2 Comments
You must be Logged on to comment or reply to a post.
  • Hi Luca,

     

    that is one way of debugging but there is another, in my opinion better, solution when you use DME – just call transaction DMEE_DEBUG and in tab ‘Condition’ click on ‘Set Breakpoint’

     

    Then debugger will automatically stop at the node you are interested in.

    To be honest I never had any problem with the ZBNKS formatting so far but instead of doing each single assignment twice (one without space and one with ) you can simply make a technical node in DMEE which is left aligned and has only 2 characters. Then compare the value not against FPAYH-ZBNKS but against the technical note containing formatted ZBNKS. That looks way better in DME structure than additional conditions with spaces.

     

    Regards,

    Marek