SAP ABAP - CL GUI ALV TREE - How to add custom toolbar buttons

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ต.ค. 2024

ความคิดเห็น • 6

  • @swagataroy21
    @swagataroy21 2 หลายเดือนก่อน

    Can you please guide on how to add subtotals of the child nodes in the respective parent nodes?

  • @astet
    @astet 3 ปีที่แล้ว +1

    hey thank you for the Video. I am also experimenting with cl_gui_alv_grid and created buttons. Can you help me maybe with 1 or 2 Questions :D? If you say yes, there are my Questions sir 1) How can i make a gap between 2 buttons like one at the beginning and another one at the end of alv grid? i tried button type = 3 Seperator but it does nothing. Question 2 ) I created a alv grid with default screen and want to give a pf-status and user command without call screen. Thank you very much :)

    • @itwithdustin
      @itwithdustin  3 ปีที่แล้ว +1

      I would be curious to see the code you’re using for the separator button, I would think that it should work.
      As for question two, you can use the set_screen_status( ) method of the cl_salv_table instance to handle this. Create an event handler class for the added_function event of cl_salv_events_table, and you should be good to go. Let me know if you have further questions.

    • @astet
      @astet 3 ปีที่แล้ว

      @@itwithdustin Thank you. I will experiment with it asap :D and let you know.

    • @jorgeMcarvalho1990
      @jorgeMcarvalho1990 2 ปีที่แล้ว

      @@astet I believe sap does it like this:
      * Modify toolbar with methods of CL_GUI_TOOLBAR:
      * add separator to toolbar
      CALL METHOD g_toolbar->add_button
      EXPORTING
      fcode = ''
      icon = ''
      butn_type = cntb_btype_sep.
      Just saw it in a standard program. Not sure if that's what you were looking for.

    • @astet
      @astet 2 ปีที่แล้ว

      @@jorgeMcarvalho1990 we finished the project and I didn't seperate it. 😅 But thank you very much for this idea. I will try it in next one. 👍