cancel
Showing results for 
Search instead for 
Did you mean: 

How can i write code inside methods.

Former Member
0 Kudos

Hi,

I am new to wbdynpro. How can i write code in Webdynpro?

I have created one layout in that two textboxes are there. After entering the details when i click on the button the datas should be saved into the database table. How can i write code in this.

please help me.

Shyja

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

First in context create node for 2 input field. Then disign layout for input filds and do data binding. Then create button and assign ON action event to it. In action method use wizard to read the values from the node.

DATA: Node type REF TO IF_WD_CONTEXT_NODE,

elem_node1 TYPE REF TO if_wd_context_element,

stru_node1 type ZEMP.

Node = wd_Context->get_Child_Node( Name = `S_NODE2` ).

  • get element via lead selection

elem_node1 = node->get_element( ).

  • get all declared attributes

elem_node1->get_static_attributes(

IMPORTING

static_attributes = stru_node1 ).

INSERT ZEMP FROM stru_node1.

If helpful reward points.

Regards,

Karthick S

Answers (1)

Answers (1)

Former Member
0 Kudos

hi shyja.....

if you click the methods tab, there will be different methods, in whichou can code.

chec out these links:

http://www.octavia.de/fileadmin/content_bilder/Hauptnavigation/SAP_NetWeaver/WebDynpro/Web_Dynpro_Pa...

help.sap.com/saphelp_webas630/helpdata/en/c3/76b45d9688e04abe1a1070410ddc1e/content.htm

help.sap.com/saphelp_nw04s/helpdata/en/79/002c2a0d43e645a39a89dd662b5f68/content.htm

---regards,

alex b justin