FM or BAPI for Purchase Order Creation.

can ne1 help me to
create purchase order reference to PReq(Requisition) thru ne FM or BAPI.

Hi,
We can create the PO Using the BAPI_PO_CREATE1 function module.
in this function module fill up the all necessary Details.
With details in Item Table we haveto give  the Fields PREQ_NO and PREQ_ITEM  for each item .
then it will creates the PO with PREQ.
Reward Points If useful.
Thanks&Regards,
Srinivas.

Similar Messages

  • BAPI for Purchase Order Creation

    Hi All,
    Purchase Order creation through BAPI, Auto Po creation. Please advise program.
    The requirement is: when we delivery the goods from one plant to another plant,PO should create in second plant with goods what delivered from first plant.
    Pranitha
    Moderator message : Spec/requirements dumping is not allowed. Thread locked.
    Edited by: Vinod Kumar on Sep 30, 2011 3:37 PM

    Hi,
    As per  u r requirement
    you can use  : BAPI =>    BAPI_PO_CREATE  with suitable Document  Type ( Stock trasnfert : STO )
    IF  u want to auto po must be created after each delivry in this case you need to use BADI
    'MB_MIGO_BADI; In This BAPI  There is method : POST_DOCUMENT
    In this method u can write code for Auto PO Creation by using BAPI .
    Hope This will Resolve u r query.
    Thanks and Regads
    Santosh

  • Please Tell  me the Standard Bapi for Purchase Order Creation

    Hi,
      Please tell me the standard BApi for the PO creation. How to excute the standard Bapi. Please help me.
    Regrads
    Mohan

    Hi Mohan,
    Use this BAPI BAPI_PO_CREATE1.
    Check this post, you have program aswell
    https://forums.sdn.sap.com/click.jspa?searchID=7294168&messageID=1172796
    Regards,
    Satish

  • Replacing the bapi with the new bapi for purchase order creation

    Hi,
       In the customised code call is there for the bapi function module  'BAPII_PO_CREATE'.
       Iam trying to replace the call with the code that calls function module 'BAPI_PO_CREATE1'.
       Please help me about what changes I needed to do in the code . As there is much mismatch in the import and export parameters
    and tables in both the function modules.
       Thanks in advance.
    Edited by: anwar.indya on Mar 25, 2011 2:18 PM
    Edited by: anwar.indya on Mar 25, 2011 2:19 PM

    Hi,
    As per  u r requirement
    you can use  : BAPI =>    BAPI_PO_CREATE  with suitable Document  Type ( Stock trasnfert : STO )
    IF  u want to auto po must be created after each delivry in this case you need to use BADI
    'MB_MIGO_BADI; In This BAPI  There is method : POST_DOCUMENT
    In this method u can write code for Auto PO Creation by using BAPI .
    Hope This will Resolve u r query.
    Thanks and Regads
    Santosh

  • Getting errors when iam using  BAPI_PO_CREATE1 for Purchase Order creation

    Hi sap Gurus,
      I am getting Errors when iam using  BAPI_PO_CREATE1 for Purchase Order creation that Material (144) does not exist but it is alreardy maintained in MM01.
    I dont get how it is coming.and what are the mandatory fields in bapi BAPI_PO_CREATE1 in item level .that is too material only.
    pls let me know .
    thanks in advance.

    Hi,
    Check the sample code..
    report  zpo_test             .
    *DATA DECLARATION
    constants : c_x value 'X'.
    *Structures to hold PO header data
    data : header like bapimepoheader ,
    headerx like bapimepoheaderx .
    *Structures to hold PO account data
    data : account like bapimepoaccount occurs 0 with header line ,
    accountx like bapimepoaccountx occurs 0 with header line .
    *Internal Tables to hold PO ITEM DATA
    data : item like bapimepoitem occurs 0 with header line,
    itemx like bapimepoitemx occurs 0 with header line,
    *Internal table to hold messages from BAPI call
    return like bapiret2 occurs 0 with header line,
    *Internal table to hold messages from BAPI call
    pocontractlimits like bapiesucc occurs 0 with header line.
    data : w_header(40) value 'PO Header',
    purchaseorder like bapimepoheader-po_number,
    delivery_date like bapimeposchedule-delivery_date.
    data : ws_langu like sy-langu.
    *text-001 = 'PO Header' - define as text element
    selection-screen begin of block b1 with frame title text-001.
    parameters : company like header-comp_code default '122' ,
    doctyp like header-doc_type default 'NB' ,
    cdate like header-creat_date default sy-datum ,
    vendor like header-vendor default '2000000012' ,
    pur_org like header-purch_org default 'PU01' ,
    pur_grp like header-pur_group default '005' .
    *sociedad like HEADER-COMP_CODE default '122' ,
    *vendedor like HEADER-SALES_PERS default 'sale person'.
    selection-screen end of block b1.
    selection-screen begin of block b2 with frame title text-002.
    parameters : item_num like item-po_item default '00010',
    material like item-material default '12000000' ,
    tipo_imp like item-acctasscat default 'K' ,
    *pos_doc like ITEM-ITEM_CAT default 'F' ,
    shorttxt like item-short_text default 'PRUEBA BAPI' ,
    grup_art like item-matl_group default '817230000' ,
    plant like item-plant default '3001' ,
    mpe like item-trackingno default '9999' ,
    *contrato like ITEM-AGREEMENT default '4904000003' ,
    *quantity like ITEM-QUANTITY default 1 .
    po_unit like item-po_unit default 'EA'.
    selection-screen end of block b2.
    Par?mnetros de imputaci?n
    selection-screen begin of block b3 with frame title text-004.
    parameters : centro like account-costcenter default '1220813150',
    cuenta like account-gl_account default '6631400' ,
    num_pos like account-po_item default '10' ,
    serial like account-serial_no default '01' ,
    ind_imp like account-tax_code default 'I2' .
    selection-screen end of block b3.
    start-of-selection.
    *DATA POPULATION
      ws_langu = sy-langu. "Language variable
    *POPULATE HEADER DATA FOR PO
    *HEADER-COMP_CODE = sociedad .
      header-doc_type = doctyp .
      header-vendor = vendor .
      header-creat_date = cdate .
      header-created_by = 'TD17191' .
      header-purch_org = pur_org .
      header-pur_group = pur_grp .
      header-comp_code = company .
      header-langu = ws_langu .
    *HEADER-SALES_PERS = vendedor .
    *HEADER-CURRENCY = 'DOP' .
    *HEADER-ITEM_INTVL = 10 .
    *HEADER-PMNTTRMS = 'N30' .
    *HEADER-EXCH_RATE = 1 .
    *POPULATE HEADER FLAG.
      headerx-comp_code = c_x.
      headerx-doc_type = c_x.
      headerx-vendor = c_x.
      headerx-creat_date = c_x.
      headerx-created_by = c_x.
      headerx-purch_org = c_x.
      headerx-pur_group = c_x.
      headerx-langu = c_x.
    *HEADERX-sales_pers = c_x.
    *HEADERX-CURRENCY = c_x.
    *HEADER-ITEM_INTVL = c_x.
    *HEADER-PMNTTRMS = c_x.
    *HEADER-EXCH_RATE = c_x.
    *HEADER-EXCH_RATE = c_x.
    *POPULATE ITEM DATA.
      item-po_item = item_num.
      item-quantity = '1'.
    *ITEM-MATERIAL = material .
      item-short_text = 'prueba bapi_po_create1'.
    *ITEM-TAX_CODE = ''.
      item-acctasscat = 'K' .
    *ITEM-ITEM_CAT = 'D' .
      item-matl_group = '817230000' .
      item-plant = '3001' .
      item-trackingno = '99999'.
      item-preq_name = 'test'.
    *ITEM-AGREEMENT = '' .
    *ITEM-AGMT_ITEM = ''.
      item-quantity = '1' .
      item-po_unit = 'EA'.
    *ITEM-ORDERPR_UN = 'EA'.
      item-conv_num1 = '1'.
      item-conv_den1 = '1'.
      item-net_price = '1000000' .
      item-price_unit = '1'.
      item-gr_pr_time = '0'.
      item-prnt_price = 'X'.
      item-unlimited_dlv = 'X'.
      item-gr_ind = 'X' .
      item-ir_ind = 'X' .
      item-gr_basediv = 'X'.
    *ITEM-PCKG_NO = '' .
      append item. clear item.
    *POPULATE ITEM FLAG TABLE
      itemx-po_item = item_num.
      itemx-po_itemx = c_x.
    *ITEMX-MATERIAL = C_X.
      itemx-short_text = c_x.
      itemx-quantity = c_x.
    *ITEMX-TAX_CODE = C_X.
      itemx-acctasscat = c_x.
    *ITEMX-ITEM_CAT = c_x.
      itemx-matl_group = c_x.
      itemx-plant = c_x.
      itemx-trackingno = c_x.
      itemx-preq_name = c_x.
    *ITEMX-AGREEMENT = C_X.
    *ITEMX-AGMT_ITEM = c_x.
      itemx-stge_loc = c_x.
      itemx-quantity = c_x.
      itemx-po_unit = c_x.
    *ITEMX-ORDERPR_UN = C_X.
      itemx-conv_num1 = c_x.
      itemx-conv_den1 = c_x.
      itemx-net_price = c_x.
      itemx-price_unit = c_x.
      itemx-gr_pr_time = c_x.
      itemx-prnt_price = c_x.
      itemx-unlimited_dlv = c_x.
      itemx-gr_ind = c_x .
      itemx-ir_ind = c_x .
      itemx-gr_basediv = c_x .
      append itemx. clear itemx.
    *POPULATE ACCOUNT DATA.
      account-po_item = item_num.
      account-serial_no = serial .
      account-creat_date = sy-datum .
      account-costcenter = centro .
      account-gl_account = cuenta .
      account-gr_rcpt = 'tester'.
      append account. clear account.
    *POPULATE ACCOUNT FLAG TABLE.
      accountx-po_item = item_num .
      accountx-po_itemx = c_x .
      accountx-serial_no = serial .
      accountx-serial_nox = c_x .
      accountx-creat_date = c_x .
      accountx-costcenter = c_x .
      accountx-gl_account = c_x .
      account-gr_rcpt = c_x.
      append accountx. clear accountx.
    *BAPI CALL
      call function 'DIALOG_SET_NO_DIALOG'.
      call function 'BAPI_PO_CREATE1'
        exporting
          poheader         = header
          poheaderx        = headerx
        importing
          exppurchaseorder = purchaseorder
        tables
          return           = return
          poitem           = item
          poitemx          = itemx
          poaccount        = account
          poaccountx       = accountx.
    *Confirm the document creation by calling database COMMIT
      call function 'BAPI_TRANSACTION_COMMIT'
      exporting
      wait = 'X'
    IMPORTING
    RETURN =
    end-of-selection.
    *Output the messages returned from BAPI call
      loop at return.
        write / return-message.
      endloop.
    Regards
    Sudheer

  • BAPI for Purchase Order Confirmation and update EKES table

    Hi all,
    I have a requirement to update the PO confirmation soon after successful creation of PO in an IDOC.
    I have used BAPI_PO_CHANGE function module which didnt serve the purpose as it cannot update confirmations.
    I tried using ME_CONFIRMATION_UPDATE where I was able to add a confirmation entry in EKES table but that is not being reflected in ME23N transaction when I display the PO.
    Please help me out on this.
    Thanks & Regards
    Pavan

    NB: Never use a standard update FM (check attributes of ME_CONFIRMATION_UPDATE) its often only a SQL statement collector without any check, logging of changes or database consistency, if you perform a where-used you should find it is never called alone but with a bunch of other update FM after checks and other update preparation.
    Get back to the BAPI and table parameter POCONFIRMATION, also use BAPI_PO_GETDETAIL1 to get current data for the call of BAPI_PO_CHANGE.
    Regards,
    Raymond
    PS: If it is not in 197958 - BAPIs for purchase orders: Missing functions, you should be able to do it

  • IDOC/BAPI for Production order creation from Legacy system

    Hi all
    We are using an interface to create Production orders from legacy to SAP. Would you recommend an IDOC or a BAPI to create Production orders. If IDOC or BAPI then could you please mention which one?
    thanks a bunch

    Hi John,
    For your purposes, please use BAPI for production order creation from legacy system. There is no standard inbound IDoc available to use. SAP has an IDoc for outbound interface only (message type LOIPRO).
    If there is an inbound IDoc available, I would recommend to use an IDoc.
    IDoc technology has excellent error handling and will allow you to reprocess an error (if any).
    BAPI is also good approach to use and fast in term of  processing.
    For BAPI approach, you can use BAPI BAPI_PRODORD_CREATE.
    Hope this will help.
    Regards,
    Ferry Lianto

  • BAPI for Service order creation

    Hi ,
    Please tell me if any Bapi for service order creation  , T-code : IW31
    regards,
    Prakash

    Hi Prakash,
    Have a look on the following BAPIs:
    BAPI_ISUSMORDER_CREATEMULTIPLE - Create Service Orders
    BAPI_ALM_CONF_CREATE - Create confirmation for maintenance/service order
    WTY04_CREATE_SERVICE_ORDER - Create Service order via function module.
    Hope this will help.
    Regards,
    Nitin.

  • Document is in transfer for purchase order.Creation not possible

    Dear All,
    We did partial confirmation in EBP and later when trying to do confiramtion for the remaining quantiy getting the message"document is in transfer for purchase order.Creation not possible"
    We are taking this problem in production as well as in quality systems also.
    What are possible reason and how to solve it.
    kindly share your views.
    Thank you.

    Hi yshu,
    use tcode bd87 in SRM to check for failed confirmation IDOC (type MBGMCR).
    The double click the status record to see the exact cause of the failure.
    Rectify the error. Then try to execute the IDOC from BD87 tcode.
    For a few errors you may not be able to execute the IDOC but to create a new confirmation in SRM. In such cases, follow the below procedure..
    There should be an entry for the confirmation in the transfer table BBP_DOCUMENT_TAB in SRM. Display the details.
    Then run FM "BBP_DELETE_FROM_DOCUMENT_TAB" to delete the entry from the doc tab table.
    Then post a new confirmation in SRM.
    There is also a FM in SRM using which you can change the status of thefailed IDOC from 51 to 68 or 31.
    Rgds,
    MJ

  • Document in transfer for purchase order - creation not possible

    Hi Experts,
    we get this error when we do confirmation"'document in transfer for purchase order - creation not possible'"
    any inputs are appreciated
    Rg
    sam

    Hi All,
    We have resolved the above problem.
    When user does confirmation ,if it sucessfully  created then there will be  no entry in BBP_Document_tab table.If it's in error in process and next time when user tries to do GR then he will encounter a pop up message "Document in transfer for PO, creation not possible".
    So we need to delete the entries from table BBP_DOCUMENT_TAB using FM BBP_DELETE_FROM_DOCUMENT_TAB.
    Then check again in BBP_DOCUMENT_TAB now there will be noentry there...so now user can do the confirmation from SRM,he will not encounter this error now.
    Thanks to all the ppl who has replied
    sameer

  • FM or BAPI for Transfer Order creation in eWM

    Hello ALL,
    Please provide any FM or BAPI for Transfer Order creation in eWM. i know how to create transfer order in ERP.I tried to find out a FM or BAPI in SCM eWM but failes to get one.
    Kindly help.
    BR,
    Anil..

    Hi,
    Try using FM WS_LM_TRANSFER_ORDER_CREATE.
    I hope this is available in ur system
    Thanks

  • Profitability segment for purchase order creation - how to read it

    Hello,
    how to read it profitability segment for purchase order creation at item level ??
    There's a method on ME_PROCESS_PO_CUST ?
    Tks

    Hi,
    Use the below FM from the function group KEAK
    To read: COPA_CALL_PROF_SEGMENT or COPA_INPUT_PSEGMENT_RETURN
    To create: COPA_PROFITABILITY_SEGMENT
    Hope this helps
    Regards
    Shiva

  • BAPI for Production order creation against wbs element

    dear all,
    I am using BAPI (BAPI_PRODORD_CREATE) for Production order creation against wbs element.I am putting following input paramters in this
    material no,
    order type
    plant
    qty
    basic start dt & end dt
    wbs
    But during GRN it is not taking the account assignment as project stock i.e. its picking movement type 101 but it should be 101Q.
    For this what changes are required.
    regards
    ravi arora

    Hi,
    2 options i can think of:
    1. Create a BDC program by recording co10
    2. Create a planned order with order type PR using BAPI_PLANNEDORDER_CREATE, specify the WBS element & other details. Now use BAPI_PRODORD_CREATE_FROM_PLORD to create a production order with reference to the planned order created earlier.
    I believe option 2 should meet your need. Check & revert.
    Regards,
    Vivek

  • Regarding bapis for sales order creation and modification

    Hi,
    I am trying to create a syncbo for sales order creation, modification and display. The bapis that I am using are
    1.BAPI_SALESORDER_GETLIST
    2.BAPISDORDER_GETDETAILEDLIST
    3.BAPI_SALESORDER_CREATEFROMDATA1
    4. BAPI_SALESORDER_CHANGE
    Am I using the correct bapis. When I tried to create a syncbo it gave the following errors
    BAPISDORDER_GETDETAILEDLIST does not have RETURN parameter in export or tables parameter
    RETURN parameter in Create BAPI Wrapper should refer to structure BAPIRET2
    RETURN parameter in GetList BAPI Wrapper should refer to structure BAPIRET2
    GetDetail BAPI Wrapper does not have RETURN parameter in export or tables parameter
    No Export parameter referring to header structure exists in GetDetail BAPI Wrapper
    No Import parameter referring to header structure exists in Create BAPI Wrapper
    No Import parameter referring to header structure exists in Modify BAPI Wrapper
    No Import parameter referring to a field of header structure exists in GetDetail BAPI Wrapper
    No Export parameter referring to a field of header structure exists in Create BAPI Wrapper
    No Tables parameter referring to item structure exists in Create BAPI Wrapper
    No Tables parameter referring to item structure exists in Modify BAPI Wrapper
    I am informed that the above bapis are standard bapis.
    I am not sure as to why I am getting the errors.
    Does the syncbo require the  bapi's to be in a specific format.
    What would be the header and item structures for sales order bapis
    Regards
    Raja Sekhar

    Hi Raja,
      ya , for creating Sync BOs ,our BAPI wrappers must satisfy certain conditions..
    just go through this link.
    u can use the standard BAPIs of SALES Order in ur Custom BAPI Wrapper
      http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/appdev/smartsync/what_is_a_bapi_wrapper.html
    the RETURN must be of type BAPIRET2..
                    Regards
                    Kishor Gopinathan

  • 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

