Curious Case of Adding Custom Fields to CN43N Output
Recently, I came across a requirement of adding custom fields to t-code: CN43N (PS). As usual and as always I went straight to find any user exit or a BADI available to serve this purpose but all in vain. So, just like any other SAP guy, I went searching for SCN (didn’t tell this to my client 😉 ), there I found out something pretty sad, guys are hoping against hope and crying their heart out with numerous unanswered posts and I can bet they are still looking for an answer to their query.
Anyhow, I started looking at CN43N and I was wondering how to add just one custom field to this mysterious T-Code’s output. Found out couple of things, first, there is a structure include called CI_PRPS in standard table: PRPS. This include lets you add your custom fields in the said table. This means, wherever PRPS is being used, it will take your custom field along! Great, see my first achievement below 😀
Since we have added our custom fields to the respective table, so theoretically, technically and logically these should be appearing in our T-code. Yeah? So, let’s see if that came up or not?
Here is the demonstration of my second part for the task.
Wow! Fields are now available in CN43N but unfortunately there is no data 🙁 . Let me tell you frankly, above two steps were easy. Adding fields to PRPS and getting them displayed in CN43N ALV but here comes the hard part.
Client: Mansoor! From where are you going to populate the data?
I had a conversation with client with no solution in hand but luckily as always Implicit enhancements never betray you! You they don’t! So, being devilish! I knew that implicit would do the trick for me! How? I don’t know.
To answer this HOW I started debugging CN43N and after hours of banging my head against SAP code, I finally found out what I was looking for, all you have to do is just follow. Just before showing output, CN43N calls an FM! There you go! What does the blind desires, but of course eyesight. There was I!
FM: PSIS_SINGLE01_CREATE_ALV (here PRPS data is filled) does it for me. All I needed to do was put an implicit enhancement and bingo!
Below, I tried to make most out of SAP’s amazing inline declaration concept!
Spot on! Now CN43N was bound to follow me! 😉
I hope you liked it, there is no need to thank me! If you know any other way, please share!
neatly explained , thanks for sharing,
one question though,
how do we find these implicit enhancements, sometimes we requires to grey out some fields in standard transaction(like CJ20n) at the time of save, so that next time the field is disabled for the user, is there any standard procedure for finding these implicit enhancements..
thanks and regards,
Well, this becomes somewhat tricky, in a sense when you don't find any BADI or Userexit. If you are asking for the T-Code: SENH. Here you can find everything. If not, debugging seems the only way to get through.
Hope this explains.
Very Useful...Thank you..
do you know how to add field in report cn47n?, if yes please share where i suppose to append structure
Hi handsome guy.
Do you know how to add field in report CJI3/CJI3N?
I need your help,thank you very much.
Look forward to your favourable reply.