cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt in Tutorial 6 Webdynpro for ABAP

Former Member
0 Kudos

Dear folks,

I have been following tutorial 6 in WD4A given in the link,

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c8780... [original link is broken]

.In that TECHED_05S_CUSTOMER_DATA component is not in my system.So i wrote component myself which gives this functionality. i write a method to extract customer data in Component controller ,and i created a view in that component,but still i cant get output when i select line item...means system does not shom me customer data when i click on flight data.Can anyone help me .This is my code of method.

method CUSTOMER_DATA .
data:
    Node_Customer_Data                  type ref to If_Wd_Context_Node,
    Elem_Customer_Data                  type ref to If_Wd_Context_Element,
    Stru_Customer_Data                  type If_Componentcontroller=>Element_Customer_Data .
* navigate from <CONTEXT> to <CUSTOMER_DATA> via lead selection
  Node_Customer_Data = wd_Context->get_Child_Node( Name = IF_COMPONENTCONTROLLER=>wdctx_Customer_Data ).

* get element via lead selection
  Elem_Customer_Data = Node_Customer_Data->get_Element(  ).

  select id name street POSTBOX POSTCODE into (Stru_Customer_Data-id, Stru_Customer_Data-name,
                                              Stru_Customer_Data-street, Stru_Customer_Data-POSTBOX, Stru_Customer_Data-POSTCODE)
                                              from SCUSTOM  where ID = CUSTOMID.

  endselect.
* set all declared attributes
  Elem_Customer_Data->set_Static_Attributes(
    exporting
      Static_Attributes = Stru_Customer_Data ).
endmethod.

Nirad

Accepted Solutions (0)

Answers (3)

Answers (3)

bruno_esperanca
Contributor
0 Kudos

Hi all,

I have written a tutorial that shows how to create the reusable component necessary for tutorial 6.

Please refer to my blog post:

http://scn.sap.com/community/web-dynpro-abap/blog/2012/05/07/web-dynpro-for-abap--fix-for-tutorial-6...

All the best,

Bruno Esperança

Former Member
0 Kudos

in my condition is same above.

can u give me some information how to solve doubt.

Former Member
0 Kudos

dear jung,

your internal table filed name must be same at the attribute name of the node.than and then data would be displayed.

Nirad

Former Member
0 Kudos

i have solved this at my own .thanx though