User exit: sales order  VA01: Customer number

Hi friends,
While creating Sales order, before saving the document, I need to check the Customer (Sold to pary?) details in KNEX table. KNEX-KUNNR KNEX-TDOCO KNEX-DHRCO. if condition fails, I need to display an error message V1525,
which should contain
1)customer(sold-to -party?KNEX-KUNNR)
2)partner function PARVW (VBPA-PARVW?)
3)country LNDEX KNEX-LNDEX
Functional spec says, 1)V45A0002
2)V45A0003
3)V45S0001
4)V50EPROP User exits can be levaraged.
1)triggers before we enter customer (sold-to-party) in VA01. so may not be used.
2)V45A0003: i am able to fetch KUNNR, LNDEX(land1), and able to validate KNEX Fields.
But I need to fetch partner function (PARVW), which exist in VBPA , KONP etc tables. But I am not able to write the query, which sould have all the primary keys of the table.
Please help me the way.
i) the above user exits can be used?if not, help me with user exit name.
ii)if yes, how to fetch PARVW ..as all the primary keys must be used in the select query.
Please help me ASAP.

You can try with the form USEREXIT_SAVE_DOCUMENT or USEREXIT_SAVE_DOCUMENT_PREPARE in the program MV45AFZZ (this program contains the userexits for SD).
You can access work aread VBAK and internal tables XVBAP, XVBPA with latest data for that transaction.
Regards,
Naimesh Patel

