User Exit for sale order for adding a new partner

Hi
i am having the Scenario to add a new partner in  sales order in both VA01 / va02 transaction .
i am using the exit named MV45AFZZ .   (USEREXIT_MOVE_FIELD_TO_VBAP) for this scenario.
Its perfectly working for VA01 , but not VA02 .. why ..
can any1  explain me ..

Hi Irfan,
You want to add partners in Sales order, the partners data will be saved in VBPA table.
The USEREXIT_MOVE_FIELD_TO_VBAP is used for values for fields at sales document item level.
For you its working for VA01 because , you have modified the strucure XVBPA for partners
data and it is not saved yet to the database table so it is available in VA01 and in VA02
it is checking the VBPA table there this data will not have been saved please check VBPA
for your sales order.
Please check below things.
1) Check whether you have passed UPDKZ in XVBPA UPDKZ has below values INSERT (I),DELETE (D),UPDATE(U) etc nad
if it doent works
2) Please check the SAVE_DOCUMENT_PREPARE form and check XVBPA here whether it contains the
entries you modified if not use the same code as you used in USEREXIT_MOVE_FIELD_TO_VBAP
then these changes will be saved to database and hopefully you will get it in VA02 as well
also pleaseuse the flag UPDKZ whenever you modifying this tables for your case
XVBPA-UPDKZ.
Regards,
Pawan

