Application Development and Automation 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: 
Read only

Regarding list display + button on application tool bar

Former Member
0 Likes
438

Hi guru's

I have a requirement like i need to select one particular record in the list display and prees on the button which is placed on the application tool bar.Then i should get one more screen where i can enter some details.

As per my knowledge it is possible only in grid display.

Kindly let me know if it is possible.

It would be great help if sample coding is provided.

Hi guru's

I have a requirement like i need to select one particular record in the list display and prees on the button which is placed on the application tool bar.Then i should get one more screen where i can enter some details.

As per my knowledge it is possible only in grid display.

Kindly let me know if it is possible.

It would be great help if sample coding is provided.

2 REPLIES 2
Read only

Former Member
0 Likes
411

Hi Ajay,

You can do this in alv list display also.

Copy the standard gui status in ur program using tcode SE51->user interface


>copy->target prog name.activate it

and add a button there.Use FM <b>'REUSE_ALV_EVENTS_GET'</b> to get user-command event.

sample code :

form Z8_EVENTCAT using p_i_eventcat TYPE SLIS_T_EVENT.

DATA : L_EVENT TYPE SLIS_ALV_EVENT.

  • FOR GETTING ALL 17 EVENTS

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = P_I_EVENTCAT

EXCEPTIONS

LIST_TYPE_WRONG = 1

OTHERS = 2

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CLEAR L_EVENT.

READ TABLE P_I_EVENTCAT WITH KEY NAME = SLIS_EV_PF_STATUS_SET INTO L_EVENT.

IF SY-SUBRC = 0.

MOVE 'Z8_PF_STATUS' TO L_EVENT-FORM.

APPEND L_EVENT TO P_I_EVENTCAT.

ENDIF.

CLEAR L_EVENT.

READ TABLE P_I_EVENTCAT WITH KEY NAME = SLIS_EV_USER_COMMAND INTO L_EVENT.

IF SY-SUBRC = 0.

MOVE 'Z8_USER_COMMAND' TO L_EVENT-FORM.

APPEND L_EVENT TO P_I_EVENTCAT.

ENDIF.

form Z_MENU using p_extab type slis_t_extab.

SET PF-STATUS 'MENU_LIST'.

endform. " Z_MENU

form z8_user_command using p_ucomm type sy-ucomm

p_selfield type slis_selfield.

case p_ucomm.

WHEN '&IC1'.

call screen 100.

endcase

endform.

Reward points if helpful.

Regards,

Hemant

Read only

0 Likes
411

Hi hemant,

you code tells clearly how to keep a button on the application tool bar and how to make it work.

But, my question is i want to select particular record and then press on application tool bar button. When we select that particular record i want to take that particular record details into my next screen.