BAPI to create STO requistions

Hi all,
Guide me i want to create the STO requistions using BAPI.
BAPI - BAPI_REQUISITION_CREATE
Doc type - NB
Item Category - 7
when use that then it creates successfuly, but when use
Doc type - UB
Item category - 7
then message comes and no requistions create "Document type UB not allowed with doc.  category B
please tell me which doc category i have to use for STO requistions.
Any suggestions welcome,
Regards,
Edited by: Navdeep singh on Apr 8, 2008 2:45 PM

Hi Ajith,
can u send a code for the program...?
I am getting stauck at MRP updation lavel.
Regards,
Dharmesh

Similar Messages

  • Can we create sto using BAPI_PO_CREAT1

    BAPI_PO_CREAT1
    what are the required fields to create STO using above bapi.
    or
    any other bapi to create STO.
    Thanks & Regards,
    Ramesh.T

    Hi Friend,
    You can us the BAPI for creating STO.
    Document type will be UB.
    You need to pass value on supplying plant insted of vendor.
    Rest of the things are same as like creating PO.
    Regards
    Krishnendu

  • How to create sto po via bapi-BAPI_PO_CREATE1

    if create sto po via bapi_po_create1, which fields must be defined? and i want to change sto price.how to define bapi fields? can anyone give me a sample?

    hi
    check following
    BAPI_PO_CREATE1
    http://abap.wikiprog.com/wiki/BAPI_PO_CREATE1
    hope it helps
    regards
    kunal
    award if helpful

  • Error in vendor selection while creating Purchase requistions

    Hi,
    I was using bapi_requestion_create to create purchase requistion with different quotas for different vendors.
    Ex: vendor A   with 60%
          vendor B   with 40%
    If the required quantity is 100 items then it has to split 60 items to vendor A and create seperate Puechase Requistion.
    and for 40items with another Purchase requsition.
    Currently iam able to split the noof purshcase requisiton but it was picking only with one vendor.
    MY Code :
    *******Split PRs with respect to Quota ************************
          data : lv_lines type i,
                 lv_qty type  p DECIMALS 4.
          lv_qty = it_oo-qty.
          DESCRIBE TABLE t_equp LINES lv_lines.
          IF lv_lines GT 1.
            clear : w_equp.
            loop at t_equp into w_equp
                          where qunum = w_equk-qunum.
              refresh : t_req_item.
              clear   : w_eord,
                        t_req_item[],
                        t_req_item.
              READ TABLE t_eord INTO w_eord
              WITH KEY matnr = it_oo_sum_purch-matnr_sap
                       werks = it_oo_sum_purch-plant
                       lifnr = w_equp-lifnr.
              if sy-subrc is initial.
                it_oo_purch-AGREE     = w_eord-EBELN. "To Fill ALV
                it_oo_purch-ITEM      = w_eord-EBELP. "To Fill ALV
                it_oo_purch-FORNEC    = w_equp-LIFNR. "To Fill ALV
                t_req_item-doc_type   = c_zbmr.
                t_req_item-pur_group  = it_oo-ekgrp.
                t_req_item-material   = it_oo_sum_purch-matnr_sap.
                t_req_item-plant      = it_oo_sum_purch-plant.
              t_req_item-AGREEMENT   = w_eord-EBELN.
              t_req_item-AGMT_ITEM   = w_eord-EBELP.
              t_req_item-FIXED_VEND  = w_equp-LIFNR.
              t_req_item-QUOTA_ARR   = w_equk-qunum.
              t_req_item-QUOTARRITM  = w_equp-qupos.
                t_req_item-gr_ind     = c_x.
                t_req_item-ir_ind     = c_x.
              t_req_item-MRP_CONTR   = 'NOV'.
                CONCATENATE it_oo_sum_purch-due_dte+4(4)
                            it_oo_sum_purch-due_dte+2(2)
                            it_oo_sum_purch-due_dte(2)
                            INTO t_req_item-deliv_date.
                t_req_item-QUANTITY   = ( w_equp-QUOTE / 100 ) * lv_QTY.
              endif.
    ********Rounding off values*******************
              data : lv_int(20) type c,
                     lv_dec(20) type c,
                     lv_tot(20) type c.
              clear : lv_int ,
                     lv_dec,
                     lv_tot.
              lv_tot = t_req_item-QUANTITY.
              split lv_tot at '.' into lv_int lv_dec.
              if lv_dec(1) ge '5'.
                lv_int = lv_int + 1.
              endif.
              t_req_item-QUANTITY = lv_int.
              APPEND t_req_item.
              clear : v_number.
      Create purchase requisition by group
              CALL FUNCTION 'BAPI_REQUISITION_CREATE'
                   IMPORTING
                        number            = v_number
                   TABLES
                        requisition_items = t_req_item
                        return            = t_return.
    ERRO
              IF t_return-type CO 'AE'.
                CLEAR: v_msg, v_x.
                CALL FUNCTION 'WRITE_MESSAGE'
                     EXPORTING
                          msgid = sy-msgid
                          msgno = sy-msgno
                          msgty = sy-msgty
                          msgv1 = sy-msgv1
                          msgv2 = sy-msgv2
                          msgv3 = sy-msgv3
                          msgv4 = sy-msgv4
                     IMPORTING
                          messg = v_msg.
                PERFORM zf_grava_log_erro_oo
                              USING it_oo_purch it_oo_sum_purch v_msg v_x.
    SUCESSO - Atualiza Tabela zsytmm_pr_po
              ELSE.
                CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                     EXPORTING
                          WAIT = c_X.
                CLEAR: v_msg, v_x.
                CONCATENATE text-026  v_number INTO v_msg
                                      SEPARATED BY space.
                it_oo_sum_purch-QTY =    t_req_item-QUANTITY.
                PERFORM zf_grava_log_sucesso_oo
                          USING it_oo_purch it_oo_sum_purch v_msg v_x.
                CLEAR: zsytmm_pr_po.
                vl_item = c_00001.
                zsytmm_pr_po-banfn    = v_number.
                zsytmm_pr_po-bnfpo    = vl_item.
                zsytmm_pr_po-ebeln    = c_false.
                zsytmm_pr_po-ebelp    = c_false.
                zsytmm_pr_po-zshmode  = it_oo_purch-shipm.
                MODIFY  zsytmm_pr_po.
              ENDIF.
            endloop.

    Hi,
    You have to fill DES_VENDOR & FIXED_VEND of structure REQUISITION_ITEMS while calling BAPI.  But while going through your code,
    * t_req_item-FIXED_VEND = w_equp-LIFNR
    is commented, uncomment the same and add line for DES_VENDOR also.
    Regards
    Vinod

  • Create STO with refence to PR

    Hi Folks,
    I have a requirement to create a Stock Transfer Order with Reference to Stock Transfer Purchase Requisition. ME27 transaction is used to enhance this.
    But I need to do it via a BAPI.
    Found a BAPI (BAPI_PO_CREATE), which is used to create Purchase Order.
    Can I use the same to create STO.
    There is no Input field for Purchase Requisition.
    Regards
    -Senthil Mallappan

    Hi,
    Can you try using BAPI_PO_CREATE1 to post the STO.
    The Pur. Reqn details would go to the tables parameters - POITEM, POSCHEDULE ( and POaccount)
    Regards,
    Anil.

  • BAPI for creating outbound delivery

    Hi,
    Can anyone please let me know the bapi for creating outbound delivery.I have checked for few bapi's like
    BAPI_OUTB_DELIVERY_SAVEREPLICA
    BAPI_DELIVERPROCESSING_EXEC
    If i use the first one i would like to know whether i need to do the PGI seperately by using any bdc or is it taken care in the same bapi.
    Its basically for the workflow task werein we have all the required parameters like delivery numb, sales order num ...etc
    Iam new to BAPI's.Please consider my request and let me know the details for the same.
    thanks
    keith

    The below is for creating delivery for STO's.
        Delivery creation
          call function 'SHP_VL10_DELIVERY_CREATE'
            exporting
              IF_LEDAT           = I_LFDAT
              IF_NUR_VORGABE_POS = YES
              IT_KEY_ENQUE_READ  = IT_KEY_ENQUE_READ
              IT_KOMDLGN         = IT_KOMDLGN
            changing
              CX_SD_ORDER        = XS_SD_ORDER
              CT_VBSK_ALL        = XT_VBSK_ALL
              CT_VBLS            = XT_VBLS
              CT_KEY_LATE        = XT_KEY_LATE.
    Message was edited by: Anurag Bankley

  • BAPI for create IR and GR

    Hi All,
    I would like to use the BAPI to create the IR and GR.
    But i don't know which BAPI is use for create the IR and GR . Could you mind give any information about this?
    Regards,
    Luke

    Hi Luke,
    The function module "BAPI_GOODSMVT_CREATE " would perform the task.  Please refer to the following link.
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
    Regards.

  • BAPI to create Excise Invoice and Commercial Invoice

    Hi All,
    Can u tell me the BAPI for creating Excise and Commercial Invoice.
    Moderator message: please do some research before asking.
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Mar 2, 2011 5:56 PM

    Hi,
    You can make the appropriate setting in Customizing for Excise Duty, by choosing Basic Settings -> Maintain Excise Groups, and selecting Create EI (Create Excise Invoice Automatically)
    Also maintain the default excise and series group in the configuration.
    Logistics general>Tax on Goods Movement>India>Basic Settings>Maintain Excise groups. For your Excise group maintain the check Excise invoice during Billing.
    After maintaining the same also maintain the default values in Logistics general>Tax on Goods Movement>India>Business transactions>Outgoing Excise invoices-->Maintain Default Excise groups and Series groups.
    Regards,

  • BAPI to create Scheduling Agreement of VA31

    Dear gurus,
    I need to find the BAPI or Function Module to create Scheduling Agreement of VA31 from the uploaded data. I know that I can use BAPI_SALESORDER_CREATEFROMDAT2 to create the sales order of VA01. Can I use the same bapi to create the scheduling agreement of VA31? Both of the screens seems to look quite the same but their order types are different. Any suggestion on this?
    Thank you for your help. Have a nice day.
    Best Regards,
    Hedy

    Hi,
    FM
    BAPI_CUSTSCHEDULAGREE_CONFDELV
    Functionality
    You can use this method to make a delivery confirmation in the SD scheduling agreement
    Example
    1. Generating delivery for a scheduling agreement item.
    2. Changing a delivery item.
    3. Posting of goods issue for delivery.
    4. Deleting a delivery item or a delivery.
    Regards,
    Venkatesh

  • BAPI for creating scheduling agreement with reference to Contract agreement

    Hi All ,
    Can anyone please suggest if there is any BAPI for creating scheduling agreement with reference to the contract agreement number.
    Thanks for your help.
    Vadivukkarasi

    Hi,
       Check this BAPI <b>BAPI_AGREEMENT_MAINTAIN.</b>
    check these
    BAPI_CUSTSCHEDULAGREE_CONFDELV Customer Sched. Agreement: Confirmation of Delivery; Document Flow Upd
    BAPI_SALES_DEL_SCHEDULE_CREATE BAPI for creation of releases in scheduling agreements
    Regards

  • BAPI for Creating a PM order(iw34) with reference to a Notification

    Hi All,
    Could anyone help to find the BAPI for creating a PM order with reference to a notification Number.
    I will explain my requirement :
    I want to create a notification from an external Application where i got the BAPI BAPI_ALM_NOTIF_CREATE and keeping this created notification number as Referece or for this notification number  i need a create a PM order.Usually this process in done transaction IW34 in R/3.
    But with the BAPI BAPI_ALM_ORDER_MAINTAIN i can create a PM order but this BAPI doesn't have a input parameter "Notification number ".So i can't use this BAPI.
    Could any suggest for a BAPI where i can create a PM order with reference to a Notification Number.
    Regards,
    Sid

    Hi,
    I have tried with the FM CO_IH_ORDER_GENER_2 but when i executes it gives a error message
    "<i>Service/maintenance order type PM02 not completely maintained in plant
    Message no. IW216
    Diagnosis
    For the selected order type and plant, no check control is maintained in Plant Maintenance/Service in 'Availability Check for Materials, PRTs and Capacities'.
    Procedure
    A check control must be maintained for this combination of order type and plant</i>"".
    And even have a doubt what to enter in this input parameter "GEWRK_OBJTYP"  .
    Kindly help me to solve this issue.
    Regards,
    Sid

  • BAPI to create SNP planned order based on start date

    Hi,
    I am looking for a BAPI to create SNP planned order based on the order start date. There is BAPI BAPI_MOSRVAPS_CREATESNPORDER which can be used to create SNP planned order based on the end date but not based on the start date.
    Also would be great if some one can share how do they create SNP Planned orders using BAPI BAPI_MOSRVAPS_CREATESNPORDER in case if GR processing time is defined in the product master and workdays for GR to be respected according to the calendar.
    Regards,
    Venkat

    Hello Mr.Venkat,
    Hope you recognize me.
    Please check out the BAdi below.
    BAdi - APO_BAPI_BUS10503 (this is the BAdi for ManufactOrderAPS  BAPI which contains the SNPorder BAPI)
    Method - CHANGE_SAVEMULTIPLE2
    In this method parameter IT_ORDER_HEAD contains Order start date input option.
    For GR time please check this (not sure if it will help).
    Same BAdi/ same method
    Parameter IV_PLANNING_MODE_USAGE contains field PLANNING_MODE.
    Value 1 for PLANNING_MODE corresponds to "Observance of parameters from the product master".
    This may make it respect the GR time in product master
    Good luck with the above
    Regards,
    Ashok

  • Problem using BAPI to create Service Confirmation in CRM

    Good afternoon all.
    I have raised this is CRM forum too, just thought it best to ask the broader ABAP community the question too.
    We are encountering a problem using a BAPI to create a transaction in CRM, specifically:
    I am trying to create a Service Confirmation (BUS2000117) in a CRM system using the BAPI BAPI_BUSPROCESSND_CREATEMULTI.
    The BAPI succeeds in creating the header of the transaction, but I cannot make the BAPI create any other data in the transaction such as partners or items.
    Just want to be sure that I am not being foolish...has anyone succeeded in using this BAPI to create an error-free Service Confirmation?
    Regards
    Nick

    I am going to pop this thread into General ABAP forum too.
    Nick

  • Need     RFC/BAPI    to create Delivery Order  with respect to  Sales Order

    Hi Gurus ,I'm   new  to  AB AP  Language   to be  working  in company
    so  can anyone  tel  me   FM/BAPI   to create  Delivery  order  with respect to  sales order(va01,vl01n)
    Any  sugg.. will appreciate  u.........
    Thanks in Advance...........

    Hi,
        Try this BAPI
    BAPI_SALESORDER_CONFIRMDELVRY
    Regards
    Bala Krishna

  • Need a Bapi to Create a purchase order

    Hi experts,
    Is there a Bapi, to create a 'Purchase Order' from an existing Purchasing document no. marked for deletion.
    Thanks in advance ,
    Hrashit Rungta

    Hi Experts,
    I have used BAPI_PO_CREATE1 to create a purchase order .
    I have successfully created a purchase order when i use this BAPI directly through SE37 ,
    supplying the required inputs.
    But now i am calling  this BAPI inside a program,
    Supplying the same inputs as earlier.
    Buit i am not able to generate a PO.
    I am getting the messages in the Return Table as :|Please enter items first
                                                                                    No instance of object type PurchaseOrder has been created. External referen
                                                                                    Document contains no items
    Can someone suggest What input am i missing ?
    Thanks in advance,
    Harshit Rungta

