Routine or exit in modifying return order in reference to an invoice...

Hello Experts,
Is there a routine(inside VOFM) or user-exit to modify the values being passed
from the original invoice document to the return order being created. Presently,
we are having a problem when the original invoice has a rebate condition and when we
create multiple line items with the same material in the return order, the succeeding
line items references its rebate discount in the wrong material in the invoice document.
Example:
Original Sales Invoice 3010002390
Line Item No.     SKU          Quantity     Total Rebate Discount          Per Unit Rebate Discount
10          100315          10               128.07                    12.81
20          106666          10               128.07                    12.81
30          100338          10               243.86                    24.39
Return Order 1120000402  (repeatedly created with reference to the same sales invoice number)
20          106666          1               12.81                    12.81
30          106666          1               24.39                    24.39
For Return Order line 30, it should have picked the price 12.81 instead it picked 24.39,
which is the same line item with the original sales invoice

How do you create the return orders?
From your example it looks like there is an error somewhere in the custom code. Either a variable is not cleaned up or an internal table is read, then manipulated and the previous record is not restored in the memory, etc. Also the program might be looking at the line number (POSNR) without considering the material number. Or, if you use a custom program to create the returns, the problem might be there.
Take a look at the configuration of Copy Control. In SPRO, go to Sales & Distribution -> Sales -> Sales Documents -> Maintain Copy Control for Sales Documents -> Copying Control: Billing Document to Sales Document. Then find you document type combination (could be target = RE, source = F2) and double-click on it. There you will see the routines (VOFM) that are assigned to the copy control. Also check the config for Items and Schedule Lines (see the lefthand window there). There could be something different attached to each item type.
Also check if there is anything in the pricing user exits, you'll find a list here:
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erplo/copyofSDUserexits
Good luck!

