Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

migo-101 document

former_member225134
Participant
0 Kudos

HI,

      I want to show 101 document (not obtained for 543), with subcontracting po  (pstyp = 3) .....so i am fetching value from

SELECT A~MBLNR  " Number of Material Document

           A~MJAHR  " Material Document Year

           A~ZEILE_I  " Item in Material Document

           A~BLART  " Document Type

           A~BLDAT  " Document Date in Document

           A~BUDAT  " Posting Date in the Document

           A~CPUDT  " Day On Which Accounting Document Was Entered

           A~TCODE  " Not More Closely Defined Area, Possibly Used for Patchlevels

           A~BWART_I  " Movement Type (Inventory Management)

           A~WERKS_I  " Plant

           A~BKTXT    " DOC HEADER TXT

           A~XAUTO_I  " CREATED ON

           A~ERFMG_I  " QTY

           A~MEINS_I  " UNIT OF MEASURE

           A~USNAM    "CREATED BY

           A~MATNR_I

           A~EBELN_I

           A~EBELP_I

           B~EBELN  "PO NUMBER

           B~EBELP  "LINE ITEM

           B~PSTYP  "ITEM CATEGORY

  FROM WB2_V_MKPF_MSEG2 AS A INNER JOIN EKPO AS B ON

                           A~EBELN_I = B~EBELN AND

                           A~EBELP_I = B~EBELP AND

                           A~MATNR_I = B~MATNR

*

                           INTO CORRESPONDING FIELDS OF TABLE IT_MKPF

         WHERE BUDAT IN SO_BUDAT AND

               BWART_I IN ('101', '543') AND

               PSTYP EQ '3'.



but here am getting mblnr having both (101) and (-543) document.

i want 101 document with pstyp = 3.


Any one suggest???????

3 REPLIES 3

Former Member
0 Kudos

Hi ,

When you do not want 543 movement , why do you add it in the select query ?

                           INTO CORRESPONDING FIELDS OF TABLE IT_MKPF

         WHERE BUDAT IN SO_BUDAT AND

               BWART_I IN ('101', '543') AND

               PSTYP EQ '3'.

Pls remove 543 in where condition & check

Former Member
0 Kudos

you can use this,

FROM EKPO AS B INNER JOIN  WB2_V_MKPF_MSEG2 AS A ON 

                         A~EBELN_I = B~EBELN    AND                  

                         A~BWART_I = '101'            AND                       

                         A~EBELP_I = B~EBELP    AND                       

                         A~MATNR_I = B~MATNR

former_member225134
Participant
0 Kudos

Hi,

       i want to fetch both 101 and 543 after that below code deletes 543...it perfectly works on 131 and 261 documents.But 101 and 543 is not working..

while checking in migo the mblnr having both (+101) and (-543)..

or anybody knows how to fetch 101 document with subcontracting po = 3.

  

while check in migo it shows + 101 and purchase order should be in 3(item category).....

Please suggest some logic??????