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: 

ALV + User Exit

Former Member
0 Kudos
588

Hi all,

One of my friends here is facing a small issue in using ALV(Classic) within a user exit.

In the existing ALV display, he is using a form for setting the PF-Status as follows.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = report_name

I_CALLBACK_PF_STATUS_SET = 'F100_PF_STATUS_SET' n so on n so forth ...

But since this is being written within an exit, it does not permit the use of FORM…ENDFORM for the dynamic call of the subroutine 'F100_PF_STATUS_SET'.

Anybody who has worked on Exits and ALV, your inputs would be of great help.

Hope my question is clear …!!

Many Thanks,

Gayathri.

6 REPLIES 6

Former Member
0 Kudos
191

U can check this link

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm

Thanks & Regards,

Judith.

Former Member
0 Kudos
191

Hi, try my solution.

Create a new report, assume name it ZCALLBACK, and write your F100_PF_STATUS_SET form in it, like following:

report ZCALLBACK.

FORM F100_PF_STATUS_SET.

  • your logic

ENDFORM.

And in your user-exit, call the ALV function like following:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZCALLBACK'

I_CALLBACK_PF_STATUS_SET = 'F100_PF_STATUS_SET'

......

Hope it will be useful to your scenario.

And thanks a lot

Former Member
0 Kudos
191

Thanks a lot Judith. I am yet to implement this logic. Will let you know once it is successful.

Many thanks once again !!

Regards,

Gayathri.

0 Kudos
191

Hi Gayathri,

There is way to say thanks in SDN,hope u know it.U can reward points if u feel it as useful.

Thanks & Regards,

Judith.

Former Member
0 Kudos
191

Hi zhenglin gu ,

Yours has been a very helpful answer. Thank you very much. It was a good logic indeed.

I will close the thread once this issue has been resolved.

Regards,

Gayathri.

Former Member
0 Kudos
191

Hi, you are welcome.

But please don't forget the reward point.

thanks a lot