cancel
Showing results for 
Search instead for 
Did you mean: 

editable alv in webdynpro ...and after editing how to upload the data in database

Former Member
0 Kudos

Hi , i have created one ALV which contains the material master data .i have following requirements .

1) want to make material number (matnr) and material type (mtart) editable .

2) to upload both the filed in db table after editing

i am not able to upload the data i am using predefind BAPI . BAPI_MATERIAL_SAVEDATA by using service call . but its not working.

i am giving you the code.

method onactionsave.

DATA:

      NODE_MARA                           TYPE REF TO IF_WD_CONTEXT_NODE,

      ELEM_MARA                           TYPE REF TO IF_WD_CONTEXT_ELEMENT,

      STRU_MARA                           TYPE IF_INPUTVIEW=>ELEMENT_MARA .

*   navigate from <CONTEXT> to <MARA> via lead selection

    NODE_MARA = WD_CONTEXT->GET_CHILD_NODE( NAME = IF_INPUTVIEW=>WDCTX_MARA ).


*   @TODO handle not set lead selection

    IF ( NODE_MARA IS INITIAL ).

    ENDIF.

*   get element via lead selection

    ELEM_MARA = NODE_MARA->GET_ELEMENT(  ).


*   @TODO handle not set lead selection

    IF ( ELEM_MARA IS INITIAL ).

    ENDIF.



*   alternative access  via index

*   Elem_Mara = Node_Mara->get_Element( Index = 1 ).

*   @TODO handle non existant child

*   if ( Elem_Mara is initial ).

*   endif.


*   get all declared attributes

    ELEM_MARA->GET_STATIC_ATTRIBUTES(

      IMPORTING

        STATIC_ATTRIBUTES = STRU_MARA ).

      WD_COMP_CONTROLLER->EXECUTE_BAPI_MATERIAL_SAVEDATA(

      ).

its not working .

please suggest me anyother to upload the data after changing it in alv in sap abap wda

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
former_member210804
Active Participant
0 Kudos

Hello webdynpro consultant,

Go through the following link

http://saptechnical.com/Tutorials/WebDynproABAP/Column/page2.htm