Query to determine sales quote and sales order

Hi
I am working on User exits.Whenever a sales quote or a sales order is saved the user exit USEREXIT_SAVE_DOC_PREPARE  gets triggered.I need to check whether a sales quote is being saved or a sales order is being saved.
Can anyone tell me where i can find whether the save operation of sales quote or the save operation of  the sales order has triggered the user exit.

Hi,
Check for the field VBTYP of XVBAK or YVBAK structure, if it is 'C" then it is Sales Order,if it is 'B', then quotation.
Regards,
Anji

Similar Messages

  • Sales Quote and Sales Order for Service Module.

    Hi All,
    I have a scenario with one of the customer where they have a Service Department. The customer is into installation and servicing of Air conditioning systems.
    The scenario is as mentioned below:
    Customer does the installation of Air Conditioning work and then provides service to the same, if contract mentioned that service is also to be provided by same team. There are also times when the customer quotes only for Servicing of the Air Conditioning in the Projects where the installation is not done by them, but a third party. In such case the customer sends his Sales Quotation for taking up the Servicing of the Air Conditioning (AMC for a year), to be provided to the principle client. If he wins the opportunity then the same will be transferred to Sales Order.
    Now in SAP Business One the Service Module starts only with Service Contract and Service Warranty Templates. This is considering that the equipments are delivered by the Contractor him self. This scenario is fine.
    But for equipments which are not delivered by the customer, then manual Customer Equipment Card can be prepared and then service contract created to it. But here there is a disconnect between the Quotation that they send to principle and attaching the Sales Order, if the Service Bid is won by Customer. If i need to keep a reference as to which Sales Order was received by Customer from Principle in Service Contract, there is no provision for same.
    Is there any way i can do it other than creating a UDF and linking the sales order number to Service Contract and not developing any screens for same?
    Require all your valuable inputs..
    Regards
    Rohan S. Kamble

    Hi Rohan........
    There is no such standard field in Service Contract to attach Sales Order. You can create UDF else you can have FMS and map it to remark field.
    And when you copy it to service call you can attach the same SO at Activity level or it will be attached automatically as yiu are defining it into the service contract.........
    Regards,
    Rahul

  • Material for Quoting and Sales online

    Hi Team,
    I am new to Oracle Quoting and Sales online if any body has document regarding this modules. Please share with me.
    My email id is [email protected]
    Thanks in advance.
    Regards
    Nikil

    Hello Shiva,
    thanks for giving a hint. I would consider that as difficult - it is an option for me indeed, as a consultant, but I wonder if it can be handled by the business users in the end on a regular (yearly) basis. In addition these records/agreements would need constant adminitration, as new materials are opened - as would the BDCs. The experience with user here was to keep it as simple as possible (as always maybe).
    From your answer and the lack of other answers I assume that everybody has/would stick to the standard here and solve this through configuring the condition records appropriate. Therefore I will try to add new access sequences or try to stick to the product hierarchy somehow to be able to put in different materials for settlement.
    To sum it up in one sentence: If you want to determine the profit center product oriented in the sales order you need to maintain dependent data also on a product oriented level.
    I still appreciate comments.
    Regards,
    André

  • FM to simulate the org model determination - sales group and sales office

    Hi
    I am looking for a FM to get the organization profile details which on sales order Organization tab.
    I want to pass BP# and order type as input and get the sales group, sales office.
    I tried using 'CRM_ORDER_MAINTAIN'' but with no luck. (May be I am not using it correctly )
    Please suggest any a way to achieve this .
    Thanks in advance
    Swapnil

    Hi Swapnil,
    U can  Simulate  in the orgdata rule itself  from the following path mentioned below--
    SproCRM-Master Data-Organizational Management----Organizational Determination-
    Change rules and profiles.
    Enter the Rule -ORGMAN_14 and click on display-
    Click on simulate rule resolution icon next to Change icon
    mention the Partner number and click on execute test icon or F8. You will get the list of sales office and
    sales groups. you will also get the  FM details in the rule itself. Revert me for any other  clarifications.
    Regards
    Pavan.A

  • Sales office and sales group are not copied from quotation to sales order

    Hi All,
    I have maintained sales office and sales group in quotation maually at header level.while  coping to sales order sales office and sales group are missing.
    Please let me know what would be reason for missing those twoand whether i should check anything in copy controls.
    Regards
    Mohan

    As its a standard functionality to have the Sales Group & Sales Office from Quotation to Order. But in your case, check the Copy Control settings at Header Level .
    DataT 051 General header data       Copying requirements 001 Header-same customer
    DataT 101 Header business data
    DataT 001 Partner header
    In case , they are also same, then check if any Logic is added in the Existing Routine.
    Best Regards,
    Ankur

  • Sales office and sales group compulsory when creating a sales order

    Hi,
    When creating a new sales order, I would like to have the sales office and sales group compulsory.
    Does anyone know where is the customizing point?
    Thanks for your help,
    Ronan

    Dear Ronan,
    Spro --> Img --> Sales and Distribution --> Basic Functions --> Log of Incomplete items --> Define Incompleeness Procedure (T. Code: OVA2)
    Here, Select Group as A - Sales Header
    and double-click: Procedures (left hand Dialog Structure).
    On to next screen, select Incompleteness Procedure "11" and double click: Fileds  (left hand Dialog Structure).
    On to next screen, include Table-Filed as:
    1. VBAK - VKBUR (for Sales Office) and
    2. VBAK - VKGRP (for Sales Group)
    for both the entries, select Scr. as "KKAU" and Status as 01 and check Warning.
    Note: To make changes in to InCompleteness Procedure, click: (CTRL+F1)
    Recommendation: Please save chnaged Incompleteness Procedure as Z - procedure; to avoid changes in to Standard Procedure.
    Now,
    Spro --> Img --> Sales and Distribution --> Basic Functions --> Log of Incomplete items --> Assign  Incompleeness Procedure --> Assign procedures to the sales document types (T. Code: VUA2)
    Here, assign your Order type (say, OR) to your Incompleteness Procedure (say, Z - Procedure)
    Check Field: IC-Dialog as per requirement (Clck the field and press F1, to read its usage).
    Now, Go to, T. Code: VOV8; and select your Sales Doc. Type (say, OR).
    Within the Sales Doc., Assign your defined Incompleteness Procedure in to:
    Tab: Transacton Flow --> Field: Incompl.proced.
    Note: To enable screen, for changes, press (CTRL+F4).
    Best Regards,
    Amit

  • Sales Office and Sales Group Automatic Determination based on the Sold to P

    Hello every one
    We need determine sales office and sales group based on sold to party master data in Activity Management in SAP CRM 2007.
    I want to know if there is a way to do it when we save the document.
    Any ideas???

    hi, the sales org, office, group determination can be configure in Organization Determination.
    You can choose Org Determine rule for your CRM document.
    And if you feel the rule can't match your requirement,  you can create a new rule, and create customize function module for the rule, you can add your determine logic in the function module to realize your requirement.

  • Sales text and  Purchase Order Text

    Hi,
    in what tables are stored Sales text and Purchase Order Text of the material master ?
    Best Regards

    Hi
    All long text is stored in STXH and STXL.
    Object is MATERIAL.
    Text-Id for basic data text is GRUN
    Text-Id for purchase order text is BEST
    For sales order text it is text object MVKE with text-id 0001
    Go to SE37 function builder. Enter READ_TEXT and do a single test ( F8 )
    Enter your parameters and execute. Example below.
    NAME is a comibation of materialnumber (00000000008000000)WITH leading zeros
    if numeric and sales org (1000) plus distribution channel (10)
    Import parameters - Value
    CLIENT - 010
    ID - 0001
    LANGUAGE - E
    NAME - 000000000008000000100010
    OBJECT - MVKE
    ARCHIVE_HANDLE - 0
    LOCAL_CAT
    Just for future reference with regards to getting text id's etc.
    eg: PO texts.
    --> Go into the material master PO text
    --> Double click into the required text.
    --> Click the "GO TO" menu option.
    --> click Header.
    and all the info you need is there.
    Thanks..

  • Uploading sales text and Purchase order text for material master

    Hi,
      I have created, material master with LSMW  byt not updated SALES TEXT and Purchase order text with LSMW  now i want to uplaod the sales and po text for material master can you give some link or ref. code to upload the text i have near 1000 items for which i want to uplaod text  when i have done the recording with SHDB  i have not found filed in recording.
    regards,
      zafar

    Hi,
    I have made the code in se38
    as below but still it is not working
    REPORT  ZTEST_TEXT.
      data: headerl like thead occurs 0 with header line.
      data itab3 like tline occurs 0 with header line.
    headerl-tdobject = 'MATERIAL'.
    headerl-tdname = '00000000000LSMW123'.          "(Material : 000000000300000560, Sorg : 0001, Dist channel: 01)
    headerl-tdid  = 'BEST'.
    headerl-tdspras = 'E'.
    append headerl.
    move '*' to itab3-tdformat.
    move 'Testing PO text' to itab3-tdline.
    append itab3.
    call function 'SAVE_TEXT'
      exporting
        header                = headerl
      insert                = ' '
       savemode_direct       = ' '
      tables
        lines                 = itab3
    exceptions
       id                    = 1
       language              = 2
       name                  = 3
       object                = 4
       others                = 5.
       IF SY-SUBRC = 0.
         CALL FUNCTION 'COMMIT_TEXT'
           EXPORTING
                OBJECT   = headerl-tdobject
                NAME     = headerl-tdname.
       ENDIF.
       break-point.
    regards,
    zafar

  • How to download material sales text and purchase order text information

    Here is situation:
    goto MM03 transaction,
    Take any material -- and select below views
    1. sales text
    2. purchase order text
    i have to write the download program with the sales text and purchasing text information of all the materials.
    could you pls tell me in which table I will get all the above sales text and purchase order text infrmation.
    I think it will store in standard text. I checked STXH table also for getting information text object, text id, text name, language, etc.
    If anybody knows .. please share.
    Thanks in advance.
    Regards
    Raghu

    Declare internal tables as follows: - An example
    TYPES: BEGIN OF TY_PO_LINES,
         INCLUDE STRUCTURE TLINE.
         END OF TY_PO_LINES,
         TY_PO_LINES_T TYPE STANDARD TABLE OF TY_PO_LINES.
    TYPES: BEGIN OF TY_PO_TEXT,
           TDOBJECT TYPE TDOBJECT
           TDNAME TYPE TDOBNAME,
           TDID TYPE TDID,
           SPRAS TYPE SPRAS,
         TDLINES TYPE TY_PO_LINES OCCURS 0,
         END OF TY_PO_TEXT,
         PO_TEXT_T TYPE STANDARD TABLE OF TY_PO_TEXT.
    DATA: PO_TEXT TYPE TY_PO_TEXT_T
    PO text:
    Looping at your internal table which consists of PO number,
    SELECT TDID TDSPRAS FROM STXH INTO A INTERNAL TABLE say PO_TEXT
    TDOBJECT = EKKO "PO Header Text
    TDNAME = PO NUMBER
    SELECT TDID TDSPRAS FROM STXH INTO A INTERNAL TABLE say PO_TEXT
    TDOBJECT = EKPO "PO line item text
    TDNAME = PO NUMBER
    ENDLOOP
    Looping at PO_TEXT
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
         ID = PO_TEXT-TDID
         LANGUAGE = PO_TEXT-TDSPRAS
         NAME = PO_TEXT-TDNAME
         OBJECT = PO_TEXT-TDOBJECT
      TABLES
         LINES = PO_TEXT-TDLINES
    ENDLOOP
    Follow the same above logic for material with suitable TDID you need to extract
    Hope this helps,
    SKJ

  • Do we have any BAPI to get the Sales quote or Sales order details

    Hi Experts,
    Do we have any BAPI to get the sales quote or sales order details from my other SAP system.
    My requirement is to get the sales quote or sales order details from the other SAP system.
    Please help.
    Regards,
    Chitrasen

    Hi Experts,
    Thanks for ur help. The BAPI is BAPI_SALESORDER_GETSTATUS which helps in fetching the sales quote information.
    Thanks,
    Chitrasen

  • How can we reject an already approved sales quotation and sales order

    Hi,
    Could anyone please tell me how can we reject an already approved sales quotation and sales order.
    Thanks and Regards
    Mahavir

    Hi,
    in the document flow : i am finding documents which are given below :
    Serv. notif.      00015773                                                     
    Qt For NewConnection 20022016  23.04.08 Completed  
    Order New Connection  22460       23.04.08 Open                 
    Z New Connection  90022430   23.04.08 FI doc. not Required 
    Cancel. Invoice (S1) 90023731  19.07.08 FI doc. not required 
    I have run VF11 for document no. 90023731 .
    But when i was running VL09 i just gave the shipping point and execute the transaction.
    Then i did not find any document for that selection.
    Please guide .
    Thanks and Regards

  • Automatic determination of Sales Office and Sales Group in a Transaction

    Hi CRM gurus,
    I was able to perform automatic determination of Sales Org, Division, and Distribution Chanell (Org determination), but still need to do the Sales Office and Sales Sales Group part.
    I tried to do this with the Sales Rep in my Lead and Opportunity Transactions. I had 'employee' assigned to the Sales Group in the Org Model, and selected the same BP as Sales Rep in the Transaction, but it did not help. I'll appreciate if you could share your thoughts.
    Thanks,
    -Pras

    Hi Pras
    If there is only one org unit found and this one org unit contains only one sales office / one sales group then it should be filled in automatically. Be sure that they are part of the org profile and determination rule.
    If you want to restrict the determination which was found automatically look in this thread ORG.determination - there is a reference to the code where the found org units are displayed and where you can modify the selection.
    Regards, Kai

  • How to restrict Sales office and Sales Group.

    Hi All,
    I want to restrict the users from changing the sales office and sales group in the sales order.
    Is there any standard way to achieve this or do we need to do with User exit??
    Please help.
    Thanks,
    Pavan.

    hi
    there is no standard settings for estrict the users from changing the sales office and sales group in the sales order
    so you have to write the logic in userexit
    DATA: lt_user_list   TYPE STANDARD TABLE OF tvarvc,
           lw_user_list   TYPE tvarvc,
           lr_user        TYPE RANGE OF syuname,
           lw_user        LIKE LINE OF lr_user.
    IF screen-name EQ ' VBAK-VKBUR' and   VBAK-VKGRP.
    * IF sy-tcode EQ 'VA02'.
    **Get list of users who are allowed to change SO - only they can change payment terms
         SELECT *
           FROM tvarvc
           INTO TABLE lt_user_list
          WHERE name = 'ZSD_VA02_ALLOWED'
            AND type = 'S'.
         IF sy-subrc = 0.
           LOOP AT lt_user_list INTO lw_user_list.
             lw_user-sign = lw_user_list-sign.
             lw_user-option = lw_user_list-opti.
             lw_user-low    = lw_user_list-low.
             lw_user-high   = lw_user_list-high.
             APPEND lw_user TO lr_user.
             CLEAR lw_user.
           ENDLOOP.
    **    If user is not in the users listed for change allowed
           IF sy-uname NOT IN lr_user.
             screen-input = 0.
           ELSE.
             screen-input = 1.
           ENDIF.
         ENDIF.
       ENDIF.
    ENDIF.
    go to STVARV t code here you check the NAME and give the user ids who need to change

  • How to include Sales Office and Sales Group into FI report?

    Hi,
    I have a requirement to add Customer characteristics u201CSales Groupu201D and u201CSales Officeu201D into a FI report which is based on the InfoCube 0COOM_C02. The values that needs to be presented is actual data (Customer Master Data; NOT transactional value.
    In the DataSource u201C0COORDER_ATTRu201D, fields Sales Organization and Sales Group are present and it is brought to BW from R3. But I am not able to find the way to get the field Sales Office into SAP BW.
    I checked the extraction program for the DataSource u201C0COORDER_ATTRu201D, the fields Sales Org and Sales Group are coming from a table u201CCE41000u201D but in this particular table there is no Sales Office present.
    So can anyone guide me out in getting the Sales Office to the DataSource u201C0COORDER_ATTRu201D, or is there any way of getting it in BW directly by reading some Master Data table.
    Thanks in advance
    Prasapbi

    Hi Sangeeta,
    As per your statement, my understanding is that the Organization Attributes are not maintained in the Customization. If all the values are properly maintained then based on the Organization Data determination, the system would have picked up the data. You can first check the Organization Structure and see all the attributes are properly maintained or not and then check whether the Object Permitted in determination checkbox is checked. Then create a Transaction and see that all the Organization data are getting filled properly.
    Have a look at the following link for a complete guide to the Organization data determination customization.
    http://help.sap.com/saphelp_crm70/helpdata/en/6d/5c1738453fde16e10000009b38f8cf/frameset.htm
    If the Organization data customization is not meeting your requirements then you can have a second look at the development approach. Then we can have a look at the available Objects to get the desired functionality.
    Hope this helps.
    Thanks,
    Samantak.

Maybe you are looking for