04-01-2014 10:21 AM
Hello everyone,
I have a requirement which is to add 2 new columns on the ALV that appears after going through the phap_admin selection screen.
I show you a picture as an example:
I need to add 2 fields form infotype 0002 in this ALV list.
I've been looking around and I found this badi: HRHAP00_REPORTING, but I don't think it can help me, because this bady Works after clicking the status button "Reporting" at /nphap_search.
Does anybody faced the same issue?
Do you now any badi for that purpose?
Help would be apreciated and rewarded with points.
Kind regards.
04-01-2014 10:31 AM
Append your additional fields in this structure HAP_S_DOCUMENTS it will show in the layout.
then write implicit enhancement for data population where final itab is filling.
and after append structure, for data population in the following include LHRHAP_UI_DOCUMENT_REPORTF06 and subroutine f1100_ctrl_create modify table based on ur logic.
I tried in my sandbox its working fine and data is showing perfectly.
suri
04-01-2014 10:27 AM
If there are no badis then go for implicit enhancements.
1. search how field catlog build add two fields to that
2. data population logic while filling the final itab.
Regards
sure
04-01-2014 10:30 AM
Have you tried:
1) After executing PHAP_ADMIN, and before you get to this screen.
2) Goto se24 (Display class cl_exithandler)
3) Double click on the method GET_INSTANCE.
4) Put a break point at Line no.25 (CASE sy-subrc).
Now
5) Press the required button on PHAP_ADMIN to get to your next screen
6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
7) This way you will find most, but not all, the BADIs called
04-01-2014 10:31 AM
Append your additional fields in this structure HAP_S_DOCUMENTS it will show in the layout.
then write implicit enhancement for data population where final itab is filling.
and after append structure, for data population in the following include LHRHAP_UI_DOCUMENT_REPORTF06 and subroutine f1100_ctrl_create modify table based on ur logic.
I tried in my sandbox its working fine and data is showing perfectly.
suri
04-01-2014 11:27 AM
Thank you Suri, I've been searching for BADI's but I cannot find anything that suits me well, and I think your solution is OK, but the customer doesn't want to take risks and spoil other applications that Work on the standard structure HAP_S_DOCUMENTS.
Thank you for your time.
04-01-2014 12:28 PM
then you can add your additional fields in fieldcat log of sub routine mentioned above and put if sy-tcode = 'PHAP_ADMIN'. then insert ur additional fields in fieldcatlog internal table and populate the data.
04-03-2014 11:47 AM
Yes, thank you Suri, of course it's posible to append a structure on the HAP_S_DOCUMENTS and to set an enhancement-point to the standard program, and it will work, but I was wondering if there was a cleaner solution prepared by SAP to perform this action.