Similar Messages

  • Return Order with reference to Proforma invoice

    Dear All
    Is it possible to create a return order with reference to proforma invoice. How ?? if possible.
    Our scenario is when we do stock transfer order and truck meets with an accident or anything and material needs to written to the factory premises. we dont want to complete proforma invoice.
    Suggestions PLZZ
    Regards-
    Ram

    I don't see any the relevance or logic of creating of return order from proforma invoice.
    You can follow - Returns flow:
    PO type is same ( Intercompany STO PO type is NB )
    While you make this PO there is a return indicator check box at the line item where you will give qty etc (scroll on the rt side)
    Tick that
    Then save the PO with all other information
    There is a configuration Return delivery type has to be assigned
    IMG-MM-Purchasing-PO-Returns Order-Return Plant to Plant
    Here for your plant you need to assign delivery type as NCR This config is reqd to be done from your end
    So, the Flow would be
    - ME21N (with returns indicator)
    -VL10B
    -VL02N (delivery type will be NCR ) & do a PGR here
    -VF01 do billing with reference to delivery created
    I Category in del will be NCRN & M type will be 673
    If you are using standard document types system will pick billing type as IG which is nothing but a intercompany credit memo
    Copy controls between NCR and IG in VTFL is already there in standard
    For understanding also, refer following link:
    return process intercompany stock transfer
    Hope this can assist you.
    Thanks & Regards
    JP

  • User Exit for Va01[ Return Order ]

    I Have Written User Exit for Va01[ Return Order ] in MV45AFZZ,
    I'm Making tax field VBAK-TAXK1 as 0 when making this field as 0 Pricing Condition Tax calculation should not be exit and tax value must be 0.
    How to do this process...plz give me a solution.

    Hi
    For price calculations or modifications, you may have to write the code in SD routines. Check this T.code VOFM.
    Reward if it helps!
    Krishna

  • Return order with reference to the billing document created via IDOC.

    Dear Colleagues,
    I’m struggling to understand and confirm whether standard functionality of ORDERS05 idoc allows creating a return order with reference to existing billing document?
    I have tried using standard segment E1EDK02 and E1EDP02 with qualifiers 009,010,011,087 but unfortunately idol is not creating a return order with reference and ignoring this segment.
    Have any one came across similar problem? If yes then will be grateful for sharing his experience.
    Best regards,
    AL

    Dear Friend
    Welcome to SDN
    Return order is itself a challenge to SAP standard settings
    There are some scenarios
    1. Return order qty should not be increasesd say Billed qty of material X is 20 units
    While returning Material X should be a maximum of 20 units
    If made 21 it should throw error T code OVAH message class V4 message no 299 convert from warning to error thro customization
    2.Return order should be created only once referencing billing doc
    To control that T code SE91 message class V1 message no 499 convert from warning to error thro ABAP help
    3 Your issue is same like case 1 but the material X is entered as second line item in the return order with some qty
    This case system is not throwing even a warning
    Yes correct
    This is to be handled with userexit
    Discuss the same with ABAPer
    Check these threads on return issues which is of different scenario than of yours
    Forum post in ERP - Sales and Distribution (SD) General: Order Qty.
    Order Qty.
    Forum post in ERP - Sales and Distribution (SD) General: Return order
    Return order
    Regards
    Raja

  • Return order with reference to the Billing Document

    Hi All,
    This is with reference to issue that when I create a Return order with reference to the Billing document
    I had one line item in the billing document say xxx of quantity  4  I had done the setting in the
    system messages V4 229 to convert the warning to error messages for billing quanity to order quanity
    If I enter in the first line item 8 insted of 4 system will throw a error but the issue is the same item xxx of qty 4 is entered in the second line item  and system allows to save the return order how to stop  this
    Please give the valuable feedback.

    Dear Friend
    Welcome to SDN
    Return order is itself a challenge to SAP standard settings
    There are some scenarios
    1. Return order qty should not be increasesd say Billed qty of material X is 20 units
    While returning Material X should be a maximum of 20 units
    If made 21 it should throw error T code OVAH message class V4 message no 299 convert from warning to error thro customization
    2.Return order should be created only once referencing billing doc
    To control that T code SE91 message class V1 message no 499 convert from warning to error thro ABAP help
    3 Your issue is same like case 1 but the material X is entered as second line item in the return order with some qty
    This case system is not throwing even a warning
    Yes correct
    This is to be handled with userexit
    Discuss the same with ABAPer
    Check these threads on return issues which is of different scenario than of yours
    Forum post in ERP - Sales and Distribution (SD) General: Order Qty.
    Order Qty.
    Forum post in ERP - Sales and Distribution (SD) General: Return order
    Return order
    Regards
    Raja

  • Regarding user-exit for customer return order in sales order creation

    Hi,
    My problem is when sales order type ZRE(Customer return) is created with refrence to Invocie i have to check the quantity in the return order is less than the original invoice or not.If quantity in return order is greater than invoice quantity then i have to raise error message.For this which user-exit is suitable in sales order program SAPMV45A.
    Thanks,
    shyla kumar

    Hi
        Use can use MV45AFZZ AND MV45AFZB userexits
    Within mv45afzz USE CAN form related to VBAP or
    save_document_prepare.
    Please reward if useful.

  • User exit to modify sales order pricing condition

    Hi Experts,
    I need ot modify Sales Order Header Condition (ZFRH), Condition Value (KWERT) for Transaction VA01 & VA02
    I agree there are many user exits which will modify XKOMV-KWERT structure and can populate what ever value we insert.
    But the value we insert is inserting into line item condition and the total of all line items is populating in Header .
    I need to modify only Header condition without populating Line items
    Thanks ,
    Basheer .

    Hi:
    Program : MV45AFZZ
    search for USEREXIT_NUMBER_RANGE.
    BR,
    Manthana

  • Return order - your reference field is grey

    hi,
    I want to make use the field "your reference" in item -->  PO tab --> your reference. however, this field is grey in return order. how can I make it changable. Thanks

    Hi
    Normally this field is not grayed out. Check field varient with help of SHDO. In order to copy PO number from order to return order you will have not create copy control routine with help of T code VOFM. Standard routine is 101. Copy and modify routine according you need and assing the new routine in copy controls between OR to RE.
    Vijay

  • Error while creating Return order with reference to Complaint

    Hi,
         We are using Complaint Management in CRM Service. After creation of Complaint, we want to create Return Order that is going to replicate in R/3 .
    We are able to create Return request in CRM as a follow up document. However we are not able to replicate the return order in R/3.
          We have created Return Document type CRMR in R/3  with related Item Category REN assignment & corresponding number ranges assignment.
    We facing problem, as this document is not getting replicated in R/3 & in Complaint, it shows message as "The document is being distributed at the moment, and therefore cannot be changed. The document will be ready for input once it has been distributed successfully.”
    In SMW01, it is showing as fully processed document. However in error segment it shows as error” No upload into R/3" &"R/3 Adapter is called".
    Could please suggest any configuration we have missed or additional configuration to be done?
    Regards,
    Arun

    Hi Arun,
    Have you check & maintained middleware setting for  document transfer
    (tcode R3AC1). Check object SALESDOCUMENT and try maintain transaction
    type there. Don't forget to activate use tcode R3AS.
    hope this helps.
    Gun

  • Net value issue while creating return order with reference to billing

    Dear All,
    I created SO / DEL/ BILLING for qty 100 say net value-20000.When i created Return order with  refrence to billing document,
    net value appearing same ( 20000) for 50 quantity.Pl do advise asap as its required urgently.
    Thanks in advance.
    Regards
    raj
    Edited by: raj_sapsd on Aug 20, 2010 9:18 AM

    surelly problem in VTAF
    F2 to RE
    DATAT: 103
    DATAT: 103
    DATAT: 003
    Coping requirement 021
    item level TAN  and ietm cat proposal G2N
    DataT: 153
    Datat: 104
    datat: 004
    Coping requirement 303
    Update doc Flow X
    only possibilites Removed my Moderator
    Edited by: Lakshmipathi on Aug 21, 2010 9:31 AM
    Please avoid asking for points

  • Creation of return order with ref to an Invoice

    Hi SD Experts,
    When i create return order RE with reference to a Billing document F2, storage location from the original document is getting copied into the return sales order.
    My requirement is, the storage location should not be copied since returns are supposed to go to a different storage location. Is there a standard way to control this. I was checking in copy control. Not able to find one.
    Thanks for your help.
    Regards
    Raghavendran

    Hi Raghavendran Gundurao,
    I too had same requirement, i mapped it by following changes in configuration.
    storage location determination depends on Sh.pt+ plant+ storage cond.
    & sh.pt will get determined on the basis of plant+ shipping cond. + loading group.
    Create new shipping pt for return  (Eg. ZRE) & do the basis setting like assignment  to plant  & check whether return storage location  is maintained in plant.
    Also new shipping cond: ( e.g.: RE)
    maintain shipping condition(RE) in Return order setting (VOV8) as it has a priority over customer master shipping condition.
    Do the shipping pr determination RE+ your loading group+plant
    then do the picking location determination Sh.pt (ZRE)+ plant = return storage location
    By doing this your Shipping point will get redermined to ZRE in return sales order. & your new return storage location  in delivery.
    pls make sure that storage location is not mandatory field in sales order (incomletion procedure)
    if you have any further queries let me know.
    Regards,
    chetan

  • How can I Create return order with reference to an ARCHIVED invoice

    The standard "Reference" process does not work when the invoice has been archived. Has anyone solved this problem?

    This is because the archived document is not available in the database and the archived document can be used only for viewing the data. Normally only very old documents (like more than 7-10 years old) are archived, so I am just surprised, why a return order is created for a very old document (sales process)?
    Regards,

  • Return Cycle  with reference to cancelled invoice

    Dear All,
    There is a issue with the client  where in  the return sales order is happening with reference to cancelled invoice.  How to block the returns sales order from taking the cancelled invoice.
    1. Is this a normal standard behaviour of the system ( whether it will accept the cancelled invoice when trying to input in the returns order ?
    2.  Or Can we block the cancelled invoice from entering in the returns sales order process.
    Regards,
    Kumaresh

    Hi Kumaresh,
    1. Is this a normal standard behaviour of the system?
    Yes.
    2. Can we block the cancelled invoice from entering in the returns sales order process?
    Yes. By assigning Routine in Copy controls.
    Please find the Below link
    Returns referred to an invoice that is already cancelled
    Thanks
    Dasaradha
    Edited by: dasaradha ramireddy on Jan 20, 2012 1:04 PM

  • Sales order with reference to the invoice

    How can we create a sales order with reference to the invoice

    Hi,
    1. Create sales order
    This process step can be triggered as follows:
    The customer accepts the quotation and places an order.
    You create a sales order with reference to a quotation. For more information, see Structure link processing Quotations. The system copies the items from the quotation.
    You create a sales order. This is also possible without performing the previous steps.
    2. Enter products
    You enter products requested by customers.
    Note
    If necessary, you can configure products again for every item of the sales order. You can find more information in the business scenario variant Structure linkQuotation and Order Management (Configure-to-Order) and under Structure linkProduct Configuration in the Sales Transaction.
    3. Check availability, schedule order and create requirements
    The system triggers an availability check and scheduling in SAP APO for every order item in SAP CRM. The confirmed quantities and dates are confirmed by SAP APO to SAP CRM, and saved in the sales order (see Structure linkAvailability Check in the Sales Order). At the same time, a customer requirement is created in SAP APO.
    Note
    You can also execute the availability check in SAP R/3. You can find more information under Structure linkAvailability Check with SAP R/3.
    4. Maintain and determine conditions
    The system determines the prices and the value of individual items. If necessary, you can process these. For more information, see Structure linkPricing.
    5. Perform credit check
    SAP R/3 executes a credit check based on the results of pricing in SAP CRM. The result of the credit check is confirmed in SAP CRM, and saved as the credit status at item level. For more information, see Structure linkAutomatic Credit Check.
    6. System replicates sales order
    After the sales order has been saved in SAP CRM, complete and without errors, it is replicated for logistics processing in SAP R/3. Order data is transferred together with confirmed scheduling lines to SAP R/3.
    7. System receives sales order
    After replication to SAP R/3, you can change the sales order in SAP CRM and SAP R/3. You can find more information on this under Structure linkData Exchange for Sales Transactions: CRM Enterprise - SAP R/3
    8. Send order confirmation to customer
    You can send the order confirmation either electronically, or in print to the customer. You can find more information under Structure linkSales Order Confirmation by E-Mail.
    9. Monitor status of order
    PS: Do award points

  • User exit to modify EKKO-IHREZ ( Your reference field )

    Hi All,
    We are using Badi ME_PROCESS_PO_CUST to modify You reference ( EKKO-IHREZ ) field during purchase order creation . This badi is called when purchase order is created  through ME21N and when PO is created through BAPI . This badi is not called when PO is created through ME21 .
    Can you please let me know if there is any other user exit/ badi ( or any other way ) where we can modify EKKO-IHREZ when PO is created through ME21 . I checked few user exits but all are having EKKO as the Importing parameter so changes  made to IHREZ  will not be reflected .
    Thanks and Regards,
    Kiran.

    Hi,
    Have you tried with BTE function modules, try using "01000730     APO Plug-In: Purchase Order" Event, only you have to enter BERE transaction, execute with F8, locate 01000730 event, select it and then press "Sample Function Module" button, copy the function module sample "SAMPLE_INTERFACE_01000730" by your own ZFUNCTION where you will have the posibility to make changes to EKKO-IHREZ field see the parameters you can acces and make all the programming you need like:
    FUNCTION ZSAMPLE_INTERFACE_01000730.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_EKKO) LIKE  EKKO STRUCTURE  EKKO OPTIONAL
    *"     VALUE(I_CALL_MRP) DEFAULT ' '
    *"  TABLES
    *"      T_XEKPO STRUCTURE  EKPO OPTIONAL
    *"      T_XEKET STRUCTURE  EKET OPTIONAL
    *"      T_XEKKN STRUCTURE  EKKN OPTIONAL
    *"      T_YEKPO STRUCTURE  EKPO OPTIONAL
    *"      T_YEKET STRUCTURE  EKET OPTIONAL
    *"      T_YEKKN STRUCTURE  EKKN OPTIONAL
    ToDo
    I_EKKO-IHREZ = 'MY_IHREZ_VALUE'.
    ENDFUNCTION.
    Activate it.
    Then go to transaction FIBF, then go to menu "Settings->Process Modules->...Of an SAP Application", once there create a new entry and set 01000730 for the process and your ZFUNCTION name in the Function Module Field, save changes and make a test to see if it works fine.
    I hope it helps.
    Regards,
    Moises Grappin.

Maybe you are looking for

  • Displaying page total on a page with fixed number of lines

    Hi , My requirement is to have a fixed number of rows per page (say 20) and to have a page total beneath the table containing the data.I am using a RTF template.The columns in the table are Order Amount Page Total : 3000 For including a page-break af

  • Will I lose my music if I uninstall my itunes

    My itunes says it's corrupt or not working properly I keep trying to download itunes all over but I'm worried if I uninstall my itunes will I lose the music I have.

  • Using different namespaces in ALUI remote portlets

    I'm trying to incorporate AJAX technology into our ALUI remote portlets. I'm using Backbase tools to try to do this. However, these Backbase tools have their own namespace defined for their custom tags. When I try to access the remote portlet, I get

  • Acrobat 8 3D "invalid serial number" message

    I'm getting the message, "You have entered an invalid serial number. Please reinstall Adobe Acrobat 8 professional and enter in a valid serial number when asked." However, the fixes on the Adobe forums for this problem state that it occurs due to Cre

  • HT5429 iOS 6 Maps and Chinese writing every where

    Why is it that all the countries, cities etc have the name in English (which I expect) but also above that Chinese characters for I assume the name in Chinese. Very annoying where can I turn this off? Thanks