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: 

Navigation in ALV GRID

Former Member
0 Kudos

Hello to all,

I want to display a purchase order in an ALV Grid with its details,

and user can see the other purchase order by clicking the Next, Previous, First and Last button Application toolbar.

I have all the data(PO with there details) in an Internal table.

How i can achieve the navigation of PO in the grid using the above stated buttons.

Regards

Saurabh

1 REPLY 1

Former Member
0 Kudos

Hi,

You can use pf-status to navigate display another purchase order.

FORM set_pf_status USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'xxxxxx'.

ENDFORM.

This is the standard subroutine for handling pf-status.

you have to pass this subroutine name to pf-status in grid display.

I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'

After that you have to use the user-command subroutine to handle the function codes.

FORM USER_COMMAND USING UCOM TYPE SY-UCOMM R_SELFIELD TYPE SLIS_SELFIELD.

CASE UCOM.

WHEN 'NEXT'.

leave to list-processing.

-


-


WHEN 'PREVIOUS'.

leave to list-processing.

-


-


ENDCASE.

endform.

Then you have to pass this usercommand subroutine to your grid display.

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

I think it is helpful for you.