How to restrict header text changes in sales order level

Dear Experts,
how to restrict header text changes in sales order level change mode
thanks

Hello Chandu,
how to restrict header text changes in sales order level change mode
In order to restrict changes to Sales Order Header Text, the appropriate User Exit would be USEREXIT_MOVE_FIELD_TO_TVCOM_H. With the help of ABAPer, you can include the simple logic on the basis of Header Text type such that whenever any changes are incurred on the Sales Order header text, updates would be prevented.
Please try out this approach and let us know your latest observation on this issue.
Regards,
Sarthak

Similar Messages

  • How to trigger workflow from changes in Sales Order in CRM?

    Hi Experts,
    I want to trigger event at the time of saving the changes in sales order (TCODE- CRMD_ORDER).
    I have found one BO - BUS2000115 but it is getting triggered only after new creation of sales order.And there is no BO available when we change the sales order.For this reason I have created one customize event in BO(BUS2000115).
    Now my question is How should I link this customize event so that it will trigger after saving the changes ?
    I have seen SWEC transaction but was not able to find anything to link this customize event.
    Please help ....!!!
    Good response will be rewarded.
    Thanks
    Snehasish Das
    Edited by: Snehasish Das on Feb 14, 2008 2:31 PM

    In SWEC, actually you link the change document object to a Business object and its corresponding event , to which workflow should react to.
    If yo udo not find the entry then, yo unedd to create one with finding out the respective chage documnet object.
    Hope that helps.
    Regds,
    Akshay

  • How to restrict duplicate condition type in sales order

    Hi All
    Is there any standard method to restrict user for adding a particular discount condition type more than once in sales order. condition type is manual and its records are also being maitained manually.
    Else would I will have to create userexit at sales order level or a routine in pricing procedure. I doubt on creating a rotuine in pricingprocedure because in pricing procedure there is already a restirction to add similar condition type more than once.
    Thanks

    create a routine and add this routine to the discount condition type only.

  • Remove Header text from a sales order, created with reference to quotation

    Hi all,
    I have a sales order(in VA01) which is created with reference to quotation (in VA21).
    If header text (Notes for logistics, Note for responsible person, Header text Doc & Declaration) in texts tab is maintained in the quotation they are getting copied in Sales Order which is NOT the requirement.
    I need suggestions on how to disable the text that is getting copied.
    Any pointers would be of great help.
    Regards,
    Vamsee Priya.

    Hi Nilesh,
    I created a routine in vofm and this solved my problem.
    Now, I'm having a similar problem where I'm creating an Invoice(through transaction VF01) giving the delivery document number and document type (Invoice F2).
    we are maintaining Header text in Order through which the above mentioned delivery document number is created and this header text should get copied in the Invoice.
    For this, I went into Transaction VOTXN, from there selected billing header, from here kept a break point for the routine BEDINGUNG_PRUEFEN_001 through which the text will get copied.
    Now, when I'm creating the Invoice this routine is getting executed, but still the text is not getting copied.
    Any pointers on this would be of great help.
    Also at the end of your previous mail, you are telling about SPRO - text assignment. Can you please let me know how to I should navigate to this text-assignment??
    Thanks and Regards,
    Vamsee Priya.

  • Copy header text of mult sales orders in a billing document

    Hello Gurus,
    My requirement is to pass the header text from Sales order to a Billing document.
    However, if I create a billing document with reference to just one sales order, it is getting copied correctly in header text of a billing document.
    In case of multiple sales orders for one billing document VF01, it copies header text elements of only first sales order, and not the other ones.
    Kindly tell me how to copy the header texts of all the Sales Orders in a billing document.
    Thanks....

    Use the user exit "RV60AFZC" to populate the header text.
    Regards
    Vinod

  • Get Header Texts from a Sales Order when you push 'Save Button'

    Hello,
    I am developing a user exit run when you push 'Save' Button in Sales Document and I do not know how to retrieve current header texts.
    I cannot access to database tables because they haven't been saved yet and I cannot the sales document number.
    Does anyone have any ideas?
    Many thanks!!

    Hi Fernando,
    use the below sample code to get the run time header text.
    write the below code in USEREXIT_SAVE_DOCUMENT_PREPARE.
    DATA : begin of wa_tline,
            tdformat like tline-tdformat,
            tdline like tline-tdline,
       end of wa_tline.
       data it_tline like table of wa_tline.
    data temp_vbeln(70) type c.
           temp_vbeln = xvbak-vbeln.
           CALL FUNCTION 'READ_TEXT'
             EXPORTING
    *         CLIENT                        = SY-MANDT
               id                            = 'Z053'
               language                      = 'E'
               name                          = temp_vbeln
               object                        = 'VBBK'
    *         ARCHIVE_HANDLE                = 0
    *         LOCAL_CAT                     = ' '
    *       IMPORTING
    *         HEADER                        =
             tables
               lines                         = IT_TLINE
    *       EXCEPTIONS
    *         ID                            = 1
    *         LANGUAGE                      = 2
    *         NAME                          = 3
    *         NOT_FOUND                     = 4
    *         OBJECT                        = 5
    *         REFERENCE_CHECK               = 6
    *         WRONG_ACCESS_TO_ARCHIVE       = 7
    *         OTHERS                        = 8
           IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
           ENDIF.
    Thanks,
    Sumanth P

  • How to delete header condtion line of sales order by BAPI

    Hi,
    I want to delete the condtion line of sales order header using BAPI "BAPI_SALESORDER_CHANGE",
    it is work well in item level condition type, but it is not work for header condition type. show error message "missing item number" since of pass item number "000000" for header condition line.
    Below is reference source code, thanks in advance.
    *& Report  ZTEST_BAPI_SO_DELETECONDLINE
    *& Sample program to call BAPI_SALESODRER_CHANGE to
    *& delete condition line of so line item
    REPORT  ZTEST_BAPI_SO_DELETECONDLINE.
    ***--- Structures for create BAPI
    DATA: SALESDOCUMENT LIKE BAPIVBELN-VBELN.
    DATA: ORDER_HEADER_INX LIKE BAPISDH1X,
          BEHAVE_WHEN_ERROR LIKE BAPIFLAG-BAPIFLAG,
          SIMULATION LIKE BAPIFLAG-BAPIFLAG.
    DATA: BEGIN OF ORDER_ITEM_IN OCCURS 2.
            INCLUDE STRUCTURE BAPISDITM.
    DATA: END OF ORDER_ITEM_IN.
    DATA: BEGIN OF ORDER_ITEM_INX OCCURS 2.
            INCLUDE STRUCTURE BAPISDITMX.
    DATA: END OF ORDER_ITEM_INX.
    DATA: BEGIN OF SCHEDULE_LINES OCCURS 2.
            INCLUDE STRUCTURE BAPISCHDL.
    DATA: END OF SCHEDULE_LINES.
    DATA: BEGIN OF SCHEDULE_LINESX OCCURS 2.
            INCLUDE STRUCTURE BAPISCHDLX.
    DATA: END OF SCHEDULE_LINESX.
    DATA: BEGIN OF ORDER_CFGS_REF OCCURS 2.
            INCLUDE STRUCTURE BAPICUCFG.
    DATA: END OF ORDER_CFGS_REF.
    DATA: BEGIN OF ORDER_CFGS_INST OCCURS 2.
            INCLUDE STRUCTURE BAPICUINS.
    DATA: END OF ORDER_CFGS_INST.
    DATA: BEGIN OF ORDER_CFGS_VALUE OCCURS 2.
            INCLUDE STRUCTURE BAPICUVAL.
    DATA: END OF ORDER_CFGS_VALUE.
    DATA: BEGIN OF CONDITIONS_IN OCCURS 2.
            INCLUDE STRUCTURE BAPICOND.
    DATA: END OF CONDITIONS_IN.
    DATA: BEGIN OF CONDITIONS_INX OCCURS 2.
            INCLUDE STRUCTURE BAPICONDX.
    DATA: END OF CONDITIONS_INX.
    DATA: BEGIN OF EXTENSIONIN OCCURS 2.
            INCLUDE STRUCTURE BAPIPAREX.
    DATA: END OF EXTENSIONIN.
    DATA: BEGIN OF RETURN OCCURS 2.
            INCLUDE STRUCTURE BAPIRET2.
    DATA: END OF RETURN.
    DATA: TMP_POSNR  LIKE VBAP-POSNR,
          L_KNUMV    LIKE VBAK-KNUMV,
          L_KSCHL    LIKE KONV-KSCHL,
          L_STUNR    LIKE KONV-STUNR,
          L_ZAEHK    LIKE KONV-ZAEHK.
    ***--- Selection
    PARAMETERS: P_VBELN LIKE VBAK-VBELN OBLIGATORY MEMORY ID AUN DEFAULT '7000510', "'0001007443', " SO
                P_POSNR LIKE VBAP-POSNR OBLIGATORY DEFAULT '000000' , " so item
                P_CONDN LIKE  KONV-KSCHL  DEFAULT 'ZOSP',    " condition type
                P_CONDI LIKE  KONV-ZAEHK  DEFAULT '01',      " Condition item number
                P_TEST  AS CHECKBOX DEFAULT 'X'.             " test mode
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT         = P_VBELN
        IMPORTING
          OUTPUT        = P_VBELN.
      CLEAR: L_KNUMV.
      SELECT SINGLE KNUMV INTO L_KNUMV
      FROM VBAK
      WHERE VBELN  = P_VBELN.
      IF SY-SUBRC = 0.
        CLEAR: L_KSCHL,L_ZAEHK,L_STUNR.
        SELECT SINGLE KSCHL ZAEHK STUNR INTO (L_KSCHL, L_ZAEHK, L_STUNR)
        FROM KONV
        WHERE KNUMV = L_KNUMV
          AND KPOSN = P_POSNR
          AND ZAEHK = P_CONDI
          AND KSCHL = P_CONDN.
        IF SY-SUBRC <> 0.
          WRITE:/ 'Condition type or condition item is not exist.'.
          EXIT.
        ENDIF.
      ELSE.
        WRITE:/ 'Sales order number is not exist'.
        EXIT.
      ENDIF.
    IF L_ZAEHK IS INITIAL.
          WRITE:/ 'Condition type or condition item is not exist.'.
          EXIT.
    ENDIF.
    SALESDOCUMENT = P_VBELN.     " Sales order number
    ORDER_HEADER_INX-UPDATEFLAG = 'U'.   "U = change sales order
    ***Item Data
    ORDER_ITEM_IN-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_IN.
    ORDER_ITEM_INX-UPDATEFLAG = 'U'.   "I = add, U= update, D=delete
    ORDER_ITEM_INX-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_INX.
    ***--- Begin delete a condition line
    ***--- Make sure to use update flag 'D'. Here I = add, U= update, D=delete
    CLEAR: CONDITIONS_IN,CONDITIONS_INX.
    REFRESH: CONDITIONS_IN,CONDITIONS_INX.
    CONDITIONS_IN-ITM_NUMBER = P_POSNR.
    CONDITIONS_IN-COND_ST_NO = L_STUNR.
    CONDITIONS_IN-COND_COUNT = L_ZAEHK.
    CONDITIONS_IN-COND_TYPE  = L_KSCHL.
    APPEND CONDITIONS_IN.
    CONDITIONS_INX-UPDATEFLAG = 'D'.
    CONDITIONS_INX-ITM_NUMBER  = P_POSNR.
    CONDITIONS_INX-COND_ST_NO  = L_STUNR.
    CONDITIONS_INX-COND_COUNT  = L_ZAEHK.
    CONDITIONS_INX-COND_TYPE   = L_KSCHL.
    APPEND CONDITIONS_INX.
    ***--- End delete a condition line
    BEHAVE_WHEN_ERROR = 'P'.
    SIMULATION = P_TEST.   " Test mode or not
    "=== call BAPI
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        SALESDOCUMENT               = SALESDOCUMENT
        ORDER_HEADER_INX            = ORDER_HEADER_INX
        LOGIC_SWITCH                = '    U'
      TABLES
        RETURN                      = RETURN
        ORDER_ITEM_IN               = ORDER_ITEM_IN
        ORDER_ITEM_INX              = ORDER_ITEM_INX
        CONDITIONS_IN               = CONDITIONS_IN
        CONDITIONS_INX              = CONDITIONS_INX .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    WRITE: / 'Return code =', SY-SUBRC.
    SKIP 1.
    LOOP AT RETURN.
      WRITE: / RETURN-MESSAGE.
    ENDLOOP.
    Edited by: hank jiang on May 21, 2010 5:07 AM
    Edited by: hank jiang on May 21, 2010 5:25 AM
    Edited by: hank jiang on May 21, 2010 5:27 AM

    SALESDOCUMENT = P_VBELN.     "Sales order number
    ORDER_HEADER_INX-UPDATEFLAG = 'U'.   "U = change sales order
    ORDER_ITEM_IN-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_IN.
    ORDER_ITEM_INX-UPDATEFLAG = 'U'.   "I = add, U= update, D=delete
    ORDER_ITEM_INX-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_INX.
    "Begin delete a condition line
    "Make sure to use update flag 'D'. Here I = add, U= update, D=delete
    CLEAR: CONDITIONS_IN,CONDITIONS_INX.
    REFRESH: CONDITIONS_IN,CONDITIONS_INX.
    CONDITIONS_IN-ITM_NUMBER = P_POSNR.
    CONDITIONS_IN-COND_ST_NO = L_STUNR.
    CONDITIONS_IN-COND_COUNT = L_ZAEHK.
    CONDITIONS_IN-COND_TYPE  = L_KSCHL.
    APPEND CONDITIONS_IN.
    CONDITIONS_INX-UPDATEFLAG = 'D'.
    CONDITIONS_INX-ITM_NUMBER  = P_POSNR.
    CONDITIONS_INX-COND_ST_NO  = L_STUNR.
    CONDITIONS_INX-COND_COUNT  = L_ZAEHK.
    CONDITIONS_INX-COND_TYPE   = L_KSCHL.
    APPEND CONDITIONS_INX.
    "End delete a condition line
    BEHAVE_WHEN_ERROR = 'P'.
    SIMULATION = P_TEST.   " Test mode or not
    "=== call BAPI
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        SALESDOCUMENT               = SALESDOCUMENT
        ORDER_HEADER_INX            = ORDER_HEADER_INX
        LOGIC_SWITCH                = '    U'
      TABLES
        RETURN                      = RETURN
        ORDER_ITEM_IN               = ORDER_ITEM_IN
        ORDER_ITEM_INX              = ORDER_ITEM_INX
        CONDITIONS_IN               = CONDITIONS_IN
        CONDITIONS_INX              = CONDITIONS_INX .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    WRITE: / 'Return code =', SY-SUBRC.
    SKIP 1.
    LOOP AT RETURN.
      WRITE: / RETURN-MESSAGE.
    ENDLOOP.

  • Erroneous Shipping Header Text in the Sales Order

    Hi ,
    We are facing one problem.Can you please help us..
    We seemed to have a recurring issue in SAP Production wherein an erroneous shipping text and supply location header text
    suddenly appears on the sales order header text.   As of this stage, our interim solution is to manually clear the erroneous text via invoking
    the SAVE_TEXT command directly in Production to clear out the text.   The problem with this approach is that we are "reactive"
    to the event meaning we only get to know of the issue after the National Order Centre reports the issue and by the time it reach
    IT it already affected quite a few sales and stock transport orders.  
    I
    a) an investigation to be conducted as to identify the root cause of this issue 
    b) permanent solution to be put in place to rectify the issue
    here's the text ID that got affected
    Text ID = Z022  (Shipping Text)
    Text ID = Z029  (Supply Location)
    Language = EN
    Text Name = XXXXXXXXXX
    Text Object = VBBK
    a list of programs that calls SAVE_TEXT and updates
    the above-mentioned text ID.  We have gone through the SD user-exit MV45AFZZ.
    The sample you see below is an STO.  As you know the STO is created inside the sales user-exit and uses the
    shipping instruction default from the originating sales order to pass on the text to the STO shipping text.
    We are unable to re-create this issue so this sorts of adds a layer of complexity.
    I found SAPLSTXD memory id..It is importing from this id..But there is no export in the program..
    Can you please help us where the text is exporting ..We need to find out the root cause of this issue and solution..
    Thanks in advance.
    Satish kumar.

    I found SAPLSTXD memory id..It is importing from this id..But there is no export in the program..
    Chances are it is set and exported at some point, then abandoned after processing for that document...it needs to be cleared probably, since your user is remaining in the same user context and therefore when another import is executed, the text stored there is brought in, even though not for that order/document....believe you'll find this is a programming error, need to export space or clear the ID after it is used...
    Check the other MV45AFZ* objects also...MV45AFZZ is not the only SD user exit...look at the inlcudes (named like mv45afz* )  in SE80 for program SAPMV45A.  I can't see SD (don't run at my employer), but you might also check copy requirements in transaction VOFM entries?  Some of the SD wizards can advise on that part.
    Try ABAP Scan program RSRSCAN1, probably as background job, if you don't find in MV45AFZ* members.  Sorry, that's the old program (but it might find for you).  Current version is program RPR_ABAP_SOURCE_SCAN.
    Edited by: BreakPoint on Sep 22, 2010 4:16 PM

  • How to restrict two items in one sales order.

    Hi ,
    My client wants that in one sales order two material say Mat -A and Mat-B should not go together. It should go in seprate sales order due to chemical nature both product should go  seprately.
    Kindly advise me how to configure it. Give full details
    Regards,
    Balu

    Hi
    Chemical in nature will have reaction when the some chemical composition are similar or opposite group this logic will apply to maintain the inventory for those materials at storage location level
    If A and B materils should not be in one deliver means we should nt put them closer same will apply at the time of inventory and same wil be different storage locations, provided that if we worst case producing same in single plant
    Hence if any  customer may order for the above two materials those two are determining different shipping points in the Order and subsequently delivery split will take place but in order to achecive this we need to maintain the different shipping points for those nature chemicals.
    Regards,
    Ram.

  • Profit centre check at sales order level

    Dear All,
    When I create a sales order, a profit centre comes as default from the material master, which needs to be changed at sales order level.
    Can I have any validation here that if the profit centre doesn't match a particular criteria, system should not alllow to save the sales order.
    If there is an user exit, kindly let me know with details.
    Thanks and regards,
    Avnesh Kamdar

    Dear Kadar,
        You take the help from the ABAPer, and explain what are the data you are going to use or consider (Base data) while validating the  Profit centre in the Sales order.
    You try with the following User Exits
    In the program MV45AFZZ
    1.USEREXIT_SAVE_DOCUMENT_PREPARE
    2.USEREXIT_SAVE_DOCUMENT.
    I hope it will help you
    Regards,
    Murali.

  • How to make Text Input in Sales Order Trigger Change Event

    Hi Gurus,
    I have a project going on where when a sales order is created, changed or cancelled, an IDoc is FTP to our freight company.
    Now the issues is when we change a sales order text input (for example, shipping note). Nothing happens. The system doesn't take this as a change so no change event is triggered.
    Text fields I'm talking about is the one from Go to --> Header. and for Item Go to --> Item.
    When I input a note in this field, it comes out in the IDoc, but when I go back to the Sales Order and change the note, it doesn't trigger a change and therefore no IDoc is generated.
    how can I go about this?
    thanks.

    Hi,
    Could you initiate the idoc creation from a workflow?
    Have you checked the event trace?
    Is the BUS2032 object type CHANGED raised? I checked our system and event is raised on text change.
    Transaction SWELS to activate and deactivate trace.
    Transaction SWEL to monitor event raised.
    Don't forget to turn trace off
    Hope this helps
    TB

  • How to restrict the user from making any changes in Sales order- item level

    Hi to all
    How to restrict the users from making any changes in sales order at item level if the same sales order is released by senior user through status profile.
    Regards
    Anish Parikh
    Edited by: anish parikh on Jan 24, 2008 5:16 AM

    Hi Anish,
    This can be achieved through the roles and authorization.
    This can be done through the basis team. they can create user profiles and roles.
    For the roles they assign some transaction codes so that they can view the only assigned tr. codes.
    Like that ur requirement can be done.
    Also u can prevent the user to change any fields in the sales order screen (VA02). for that please modify the authorisations.
    Hope i answers.
    Reward points if useful.
    Edited by: kaleeswaran bhoopathy on Jan 24, 2008 9:57 AM

  • !!!How to restrict user for making  changes in Sales order , partner level

    Hi all,
    Can anybody tell me how to restrict user for making  changes in Sales order  at partner level, is it through user exit?

    Hi Ruchi
    I hope u had gone to the screen fields which u want them not to be editable. So there u select all the fields contents which u do not want to to be changed and check the boxes with W.content and Display and save it. Once evrything is done u have to activate the particular transcation going in to the standard variants and put the name and click the activate button.
    Hope its clear
    Reward if help ful
    Sri

  • Restrict manual change in sales order with respect to quotation

    Hi All,
    The user use to create sales order with respect to quotation.  The user can able to change pricing as well as some header and item fields.  How can I restrict user for manual change in sales order expect some specific fields.
    Thanks.

    Hi Sunil,
    It is possible through configuration better you can post in sd forums.
    For the condition type settings , ensure that the manual entries is 'D'. it wont allow any changes in the order.
    Regards,
    Madhu.
    Edited by: madhurao123 on Aug 1, 2011 1:08 PM

  • How to update the sales text in the Sales Order.

    Dear all,
    I want to Update the sales text in the Sales Order. I used the "CREATE_TEXT" but i couldn't update using it.
    Can u please guide me, how to use the Function Module to update the sales Order line item text values.
    Thank U
    Uwanthi

    HI
    Check this link
    User Exit to update Sales order text (Terms of delivery) on saving it
    Regards,
    Krishna

Maybe you are looking for

  • Sharing itunes library across accounts on the same IMac

    How do you share your ITunes library with other accounts on the same IMac? There's clear advice how to share it with other networked computers, but how do you do it across accounts on the same IMac?

  • Brush Tool wont keep fill

    I recently bought a new wacom intous 3 drawing tablet and start messing around with illustrator. I am completely new and do not know much. I am wondering why every time I draw with the brush tool my fill goes away? If anyone can help I would be very

  • Best tool for on-scree, live annotations?

    I'd like to be able to annotate presentations as I'm giving them. I downloaded OmniDazzle with this in mind. However, there two main problems with it. First, there's no way to toggle to different tools (i.e. from cutout to flashlight) without stoppin

  • Warning in Database

    Hi All, I have warning at database backup. We are using Oracle database. We are planning Whole database online+redo log backup. Today it encounters warning "Log file: aehxnyrd.cds having return code 0001 success with warning". When  I see the details

  • Video Footage not working on my Mac but only on PCs.. i need it on the Mac!

    I have uploaded movie footage from a JVC Everio and a Sony Vario-Tessar- both of which use the HDD (Hard Disk Drive) technology. The footage works perfectly on any PC computer however on my Macintosh when attempting to play them or edit them using Fi