Data Transfer from Sales Order to Purchase Requisition

We are trying to transfer data from Sales Order to purchase requisition in an individual purchase scenario.
We want to copy value in KUWEV-KUNNR in Sales Order and paste in CMMDA-KUNNR on purchase requisiton.
So in user-exit "USEREXIT_MOVE_FIELD_TO_ME_REQ" on include "MV45AFZB" we added the following code:
FORM USEREXIT_MOVE_FIELD_TO_ME_REQ.
DATA:   BEGIN OF IT_VBEP OCCURS 0,
        VBELN LIKE VBEP-VBELN,
        BANFN LIKE VBEP-BANFN,
        KUNWE LIKE VEPVG-KUNWE,
        END OF IT_VBEP.
DATA: BEGIN OF TI_VBAK OCCURS 0.
        INCLUDE STRUCTURE IT_VBEP.
DATA: END OF TI_VBAK.
    SELECT A~VBELN   B~KUNWE
      INTO CORRESPONDING FIELDS OF TABLE IT_VBEP
    FROM  VBAK AS A INNER JOIN VEPVG AS B
                          ON B~VBELN = A~VBELN
    WHERE A~AUART EQ 'PDIR'.
   LOOP AT EBKN.
       LOOP AT IT_VBEP.
            IF IT_VBEP-VBELN = EBKN-VBELN.
              IT_VBEP-BANFN = EBKN-BANFN.
            ENDIF.
            MODIFY IT_VBEP.
       ENDLOOP.
   ENDLOOP.
*Break-point.
SORT IT_VBEP BY vbeln.
LOOP AT IT_VBEP.
  IF EBAN-BANFN = IT_VBEP-BANFN.
    EBAN-KUNNR = IT_VBEP-kunwe.
    MODIFY EBAN.
  ENDIF.
ENDLOOP.
* Example
* EBAN-LIFNR = zzfield1.
* EBKN-KOSTL = zzfield2.
ENDFORM.
*eject
Right now it turns random values on the purchase requisition field.
Edited by: Carlos Salazar on Sep 15, 2010 5:19 PM
Moderator message: please use more descriptive subject lines from now on.
Edited by: Thomas Zloch on Sep 15, 2010 5:26 PM
Edited by: Carlos Salazar on Sep 15, 2010 5:30 PM

Hi,
Why are you using only the following line to read the VBEP table?
WHERE A~AUART EQ 'PDIR'.
Shouldn't you be using a sales document number or something more specific than document type?
Regards,    Andy

