cancel
Showing results for 
Search instead for 
Did you mean: 

Doubts with WD ABAP

former_member215786
Participant
0 Kudos

Dear I want learn WD ABAP. I am reading the documentation that follow:

[Web Dynpro for ABAP: Tutorials for Beginners|http://www.sdn.sap.com/irj/sdn/nw-wdabap?rid=/webcontent/uuid/367b73e5-0901-0010-daa3-9de4771fc985] [original link is broken];

However I have doubt with the following code:

 
method WDDOINIT .
* data declaration
data:
Node_sflight type REF TO IF_WD_CONTEXT_NODE,
Itab_sflight type standard table of SFLIGHT.
* get data from table SFLIGHT
select * from SFLIGHT into table Itab_sflight.
* navigate from <CONTEXT> to <SFLIGHT> via lead selection
Node_sflight = wd_Context->get_Child_Node( Name = `SFLIGHT_NODE` ).
* bind internal table to context node <SFLIGHT>
Node_sflight->Bind_Table( Itab_sflight ).
endmethod.

This code use several methods that is generated, but I want know How is got this code, there is a Wizard for generate this code? or I should learn this code

Accepted Solutions (0)

Answers (3)

Answers (3)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

In pattern, choose ABAP Objects patterns.

In that in radio button, Call Method choose the following from F4 button.

Instance Node_sflight

Class/Interface IF_WD_CONTEXT_NODE

Method Bind_table

It will generate the below code.Pass the internal table as shown in bold.

CALL METHOD node_sflight->bind_table

EXPORTING

new_items = itab_sflight

  • set_initial_elements = ABAP_TRUE

  • index =

.

gill367
Active Contributor
0 Kudos

IN web dynpro configuration wizard i am not getting read set and append radio buttons,,

is there any option in teh settings i need to change please let me know.

thanks

sarbjeet

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

You can use code wizard for reading the context node. In this case, SFLIGHT_NODE.

After that, write the select statement by your own.

Then for binding the table, either you can use Pattern button as normal for OOPS ABAP or you can write the single table.

Former Member
0 Kudos

Hi carmen ,

The coding you have written above can be generated through code wizard easily.

Just you need to click the code wizard button .

just see the below link :-

[http://help.sap.com/saphelp_tm70/helpdata/en/3b/29933f09a5fb47e10000000a114084/content.htm]

you can call nodes and can call them as a table or structure.

again you can access methods and attributes of various classes . The code will be auto genarated. You just need to cange a little bit according to your need.