Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all articles
Browse latest Browse all 10425

purchase requsition enhancement problem

$
0
0

when i am execute me51n that timeno value is fetched in lv_bwtty and lv_bwtar from mbew.


DATA: lw_req_item   TYPE mereq_item,

         lv_bwtar TYPE bwtar_d,      " valuation type

         lv_bwtty TYPE bwtty_d.      " valuation catagory

 

 

   CLEAR: lw_req_item,lv_bwtar,lv_bwtty.

 

 

*   DATA:

*           bwtar TYPE MBEW-bwtar,

*           bwtty TYPE MBEW-bwtty.

 

   IF im_item IS NOT INITIAL.

     CALL METHOD im_item->get_data

       RECEIVING

         re_data = lw_req_item.

   ENDIF.

 

   IF sy-tcode EQ 'ME51N' AND lw_req_item IS NOT INITIAL.

     SELECT SINGLE bwtar bwtty FROM mbew INTO (lv_bwtar , lv_bwtty)

        WHERE matnr = lw_req_item-matnr AND bwkey = lw_req_item-werks.

*        AND bwtty = 's' OR  bwtty = 'b' OR  bwtty = 'k' OR  bwtty = 'z' OR  bwtty = ' '.

 

     IF sy-subrc EQ 0.

       IF lv_bwtty = 'S' OR lv_bwtty = 'b' OR lv_bwtty = 'k' OR lv_bwtty = 'z' OR lv_bwtty = ' ' AND lv_bwtar <> lw_req_item-bwtar.

         MESSAGE 'valuation type does not exits in Material Master' TYPE 'E'.

 

        ENDIF.

     ENDIF.

   ENDIF.

ENDMETHOD.



how can i resolve that issue..


Viewing all articles
Browse latest Browse all 10425

Trending Articles



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