Maybe you are looking for

  • IC Webclient Profiles

    Hi, we started customizing the IC Webclient trough profiles (as described in the "Consultant's Cookbook for IC Webclient CRM 4.0", Chapter 3). Assigning profiles seem to work, but the profile xml-tags in the profile ("<ControllerReplacements>") don't

  • Magic Mouse Momentum - NOT WORKING!

    Started using my brand new Magic Mouse and the momentum feature does not work. It does scroll like any other mouse on the market but no momentum. Also, I the tracking is slow even when set on the max setting. I've seen the posts with slow tracking, b

  • HT1443 My Macbook Pro is currently running OS X 10.4.11.  What do I need to do to upgrade to the latest version of Lion?

    I am currently running OS X 10.4.11 on my MacBook Pro and would like to upgrade to the latest version of Lion.  When I check for updates, I receive a message that says no updates are available.  When i tried to purchase a Lion upgrade, it says I need

  • Error printing both wireless and via USB

    Hi my printer is a HP deskjet 3050A all in one. It stopped communicating with the computers in the house when we were having internet issues.Tthe modem was reset. I have unistalled it and reinstalled the printer and the drivers and I can send the doc

  • Sales BOM block the quantities of child objects

    Good morning, It i difficult to write my question because I use italian Sap version and I have all fields names in Italian, so I hope that my translation is correct. I have i.e. item 1, item 2 and item 3 with a well defined price. When a customer wan