Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ALV with user-defined buttons on toolbar in wd abap

Hi All,

I have to create an alv with user defined buttons in wd abap on its toolbar.Could any one tell me in detail about it or provide me with any tutorial based on it.

Thanking you all in advance.

Former Member
Former Member replied

DATA: LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.

DATA: LR_INTF_ALV TYPE REF TO IWCI_SALV_WD_TABLE.

LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).

IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) EQ ABAP_FALSE.

LR_CMP_USAGE->CREATE_COMPONENT( ).

ENDIF.

LR_INTF_ALV = WD_THIS->WD_CPIFC_ALV( ).

WD_THIS->M_MODEL = LR_INTF_ALV->GET_MODEL( ).

DATA: LR_FUNCTION TYPE REF TO CL_SALV_WD_FUNCTION.

LR_FUNCTION =

WD_THIS->M_MODEL->IF_SALV_WD_FUNCTION_SETTINGS~CREATE_FUNCTION(

ID = 'ISSUE' ).

DATA: LR_BUTTON TYPE REF TO CL_SALV_WD_FE_BUTTON.

CREATE OBJECT LR_BUTTON.

LR_BUTTON->SET_TEXT( 'Issue/Receive' ).

LR_FUNCTION->SET_EDITOR( LR_BUTTON ).

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110

Abhi

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question