Bapi purchase order

Hy Gurus,
Are there a Bapi with input the purchase order number and output the purchase order open quantity and delivery date?
Thanks.
Josy

Hi
Use this bapi BAPI_PO_CREATE1 it has those fields you want..
thanks
Edited by: Sharada.Dhulipala on Oct 12, 2011 4:33 PM

Similar Messages

  • Help Bapi Purchase order with reference to purchase requisition no

    Hi,
    i used BAPI_PO_CREATE1 for creating purchase order with reference to Purchase requisition number but im getting these error
    please help me to solve this
    1 E BAPI 001 No instance of object type PurchaseOrder has been created. External reference:
    2 E MEPO 001 Purchase order item 00010 still contains faulty schedule lines
    3 E 06 054 Doc. type/item cat. NB/S (requisition) <-> NB/ (purch. order)
    4 E 8W 162 No schedule line exists for schedule line number 0010000030 00010 0000.
    Thanks & Regards,
    Azhar
    Message was edited by:
            Azhar

    Hi Azar,
    I am also getting the same messages, did you get resolve the issue.

  • FM BAPI purchase order to check if is invoiced

    Hi,
    I've got to migrate PO to a new comp code, is there any bapi or FM thats show's if the po as been invoiced.
    Thzs in advanced to all
    Jaime Cordeiro

    Hi,
    Thzs for the anserw, the solution pass by the reading of that table and a combination of the quantitys.
    Regards
    Jaime Cordeiro
    Award point given

  • BAPI purchase order create (subcontracting)

    Hi,
    Is it possible to create subcomponents for PO item when it is not BOM related? I checked BAPI_PO_CREATE and CREATE1 (with ALE messages assigned) but cannot find how to use standard way to accomplish this (ver. 4.6C).
    Is there a better way to do this than batch input with ME21?
    Best regards,
    Maciej

    That's the first thing I checked...
    CREATE1 is used only once in 4.7 (idoc_input..) and not in 4.6C, there should be new interface generated.  The problem is all BAPIs interfaces have no container for subcomponents at all (only items general, schedule lines, service lines, conditions etc.).
    Note 197958 says BAPI_PO_CREATE can be used for creating subcontracting items only when BOMs exist and most probably it is the last answer to this issue;)
    Br,
    Maciej

  • BAPI for updating tax code for purchase order..

    Hi friends,
      I have one requirement to change tax code for multiple Purchase order but the
    thing is they should not go for release.So what should I prefer BDC or BAPI.
      I am thinking to implement it through BAPI, but I don't know what procedure to follow.
    If somebody can provide me a small guiding steps or code then it will be very helpful for me..
    Thnaks in advance..
    Useful answers will be rewarded with points....
    Regards,
    Rajesh Akarte

    Hi Friend,
    BAPI_ACC_PURCHASE_ORDER_CHECK  Accounting: Check Purchase Order                                         
    BAPI_ACC_PURCHASE_ORDER_POST   Accounting: Post Purchase Order  
    MEWP                           BAPIs Purchase order                                                     
    BAPI_PO_CREATE                 Create Purchase Order                                                    
    BAPI_PO_GETDETAIL              Display Purchase Order Details                                           
    BAPI_PO_GETITEMS               List Purchase Order Items                                                
    BAPI_PO_GETITEMSREL            List Purchase Orders for Release (Approval): New as of 4.0A              
    BAPI_PO_GETRELINFO             Display Detailed Release (Approval) Information on Purchase Order        
    BAPI_PO_GET_LIST               List Purchase Orders - Only up to 4.0A                                   
    BAPI_PROCOPERATION_GETCATALOGS Determine Valid Catalogs as Value Help                                   
    BAPI_PROCOPERATION_GETINFO     Analysis of Objects to be Generated in Purchasing                        
    <b>AND</b>
    Use condition type NAVS with access sequence 0003 to default the taxcode in the purchase order item using conditions. Materials Management -> Purchasing -> Purchasing order processing ->define screen layout at document level. Search for the transaction ME21.Double click on ME21. Then search for TaxCode
    Use condition type NAVS with access sequence 0003 to default the taxcode in the purchase order item using conditions.
    A2: Go to IMG.
    Materials Management -> Purchasing -> Purchasing order processing ->define screen layout at document level.
    Search for the transaction ME21.Double click on ME21. Then search for TaxCode. It is advisable to configure also the info record. The tax code should be a required entry, and whatever you specify here will be the default value in the Purchase order.
    Materials Management -> Purchasing -> Purchasing info record -> define screen layout.
    When you get here you search for the transaction ME12 ,double click here; search for Input VAT indicator.
    Regards ,
    Kumar.

  • Open Purchase Order UPload Using the BAPI 's

    i need to upload the open Purchase Order using the BAPI function BAPI_PO_CREATE1., below is the given fileds blod are for Header, header will Repeat for the line items,can any one help me out  using the BAIP's for upload the PO, i need sample code for this ........
    Thanks & Regards
    Raghu
    <u>Field Name     Field Description                              Type     Length</u>
    <b>EBELN             Purchasing Document Number                         CHAR     010          X
    BUKRS             Company Code                                                     CHAR    004     MN10     C
    EKORG             Purchasing Organization                              CHAR     004     MN00     C
    EKGRP             Purchasing group                              CHAR     003          X
    BSART             Order type (Purchasing)                              CHAR     004          X
    LIFNR             Account Number of Vendor or Creditor                    CHAR     010          X
    BEDAT             Purchase Order Date                              DATS     010          X
    ZTERM             Terms of payment key                              CHAR     004          X
    WAERS             Currency Key                                   CUKY     005          X
    INCO1             Incoterms (part 1)                              CHAR     003          X
    INCO2             Incoterms (part 2)                              CHAR     028          X</b>
    EBELP             Item Number of Purchasing Document                    NUMC     005          X
    EMATN             Material number                                   CHAR     018          X
    WERKS             Plant                                        CHAR     004          X
    LGORT             Storage location                              CHAR     004          X
    EPSTP             Item category in purchasing document                    CHAR     001          X
    KNTTP             Account assignment category                         CHAR     001          X
    EINDT             Item delivery date                              DATS     010          X
    MENGE            "Purchase order quantity (direct input, transfer of POs)"     CHAR     013          X
    MEINS            Order unit                                   UNIT     003          X
    NETPR            "Net price: Document currency (direct input, transfer of"     CHAR     011          X
    PEINH            "Price unit (direct input, transfer of POs)"               CHAR     005          X
    BPRME            Order Price Unit (Purchasing)                         UNIT     003          X
    BPUMZ            Numerator: Conversion OPUn into OUn (direct input of POs          CHAR     005          X
    BPUMN            Denominator: Conversion OPUn into OUn (direct input of P          CHAR     005          X
    SAKTO            Cost element                                   CHAR     010          X
    KOSTL              Cost Center                                   CHAR     010          X
    VBELN          Sales and Distribution Document Number                    CHAR     010          X
    VBELP          Sales document item                              NUMC     006          X
    WEMPF          Goods recipient                                   CHAR     012          X
    WEBTH          "Amount in local currency (direct input, transfer of POs)"     CHAR     013          X
    WEBTF          "Amount in document currency (direct input, transfer of P"     CHAR     013          X
    WEREF          Flag for treatment of GR/IR (direct input of POs)          CHAR     001          X
    SPINF          Indicator: Update info record                         CHAR     001          X
    WEPOS          Goods Receipt Indicator                              CHAR     001          X
    REPOS          Invoice receipt indicator                         CHAR     001          X

    i need to upload the open Purchase Order using the BAPI function BAPI_PO_CREATE1., below is the given fileds blod are for Header, header will Repeat for the line items,can any one help me out  using the BAIP's for upload the PO, i need sample code for this ........
    Thanks & Regards
    Raghu
    <u>Field Name     Field Description                              Type     Length</u>
    <b>EBELN             Purchasing Document Number                         CHAR     010          X
    BUKRS             Company Code                                                     CHAR    004     MN10     C
    EKORG             Purchasing Organization                              CHAR     004     MN00     C
    EKGRP             Purchasing group                              CHAR     003          X
    BSART             Order type (Purchasing)                              CHAR     004          X
    LIFNR             Account Number of Vendor or Creditor                    CHAR     010          X
    BEDAT             Purchase Order Date                              DATS     010          X
    ZTERM             Terms of payment key                              CHAR     004          X
    WAERS             Currency Key                                   CUKY     005          X
    INCO1             Incoterms (part 1)                              CHAR     003          X
    INCO2             Incoterms (part 2)                              CHAR     028          X</b>
    EBELP             Item Number of Purchasing Document                    NUMC     005          X
    EMATN             Material number                                   CHAR     018          X
    WERKS             Plant                                        CHAR     004          X
    LGORT             Storage location                              CHAR     004          X
    EPSTP             Item category in purchasing document                    CHAR     001          X
    KNTTP             Account assignment category                         CHAR     001          X
    EINDT             Item delivery date                              DATS     010          X
    MENGE            "Purchase order quantity (direct input, transfer of POs)"     CHAR     013          X
    MEINS            Order unit                                   UNIT     003          X
    NETPR            "Net price: Document currency (direct input, transfer of"     CHAR     011          X
    PEINH            "Price unit (direct input, transfer of POs)"               CHAR     005          X
    BPRME            Order Price Unit (Purchasing)                         UNIT     003          X
    BPUMZ            Numerator: Conversion OPUn into OUn (direct input of POs          CHAR     005          X
    BPUMN            Denominator: Conversion OPUn into OUn (direct input of P          CHAR     005          X
    SAKTO            Cost element                                   CHAR     010          X
    KOSTL              Cost Center                                   CHAR     010          X
    VBELN          Sales and Distribution Document Number                    CHAR     010          X
    VBELP          Sales document item                              NUMC     006          X
    WEMPF          Goods recipient                                   CHAR     012          X
    WEBTH          "Amount in local currency (direct input, transfer of POs)"     CHAR     013          X
    WEBTF          "Amount in document currency (direct input, transfer of P"     CHAR     013          X
    WEREF          Flag for treatment of GR/IR (direct input of POs)          CHAR     001          X
    SPINF          Indicator: Update info record                         CHAR     001          X
    WEPOS          Goods Receipt Indicator                              CHAR     001          X
    REPOS          Invoice receipt indicator                         CHAR     001          X

  • BAPI for PURCHASE ORDER with OPEN QUANTITY field

    Hi All,
    I wanted to use the BAPI_PO_GETDETAIL to get the Purchase Order details upon triggering from Warehouse management system,
    But the details required contains a field called OPEN QUANTITY...which is not used in this BAPI.
    I request to let me know if any BAPI exits for PO details having the structure for this field:Open Quantity.
    Am using SAP version 4.0B.
    If not exists please advise how to customize the existing BAPI to meet the requirement.
    thanks
    mahi

    Hi,
    Open quantity is a calculated field. I guess the BAPI gives the details of the delivery, so take the ordered qty and substract the delivered qty from that.
    Delivery data is EKET table.
    Regards,
    Ravi

  • Hi experts, Upload purchase order using BAPI

    hi
    Could you please help me how to do PURCHASE ORDER CREATION using BAPI.
                         Thank you.

    Satyendra,
    The forum that you have posted your question in is for questions related to the SAP Business One Integration for SAP NetWeaver.  Your question is or seems to be related to R/3 and should be posted in that forum.
    Eddy

  • Purchase Order BAPI's

    Dear All,
    Could you please let me know the BAPI that can be used to check whether the Purchase order has been created for a particular material or not.
    Also to get the all the PO's that are created with the corresponding material details.
    Please the list of input fields that needs to be provided for these BAPI's
    Regards,
    Nithiyanandam

    Hi,
    Could you please make it clear, Because I dont have much knowledge in ABAP. I executed this BAPI through the Tcode SE37, by providing the Material number details in Import parameter. When executed, the return parameter provided the total count of the PO numbers for the material( as 500 etc for ex) and I am not getting any details in the PO_ITEMS tables.
    Let me know what else chould I provide.
    Thanks & Regards,
    Nithiyanandam

  • Error while creation of PUrchase order by using BAPI.

    Hi All,
       We are creating a purchase order thru BAPI ("BAPI_POEC_CREATE") and we are passing the following parameters ( I_PO_HEADER , I_PO_ITEMS , I_PO_ACCASS , I_PO_PARTNER and I_PO_ORGDATA)  to the bapi and after processing  we are getting the following error and Abend messages.
    Messages:
    1) Enter at least one item or one limit ( we have added line items in I_PO_ITEMS structure).
    2) Incorrect interface data for set 78 in method C.
    3) Interface data contains errors.
    Can anyone help me in fixing these errors inorder to proceed further.
    Regards
    Dharmaraju

    Hi there,
    Did you manage to sort this problem ?
    If not let me know
    I am using the same and know how to overcome
    Thanks
    Turlock
    T

  • Create a Purchase order using the BAPI using the data in the XML file.

    Hello Gurus,
    here is the scenario can anyone help me how to proceed explaining the procedure?
    Create a Purchase order using the BAPI using the data in the XML file.
    comprehensive explanations are appreciated.
    thanks in advance.

    hi,
      first use fm "bapi_po_create".
      then use fm "BAPI_ACC_GL_POSTING_POST"
    The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
    •     No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
    •     In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
    •     A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM).

  • Problem in creating a SyncBo for Purchase Order BAPIs

    Hello Everybody,
    I am trying to create a smart sync application for Purchase Orders.
    I have used standard bapis like BAPI_PO_GETDETAIL AND BAPI_PO_CREATE1.
    I have developed my own wrapper functions using these std bapis. For the PO creation i only plan to insert the necessary and mandatory data. The problem i face is that some of the tables in the create bapi which are mandatory for a PO creation are freezed in the SyncBo.
    Tables like POITEMX, POADDRDELIVERY, POSCHEDULE and structure POHEADERX are all required for the creation of a PO. Without this minimum data a PO cannot be created.
    After i have created the syncBo, on the mapping screen i can only see these tables under the create BAPI. But i am not able to perform the mapping of their fields. These are non-editable or i must say that they are freezed.
    And if i cannot map them then i cannot pass data for them from the client. Although i can do the mapping for the table PO_ITEM and the structure PO_HEADER.
    I hope i am able to expplain my problem. Kindly get back to me if i am not clear. Any sort of help is welcome.
    Thanking in advance,
    Saurabh.

    Hi Saurabh,
    Hope you are aware of the prerequisites for creating the BAPI Wrappers.
    If you want to insert some data into the Business Object, then you have to include
    GETLIST, GETDETAIL and CREATE Bapi Wrappers.
    I think in your case,
    You might not have mapped those fields in your GETLIST Bapi Wrapper.Just check whether you have mapped those fields that are necessary for PO creation in your GETLIST and GETDETAIL BApi wrapper mapping screen.
    Those fields you have mapped in the GETLIST and GETDETAIL BAPI wrappers will be visible (for selection - checkboxes will be editable) in the mapping screen for CREATE BAPI Wrapper.
    So first of all, you have to map fields there in the mapping screens for GETLIST and GETDETAIL Bapi Wrappers...
    check this thing...
    refer these links..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20infrastructure/mobile%20development%20kit%202.5/content/appdev/smartsync/introduction.html
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20infrastructure/mobile%20development%20kit%202.5/content/appdev/smartsync/bapi_wrapper_types.html
    In the second link, you can see one figure, which is explaining the things that are to be satisfied by the BAPI Wrappers for SyncBO creation...
    Let me know If you have doubts in the prerequisite section itself...
    Regards,
    Kishor Gopinathan

  • Bapi to post planned delivery cost of a purchase order

    Hi every body,
             Can anybody please give me the full details of the planned delivery cost data
    to post with BAPI_INCOMINGINVOICE_CREATE
    what are the manditory fields,
    I am using the following code , but  a few are posting , remaining r not posting
    but when I post the same through MIRO it is posted what is difference
    this error was came
    ERROR: enter good reciept data only when working with GR-based IV
    REPORT  ZBAPI_MIRO                              .
    tables: ekko,ekbe,ekpo,lfa1,EKBZ,t000.
    data: itemdata like BAPI_INCINV_CREATE_ITEM occurs 0 with header line,
      headerdata like BAPI_INCINV_CREATE_HEADER occurs 0 with header line,
         return like BAPIRET2 occurs 0 with header line,
         DOC_NO LIKE BAPI_INCINV_FLD-INV_DOC_NO,
         FISC_YEAR LIKE BAPI_INCINV_FLD-FISC_YEAR.
    DATA:error_flag.
    data: item_data like EK08BN occurs 0 with header line.
    data: begin of  itab occurs 0,
                 p_order like ekpo-ebeln,
                 p_item like ekpo-ebelp,
                 p_ctype like konv-kschl,
                 p_lifnr like lfa1-lifnr,
          end of itab.
    data:  order(10) type N,
          vendor(10) type N.
    data: begin of it_doc occurs 0,
                DOC_NO LIKE BAPI_INCINV_FLD-INV_DOC_NO,
                p_order like  ekko-ebeln,
          end of it_doc.
    PARAMETERS:  fn LIKE rlgrap-filename OBLIGATORY.
    DATA: FN1 TYPE STRING,
         l .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR fn. "p_file.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                field_name = 'FN'
           IMPORTING
                file_name  = fn.
    START-OF-SELECTION.
       FN1 = FN.
    PERFORM upload.
    loop at itab.
    CLEAR: EKBZ,EKPO,LFA1,ITEM_DATA,HEADERDATA,itemdata.
    REFRESH:itemdata,HEADERDATA,ITEM_DATA.
    order = itab-p_order.
    itab-p_order = order.
    vendor = itab-P_lifnr.
    itab-p_lifnr = vendor.
    select single * from ekbz where ebeln = order
                               and ebelp = itab-p_item
                              and kschl = itab-p_ctype
                              and bewtp = 'F'.
    select single * from ekpo where ebeln = order
                           and ebelp = itab-p_item.
    SELECT SINGLE * FROM LFA1 WHERE LIFNR = vendor.
    clear: item_data.
    refresh:item_data.
    call function 'ME_READ_COND_INVOICE'
       exporting
       I_BUDAT            =
        I_EBELN            = itab-p_order
        I_EBELP            = itab-p_item
       I_FRBNR            = ' '
         i_lifnr            = ' '
       I_XBLNR            = ' '
       RE_KURSF           =
       RE_WAERS           =
       I_RESWK            = ' '
       I_EKKI             = 'X'
       I_BUBIS            =
       RE_WWERT           =
       XEK08B_FLAG        =
       I_BELNR            =
       I_BUZEI            =
       I_READ_KRUEK       = ' '
       I_DISPLAY          = ' '
      TABLES
        XEK08BN            = item_data
       XEK08BN_CURR       =
    read table item_data with key kschl = itab-P_ctype.
    headerdata-INVOICE_IND = 'X'.
    headerdata-DOC_TYPE = 'KR'.
    headerdata-DOC_DATE = ekbz-budat.
    headerdata-PSTNG_DATE = SY-DATUM.
    headerdata-REF_DOC_NO = itab-P_ORDER.
    headerdata-COMP_CODE = 'HPL'.
    headerdata-DIFF_INV = itab-p_lifnr.
    headerdata-CURRENCY_ISO = ekbz-waers.
    headerdata-GROSS_AMOUNT = item_data-WEWWR - item_data-AREWR .
    headerdata-BLINE_DATE = SY-DATUM.
    headerdata-DEL_COSTS_TAXC = 'V0'.
    headerdata-PO_REF_NO = itab-P_ORDER.
    headerdata-bus_area = 'OTHR'.
    headerdata-ITEM_TEXT = LFA1-NAME1.
    *headerdata-HEADER_TXT = .
    headerdata-ALLOC_NMBR = itab-P_ORDER.
      APPEND HEADERDATA.
    CLEAR HEADERDATA.
    itemdata-INVOICE_DOC_ITEM = '00001' .
    itemdata-PO_NUMBER = itab-P_ORDER.
    itemdata-PO_ITEM = itab-P_ITEM.
    *itemdata-REF_DOC = ekbz-belnr.
    itemdata-REF_DOC_YEAR = ekbz-gjahr.
    itemdata-REF_DOC_IT = itab-P_ITEM.
    itemdata-TAX_CODE = 'V0'.
    itemdata-ITEM_AMOUNT = item_data-WEWWR - item_data-AREWR .
    itemdata-QUANTITY = item_data-BPWEM - item_data-BPREM .
    itemdata-PO_UNIT = ekpo-meins.
    itemdata-PO_PR_UOM = ekpo-meins.
    itemdata-COND_TYPE = itab-P_CTYPE.
    *itemdata-ITEM_TEXT = .
    append itemdata.
    clear itemdata.
    CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
      EXPORTING
        HEADERDATA       = HEADERDATA
      IMPORTING
        INVOICEDOCNUMBER = DOC_NO
        FISCALYEAR       = FISC_YEAR
      TABLES
        ITEMDATA         = ITEMDATA
       ACCOUNTINGDATA   = I_ACCOUNTINGDATA
       TAXDATA          = I_TAX
        RETURN           = RETURN.
    if sy-subrc <>  0.
    message e999(re) with  'Problem occured'.
    else.
      loop at return.
        if not return is initial.
         clear bapi_retn_info.
         move-corresponding return to bapi_retn_info.
          if return-type = 'A' or return-type = 'E'.
            error_flag = 'X'.
          endif.
         append bapi_retn_info.
        endif.
      endloop.
      if error_flag = 'X'.
       message e999(re) with  'Problem occured'.
        rollback work.
      else.
          Return Table from BAPI call is empty
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            WAIT   = 'X'
          IMPORTING
            RETURN = RETURN.
      endif.
    endif.
           write:/ 'Document no :', doc_no.
           it_doc-doc_no = doc_no.
           it_doc-p_order = itab-p_order.
           append it_doc.
           CLEAR IT_DOC.
    endloop.
    loop at it_doc.
       if it_doc-doc_no = ' '.
          write:/ 'purchase order not posted ' , it_doc-p_order.
       else.
       write:/ 'document no:' , it_doc-doc_no, 'p.order:' , it_doc-p_order.
      endif.
    endloop.
    *&      Form  upload
          text
    -->  p1        text
    <--  p2        text
    form upload .
      CALL function 'GUI_UPLOAD'
      exporting
        filename                      = FN1
       FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      = ITAB
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    endform.                    " upload

    I think you need to implement user-exit EXIT_SAPMM06E_012 of enhancement MM06E005.
    Look in OSS with seach term MM06E005 to get some examples.
    Note310154 "ME21N/ME51N: Customer-specific check, generating error log" has some examples.
    You should use the macros to set errors/warnings
    Example:
      mmpur_business_obj_id pt_ekpo-id.
      mmpur_metafield mmmfd_partners.
      mmpur_message_forced 'W' '00' '208' text-001 '' '' ''.
    regards,
    JG

  • 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

  • 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.

