Designing a BADI to create purchase order based on purchase requistion

Hi..
i ve to design a badi such tat whenever an order is placed it shld create a purchase order based on the purchase requsition..
its like a user exit thru a BADI.
theres somethg called a shoppg cart ... thru tat when we enter.... it creates a purchase requisition and without purchase order.... delivers it

Hi,
    U can use the BAPI 'BAPI_PO_CREATE1' to create the purchase requisition.

Similar Messages

  • User Exit / BADI while creating Purchase Requistion

    Hi,
    I am trying to find a BADI that would get triggered before the purchase requisition gets created (so that I can edit the storage location). I observe that purchase requisitions could be created with transactions like MD41 or while creating a sales order (events trigger MRP in background ?)
    I tried to find the relevant BADIs using the transaction MD41 and function module SXV_GET_CLIF_BY_NAME and found the following BADI definitions but was not too sure which one to use in the case. Could anyone help
    MD_MRP_PARAMETERS
    MD_CHANGE_MRP_DATA
    MD_ADD_ELEMENTS
    MD_MODIFY_SOURCE
    MD_ALTERN_EXPLOSION
    MD_LAST_LOT_EXACT

    Used the BADI MD_PURREQ_CHANGE

  • How to create an order based on Notification through BAPI_ALM_ORDER_MAINTAIN

    Hi
    I need to create an order based on the notification no. This is manually can be done using the Standard T.Code IW34.I am using BAPI_ALM_ORDER_MAINTAIN to create an order based on Notification. I am getting the below message( which is success message)
    Order %00000000001 saved with number 40001258
    BAPI control was ended
    Though order is created it not assigned to notification No. I am using ref key as '%00000000001' and also I tried with '%0000000000140232323' where 40232323 is notification No.
    And if I checked in order the notification No is assigned to order as '%00000000001'. And when I check back the Notification, the order is not assigned to Notification No. How to assign the created order no to Notification No.
    Code is attached for Ref.
    Now the problem is the order is not assigned to notification no. Is there any FM or BAPI to do the same fucntionality..!
    Regards,
    Amar

    Hello Amarnadh,
    Keng Haw Soon is right, object key should always have the client like 010.
    In your code you were passing it without the client.
    Pass like below and it will work.
    ls_methods-objectkey = '%00000000001000040232323'.
    Regards,
    Thanga

  • 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

  • Creating sales order based on store numbers in IS retail

    Hi ,
         I want create a sales order based on the PO received from the customer in the IS Retail system. The purchase order will be sent in a EDI file.
    a single line item in the PO will have multiple store locations where we need to ship materials. for example.
    Let us take an example
    PO will have an item "Shampoo"  quantity  - 1000, this 1000 has to be shipped to diffrenet stores like 0001 - 100, 0002 - 100 , 003 - 200 etc. Based on this PO we need to create a sales order.
    Is there any way we can handle in SAP IS retail to create sales order & save the customer store number in the sales order for that item
    With Regards
    K.Varadharajan

    Hi Varadarajan,
    For one Sales Order only one Sold to Party and one Ship to Party are possible as they are header data.
    You can have individual Sales Order for each outlet and one delivery can be made for several Sales Order for single Ship to Party.
    Hope this clarifies you.
    Regards,
    ManiKumaar

  • Creating transfer orders based on transfer requirements

    Hi,
    I have a requirement to create a transfer order based on a transfer requirement and also in that transfer order I need to specify the SSCC pallet number as Storage Unit Number.
    I have searched the SCN and found that I should use FM L_TO_CREATE_TR. I also see that I should fill import structure it_trite with storage bin related data.
    I am on a 46C system and I do not have the it_trite structure. I have seen comments that it exists in 45B and I also see it in ECC6 systems.
    I cannot find any related notes on OSS.
    Can someone confirm that 46C should not have this import structure? How am I supposed to specify storage unit number if that import structure is not there? Are there alternative FM's I can use?
    best regards,
    Glenn

    A solution has not been identified...query closed.

  • Create maintenance order based upon notification in NWBC / Portal

    Dear experts,
    How to create a maintenance order based upon a notification, using the POWL for notifications ?
    I am using NWBC and would like to create a maintenance order, based upon a notification put in process.
    In R/3, this works fine using transaction IW22 / IW28 and all info from the noticiation is copied in the new order.
    How can I get the same functionality using  the role SAP_BPR_MAINTENANCE_TECH_12 ?
    Kind regards,
    Dirk

    Dirk,
       You should be able to select the Notification number from the POWL overview list and choose the "Create Order" push button on the Tollbar (along with display notification, change notification etc).
      What i have noticed is that once you are inside the notification from the Portal application, the create Order push button or functionality doesn't seem to exists. This is probably incomplete functionality taking into consideration the standard IW22 transaction /Or a  Bug  and maybe you could raise a OSS Note for the same.
    Regards
    Narasimhan

  • User exit Or Badi for  creating Service order while modifying sales order.

    Hi Experts,
    I am creating Notification using transaction IW51.
    In IW51 there is a button to create a sales order.
    I click on sales order button and create a sales order.
    Now notification and sales order are created.
    Now i go in transaction VA02 and click on avalibility check push button .It gives me some popups in which i select copy all options.Then  i click on save button
    .At this point service order gets created.
    My requirement :
    Before the service order gets created i want to pass the notification data ; for ex- Equnr(Equipment number) to service order.
    Thanks & Regards,
    Chetan

    Hi,
    Are you saying first create notification,then service order
    and then Sales order.
    But the requirement is create notification then sales order and when you go in va02 and while modifying the sales order and create service order.
    Thanks & regards,
    chetan.

  • MD02 - Create purchase requistions

    Hi,
    I am using transaction MD02 to create puchase req. for sales orders. Do you know any user-exits or BAdis that can be used to assign a value to the tracking number field (BEDNR) on the purchase req. line item? Please help.
    Many thanks,
    Chuong

    There are several BAdI's for Purchase requisitions.
    Go to txn SE18 and select the drop down.
    Select Information System.
    Enter urchase in the short description (case sensitive to allow "Purchase" and "purchase").

  • BDC to create purchase requistion

    Hi ,
    Can purchase req. be created using BSC?
      if yes then how, what are the mandatory fields for BDC recording for purchase requisition?
    Thanks
    Lovleen

    You can not create BDC for purchase order creation by T-Code ME21n as it is using ALV for items. But you can use thold transaction ME21 to create purchase order by BDC. But better to use BAPI or functional module.

  • Create purchase requistion

    Hello,
    I'm working on an integration project between SAP and a third-party library software system. The goal is to generate SAP Purchase Requisitions for orders created within the library software. The idea is to let the library software generate an (xml) file and load the file into SAP.
    I'm searching for information on the structure/layout of such a file and the technology to use to transform the file to a PR in SAP ?
    Any help would be appreciated.
    Kind regards,
    Erik

    You can not create BDC for purchase order creation by T-Code ME21n as it is using ALV for items. But you can use thold transaction ME21 to create purchase order by BDC. But better to use BAPI or functional module.

  • Creating Purchase Requistion with Configuration Data

    Hi Guys,
    I am interested in creating purchase requisition (BUS2105) with configuration data (Charatceristics). However, the BAPI BAPI_REQUISITION_CREATE does not have any interface to pass the config data.
    I tried using BAPI BAPI_OBJCL_CHANGE/CREATE to assign characteristics to to the requisition with no success.
    Any suggestion is welcomed.
    Thanks
    Yogi

    Hi,
    Dont think Shipping data will be there in Material Master. U probably need to chk the shipping details for the customer instead.
    Regards,
    Bikash

  • Designer BC4J Generator Extension creates wrong order by clause

    Hi,
    Just tried out the new Designer BC4J Generator Extension and it creates a wrong order by clause. I have a List of values in Designer with one table usage. There is a bound item based on a columnname CODE and has the name L_CODE. The order by sequence is 1 and ascending. After generating it in JDeveloper the generated query is:
    SELECT PrjEntityUsage.CODE,
    PrjEntityUsage.NAAM
    FROM X_PROJECTEN PrjEntityUsage
    ORDER BY LCODE
    So there are two problems:
    1) If the name property in designer is different from the column name the select in the SQL query in JDeveloper needs an alias with the name property from Designer.
    2)If there is an _ in the name it is ignored in the order by clause in JDeveloper.
    I do not know where to report the bug so i placed it here.
    Regards,
    Andre Jochems

    Andre,
    Thanks for notifying us about these. There are indeed bugs which we have logged and scheduled for a fix.
    Regards
    Sue Harper

  • Create Planned order based on qty in APO or SCM

    Hi All,
    I am working product view in APO or SCM system .
    Requirement is create new planned order with sales order individual length and planned order pegged to sales order in APO system.
    Example
    Sales order has  factor 4 and individual length 1000( 4 x 1000 ). Total quantity is 4000M.
    We need to create 4 planned orders. Each Planned order has a quantity of 1000M.
    Please help me and  let me if any function module is there.
    Thank you,
    Durga Vinta

    Hi All,
    Thank you so much for your response.
    I have placed a X pushbutton in product view- > Element tab.
    If the user presses X then screen will display with sales order information based on Factor
    Example Sales order has 4 x 1000 = 4000M
    Factor individual length
    1         1000
    1         1000
    1         1000
    1         1000
    If the user selects the 1st and 2nd and presses save button. We need to create two planned order for sales order. Each planned order has 1000 qty.
    Please let me know if any function module or BAPI in APO system.
    Thank you,
    Durga Vinta
    Edited by: Durga Vinta on Jul 16, 2010 11:38 AM

  • Create Purchase Requistions through MD01 despite Procurement Type X

    Hi,
    When we run MD01, Planned Orders are being created for our materials with Procurement Type X despite we select "1 - Purchase Requisitions" in field "Create Pruchase req."
    We would like to have Purchase Requisitions created instead of Planned Orders, is it possible?
    Or is there any way of converting the planned order into a purchase requisition automatically? (we know we can do it manually in MD04)
    Thank you very much

    Hi Jürgen L,
    Thanks, but we need to have Procurement Type X (or E) due to a Project System requirement.
    I've seen that with Procurement Type E and Special Procurement 20 (External Procurement) the MRP creates PReq. (instead of Planned Orders) and our Project System requirement is fulfilled.
    It seems kind of contradictory (and I must do some extra test) but it works. Do you think this could have other consequences?
    Thanks

Maybe you are looking for

  • How to use the Microsoft File Copy dialog box  in Java ??

    Can anyone tell me if it is possible to use the Microsoft File Copy dialog box (the one with the animated gif of the paper flying from one folder to anaother) in a Java. Many thanks

  • Transformation on SAP InfoObject

    Hi Experts, I have made a transformation on 0calmonth. As I want to create a dtp for this transformation I get the message that the Source 0CALMONTH (TYPE IOBJA) is not activ. (The infoobject is active; if I try to activate again, system says that it

  • Additional condition for document splitting  for general ledgers

    Hello, I need to add another condition in GL, to split invoice by KBLNR. Is there any program  that will adjust system to do this? I mean to expand FAGL* tables, and enable this condition (KBLNR) to be used in customising document splits of GL in SPR

  • Remote Server Management

    Is it possible to remotely manage (screen sharing, etc.) a headless Mac Pro running Snow Leopard Server without having to buy Apple Remote Desktop? Can this be done with mobile me Back to My Mac? Thanks for any help!

  • (AS 3.0) How to separate functionality using classes

    Anyone familiar with this? I have already tried dividing among classes and it is not working. I have created the following code that pulls data from an external xml file into a datagrid. I have been trying to figure out how to get it to function usin