Quantcast
Channel: SCN : All Content - Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 3667

in Webdynpro type compatible error.

$
0
0

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)


Viewing all articles
Browse latest Browse all 3667

Latest Images

Trending Articles



Latest Images

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