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

Similar Messages

  • 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.

  • Short text from a sales order not pulling through to a STO

    Hi,
    Does anyone have any idea why the short text from a sales order would pull correctly into a purchase requisition, but when this PR is converted to a PO then the short text in the PO reverts to that in the material master?
    Thanks in advance.
    jj

    Hi,
    IN ECC 6.0 EHP 4, it gets copied from PR to PO but not in lower versions.
    Hence you can achieve the same using some PO BADI's or through enhancement spots.
    Thanks & Regards,

  • 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

  • When you push the button VL02N that is in the  post output of goods)

    En inglés:
    Hello, in Peru is required to account when delivery by VL02N, the document is assigned a serial tax (calculated by ranges in a table z), the point is that I have not got any user exit is activated when you push the button VL02N that is in the (post output of goods), I reviewed the user exit and is not active MV50AFZ1 the button and the methods of the badi LE_SHP_DELIVERY_PROC (transaction SE18) were not actively using the button to count the output of goods VL02N transaction delivery
    Would know as one might do this?
    thanks and regards
    En español:
    Hola, en Peru se necesita que cuando de contabilize la entrega por la VL02N, se asigne al documento un consecutivo fiscal (calculado por rangos en una tabla z), el punto es que no he conseguido ningun user exit que se active cuando presiono el boton que está en la VL02N , (contabilizar salida de mercancias), revisé el user exit MV50AFZ1 y no se activa en el botón y los métodos de la badi LE_SHP_DELIVERY_PROC ( transacción se18) tampoco se activam con el botón de contabilizar la salida de mercancia en la transacción VL02N  de la entrega
    Sabrian como se podria hacer esto?
    gracias y saludos

    Hi,
    you can use the BADI " LE_SHP_GOODSMOVEMENT" in SE18 implement and see we have the Parameter IS-LIKP using which you can put values.
    Regards

  • 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

  • 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

  • EOS T3i when you push the button it clicks like it took a photo, but it does not

    No matter which setting you have it on it will not take photos unless you hold down the button and make it click several times like you are doing action shots.

    Yes, Mirror Lockup is one possibility. Also, if you have Long Exposure Noise Reduction enabled and are taking shots of 1 second or longer, the camera has to take two shots. First, it takes a "regular" shot, then a second,"blank" shot is made with the shutter closed. This second shot is then used to identify noise, which is subtracted from the first image. The second shot is the same length of time as the first one... so if you were making a 4 second exposure, all together it will take 8 seconds to make both shots when LENR is enabled. If you cancel the second shot before it completes (by turing off the camera or removing the battery), neither image is saved... so it seem like no shot was taken. Another setup that makes you press the shutter release repeatedly is bracketing.... There's exposure bracketing and white balance bracketing. Exposure bracketing allows you to set a range of exposures which will be taken, probably 3 total on your camera, and I think you have to press the shutter release three times for them all to be taken. Sometimes the shutter release button gets "gummed up" with finger oils, dust and grime, with use and over time. That can cause delays and problems when trying to take a shot. There are several places online that show how to clean it yourself (Google it... but be careful if you decide to try to do it), or you can send to Canon (they'll replace the button entirely), or have an independent repair shop clean it. ***********
    Alan Myers
    San Jose, Calif., USA
    "Walk softly and carry a big lens."
    GEAR: 5DII, 7D(x2), 50D(x3), some other cameras, various lenses & accessories
    FLICKR & EXPOSUREMANAGER 

  • Header text to be copied from the sales order to delivery

    Hi Gurus,
    I have a requirement in which  header text "Customer order text " needs to be copied from the sales order to the delivery.After copying the text we need to print on the packing slip.
    Can anyone advise me as how to copy the text from the sales order header to delivery  and then print on the packing slip.
    Thanks ,
    Smitha.

    Maintain the Text ID @ Sales Documnet Header level and add it to your Text Procedure. Also ensure you assign the access sequence to your Text ID in your procedure.
    Access Seuquence should have VBBK and the text ID number and check All Languages and use Requirement 1.
    Then in the Delivery Header Text Procudure add this text ID and assign the same access sequence as above.
    This will copy the Text ID from Sales Order to Delivery Order Header.
    You can configure the output for packing slipduring the delivery process  and in the output program read this Text ID and print it.
    Note" Copy Controls do not copy text from preceeding documents to succeeding documents. Only the Access Sequences used in the Text Procedure will do that with the help of the reuqirement assigned in the same.
    Thanks and Hope this helps.
    Sai

  • Get Header Text with special characters

    Dear Experts,
    I have written a program using READ_TEXT FM to get header text from Delivery.
    However, one of the fields has a value "K&N".
    When I get the header text, it shows "K<(>%<)>N".
    How can I get back the normal text? Or do I need to replace the strings manually?
    It is stupid.
    Thanks.
    Regards,
    Cato

    Hi Cato,
    Just go to this thread and solution from Valter.
    [Read_text|Read_text with special character "&".;
    Regards,
    Madhu.

  • How to get header text in user exit for sales order

    Hello all,
    My requirement is that I get and modify the header text in user exit when creating a sales order. In the user exit I'll do some validation and put the error code into header text. But I can't use function 'READ_TEXT' to get header text since the text has not been updated into database.
    Can anybody help me? point will be rewarded. Thanks in advance.
    regards,
    --Alex

    Use the following internal tables. These internal tables are declared in include <b>THEADDAT</b>. THEADDAT is an include of  <b>MV45ATOP</b>.
    THEAD,                
    TLINE.                       
    TVCOM,                      
    TTXID,        
    TTXIT,
    TTXOB,              
    TTXOT          
    I hope it helps.

  • Transfer of Header text from Sales Order to Delivery

    Hi Experts,
    I had a requirement to populate Terms of delivery text in Sales Order Header text with some predefined value which I have accomplished using MV45AFZB - User Exit USEREXIT_CHECK_VBAP which transfers the text on save of the document to sales order header (terms of Delivery Text ) .
    Now the issue is the same text is required to be copied to delivery - Terms of Delivery header Text. But this is not happening/Its occuring one out of 4 times . I am not able to find out the reason for this.
    Please help in this regard.
    Thanks

    This can be set in conifugration. Transaction VOTXN. The delivery header text can be set to be referenced from the sales order.

  • Consume PIR from Sales Order when PIR's are not in BOM Usage 1

    I need help determining which combinations of Strategy groups I need at the header level (Variant Config KMAT) and item level Phantoms (HALB)  The Phantoms are just used to drive forecast, I have no need to issue or stock these items... just need them to be reduced when I use them in a Sales Order.
    Please help me understand the planning strategy groups or the requirement type combinations on the header material and the item materials.
    Standard SAP will consume the PIR if they exist in the production BOM (Usage 1).   However, due to Usage 1 having the object dependencies placed at lower levels and parameter effective, I am not able to add the foretasted assemblies to the usage 1 BOM.  I have created the PIR's for these HALBu2019s using Simulative Long Term Planning.
    I need a way to consume/reserve the foretasted PIR's from the sales order... without the use of the Production Order or Planned Order.  I think it can be done at the time of the sales order PGI... but have not been able to figure out the configuration.  Below are the main steps if the PGI is the vehicle for consumption.
    Sales Order uses Configuration Profile SD01, KMAT and BOM Usage 5 items are in the found in the Sales Order.
    KMAT is inactive in Demand Management (MD62).
    BOM Usage 5 items have PIRu2019s, they are created from Simulative Long Term Planning.
    1.     During Sales Order creation, the BOM Items are selected from VC.
    2.     During Sales Order PGI, the BOM Items are consumed and show as withdrawn in MD623/MD73.
         Sales Order Reservation and/or Consumption of Item Level Planned Independent Requirements     
         ***PIR's are not found in the Production BOM, only the Sales BOM.               
         ***Production BOM and Sales BOM have same KMAT, and same Object Dependencies          
         Step 1:     Create Sales order for KMAT 10000008                    
              a. Sales Order will have KMAT at line item 10               
              b. Sales Order will have BOM Usage 5 materials as items (see BOM's Below)          
              VC will pick the specific materials that are relevant to order          
         Step 2.     Sales Order is Saved/Confirmed.                         
              a. A reservation will be created against the Planned Independent Requirements for Sale BOM Items.
              MD73 for the HALB will show the Planned Independent Requirement, and the Reservation.     
              b. A Planned Order is created using BOM Usage 1.               
              VC will pick the specific materials that are relevant to order          
         Step 3.     Production Order is completed and issued to Sales Order.               
         Step 4.     Sales Order Delivered with PGI                    
              a. The HALB PIRu2019s in the Sales Order will be withdrawn (reservation goes away, PIR qty reduced by 1 PC).
    Client 100     BOM Usage 5                              
         Material Type     BOM Item     Material Number     Planning Strategy Group     Planning Independent Requirements     VC ObjDep          
         KMAT     Header     10000008     25     00-Inactive     KMAT          
         HALB     01     10000023     70     00-Active     Yes, At this level          
         HALB     10     10000025     70     00-Active     Yes, At this level          
         HALB     20     10000024     70     00-Active     Yes, At this level          
         HALB     30     10000026     70     00-Active     Yes, At this level          
         HALB     40     10000027     70     00-Active     Yes, At this level          
    Client 100     BOM Usage 1                              
         Material Type     BOM Item     Material Number     Planning Strategy Group     Planning Independent Requirements     VC ObjDep          
         KMAT     Header     10000008     25     00-Inactive     KMAT          
         KMAT     10     KA_350_FA_P4
    (Parameter Effective)     Null     Null     Yes, but at lower levels          
         KMAT     20     KA_350_FA_P4 (Parameter Effective)     Null     Null     Yes, but at lower levels          
         KMAT     30     KA_350_INT
    (Parameter Effective)     Null     Null     Yes, but at lower levels          
         KMAT     40     KA_350_INT
    (Parameter Effective)     Null     Null     Yes, but at lower levels

    You can manage copying data from the sales order to the production order by some FMS.
    For data not in the production order you can define UDF-s on the production order.
    E.g.copying the item code you can use this FMS:
    SELECT T0.ItemCode
    FROM RDR1 T0  INNER JOIN ORDR T1 ON T0.DocEntry = T1.DocEntry
    WHERE T1.DocNum =$[$32.1]
          and T0.VisOrder=0
    connecting this to the Product No. field setting autorefresh when Production Order Origin Number changes.
    Or copying the Item details you can use this FMS
    SELECT T0.Text
    FROM RDR1 T0  INNER JOIN ORDR T1 ON T0.DocEntry = T1.DocEntry
    WHERE T1.DocNum =$[$32.1]
          and T0.VisOrder=0
    connected to an UDF setting autorefresh when Production Order Origin Number changes.
    (And similar other FMS-s can be connected to other fields you want to copy.)

  • Hii  purchase infor record when creating PR from a sales order

    Hii
    I have found an exit USEREXIT_MOVE_FIELD_TO_ME_REQ when creating a sales order i can modify the table EBAN
    there is a special flow where i need to remove clear out the Purchase info record (INFNR) since when creating a sales order the purchase determine his own vendor thus i have an error message which is trggered since the vendor of purchase infor record is different from the sales order vendor.
    can you please advise what is the impact of deleting the INFNR data during the creating of sales order.  Seems to me that the purchase requisition is not created automatically in this case?

    Hi,
    IN ECC 6.0 EHP 4, it gets copied from PR to PO but not in lower versions.
    Hence you can achieve the same using some PO BADI's or through enhancement spots.
    Thanks & Regards,

  • Exclude condition from sales order when minimum  vale not  reached

    Hello,
    what  would  be  the  best  way  to  exclude/include  the  freight  cost  condition  from  sales order  when  minimum  order value  is  not  reached?
    Thanks and  best regards
    L

    Hi,
    If you want to be it should be automatically then follow what RAM KI suggested, but without much more work you want do it manually then do as suggested below
    Use the field USAGE at header >> under Sales tab
    Create table with combination of Sales orgz and usage fileld and generate table
    Assign this generated table to access sequence which is used in your frieght condition
    Configure two usages as FRIEGHT include and FRIEGHT Exclude
    Maintain condition record for the frieght condition with above combination
    Now when you create sales order go header level and select usage as you select usage system will pull values from condition record for frieght.
    kapil

Maybe you are looking for