2007 May 09 2:00 PM
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.
2007 May 09 2:14 PM
Hi Ajay,
You can do this in alv list display also.
Copy the standard gui status in ur program using tcode SE51->user interface
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
2007 May 09 2:27 PM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |