on 12-18-2015 2:01 PM
HI Freinds ,
I am new to webdynpro ,now i am doing some new development ,here i am getting some small problem i have tried and sharing for that,kindly check once let me know .i am pasting my code fist. my question is i am populating a table and item fields when you push some button.Still now getting table along with filter conditions are fine according my client req,now kindly see that last line i am sending the ITAB(item data)to another interface node to populate by push button .but i am getting here type compatible error ,both sides i am using same structure the same fields which i pinged here .how can i send custom itab to this node .kindly tell me.i have seen in some portals and tried but it wont work .
--
types:begin of ty_vbak,
vbeln type vbak-vbeln,
erdat type vbak-erdat,
erzet type vbak-erzet,
ernam type vbak-ernam,
end of ty_vbak.
data:itab type standard table of ty_vbak,
wa type ty_vbak.
DATA lo_nd_salesdoc TYPE REF TO if_wd_context_node.
DATA lo_el_salesdoc TYPE REF TO if_wd_context_element.
DATA ls_salesdoc TYPE wd_this->Element_salesdoc.
data lv_vbeln type wd_this->Element_salesdoc-vbeln.
* navigate from <CONTEXT> to <SALESDOC> via lead selection
lo_nd_salesdoc = wd_context->get_child_node( name = wd_this->wdctx_salesdoc ).
* get element via lead selection
lo_el_salesdoc = lo_nd_salesdoc->get_element( ).
CALL METHOD LO_EL_SALESDOC->GET_ATTRIBUTE
EXPORTING
NAME = 'VBELN'
IMPORTING
VALUE = lv_vbeln .
select vbeln
erdat
erzet
ernam from vbak into table itab where vbeln eq lv_vbeln.
DATA lo_nd_salesheader TYPE REF TO if_wd_context_node.
----------------------
DATA lo_el_salesheader TYPE REF TO if_wd_context_element.
DATA ls_salesheader TYPE wd_this->Element_salesheader.
DATA lv_erdat TYPE wd_this->Element_salesheader-erdat.
* data ls_salesheader TYPE ty_vbak.
* navigate from <CONTEXT> to <SALESHEADER> via lead selection
lo_nd_salesheader = wd_context->get_child_node( name = wd_this->wdctx_salesheader ).
--------------------------------------
lo_ ls_salesheader = itab."error here unable to send to lo_ls_salesheader.
---------------------------------------
lo_nd_salesheader = bind_table ( new_elements = lo_nd_salesheader set_intial_elements = abap_true)
Hi,
DATA ls_salesheader TYPE wd_this->Element_salesheader " Work Are
should be of type DATA ls_salesheader TYPE "wd_this->Elements_salesheader" Internal table
Change the type of LS_salesheader to "wd_this->Elements_salesheader"
Regards,
Vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Sorry to late response .
Thanks a lot for your valuable time and response .
Problem solved .
Regards/Teja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Thanks a lot to all for your response ,yes i tried with structure and itab ( "wd_this->Elements_salesheader").my error has gone but later while doing Bind_table ( itab ).or lo_nd_salesheader = bind_table ( new_elements = lo_nd_salesheader set_intial_elements = abap_true).
Getting Bind_table Methd has unknow or protected or private error actually i tried something for this error from existing posts but it wont work ,could you please tell me. Thanks to all once again for your valuable time.
Regards
Teja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
--------------------------------------
lo_ ls_salesheader = itab."error here unable to send to lo_ls_salesheader.
---------------------------------------
You're moving the contents of ITAB to the structure and hence you're getting error.
Try to move WORKAREA contents to structure.
lo_nd_salesheader = bind_table ( new_elements = lo_nd_salesheader set_intial_elements = abap_true)
For bind_Table( ) , we need to pass ITAB as a value but not node reference.
Hope this will help you else revert back with your observations.
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Teja,
lo_nd_salesheader = bind_table ( new_elements = lo_nd_salesheader set_intial_elements = abap_true)
Hope you are binding the node instead of your ITAB. Please use itab in place of lo_nd_salesheader.
BR,
RAM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.