‎2020 Jan 24 3:01 PM
Hi.
I'm searching but did not find how to add customized button.
I need to add as customer here required it so I can save Header and Slave internal tables as EXCEL.
I think we can not do it with standard CL_SALV_HIERSEQ_TABLE solution to save both tables in users PC.
‎2020 Jan 24 3:11 PM
"HIERSEQ" corresponds to the display as a full screen, so you can't add buttons dynamically.
You can only define an initial "GUI status" via the method SET_SCREEN_STATUS. The prerequisite is to create the custom GUI status by copying the standard one which is probably STANDARD_FULLSCREEN in program SAPLSLVC_FULLSCREEN, and add your own buttons.
I don't know what are the available types of exports for a HIERSEQ ALV.
‎2020 Jan 24 3:11 PM
"HIERSEQ" corresponds to the display as a full screen, so you can't add buttons dynamically.
You can only define an initial "GUI status" via the method SET_SCREEN_STATUS. The prerequisite is to create the custom GUI status by copying the standard one which is probably STANDARD_FULLSCREEN in program SAPLSLVC_FULLSCREEN, and add your own buttons.
I don't know what are the available types of exports for a HIERSEQ ALV.
‎2020 Jan 24 3:18 PM
hi sandra.rossi .
Do you know where to use IF sy-ucomm= 'MYCUSTOM_BUTTON' statment with no screen ?
I'll try to test some report events to do it.
‎2020 Jan 24 3:26 PM
Use GET_EVENTS to retrieve the event instance, then register a handler for the event ADDED_FUNCTION. The function code is in parameter E_SALV_FUNCTION.
‎2020 Jan 24 3:42 PM
Hi Sandra.
I used set pf-status inside form show_alv_tree but it is not showing it.
Probably I'm getting rust on this. 🙂
Do you know the correct place to use it ?
SET PF-STATUS 'STANDARD_FULLSCREEN'.
Another question.
I already have a local class to handle events and already have for example another method on_single_click to handle my hot spots.
I created a method to handle user command like you said but it is not getting called probably because my PF-STATUS is yet the standard of my report.
I need to set this custom pf-status to get this solved probably.
‎2020 Jan 24 3:46 PM
I said "method SET_SCREEN_STATUS" (of the HIERSEQ instance) 🙂
‎2020 Jan 24 4:37 PM
Solved. many thanks to sandra.rossi .
Called this method just before the display method.
"Set PF-Status
gr_hierseq->set_screen_status(
EXPORTING
report = sy-repid
pfstatus = 'STANDARD_FULLSCREEN'
* set_functions =
).SET HANDLER gr_events->on_user_command FOR lr_events.Added this method on my existing local class
on_user_command FOR EVENT added_function OF cl_salv_events_hierseq
IMPORTING e_salv_function sender.And put a break inside this new method and it is executed always when I click my new Excel button.
METHOD on_user_command.
break-point.
ENDMETHOD.I've already copied that PF-STATU from that standard program mentioned above and created already my new button on it.
Works like magic.
many thanks to you Sandra. 🙂