Similar Messages

  • USER-EXIT - sales order, credit block

    Moderator message: moved to correct forum.  In future please use meaningful subject.
    my requiremnet is, Delivery for an sales order should be created even if it is a credit block i.e even the credit check is unsuccessful the order should be deliverd when we deliver the order from salesdocument->deliver.
    i need a user-exit for this to put this check.
    can ne one help me.
    regards,
    pavan,

    Hi,
    According to Std SAP if in case credit mgmt is activated system will check for credit limit for that customer before delivery.You will be trying to change the std scenario which is not advisable.
    However,
    Try user exit MV45AFZZ & in that
    FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
    Also check other exits related to delivery & credit mgmt from
    SPRO->Sales & Distr-> System Modifications->User Exits
    and check out the documentation part next to each exit in that category.
    Regards,
    Amit

  • User exit sales order change (VA02)

    Hi 
    For certain users , field shipping conditions  VSBED (Header)  needs to be  in display mode only in T-code Va02
    i am creating a security object and that will be assigned to those  user roles.
    I need user exit which can be used to trigger this change ( executing security object)
    Sri

    Hi Please check these
    Userexit
    SDTRM001                                Reschedule schedule lines without a new ATP check
    V60F0001                                SD Billing plan (customer enhancement) diff. to billing plan
    V46H0001                                SD Customer functions for resource-related billing
    V45W0001                                SD Service Management: Forward Contract Data to Item
    V45S0004                                Effectivity type in sales order
    V45S0003                                MRP-relevance for incomplete configuration
    V45S0001                                Update sales document from configuration
    V45P0001                                SD customer function for cross-company code sales
    V45L0001                                SD component supplier processing (customer enhancements)
    V45E0002                                Data transfer in procurement elements (PRreq., assembly)
    V45E0001                                Update the purchase order from the sales order
    V45A0004                                Copy packing proposal
    V45A0003                                Collector for customer function modulpool MV45A
    V45A0002                                Predefine sold-to party in sales document
    V45A0001                                Determine alternative materials for product selection
    Business Add-in
    BADI_SD_SCH_GETWAGFZ             Scheduling Agreement: Read WAGFZ from S073
    BADI_SD_V46H0001                        SD Customer functions for resource-related billing

  • User exit - sales order

    Hi Gurus,
    We need to have specific requirement while creating or changing a the sales order.
    In the sale order if the line items are BOM material, then the system should ensure that confirmation of the qty between the BOM materials (both header and sub utems ) are same.
    We wanted to achieve this with the help of a User Exit, which will look at the confirmation qty of each line item and then changes confirmation qty of all the line items if there exist a difference.
    So wanted to which is the actual user exit which we can use to achieve above requirment.
    Regards,
    Babs

    system should ensure that confirmation of the qty between the BOM materials (both header and sub utems ) are same.
    Is this means that you want to compare the quantity in the Sales Order with BOM Master.
    Else you can sue User Exit as MV45AFZZ.
    Best Regards,
    Ankur

  • New include proram -user exit- sales order

    hi
    i have to create a new screen which has to be displayed as a pop up
    from the user exit "<u>userexit_save_document_prepare"</u> which is present in MV45AFZZ
    the processing logic for the screen should be written in include program which is to be included in the specified userexit.
    the include program which i created while syntax checking shows
    "include <u>prg-name</u> is not accesible".
    why this is occuring.
    Another question is whether can i write the modules for pbo,pai and the subroutines i.e form & end-form all in the include program which iam creating.
    It is showing incorrect nesting. write end-form for the form before moduele.
    whether i have to write PBO,PAI,subroutines in independent include programs.
    Please give reply ASAP.

    in that case then
    call like this
    perform check (in program).
    <b>what i am thinking is THIS program in Update Mode may be bcos of that.</b>
    Regards
    prabhu
    Message was edited by:
            Prabhu Peram

  • User exit for sale order material serial number change

    I am looking for User exit for changing the serial number for the saleorder material va01.

    Hey,
      Check the include program : MV45AFZZ. it will trigger at the of saving the sale order.
    IF SY-TCODE EQ 'VA02' OR SY-TCODE EQ 'VA01'.
    Endif.
    Note : Write your coding inside the IF clause to avoid affecting the other transaction codes.
    Regards,
    Saravanan M

  • Changes in Netprice(KOMP-NETWR) While Creation Sales Order(VA01)

    Hi expert ,
    My issues while creating sales order(Va01) is :
    i have added two conditions types namely YVAT and YNBT in Condition , while calculating netprice (NETWR) its picking both values for YVAT and YNBT , i want only netprice excluding YVAT and YNBT , for example
    NETPRICE is  3000.00
    YVAT      is      50.00
    YNBT      is       30.00
    NET         is       3080.00
    but i want to display only 3000.00 in NET(KOMP-NETWR)
    please suggest  is there any user exit to do this calculations.

    Hi,
    I'm not sure if you need to update ADRC table - the address number is usually the the customer's address and is picked automatically.
    Also the transport zone is picked automatically based on the customers address or on the shipping conditions in the Sales Order.
    Transportation Zone (LZONE) also exists in the partner function (VBPA) and the shipping partner (VTPA) - in case you need to suggest a different route for shipping other than the one determined automatically.
    To change this - change both the internal tables table xvbpa and xvtpa (after reading with sales order and item from structures vbak and xvbap) in USER_SAVE_DOCUMENT_PREPARE in the include MV45AFZZ.
    But, I'm not sure if the Address Number (determining the shipping point) would be independent of the Transp Zone, though it's changed in the exit.
    Regards,
    Anil.

  • MRP - Sales order and customer fields grey-out

    Hi there,
    The Sales order and customer fields are grey-out for all MRP generated production orders. Can the SAP programmers please get this fixed? It should either read in the sales order number and the customer number or allow user to type in the sales order, just like the manually created production order.
    cheers

    Hello Gordon,
    If production is make-to-order rather than make-to-stock, the MRP should read in the sales order number and the customer, since it is specific to the sales order. Even for make-to-stock production, where it cannot read in the specific sales order number, it should at least not grey out the field, don't you think so? By greying out the field, users are not allowed to type in the sales order number even when the production order directly relates to a particular sales order. As such, we are not able to link it back to the sales order where other info such as customer's purchase order, etc... can be found.
    Could you please advise alternative way of linking MRP generated production orders to the sales orders? thanks

  • Sales Order IDoc customer

    Hello all.
    I am receiving a IDoc for a customer, wich creates a sales order.
    I need to receive diferent IDocs for one customer, but create the sales order in a diferent customer (wich is determinated by the contents of the IDoc).
    Is there any way (maybe user exit) to change the customer in wich the sales order is created?
    Thanks in advance
    Nuno Silva

    Hi,
    I suggest to check on inbound process codes DELV (linked with FM 'IDOC_INPUT_DELVRY').
    The latest DELVRY* basic type is DELVRY07 which you can use.
    Regards,
    Dominik Modrzejewski

  • The delivery date in Sales Order VA01

    Hi,
    I am wondering how the sales order process goes in term of business given that I am not an SD person.
    Normally, when a customer rep receive a sales order, the customer will request the date in which the goods are require.
    Thus, during the sales order creation, the person will key in the material, order quantity, and the delivery date.
    Example, customer wants the goods to deliver on Nov 25th 2011
    My confusion arise when the ATP check (i.e. the three section proposal date) find out that the goods are only available on December 10th 2011. Thus, the committed schedule line with committed quantity is copied from the ATP proposal screen to the 2nd scheduline line item with delivery date as Dec 10th, and the committed quantity. The following is the VA01 screen
    Schedule Line tab of item detail view:
    Dely Date -
    OrderQty----CommitQty
    11.10.2011--3--
    0
    18.10.2011--0--
    3
    Sales Order Overview screen:
    MaterialOrderQty-itemCat-FirstDate -
    Plant
    10000----2pcTAN11.10.2011-----AU01
    Question.
    1 - Do you feedback to the customer saying that the Delivery Date that can reach you is 11.10.2011 or 18.11.2011?
    tuff

    hi tuffy,
    here system will check ATP while sales order and confirm delivery date,if u r making sales order on 11.10.2011 but system will confirm delivery date in schedule line.
    u can take ur  msg reference where system is taking order on 11.10.2011 and confirm qty for delivery on 18.11.2011 so customer delivery date would be 18.10.2011.
    Edited by: KHAPREVIPIN on Oct 25, 2011 12:38 AM

  • Sales Order (VA01)- Addtional Data Tab B Request

    Hi All,,
    This is sales order(VA01) relevant and I have added the new "ZZFIELD" field in the "Additional data B" which i kept screen painter attributes check box chosen "Input Field" and Input "required".
    When i am creating sales order(VA01), the moment click on "addtional data B"  ZZfield become mandatory input field able to save sales order sucessfully after keying data. But user want's, after enter line item data which is material & qty , then cursor required to go additional data B which is mandatory field ZZFIELD. Right now, user enters line item material , qty and he is able to save it Sales order  and cursor is not going or waiting at ZZFIELD in addtional data B Tab(unless and unitl he press Additional data B Tab) .
    Is there any solution after user enter material and qty after clicking enter cursor should go "Additional data B" wait at "ZZFIELD"(as this mandatory field before sales order save) ? 
    If we dont go the Additional data B and save the document , it's not giving the message "Make an Entry required fields and it is directly saving the document.?
    Any help is highly approciate ....
    Below code written already:
    Program:SAPMV45A screen :8459 put PBO code as per below:
    Loop at Screen.
    If screen-name = 'VBAP-ZZFIELD'.
      if SY-TCODE = 'VA01' AND ORDERTYPE = 'ZSS'
        SCREEN-INPUT = 1.
       MODIFY SCREEN.
      ENDIF.
    ENDIF.
    Best Regards
    Kushal

    Hi   Abdul ,
    You dont have to do ny extra coding for the scroll bar once the no of fields increase with respect to the tsb screen area it will automatically have a scroll bar in it .
    Hope it helps
    Regards
    Swapnil

  • How to Generate sales orders with custom Fields using BAPI_BUSPROCESSND_CREATEMULTI

    Hi,
    I need to generate sales orders with custom fields on table CRMD_ORDERADM_H using BAPI_BUSPROCESSND_CREATEMULTI, after changing the structure BAPI_TE_CRMD_ORDERADM_H, and feed the  EXTENSIONIN table of the BAPI with data, the order is created, but any value on custom fields.
    After debuging, I saw that the BAPI search for structure conversion in table CRMC_OBJECTS_GEN, but we haven't entry with BAPI_TE_CRMD_ORDERADM_H in this table. is that the problem ?, Is there any way to fix it?
    Best Regards,
    Salah.

    That depends on where do you have the customer fields, check the table CRMD_CUSTOMER_H, if your custom fields are there, you need to use the changing parameter CUSTOMER_HEAD, I guess your already checked that one, right? but there's no custom fields, well...AET/EEWB doesn't enhance the strcuture of the BAPI, so you should do it manually, check the note following note for further details.
    988410 - FAQ: User-defined fields in the BAPI
    If you don't have access to the SAP Marketplace, in resume you should create an append on the structure BAPIBUS20001_CUSTOMER_H and include the following strcutrue CI_EEW_CUSTOMER_H
    Cheers!
    Luis

  • Table name for sales order with Customer info

    Hi Gurus,
    Could you please provide me table name for  sales order with customer no and customer name.
    I have list of sales order number (more than 1000 no's ) i need to identify customer number and customer name (ship to party and sold to party information). I am running this report every week. so i plan to create sqvi for this report.
    Thanks and regards,
    B.Deethya.

    Hello,
    Access Tables VBAK & VBAP.
    From the above tables you will get Solt to Party & Ship to Party Codes.
    For Customer names you have to pass the Customer Codes to Table - KNA1
    Hope this clarifies.
    Thanks,
    Jignesh Mehta

  • User exit for VD01 - Create Customer

    I am finding user exit for VD01 - Create Customer.
    I need a newly created Customer number - KNA1-KUNNR.
    I found user exit EXIT_SAPMF02D_001, but if field Customer left blank on screen in VD01, the parameter I_KNA1-KUNNR is blank. Because program genereates KUNNR further.
    Edited by: S S on Dec 23, 2008 7:56 AM

    Dear SS,
    What I understood is system is generating internal number range for customer in your case.
    You want to know the number of customer number.
    I think with this exit EXIT_SAPMF02D_001 you don't get customer number.
    Try with this BADI    CUSTOMER_ADD_DATA  
    Method MODIFY_ACCOUNT_NUMBER. use break point here.
    Then create a customer in VD01 (internal number range). maintain necessary information and save.
    system will take you to debugging mode. here you can see internal number of customer.
    Regards,
    Chandra

  • Sale Order VA01

    I trying to create sale order VA01 with reference of contract but contract not showing when I search.Can you guys help me to find out how to assign the contract to a sale order.
    Thanks

    Hello Sunil,
    Contracts can be created in Tcode- VA41, Enter the document type according to your requirement. There are many kind of contracts such as quantity contract- QC, general value contract- WK1, Material related contract- WK2, Service contract - SC, Rental contract- RC or QP and master contract- GK.
    Key in the required details and save the document. Create the sales order in VA01, click select with reference, you will find the pop up window where you will get six tabs, amonst em click on contract and enter the selection criteria and you will find your saved contract. If you want to change the quantity or value click on item selection which lets you to change the detail or else click on copy button.
    This how it works. Let me know if you have any doubt.
    Regards,
    Jay

Maybe you are looking for

  • J2se version="1.6+" in JNLP not working on a client with Java 1.5

    Hi all, In my deployment scenario I have two jnlp files, one for the app and one for its installer extension. The deployment process works fine on a client with J2SE 1.6 but there are some problems when the client has an older Java installed. I am tr

  • Opening calendar attachments on iPad 2

    I have an iPad 2 running iOS 5.0.1.I have a question though, I have a PC which is running Outlook 2003, with an Exchange 2003 server. When I set up and calendar entry and attach some documents for a meeting, I can see the attachments and open them on

  • Converting Scope_Identity from tsql to pl\sql

    Here is my MS proc: CREATE Procedure [dbo].[sp_AddLabel] @v_LabelName NVARCHAR(50) = Null,           @v_LabelDescription NVARCHAR(255)= Null,           @v_Label_Data IMAGE = NULL,           @v_ProfileID SMALLINT) As begin      INSERT INTO LABELS (LAB

  • TimeoutException - when calling web services method that opens a PDF

    I am updating a legacy program which uses Adobe Acrobat 7.0 Professional.  The idea is that the client will call web service methods, which handle opening a PDF, reading from or writing to the PDF, saving if necessary, and closing.  It then returns t

  • Hide Cost Distribution button in SRM SC screen

    Hi Experts, We have a requirement where in we need to hide the cost distribution,copy to clipboard,etc..buttons in the cost assignment section of shopping cart screen . we are using SRM 5.0 Is there a way where we can make this invisible without maki