Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8635

Re: how to enter data in input field

$
0
0

Hi Rohan,

Thanks a lot for the tips. I did all the steps but when i am clicking on SUBMIT button but it is not getting saved in my custom table ZWEBDYNPRO. Please check the code. I have written it inside onSUBMIT event in the button.

 

method ONACTIONSUBMIT .

TYPES : BEGIN OF ty_employee,

        NAME TYPE pa0001-ename,

        PLANS TYPE pa0001-plans,

        END OF ty_employee.

DATA : itab TYPE STANDARD table of ty_employee ,

       wa   TYPE ty_employee.

  DATA LO_ND_EMPLOYEE TYPE REF TO IF_WD_CONTEXT_NODE.

 

 

  DATA LO_EL_EMPLOYEE TYPE REF TO IF_WD_CONTEXT_ELEMENT.

  DATA LS_EMPLOYEE TYPE wd_this->element_employee.

  DATA ls_table_data TYPE wd_this->element_employee.

    DATA lt_table_data TYPE wd_this->elements_employee.

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

  LO_ND_EMPLOYEE = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_EMPLOYEE ).

 

 

* @TODO handle non existant child

* IF lo_nd_employee IS INITIAL.

* ENDIF.

 

 

* get element via lead selection

  LO_EL_EMPLOYEE = LO_ND_EMPLOYEE->GET_ELEMENT( ).

* alternative access  via index

* lo_el_employee = lo_nd_employee->get_element( index = 1 ).

* @TODO handle not set lead selection

  IF LO_EL_EMPLOYEE IS INITIAL.

  ENDIF.

 

 

* get all declared attributes

  LO_EL_EMPLOYEE->GET_STATIC_ATTRIBUTES(

    IMPORTING

      STATIC_ATTRIBUTES = LS_EMPLOYEE ).

*get all desired attributes in an internal table

CALL METHOD LO_ND_EMPLOYEE->GET_STATIC_ATTRIBUTES_TABLE

     EXPORTING

       FROM   = 1

       TO     = 2147483647

     IMPORTING

        TABLE  =    lt_table_data

        .

MOVE lt_table_data TO itab.

LOOP AT itab INTO wa.

MODIFY ZWEBDYNPRO FROM wa.

CLEAR wa.

ENDLOOP.

COMMIT WORK.

 

 

endmethod.


Viewing all articles
Browse latest Browse all 8635

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>