Similar Messages

  • Copy control from Sales Order  to Purchase requisition

    Can any one guide me how to set this, which fields need to be copied from Sales order to Purchase requisition.
    Vasu

    I don't think so sap has provided this kind of control but you can configure certain things as item category level for thirdparty in SD
    SPRO-SD-sales-sales document-sales document item-define item categories
    here you can check for item category TAS or you can create your own

  • Item text from sales order to purchase requisition

    Hi Experts,
    I have below queries ,
    1. What are the controls to generate/create a purchase requisition from a sales order.
    Is this possible that a Pur. req generated from a sales order but sales order is not its account assignment.
    How item text from the sales order can be copied to purchase Requisition, does settings in purchase requisition in SPRO (Purchasing Purchase req-text for purchase req----define copying rules) works only for automatically created Pur req.??
    item text from sales order can be copied for PR created through MRP or planned orders converted to PR.??
    I will appreciate if someone can provide me documentation on basics of sales and distribution at my email
    [email protected]
    Thanks in advance
    anand

    hello, friend.
    i can only answer part of your question as i am not sure of the others.  however, yes... you can automatically create a purchase requisition from the sales order. 
    one example is third party sales.  because of the item category group that you specified in the material master, the sales document determines an item category (and schedule line) that controls the creation of the purchase requisition.  here, the system knows that you must source the material from your vendor for delivery to your customer.
    further, as in the above case, when your company creates the PO with reference to the PR, your company appears as the buying entity but the ship-to address is that of your customer.
    i did not understand your question on account assignment.  please elaborate and we'll see if we can come up with the answer.
    if you wish to see documentation, you could refer to SAP's article on Third Party Sales.  other scenarios such as just-in-time inventory for trading companies or make-to-order companies may also apply.
    regards.

  • Passing text information from sales order to purchase requisition

    Hi
    My requirement is in third party processing. I want to pass line time text in sales order to the purchase requisition created in a third party processing.
    My question : is it possible in standard config setting?
    If not, Is there any user exit to address this
    please send us valuable inputs
    Thanks
    Sriram.

    Dear Sriram,
    Try this,
    Go through this IMG path do the required settings
    SPRO>IMG>Material Management>Purchasing>Purchase Requisition-->Texts for Purchase Requisitions.
    -->Define Text Types here you can define the Text type same as sales order Text type for Purchage requesition .
    -->Define Copying Rules -->Here you select the Text type(Newly defined) to which text type you want to copy the sales order text then click on Text Linkage -->New Entries in the New entries screen you enter
    Sequence
    Source Object as Sales order
    Source Text
    Fix as blank -Text automatically adopted in target object
                      Finally save the settings.
    Now you create third party sales order system will copy the sales order text to the Purchase requesition
    I hope this will help you,
    Regards,
    Murali.

  • Copy Control From Sales Order to Purchase Order

    Hi Experts,
    I want to ask how the copy control from Sales Order to Purchase Document can be done? Because they are instances that the users have some items in the Sales Orders not copied to Purchase Document.
    Thanks a lot!

    Hi Experts,
    I have seen the documentation for 3rd Party Sales, thanks to some suggestions. However, there is a report which does not work in our Test Environment, the program name is SDMFSTRP. As suggested by some forums, this is another way of connecting Sales Order to the created Purchase Requisition. So I'd like to ask if there are other ways to connect the 3rd Party Sales to the created Purchase Requisition.
    And also may I know your scenarios when there will be missing items from Sales Order to Purchase Requisition. There are some instances that from Indent Orders, some SO items are not copied to PR.
    Thanks a lot!

  • Link tables of Sales Order and Purchase Requisition

    Hi,
    thru which tables we can get the data of purchase requistion for a sales order.
    regards,
    balu

    Dear Balu,
    the fields VBEP-BANFN and VBEP-BNFPO are filled in the third-party process only. It means that there is 1:1 connection between the schedule line of the sales order and the purchase requisition. In the third-party process during saving the sales order the purchase requisition is created automatically and is linked to the order.
    If the fields are empty, it means, you have no third-party process and no 1:1 connection between the sales order and the purchase requisition. Probably the sales order created normal requirements, which generate purchase requisition(s) after MRP run. In this case you cannot see the purchase requisition from the sales order as there is no 1:1 connection. You have no chance to get the data from sales order to the purchase requisition.
    The only possibility which you (may be, it depends on the process) have, is to find sales order numbers from the purchase requisition: so to develop the process backwards. These data are stored in the database table EBKN: Purchase Requisition Account Assignment.
    Please use the following fields:
    EBKN-BANFN  - Purchase requisition number (key field)
    EBKN-BNFPO  - Item number of purchase requisition (key field)
    EBKN-LOEKZ  - Deletion indicator in purchasing document (key field, can be helpful)
    The corresponding sales orders are stored in:
    EBKN-VBELN  - Sales Document Number
    EBKN-VBELP  - Sales Document Item
    EBKN-VETEN  - Schedule line number
    I hope, this information will help you further and will solve your problem.
    Kind regards,
    Akmal Vakhidov
    Development Support SD, SAP, Walldorf/Germany

  • PO Text copy from Sales Order to Purchase Order

    Dear friends,
    Hope everyone is doing fine.
    I have the following business requirement for two situations
    Scenario 1) Purchase Order text from the Sales order has to be copied to the purchase order. Here sales order is converted to purchase requisition, and later the requisition is converted to the purchase Order.
    The standard SAP config is working absolutely fine for this.
    Scenario 2) Purchase Order text from the Sales Order has to be copied ot the purchase order. Here sales order is converted into a planned order, planned order is converted into purchase requisition, and later the requisition is converted to the purchase Order. For this situation, the text is not getting copied from Sales order to the requisition/purchase order.
    This is not working as of now with the configuration for the above scenario 1.
    Please throw some light to solve the scenario 2.
    Please let me know if there is a config or do we need to use any user exit or BADI to achieve this.
    Thanks in advance.
    Regards

    Hi Sam Matt ;
    You can benefit from MM:Define copy rules for PR texts .
    I checked , you can copy from sales order , like a belowed screens.
      Regards.
      M.Ozgur Unal

  • Copying Profit Center from sales order to Purchase order

    Hi Champs,
    Please let me know if anyone has implemented this scenario of copying profit center from sales order to purchase order and then to goods receipt.
    Thanks
    Pirzada

    Hi,
    Profit center flows from material master to other documents such as PO,SA GRN and MIRO.Please let me know what are you looking for?

  • User-exit to copy collective number from sales order to purchase order

    Hi,
    Can any one help me  which user-exit/BADI  is used to copy collective number from sales order to purchase order?  please help me.
    Thanks,
    Alka

    hi
    copy control would be the better option to choose.. but still u can a give a search in list below and opt for the right one..Refer to the link below..
    http://www.planetsap.com/Userexit_List.htm
    User exits for Sales order
    1•USEREXIT_DELETE_DOCUMENT
    2•USEREXIT_FIELD_MODIFICATION
    3.•USEREXIT_MOVE_FIELD_TO_VBAK
    4.•USEREXIT_NUMBER_RANGE
    5.•USEREXIT_SAVE_DOCUMENT
    User exits for billing
    1.•USEREXIT_ACCOUNT_PREP_KOMKCV (Module pool SAPLV60A, program RV60AFZZ)
    2.•USEREXIT_ACCOUNT_PREP_KOMPCV
    3•USEREXIT_NUMBER_RANGE_INV_DATE (Module pool SAPLV60A, program RV60AFZC)
    4•USEREXIT_PRINT_ITEM (Module pool SAPLV61A, program RV61AFZB
    5.USEREXIT_PRINT_HEAD (Modulpool SAPLV61A, Programm RV61AFZB)
    Reward if Useful
    Thanx & Regards..
    Naren..

  • Copy incoterms from sales order to purchase order

    In the third party flow: we create a sales order which creates a purchase requisition which is converted to a purchase order, I want to copy the incoterms which are initally added in the sales order automatically to the purchase order. Anyone knows how to proceed?
    Thanks!

    what business scenario is this? third-party-order-processing? in that case SAP standard would submit the data from the sales order to the purchase order (via purchase requisition) automatically, see documentation: http://help.sap.com/saphelp_erp60_sp/helpdata/en/dd/560287545a11d1a7020000e829fd11/content.htm

  • Dynamic data flow from sales order to delivery and vice-versa

    Hi Experts,
    One of our teams working for a client (transportation industry) on ECC 6.0 is facing an issue in relation to copying of partner data. (Ship-to-party address field changes to be precise)
    Currently, whenever the partner address data changed in a Sale order, though delivery is already created prior to this change, the change done is dynamically getting reflected in delivery too. Further, if the partner data in the delivery is changed, this also is getting updated on the preceding document i.e. sales order.
    We have checked the copy controls under VTLA and didn’t find any specific modifications made in this regard. Our question is:
    Is there any configuration available in standard SAP through which the data updates (like header data viz. partner field data etc.) get dynamically updated forward and backwards in a sales flow(i.e. from sales order to delivery and vice-versa)
    Your help on this will be highly appreciated.
    Regards,
    Jagan

    if the partner data in the delivery is changed, this also is getting updated on the preceding document i.e. sales order.
    The standard functionality is if you change the address of a partner function, the same will get reflected in an existing sale order.  This being the case, can you reconfirm your statement that in delivery, if you change the partner function, the same will get updated in sale order also?
    G. Lakshmipathi

  • Changes carry forward from sales order to Purchase order in third partysale

    Hi,
    My requirement to carry forward the changes in sales order to Purchase order in third party sale and vice versa.
    As we know most of the changes we do in sales order,get refelected in purchase requestion because PR get created automatically from SO but PO we create manually in third party scenario.
    Now my requirement to refelect the changes (changes qty, request delivery dale,adding or delition item etc.) from SO to PO and text message from PO to sales order automatically.
    Please guide me.

    Hi,
    Thanks for reply.
    In third party PR gets created automatically but PO gets create manually.So changes get refelect in PR only not in PO.
    Can you give me the solution for completing this task.
    Thanks & Regards
    Jalaj garg

  • Reg.Stock transfer from Sale order into Production order

    Dear All
    We want to transfer the sale order stock in to production order.
    What I have to do ? Pls help me.
    Thanks
    Rajakumar.K

    Hi,
    Could you please explain in details?
    Other than the way of converting  sale order stock which is the normal course of working, you can also consume the unrestricted stock to the production order which has a assignment to the sale order by manually changing the assigment of the material  in the production order components. If you enter into the production order components u will be able to see a column called "Spec procurement" where in by default it will be '1' if the production order is w.r.t a sale order. Then proceed with material availability check.
    Regards,
    R.Brahmankar

  • Re: Copying Header Text from Sales order to Purchase order

    Dear Friends,
    We have requirement to copy the "shipping instructions text"  maintained in the Sales Order to Purchase Order.
    Could some body guide to configuration settings needed to get this.
    Thanks,
    Krishna Redy

    Dear Suresh,
    We are creating the Purchase order with account assignment and in the PO we are giving the sales order number.
    When system is copying the Customer and order dedails to PO, same way we want to copy the Texts as it plays big role for the clients business process.
    SAP must have solution for this as it is genuine requirement. Hope someone call the right card.
    Thanks,
    Krishna Reddy

  • Sales order to purchase requisition

    HI ,
              I am trying to create a PR automatically from sales order , but when creating a sales order , I am manually enabling the check box for "GR based IV" and "GR non valuated " in sales order so that its copied to PR accordingly ,
    Can anyone suggest me the pointers so that this indicators are enabled automatically .
    Thanks ,

    First of all you can't see the GR based IV on Req
    you will find GR non valuated, Good receipt and invoice receipt
    To get this all defualt----find the A/C assignemtn category you use for this kind of req
    in std SAP use C for SO
    go to SPRO_MM_Purchasing-account assignment-maintian a/c categories
    here make your setting for your A/C category and it will defualt to reqs.

Maybe you are looking for

  • Exception occurred. Internal error: Cannot obtain XAConnection Creation of XAConnection for pool....

    Weblogic Server 6.1 SP2 is running fine. But unable to get XAConnections! I am getting following error java.sql.SQLException: Internal error: Cannot obtain XAConnection Creation of XAConnection for pool ibesXaConnection Pool failed after waitSecs:300

  • Problems with MSVCR80.dll not found, cannot install itunes

    tt2,  I'm using your instructions given earlier about removing 5 apps and downloading iTunes.  I got lost at 're-installing' using run as administrator or administrator rights.  How do I do that?  I assume its ok to see the error message that the sys

  • JComboBox with 2 or more columns

    I think this topic has been discussed here several times. However, I was not able to find a clear example on how to do this thing. I need a combo box (JComboBox) to display 2 or 3 columns with data from a database. I have no clue what to do. I have t

  • I hate QuickTime...

    Can anyone please help me... I got the new iPod nano and I can't download iTunes because QuickTime is giving me trouble. When I go to install iTunes and QuickTime, I get the message: error1905.Module C:\ProgramFiles\QuickTime\QTOControll.dll failed t

  • Installation of Sum (Software Update Manager)

    Hello People I have a problem with the installation of packets in my system BW in the stack to java. The tool JSPM this not working and I opened a message in support sap and they comment that tool for packages update, is  changed per SUM "Software Up