Maybe you are looking for

  • How to "demux" a video i.e. get sound from a video?

    I got the following tips from the apple site but does anyone knows where I can get a 3rd party program to deal with this problem (videos which are "muxed"? "When you export a video (like VCD) for iPod play, you may come across a situation in which th

  • How do I get a separate hover on my submenus in dreamweaver

    I am using dreamweaver cs3 and spry 1.4 I am having problems getting my drop down submenus to hover differently to the normal tabs at the top. Is this possible to do as I only seem to be able to get one or the other. I have attached a couple screensh

  • Challenge #246

    Folks made some beautiful music with these performers. ALEX B: I like the variety of your images this week -- the fireworks and the foreground crowd in #3 are especially neat. BARBARA W: Very nice black and white version in #1 and a cool 'collage' ef

  • "Next" button error in Report portlet

    I create a report from SQL query and publish it as a portlet then I add it to a page. everything works fine until I click Next button on the bottom of the portlet. After I do it I get the following error: Error: The servlet produced the following err

  • Problem accessing Skype on Mac OS X V. 10.7.5

    Hi, I've been having a problem with my Skype over the past two months.  I can't seem to access skype from my home wifi.  However, when I use another wifi outside, say at the mall, I am able to access skype.  At home,  everytime I try to access Skype,