Maybe you are looking for

  • Satellite Pro L - Error message when I try to play a music CD

    When I try to play a music CD I get this error message > +"The version of this file is not comparable with the version of Windows you're running. Check+ +your computer's systems information to see whether you need an x86 (32-bit) or x64 (64-bit)+ +ve

  • Insert value in WWWDATA  table for sending picture in body of email

    Hi .Requrement: Send image in the body of the email. I am using cl class to sending email and Function module WWW_GET_MIME_OBJECT requre values from table  WWWDATA and WWWPARAMS. I have image file need to be used in email body for the same i want to

  • DefaultHander cannot be resolved to a type

    Hello - I am using Eclipse to write a java mapping program but even before compilation, Eclipse IDE shows DefaultHandler as cannot be resolved to a type. I have done the following imports: import com.sap.aii.mapping.api.StreamTransformation; import o

  • Maximise DVD quality from completed iMovie project

    I recently completed an iMovie project of my son's wedding shot on my new JVC Everio video camera.  All footage successfully downloaded in Full Quality into iMovie. I did all edits on iMovie. All seemed great ......and so very excitedly, I exported i

  • Recording vinyl with Audacity - not having any luck

    I'm trying to record my vinyl collection using audacity and not having much luck. I've got the line in and can get the red recording cursor moving but no waveform appears. I have followed the info on the wiki but I cannot get any further. The wiki is