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: 

phap_admin: how to add columns to the initial ALV

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

former_member201275
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

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.

0 Kudos

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.