Similar Messages

  • User Exit during Sales Order Creation - New Line Item needed

    I have a situation during the process of sales order creation. If a Material in a line item has say 27 EA and the Base Unit is EA. But the Sales Unit is CSE. Then whenever the user enters 27 EA and presses enter he should get two line items.
    The first line item needs to convert to maximum number of CSE posible and the rest will be the second line item with the remaining EA. The order isn't important but that is what is needed. Question is how do I approach this problem and code my user exit accordingly and where do I code it.
    I was looking at SAPMV45A and saw the program MV45AIZZ which is meant as a user exit for any PAI event handling. If anybody has encountered this kind of requirement can you please share your view on this.
    I will definitely reward points for useful answers.
    Clark

    Hello Mahendra
    The requirement is as follows :
    PART 1:
    Sales Order Enter: 
    1.     When a line item is entered on a sales order (VA01 or VA02), at enter, check the sales unit of measure (VBAP-VRKME).
    •     Do not check line items where item category (VBAP-PSTYV) = TANN, TAPS or ZTAP.  TANN are free goods that should not be considered for consolidation.  TAPS & ZTAP are lower level materials as a result of product selection.  They will be attached to a higher-level material with an item category of TAX, which is relevant for consolidation.
    •     Do not check items where VRKME <> EA
    2.     If VRKME = EA, go to MARM for MATNR.
    3.     Go to record where alternate unit of measure (MEINH) = CSE, get the value from the numerator field (UMREZ).
    4.     Divide the order quantity (VBEP-WMENG) by UMREZ.
    5.     If the result is greater than 1.0, the customer has ordered more than one case and a new line item needs to be added to the sales order for the case quantity.
    6.     Add a new line to VBAP for the same material with the case quantity.  If not a whole value, the remainder of eaches (bottles) should update the qty on the first item on VBAP.
    •     Part 1 is relevant for order types ZCA, ZOR, ZSO, RE, ZSM
    PART 2:
    Batch Job to run prior to the Delivery Due List:
    1.     Read VBUK for Delivery Status (LFSTK) = A (delivery not processed).  Get all of the document numbers (VBELN).
    2.     Go to VBEP for those document numbers to get the goods issue date for the order.  There will be many records in VBEP for the same sales order.  Look at all orders with a goods issue date (WADAT) of next day.
    3.     Go to VBAK for those document numbers to see if there are multiple sales orders for the same Sold To party (KUNNR).
    4.     For customers who have more than one order in VBAK, search all line items (for all orders).  If there are no duplicate materials across sales orders, do nothing.
    •     Do not check line items where item category (VBAP-PSTYV) = TANN, TAPS or ZTAP.  TANN are free goods that should not be considered for consolidation.  TAPS & ZTAP are lower level materials as a result of product selection.  They will be attached to a higher-level material with an item category of TAX, which is relevant for consolidation.
    •     Do not check line items where reason for rejection (VBAP-ABGRU) is not blank
    5.     If there are duplicate materials, go through the same logic as in part 1.  If the quantity across the sales orders adds up to greater than one case, add the appropriate quantity to a new line item on the first sales order.   If there is a remainder qty, update the line item on the first sales order with this qty. In this case, the quantities on the second sales order needs to be closed out with a reason for rejection code of 50, ‘Line Item Consolidation’. If there is no remainder,  update the qty on this item directly.
    •     Part 2 is relevant for order types ZOR, ZCA, ZSM
    •     This batch job will have to be run manually for Day Pick orders.  The end of this program should automatically kick off the delivery due list for Day Pick orders, shipping condition 02.
    Business Justification:
    The business requires that like order line items be consolidated to one line item prior to the order going to the warehouse for picking.  This will aid in picking at the warehouse as well as result in the customer invoice not reflecting more than one line item for the same material.  In the case where the customer has truly ordered more than a case, i.e;, 1 case, 2 bottles, the documents in SAP will still reflect 2 lines.

  • Reg:User-Exit In Sales Order to Invoice

    Hi All,
    I have An requirement that to create automatic sales order and invoice  in one go, i have used BAPI_SALESORDER_CREATEFROMDAT2 to create sales order and bdc invoice to create invoice its worked fine.
    My problem is now i got an requirement as after creating sales order it should not create invoice as such because they will manually check whether the sales order is correct then only i should proceed to invoice also they need the option to create,change,delete sales order and same too invoice how can i acheive this scenario through user exits?
    Since am new to user exit can any one tell me how to use user exits and what user exits need like this scenario?

    Hi Suresh,
    For sales order following user exits can be used. These are available in include MV45AFZZ.
    USEREXIT_DELETE_DOCUMENT : At the time of deletion of sales order
    USEREXIT_SAVE_DOCUMENT : At the time of updations or creation of sales order.
    Following are the user exits available in smod.
    SDVFX007  User exit: Billing plan during transfer to Accounting
    SDVFX008  User exit: Processing of transfer structures SD-FI
    SDVFX009  Billing doc. processing KIDONO (payment reference numbe
    SDVFX010  User exit item table for the customer lines
    SDVFX011  Userexit for the komkcv- and kompcv-structures
    V05I0001  User exits for billing index
    V05N0001  User Exits for Printing Billing Docs. using POR Procedu
    V60A0001  Customer functions in the billing document
    V60P0001  Data provision for additional fields for display in lis
    V61A0001  Customer enhancement: Pricing
    Please check this exits which will help you for your requirement.
    Thanks,
    Naveen Kumar.

  • User Exit regarding Sale Order

    Hi All,
    While creating a sale order, in the header details and in conditions tab. All the condition types are displayed. Customer requirment is i need to make some changes for some particular condition type in tht sale order like. Can any one pls tell me which user exit i can use for it? to be more clear they have condition type ZFRT for Freight charges. I need to make some calculation ther and display the freight price value ther in tht condition type when the sale order is created. Since its a standrad prog we can do it by user exit only. If anyone done such requirment can let me know which user exit can be used for this.
    Thanks
    Sathish

    Go to SE80 - choose program enter SAPMV45A - Double click on the program and go to include MV45AFZA - There are user exits related to price. Put break point and execute VA01. Change field content of XKOMV (i think) and see the result in sales order application.
    They are the user exits to modify the pricing conditions.
    If you want to do that in pricing routines - find out the routine or requirement or formula for the same and go to tcode VOFM - write your code. Contact SD pricing guy for the same.

  • Reg:User-Exit In Sales Order

    Hi All,
       In the Sales Order there is a field called Order Reason(Which will come for Sample Order) for that field i want just want to check the authorization, like for this particular user he can use only three order reason from that 12 order reason in Dropdown list box , i have created the authorization object and class, could you please say in which user-exit can i use the Authority-check Statement syntax so that it works well.

    You will get a lott of user exit in MV45AFZZ.
    among them use the one that is called at the time of save.
    Use:
    1. FORM USEREXIT_SAVE_DOCUMENT ( line no 289 of MV45AFZZ)
    or
    2. FORM USEREXIT_SAVE_DOCUMENT_PREPARE ( line no 369 of MV45AFZZ)
    These are user exit ( subroutine), so you required access key for those.

  • Searching for Sales Order for the given Customer PO Number Pattern in BAPI

    Hi,
         I have developed a BAPI which retrieves all the Sales Orders for a given Customer (Sold-To). The Following are the Input Parameters given in the Function Module (RFC).
    Customer Number (Mandatory)
    From Date (Optional)
    To Date (Optional)
    Sales Order Number(Optional)
    Customer PO Number(Optional)
    Now, when the Customer PO Number is populated, it will come as a Pattern, say 9ab* and I need to retrieve all the Sales Orders with PO Number starting with 9ab.
    When I am trying to retrieve, it is giving different set of output based on the Case specified in the Customer PO Number Pattern. Lets say, if I give 9ab, I get 200 Records but if I give 9AB, I get only 5 to 6 Records.
    As I have understood from the Standard Transaction VA03, it has a Search Help VMVAA which retrieves all the Sales Orders for the given PO Number pattern irrespective of the Case, that is Lower Case, Upper Case or Mix of Upper and Lower Case.
    I can see the Code in the Search Help Exit but couldn't find useful piece of code which I can implement in my BAPI to simulate the same.
    Can somebody help me on this?
    Thanks,
    Venkat.

    Hi Sudhir,
             I think you did not understand what my problem is. What I mean to say is, for Customer X, the PO Number could be 9abc and for Customer Y, the PO Number Could be 9ABC.
           So, according to your logic, if I translate it to Upper Case, it will give the Sales Order details of Customer Y to Customer X.
          And more over, SAP stores the PO Number as it is entered in the Sales Order Screen (VA01).
        What if the Customer PO Number for Customer X is 9aBcDeFgH? and the PO Number for Customer Y is 9AbCdEf?
       Hope you've understood my question.
    Thanks,
    Venkat.

  • User exit during Sales order settlement to COPA (through VA88)

    Hi All
    I need uergent help.
    We are settling SO to COPA through VA88. We are looking for some user exit/mehtod to change soem value fields and quantity feilds in COPA document.
    Thanks
    Neeraj

    Hi,
       In your valuation strategy (tcode KE4U) you should specify that user exit will be used for record type C.
       The user exit in this case is COPA0002.
    regards
    Waman

  • User exit for Dlvy Block at header for sales order for Companycode & materl

    Hi all,
    I have a requirement. I need to apply a Delivery Block for all sales orders which fall
    In a particualr company code "999" and if they have any configurable material in the item level.
    When a Sales Order is generated, during the process of generation, I should
    Write a loigc such that, if the sales orders fall in a particlar company code
    Say for '999' and if they have a configurable material at item level,
    I have to trigger an ABAP Proxy that goes and fetches a Yes/No value from an
    External system. Based on this Flag value I h ave to then apply a delivery block for
    The order at header level.
    So I assume, I should put a logic in some user exit that gets triggered before order is saved.
    And in that user exit I have to check if the Company Code of that order is '999' and if it  has
    Configurable product or not. If it satisfies the 2 conditions, I should, trigger this ABAP Proxy and
    Based on the true/False value I have to set Delivery Block or do not set delivery block for the order
    At header level.
    So I think first I should figure  out following things.
    1) user exit ..where I should put the code to check conditions and to apply delivery block.
    2) write a proxy and trigger that proxy in this user exit.
    Coming to first part, which user exit should I use to set delivery block for the order
    At header level. And how will I check for company code and config product?
    Which variables of the SAP stnd pgm store Company Code and Config product values so that
    I can check those variables for that values?
    Please suggest and help me with this.
    Any help will be highly appreciated.
    Regards,
    Sam

    1)go to the main program sapmv45a
    include MV45AFZZ ->userexit_move_field_to_vbak
    depending on ur conditions ...
    keep a break-point in the form userexit_move_field_to_vbak ,and if it stops there Check for vbak-lifsk .
    Write a condition to set the deliveryblock that is vbak-lifsk = 'xx'.
    2)then regarding your second point ...what is the middle ware used to interact with legacy system
    let me know

  • User-Exits in sales Order

    Hello friends,
       In VA02 the customer has a requirement,For particular users it should not allow to enter new line items in the existing orders.but it should be able to modify the exsisting line items.ie if there are 3 line items a 4th item should not be allowed to be created(the below lines should come shaded).Please suggest a user exit and also help in the logic
    Thanks in advance

    You can use MV45AFZZ Include .
    here you can write the code in one of form routine.
    form save_document_prepare.
    endform.
    or
    form save_data.
    endform.
    you can keep break point with in form routine and change the sales order.
    Thanks
    Seshu

  • User exit in sales order

    Hi All,
    I want to know if there is a way (user exit) that could look at the Sales Order Type , particular Item Pricing Condition  and Ship-to party State and set the materialu2019s tax classification (VBAP/TAXM1) to u201C0u201D (Exempt) ?
    Thanks in Advance!
    Sonali.

    Hi GSL,
    I have put the code in the user exit, and I am able to set the tax classification indicator but I have a problem... Before setting the indicator I need to check for the Usage code of the line item (This code I am using instead of checking the Pricing condition) . I am able to read all the values of line item in VBAP structure in the user exit except for the first time this user exit is hit as soon as a line item is entered it is not picking up the Usage code. That field is blank.
    But if add another line item and go into the user exit I can see the previous line item Usage code in XVBPA table.
    Do you have any idea why usage code is missing in VBAP structure in the user exit or is there any other table or structure where I can get the usage code?
    Please let me know if any one have any ideas.
    Thanks in Advance!
    Sonali.

  • User Exit in Sales order / Delivery

    Hi all,
           Can i know the exact user exit to use for determining the partner in Sales order & Delivery. I would like to determine a Partner Function based on PLANT.
           The user exit should get triggered after entering plant in Order.
           will EXIT_SAPLV09A_003 work???? how about in delivery.
    Appreciate your time and help.

    Hello Wolfgang,
                  Thanks a lot for your help. I had a look at the oss note and it was really helpful.
    I agree your point about delivery partner roles.But, i am concerned about the Delivery created for Stock Transfer Order .
          From PO the delivery is done directly. Can we have a user-exit to add forwarding agent in delivery based on PLANT?
          Is this logical? or Better to do the same in PO itself? If so could you please let me know the user-exit.
    I really appreciate your effort and time in helping me.

  • ORDERS05 IDoc User Exit - Create Sales Order

    Greetings,
    I'm working at a client where they are using the ORDERS05 IDoc in conjunction with the Process code ORDE to create customer finished goods sales orders in a 46C system. When the IDoc segment E1EDP19 is qualified with "003" and the article's UPC/EAN is supplied in the material field and conversion of the UPC to material is executed during processing when the sales order type is "ZEDI" however this conversion is not executed with any other sales order type, so I suspect a user exit routine however I checked the usual suspects.
    MM06E001
    VEDB0001
    MCP20008
    MM06E001
    VEDA0001
    But not code for the UPC to material conversion.
    Any insight is alway appreciated and rewarded.
    Thanks!

    Joseph,
    Take a look in the function module EXIT_SAPLVEDA_001, see if there's an include there. We have an include there containing our Customisations, including for the E1EDP19 segment.
    Cheers, Paul.

  • Availability checking user exit at sales order level

    Hi ,
    Is ther any availability Check user Exit at the sales order level?
    1)I want to make Confirm quantity to zero in the sales order level
    2)The block confirmation is set to VBEP-BMENG to "0" for each item where VBEP-LIFSP =Z1
    Is ther any related USEREXIT in the sales order  to make confirm quantity to ZERO
    (VBEP-BMENG=0)
    Ragu

    may be you can try putting some logic is MV45AFZZ in USEREXIT_MOVE_FIELD_TO_VBEP
    or in the exitSDTRM001 - Reschedule schedule lines without a new ATP check. 
    Regards
    Sai

  • Planning for Sales orders for quantities greater than forecast in APO SNP

    Hi All,
    We have a requirement in which planning in SNP is done based on the forecast  quantity transferred from DP . Demand from Sales orders is not taken into consideration for planning . The PO's are created based on the forecast quantity only SO's consume forecast  . Now a situation arises where we have the sales orders quantity  ( say 400) is more than that of the forecast( say 300 ) , this means  for quantity of 100 no planning is being done by SNP. 
    We want to know are there any ways of getting the remaining quantity being planned by SNP
    The planning strategy used is 40 in ECC
    Thanks in advance
    Regards
    Surendra

    Hi Surendra,
    For better control, the forecast quantity should match the sales order quantity for plg strategy 40.  If there are cases when sales order quantity is greater than forecast, you can create a control check in ECC to inform the users who creates the sales orders to get a popup message to create a sales order with rush order type or any other type to track the excess sales orders received against forecast.
    In SNP, once this rush order is entered, upon subsequent net change heuristic plan which runs day night, it considers those excess quantities and puts up purchase requisitions and procurement & production can be planned based using those PRs in SNP.
    Please confirm
    Regards
    R. Senthil Mareeswaran.

  • Details for SALES ORDER for qty produced, Qty despatched etc.

    Dear  All ,
                                 pl help that user wants details for a t. code which can give details for produced qty , despatched qty & remaining qty to be despatched against a sales order .
    regards,
    sap11
    Edited by: sap11 on Jul 14, 2008 1:29 PM

    Hi,
    This is a report to be developed in SD.the report is dependend on SD module no need of abaper.
    this can be solved by sales information systems.
    transaction code is MCHI.
    thanks
    Kuntla

Maybe you are looking for

  • FAGL Table to fetch closing balances period wise

    Dear Experts, I want to fetch GL Closing balances period wise.  I have checked GLT0, where no entry is recorded. Further i have checked FAGLFLEXT, which does not support period wise closing balances. I require GL closing balance, period wise, as show

  • Dropdown in Abap Webdynpro

    Hi friends, How to have custom dropdown list for field in abap webdynpro. It is possible in general abap with FM 'VRM_SET_VALUES' how it's possible in abap webdynpro. Please reply..... Thanks in advance.

  • Email pictures (gifs) not showing, how can I redownload them?

    Hi, I have an issue where I am receiving regular emails with picture attachments in GIF format.  However, despite the images being roughly the same size, with the same characteristics (pixels/inch,RGB,etc) sometimes the image shows in the email and s

  • My photos are hidden how can I make them visible?

    I have tried to look under pictures but there is no longer a iphoto file . my iphotos are there when I click on them but they then dissapear.All the gfx are visible though along with the resourses and i can not get them away.

  • File Chunking on upload

    I have to solve a problem of uploading large 4gb files. Anyone have any experience or point to an article on the following, With a file reference we can get to the fileReferance.data and load it into memory. I wonder if you could part load a chunk of