BAPI for  Reversal of Goods Receipt Purchase Order(Transaction : MIGO)

Hi all,
Is there any BAPI for the Reversal of posting the documents Goods receipt Purchase order
(Transaction: MIGO).
Any inputs on this..is highly appreciable...
thanks in advance...
regards..
prathima.

Hi,
Try this passing material doc and year.
* Cancel the goods movement (creates a reversal document)
  CALL FUNCTION 'BAPI_GOODSMVT_CANCEL'
    EXPORTING
      materialdocument = g_material_doc
      matdocumentyear  = g_matdoc_year
    TABLES
      return           = i_return.
Edited by: Raj on May 14, 2008 7:46 PM

Similar Messages

  • BAPI needed  for  Goods Receipt Purchase Order(Transaction : MIGO)

    Hi all,
    We have a requirement where in we need to post the documents throuh BAPI for Goods receipt Purchase order(Transaction: MIGO).
    Any inputs on this..is highly appreciable...
    thanks in advance...
    regards..
    prathima.

    Hi,
    use 'BAPI_GOODSMVT_CREATE'
    Check this sample.
    code
    REPORT ZRICH_0001 .
    Structures for BAPI
    DATA: GM_HEADER TYPE BAPI2017_GM_HEAD_01.
    DATA: GM_CODE TYPE BAPI2017_GM_CODE.
    DATA: GM_HEADRET TYPE BAPI2017_GM_HEAD_RET.
    DATA: GM_ITEM TYPE TABLE OF
    BAPI2017_GM_ITEM_CREATE WITH HEADER LINE.
    DATA: GM_RETURN TYPE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    DATA: GM_RETMTD TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.
    CLEAR: GM_RETURN, GM_RETMTD. REFRESH GM_RETURN.
    Setup BAPI header data.
    GM_HEADER-PSTNG_DATE = SY-DATUM.
    GM_HEADER-DOC_DATE = SY-DATUM.
    GM_CODE-GM_CODE = '04'. " MB1A
    Write 971 movement to table
    CLEAR GM_ITEM.
    MOVE '412' TO GM_ITEM-MOVE_TYPE .
    MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
    MOVE '3800533484' TO GM_ITEM-MATERIAL.
    MOVE '1' TO GM_ITEM-ENTRY_QNT.
    *MOVE 'PC' TO GM_ITEM-ENTRY_UOM.
    MOVE '1060' TO GM_ITEM-PLANT.
    MOVE '0007' TO GM_ITEM-STGE_LOC.
    *MOVE '0901' TO GM_ITEM-MOVE_REAS.
    MOVE 'P203601001' TO GM_ITEM-WBS_ELEM.
    MOVE 'P203601001' TO GM_ITEM-VAL_WBS_ELEM.
    APPEND GM_ITEM.
    Call goods movement BAPI
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    EXPORTING
    GOODSMVT_HEADER = GM_HEADER
    GOODSMVT_CODE = GM_CODE
    IMPORTING
    GOODSMVT_HEADRET = GM_HEADRET
    MATERIALDOCUMENT = GM_RETMTD
    TABLES
    GOODSMVT_ITEM = GM_ITEM
    RETURN = GM_RETURN.
    IF NOT GM_RETMTD IS INITIAL.
    COMMIT WORK AND WAIT.
    CALL FUNCTION 'DEQUEUE_ALL'.
    ELSE.
    COMMIT WORK AND WAIT.
    CALL FUNCTION 'DEQUEUE_ALL'.
    ENDIF.
    WRITE:/ GM_RETMTD.
    LOOP AT GM_RETURN.
    WRITE:/ GM_RETURN.
    ENDLOOP.
    [/code]
    Also check the Bapis
    BAPI_PO_CREATE --> To create Purchase Order
    BAPI_PO_CHANGE --> To change Purchase Order
    BAPI_PO_GETDETAIL --> Todisplay Purchase Order
    Regards,
    Raj.

  • What is d BAPI for reversal of Good Receipt Note(GRN) for movement type 102

    Hi ABAPers,
       I have got requirement like this , I have done Goods Receipt Note (GRN) based on Purchse order Number using '.BAPI_GOODSMVT_CREATE' with 101 movement type.
       But now my requirement is reversal of good receipt note(GRN) based on Material Document Number (or) Purchase Order Number with 102 movement type. what is the bapi name i need to use. and i need to give reason for the reversal of GRN.
    please tell me the field name for reason  in bapi.
    i have searched in the net, but i could not get proper answer to this isse.
    Highly appriciate who gives answer as early as possible. I need to complete this task EOD. please give replies.
    Thanks & Regards,
    Vinay Kumar.

    Hi,
    If your material document has specific movement type i.e. 101, if you cancel document using BAPI_GOODSMVT_CANCEL, it automatically picks associated movement type 102 defined in customizing setting, you don't need to pass 102 explicitly while cancelling.
    I have not seen reason code in this bapi, but it is required to pass reason code then you may try transaction code MBST using BDC.
    Thanks,
    Ashok Veer

  • Goods Receipt Purchase order

    Hi All,
    In Goods Receipt Purchase order(MIGO) Transcation, we r having delivery note (LFSNR) field, i want to retrive this field from data base , so can any body tell me the exact table for this delivery note field.
    BALU.

    Hi,
    LFSNR field is nothing but xblnr which u can find in table mkpf.
    For this, u need to know material document no, ie,mblnr.
    If u pass mblnr,mjahr to table Mkpf, u will get field xblnr which is nothin but lfsnr which u req.
    Hope ur query is solved.
    **REWARD ALL HELPFUL ANSWERS

  • No valuation type at Goods Receipt Purchase Order

    Hi,
    No valuation type at Goods Receipt Purchase Order and have to manually input the valuation type. How to default it so that the valuation type is populated automatically and gray out without any changes to the valuation type ?
    Thanks.

    hi Pankaj,
    The valuation tyoe is appearing for the hearder material only & not for the child material.
    is there any way possible to get the valuation type of child material.
    & moreover I have tried with Purchase  info record ,But not helpful
    Please aadvice
    Regards,
    Vivek
    Edited by: vivek sharma on Aug 1, 2008 3:35 AM

  • Trying to link Goods Receipt Purchase Order (OPDN) to Landed Cost (OIPF)?

    Hi Everyone,
    I am wondering what the link is between a Goods Receipt Purchase Order and a Landed Cost. Here is a diagram of the link that I am trying to determine.
    According to the Database Tables Reference there is a link between OPDN (Goods Receipt Purchase Order) and OIPF (Landed Costs) called 'ImportEnt', as shown below -
    However I can't work out what 'ImportEnt' links to on the OPDN (Goods Receipt Purchase Order) side.
    Any advice concerning how to link OPDN to OIPF will be greatly appreciated.
    Kind Regards,
    David

    Hi Nagarajan,
    Thank you for the helpful response. The key to fixing my query was in the code below (which you kindly shared) -
    LEFT JOIN PDN1 T2 ON T1.[BaseEntry] = T2.[DocEntry] AND T1.[LineNum] = T2.[BaseLine]
    Kind Regards,
    David

  • Getting error in goods receipt purchase order

    I am getting the error when running the goods receipt purchase order..
    "Account determination for entry 1000 (COA) BSX 1200 ( Co Code) -- CAR1 ( raw material )not possible"
    Can some one suggest me for above error..
    Praveen

    Hi
    Check valuation grouping code is active in OMWD for the valuation area and then check OBYC settings for chart of accounts - for BSX transaction key - GL account has been assigned.
    Thanks

  • Find a bapi for Creates a Goods Receipt with correspond to Inbound Delivery

    hi expert!
    exist a bapi for tcode:MIGO_GR ( Goods Receipt with correspond to Inbound Delivery)
    i know one bapI  BAPI_GOODSMVT_CREATE can Creates a Goods Receipt,
      but i can't know to use it to Creates a Goods Receipt with correspond to Inbound Delivery.
    or other bapi exist for MIGO_GR?
    Best Regard!

    Hi Vatcan,
    Chek the Inbound Delivery 1st weather you refer the right PO in it
    You can also chek in  PO i
    1 Me23n Go to confirmation tab here you can see the  Inbound delivery  quantity
    2 Chek  which reference document you recived the goods,  (i.e You recived the goods with reference to PO or  Inbound delivery)
    2 Coz if you refer the inbound delivery then syestem will deafult show the inbound quanity
    And yes the actual quanity will update in inbound delivery if you refer the inbound deivery while reciveing the goods

  • Pay in advance before Goods Receipt Purchase Order

    Hi Experts,
    I would to know if it possible set a process of Paying in advance before to receive  Goods from Purchase Order
    Steps, like
    1-Create P.O (ME21N).
    2-Enter Incoming invoice (MIRO) (full or partial).
    3-Goods Receipt Purchase Order (MIGO).
    Could you suggest me?
    Thanks in advance,
    Ignacio

    If you want post the invoice prior to GR than you should not check the Gr-based invoice in the PO invoice tab then system will allow you to post the invoice.
    and later you can post the GR.
    until you post the GR you will see the open GR in MB5S tcode.

  • New batch number for Draft Good Receipt Purchase Order

    Hello,
    I'm using SBO 8.81
    I'm looking for the table that contains the information about the batch number of a draft good receipt.
    DRF16 contains quantity of batch, but when itu2019s new batch, they are not in OBTN yet (in the table, SBO define object type as 10000068 while itu2019s 10000044 for existing batch)
    The query defined here  is not working as the batches are not in OBTN yet (not in stock)
    I used the profiler trying to understand in which table these data are recorder, without success.
    Any idea ?
    Thank you for your help
    Sébastien
    Edited by: Sébastien Danober on Aug 24, 2011 6:31 PM
    Sorry, wrong forum, I recreate it under SDK

    Hi Sébastien,
    The link is from DRF16 to ODBN:
    select * from DRF16 T0 inner join ODBN T1 on T0.ObjAbs = T1.AbsEntry
    DRF16 has a zero-to-many relationship with DRF1 (ie draft lines)
    Kind Regards,
    Owen

  • SAP console goods receipt purchase order

    Hi all,
    I'm new at SAP console, and I need it to make goods reception from a purchase order with a mobile device (PDA).
    Is there any way to make it without performing a Warehouse Management customizing in SAP ERP system??? I've seen a goods receipt menu with several reception options which seems to be WM options (transport orders, etc), but I didn't see the option to make a goods reception with reference to a purchase order (like in MIGO transaction)
    Thanks in advance
    Regards

    OK, thanks a lot, that was very helpful. Now I know how to focus the problem I've some doubts.
    I'm going to customize a basic WM to work with the SAP console.
    My idea is to do a process similar to the next one:
    1) The purchase order is created inn SAP R3 with confirmation type 0004 (for inbound deliveries).
    2) Create in SAP R3 the inbound deliveries corresponding to the previous purchase orders.
    3) Create in SAP R3 the Transport Orders corresponding to the previous inbound deliveries.
    4) Confirm de Transport Orders/Inbound deliveries from the SAP console mobile device.
    5) Post the goods receipt for the confirmed inbound deliveries in SAP R3.
    Is there any way to avoid steps 2 and 3? I mean:
    - Can the inbound deliveries be automatically generated when the purchase order is saved?
    - Can the TO's be automatically generated when the inbound delivery is created?
    Right now, I'm doing these 2 steps with collective transactions, but if it is possible I'd like to do it automatically.
    Thanks a lot.
    Best regards

  • Migo Goods Receipt Purchase Order

    Hi all
    I have to clear ,in transaction Migo, the wbs elements ( only in certain cases ) .For that we ve created an user-exit in the program of Substitutions that clear the fields : cobl-ps_psp_pnr, cobl-mat_pspnr. But the two fileds are not cleared .
    the  user exit is this :
       IF ( V_BWARTWE = '101'  OR
            V_BWARTWE = '102'  OR
            V_BWARTWE = '122'  OR
            V_BWARTWE = '123' ).
          SELECT  SINGLE * FROM ekpo
                 WHERE ebeln = cobl-ebeln AND
                       ebelp = cobl-ebelp.
          check  EKPO-PSTYP EQ '3'.
          check  EKPO-KNTTP EQ 'Q'.
          cobl-kostl  = 'ZCL_PIENO'.
          CLEAR   cobl-ps_psp_pnr.
          CLEAR   cobl-mat_pspnr.
       ENDIF.
    the Field cobl-kostl   is correctly filled but the two fields wbs ar not clear .We used a program already used in an other project with the same logic,the only difference is the release : we are in 6.0
    can you Help me ?
    Thanks

    Hi,
    You can use these two badi's MB_MIGO_BADI, MB_MIGO_ITEM_BADI pick the proper one.
    i think item_badi will suit for your purpose.
    first create Z implementation for this definition and put break point in PBO detail method and chck which one is useful for you.
    regards
    Muthappan

  • BAPI for creating Return delivery to vendor using transaction MIGO

    Hi All,
             My requirement is to create Return delivery to vendor using transaction MIGO.
    In MIGO transaction to create return delivery, the following steps needs to be followed.
    i) Select the option A02 Return delivery, R02 Material document,
        Enter Material document xxxxxxxx.
        Reson for movement:xxxx
        By selecting the option item ok and via delivery check box, then save.
    After saving return delivery needs to be created.
    Is there any BAPI/FM exist for this requirement?
    I made lot of search in sdn, but i could not find any thing helpful.
    Appreciate quick help.
    regards
    surya

    Hi
    In VL02n->Extras->Delivery Output->Header
    Check if you see any message type (LD00 ?).
    If you do not see any, insert a message type LD00.
    If you want to check the IMG settings, see Txns : V/71 (for delivery types RL/RLL) and V/73 (for Item category RLLN)
    Best regards
    Ramki

  • Automatic Goods Issue for Goods Receipt (Purchase Order).

    Hi,
    Experts - I have some newbee problem.
    I have to create ZMIGO to behave like follows:
    1. User enters all necessary data (like in MIGO) and posts document.
    2. System creates automatic Goods Issue document based on data entered in 1. (above).
    I doubt full automatic posting of GI will be possible (user has to fill in WBS for GI and possibly change "GI for project"). So my idea is to redirect user from ZMIGO (after posting) GR document to MIGO_GI and pass all necessary parameters. And thats my question: How to do it? Is it possible? Any other ideas? Maybe examples???
    Will reward points to all helpful answers.
    Regs,
    FS

    Hi,
    I've created implementation for MB_DOCUMENT_BADI in se19 (named it: ZMB_DOCUMENT_BADI_1). Filled methods with code and put some break-points. Activiated methods and implementation.
    When I post documents via MIGO this BADI is not executed! Why? When I've searched program SAPLMIGO for cl_exithandler only two were found: MB_MIGO_BADI and MB_MIGO_ITEM_BADI. What I have to do to activate this MB_DOCUMENT_BADI???
    Points waiting for helpful answers.
    REgs,
    FS

  • Goods receipt Purchase Order error (MIGO_GR)

    Hi
    I'm trying to save this transaction but it is giving me an error message.
    The message comes up as -
    *" User ******** already processing Purchasing document **************"
    This message has been there for 5 hours now
    We have tried few things but this document is stuck somewhere and we don't have this document number is our system.  Is there anything I can do to find out what happened?
    Thanks and regards

    HI,
    whenever if you have opened same document or link to that document then you will get this error
    or before Posting if SAP stops or reset happens than you will get this errors.
    Please go to SM12  if you have authorisation , or any user who is having Authorisation for SM12 and select the User who has done this transaction and blocking is happend then delete all the items in that screen.
    Go back and now do the Transaction what you want to do it will Post.
    with regards
    Shrinivas gangoor

Maybe you are looking for

  • Couldn't connect iPhone to internet

    Hi guys, I hope you could help me with my iPhone problem. Today I was using whatsapp to chat with my friends, it works fine as usual. But later on, the internet connection suddenly lost. However, on the top left corner of the screen, it shows the pro

  • SAP BW Environment - What documentation is needed to support it?

    I am currently working on an existing SAP BW system, but there is no documentation at all for it. We need to create appropriate documentation to enable easier understanding of the environment going forward. However, what type of detailed documentatio

  • Gmail Mobile App 2.0

    New version: http://googlesystem.blogspot.com/2008/10/gmail-mobile-app-20.html reg

  • Open PDFfile being generated from a process ran, directly from a BTN press

    Greetings! Based on some requirements, I designed a process as explained... User enter some values on the screen, Hit on "SUBMIT & PRINT" a push button. I'm creating a process instance and calling Prcess monitor page then users go thier current isnta

  • F.17 Error

    Once i will execute f.17 i had give parameters for company code & customer, after execute the system showing error message Reply address does not exist for company code 1000 Message no. FB366 Diagnosis You want to print forms on which the reply addre