Reading the block message or text from sales order header.

Dear All,
Please let me know how to read the block text which is present in the sales order header under texts tab.
thanks in advance
regards,
Shoban

HI
Please look intothe follwoing code, which helps you to understand how to read the header slaetext.
  DATA: BEGIN OF text_head.
          INCLUDE STRUCTURE thead.
  DATA: END OF text_head.
DATA: BEGIN OF TEXT_LINES1 OCCURS 10.
      INCLUDE STRUCTURE TLINE.
DATA: END OF TEXT_LINES1 .
DATA: text_id     LIKE thead-tdid     VALUE '0001'.
  DATA: text_spras  LIKE thead-tdspras   VALUE 'EN'.
  DATA: text_name   LIKE thead-tdname.
  DATA: text_object LIKE thead-tdobject VALUE 'VBBK'.
CALL FUNCTION 'READ_TEXT'
      EXPORTING
        client                  = sy-mandt
        id                       = text_head-tdid
        language                = text_head-tdspras
        name                    = text_head-tdname
        object                  = text_head-tdobject
      TABLES
        lines                   = text_lines1
      EXCEPTIONS
        id                      = 1
        language                = 2
        name                    = 3
        object                  = 5
        reference_check         = 6
        wrong_access_to_archive = 7
        OTHERS                  = 8.
    CASE sy-subrc.
      WHEN 1. RAISE invalid_id.
      WHEN 2. RAISE invalid_language.
      WHEN 3. RAISE invalid_name.
       WHEN 4. RAISE NOT_FOUND.
    ENDCASE.

Similar Messages

  • Text messages not copied from sales order to billing

    Text messages which have been given in sales order are not copied to billing. Two of the text are copied and the other two are not getting copied. Checked the access sequence.. everything is correct.
    Please give a clue.

    Dear DV,
    These are basic settings to copy the Text from sales order to Invoice so please check in these areas,
    First you need to copy the sales order text to the delivery document from the delivery document you can copy the text to the billing document.
    To copy the sales order text to the delivery document
    You do the text determination for the deliveries also,define and maintain same TextId in the delivery header text procedure ,maintain the access sequence ,in the delivery text procedure access sequence you put the Text Object as VBBK for that Text ID.
    Make sure that you have assigned access sequence for your missed Text ID's in VOTXN transaction
    To copy the delivery text to the invoice.
    You do the text determination for the billing document,define and maintain same TextId in the billing document text procedure and maintain the access sequence,after that
    Go to VOFA transaction then selct billing document type then go in to the details screen here you do the check in the Delivery Text check Box (Top most bottom of the screen.)
    Now you can able to copy the sales order text to the invoice.
    Use VOTXN transaction for Text determinetion
    I hope this will help you,
    Regards,
    Murali.

  • Item text from sales order to purchase requisition

    Hi Experts,
    I have below queries ,
    1. What are the controls to generate/create a purchase requisition from a sales order.
    Is this possible that a Pur. req generated from a sales order but sales order is not its account assignment.
    How item text from the sales order can be copied to purchase Requisition, does settings in purchase requisition in SPRO (Purchasing Purchase req-text for purchase req----define copying rules) works only for automatically created Pur req.??
    item text from sales order can be copied for PR created through MRP or planned orders converted to PR.??
    I will appreciate if someone can provide me documentation on basics of sales and distribution at my email
    [email protected]
    Thanks in advance
    anand

    hello, friend.
    i can only answer part of your question as i am not sure of the others.  however, yes... you can automatically create a purchase requisition from the sales order. 
    one example is third party sales.  because of the item category group that you specified in the material master, the sales document determines an item category (and schedule line) that controls the creation of the purchase requisition.  here, the system knows that you must source the material from your vendor for delivery to your customer.
    further, as in the above case, when your company creates the PO with reference to the PR, your company appears as the buying entity but the ship-to address is that of your customer.
    i did not understand your question on account assignment.  please elaborate and we'll see if we can come up with the answer.
    if you wish to see documentation, you could refer to SAP's article on Third Party Sales.  other scenarios such as just-in-time inventory for trading companies or make-to-order companies may also apply.
    regards.

  • Copying Text From Sales order to Billing Document

    Hi all,
    I have searched all posts for my issue but found nothing so that i am posting this issue.
    I want to copy the Some text form sales order to billing document is there any cnfig to do this
    order is there any exit for billing in which i can write code to copy text from sales order to billing document.
    please provide me a solution.
    Thanks in adavnce.
    Vinod.

    Hi,
    Use the same t-code VOTXN to do access sequence assignment.
    When you choose text object Billing Doc (header/item), there is 3 folders in dialog structure:
    - Text procedure
    - Access sequence
    - text procedure assignment
    In the text procedure folder, select related text procedure, then assign the created access sequence to respective text id.
    Hope this help.
    Cheers,

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

  • Any user exit to copy text from sales order to PR

    Hi,
    Any user exits or bapi to copy text from Sales order to Purchase requisitions.
    Jack

    Hi
    In SPRO , please use the menu path Materials Management - Purchasing - Purchase Requisition- Texts for Purchase Requisitions - Define copying rules
    Here  select the text and double click on Text linkages. There you can define the source text from sales order to the target text in PR.
    Please try and let me know if you still have any queries.
    Please reward points if this helps you
    Rgds

  • How to update TEXT in Sales order header

    Hello ,
    I have requirement in which I am creating SO via IDOC calling BAPI_SALESORDER_CREATEFROMDAT2.
    Question: Can any one help me in finding a solution to update the TEXT in sales order header which is confogured IN TEXT CONTROL in SD.
    I have tried various option using CREATE_TEXT but it is only updating STXH table , the text is not coming in the sales order.
    If someone knows about this , <removed by moderator>.
    Edited by: Thomas Zloch on Nov 15, 2010 4:20 PM - please do assign priorities > normal

    Sounds like a text determination config issue - have you assigned the text in VOTXN?  Have you run the text determination analysis from VA02 in the document?

  • Copy Texts from sales Orders to invoices

    Hi,
    someone can help me?
    the additional texts of old invoices (related to sales order #1) are changed when I change the additional texts of the order where they come from (sales order #1)
    I don't want this changes in the old invoices created before changing the additional texts in sales order.
    Thanks,
    Antonio.

    Hi Ravi,
    First at all thanks for answering.
    According to your answer I understand that every time I modified the sales order I'd have to launch a program to maintain the texts in the old invoices, isn't it?
    Thanks again!
    Antonio.

  • Alternate BOM Text from sales order

    Hi ,In My report I need alternate BOM Text.
    The scenatrio is : when we create Sales order it will ask for Alternate BOM ( 1 or 2 or 3 ).
    Based on selection it will assign the BOM and Sales order will be saved.
    I want how to link the sales order doc no with Alternate BOM.
    I have tried so many tables : MAST,VBAP,VBAP.STPO,STKO,STAS etc but not getting the Link.
    Can anybody suggest me ?
    Thanks
    Kumar

    Hello Kumar ,
    you need to Link VBAP-STLNR -->STPO-STLNR.
    regards
    Prabhu

  • Create the Header Text In Sales Order Header

    Hi All,
    I want to create a new header text in the sales order header level, Would you mind give me some manual to create this ?
    Regards,
    Luke

    Hi Luke,
    Please goto T-code VOTXN->Sales Document->Header->Text object     VBBK
    You could create Text ID and access sequence.
    Assign the access sequence to text ID.
    Assign the text ID to the procedure.
    Assign the procedure to sales order type.
    Please also refer the following online documentation:
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/55f993545a11d1a7020000e829fd11/frameset.htm
    Hope it helps.
    Regards,
    Smile
    Edited by: Smile Zhang on Jul 3, 2008 7:22 AM

  • What's the name of FM for getting Sales Order Header / Item Status info

    Hello All:
    Do you know what's the name of Function Module for getting Sales Order Header / Item Status Overview ? Any sample code will be very much appreciated.
    Basically, I am trying to create a Webpage where user can enter the Sales Order document number and will return the Sales Order: Status Overview.
    Thanks,
    Dipankar Biswas

    Thanks everybody ! Appreciate for your prompt response. I was also looking for some sample code, and I did find some on. And here is one. I still have to try the code, but here is for all your reference:
    *& Report ZBAPI_SALESORDER_GETSTATUS *
    *& Read and Display the Sales Order Items and Status of the Order *
    REPORT zbapi_salesorder_getstatus NO STANDARD PAGE HEADING LINE-SIZE 200 LINE-COUNT 33(3).
    TABLES: vbap. "Sales Document Item Data.
    DATA: wa_bapireturn TYPE bapireturn,
    wa_bapisdstat TYPE bapisdstat,
    it_bapisdstat LIKE STANDARD TABLE OF wa_bapisdstat.
    TYPES: BEGIN OF ty_mat_name,
    matnr TYPE makt-matnr,
    maktx TYPE makt-maktx,
    END OF ty_mat_name.
    DATA: wa_mat_name TYPE ty_mat_name,
    it_mat_name LIKE TABLE OF wa_mat_name WITH KEY matnr .
    PARAMETERS: p_vbeln LIKE vbap-vbeln DEFAULT 5573.
    START-OF-SELECTION.
    SELECT matnr maktx FROM makt INTO TABLE it_mat_name.
    CALL FUNCTION 'BAPI_SALESORDER_GETSTATUS'
    EXPORTING
    salesdocument = p_vbeln
    IMPORTING
    return = wa_bapireturn
    TABLES
    statusinfo = it_bapisdstat.
    IF wa_bapireturn IS INITIAL. " Successful Execution.
    WRITE: / 'Document No: ' COLOR 1, 20 'PO Number : ', 40 'Status' , 50 'Delv.Stat',60 'Item No', 80 'Material', 90 'Material Description', 130 'Net Price' COLOR 2.
    ULINE.
    LOOP AT it_bapisdstat INTO wa_bapisdstat.
    WRITE: / wa_bapisdstat-doc_number. " Sales Document Number.
    READ TABLE it_mat_name INTO wa_mat_name WITH KEY matnr = wa_bapisdstat-material.
    WRITE: /20 wa_bapisdstat-purch_no, " Customer Purchase Order Number
    40 wa_bapisdstat-prc_stat_h, " Processing Status
    50 wa_bapisdstat-dlv_stat_h, " Delivery Status
    60 wa_bapisdstat-itm_number, " Item Number
    80 wa_bapisdstat-material, " Material
    90 wa_mat_name-maktx, " Material Description
    130(10) wa_bapisdstat-net_price. " Net Price
    CLEAR wa_bapisdstat.
    ENDLOOP.
    REFRESH it_bapisdstat[].
    ELSE.
    WRITE: wa_bapireturn-message.
    ENDIF.

  • Marketing text in sales order header

    Hi All,
    Please let me know from where does the text gets reflected in sales order header. Header has a tab TEXTS, in which we have series of texts.
    Do we have option to save the texts in any table/structure
    Thanks in advance
    regards,
    satya

    Hi
    Go to SO10 and check the material text . Now go to VOTXN and check wheather the assignment is there for sales header or not
    Regards
    Srinath

  • Error while loading data from sales order header via LO-Cockpit extraction

    Hi Guys
    I activated sales order header d/source 2lis_11_vhdr using 3x funtionality ontop of BI 7.0 dataflow. While creating infocube I am getting an error saying that " Infoobject 0RATE_TYPE is onl allowed as an attribute (not in infoprovider)"
    Also while creating the same cube I am not able to move UNIT objects to UNIT dimension (as it dont allow me to drag and drop)
    Can anyone please advise me why I am not able to activate cube based on above mentioned error.
    Thanks in advance.
    regards

    Hi,
    To be able to load transaction data for 2010, you should have the master data for that in the time dimension. For this, you need to go to BPC admin and add the dimension members in the time dimension manually.
    Alternatively, you can have a process to import master data from BI system also. You can do some more research on this. Please refer to the below link from help.sap:
    http://help.sap.com/saphelp_bpc75_nw/helpdata/en/46/fcc2ef34ee439aaa56a4f6ba001e4d/content.htm
    http://help.sap.com/saphelp_bpc75_nw/helpdata/en/e0/532af2d0804218a59157136bb63a98/content.htm
    http://help.sap.com/saphelp_bpc75_nw/helpdata/en/73/0f917879fd416099d04fb4c49889e0/content.htm
    http://help.sap.com/saphelp_bpc75_nw/helpdata/en/88/e16046853041b391314a91bfe3618b/content.htm
    Hope this helps.

  • Reading line item text from sales order

    Hi,
    I have a sales order which has an item text, I need to get the value from the text. I want to test the READ_TEXT function and I am giving values as
      Import parameters               Value           
      CLIENT                          400             
      ID                                  0011            
      LANGUAGE                   EN              
      NAME                            0001171445000010
      OBJECT                         VBBP            
      ARCHIVE_HANDLE         0               
    LOCAL_CAT                               
    It is not giving me any value.  Am I giving any thing wrong? In the NAME I gave the value as sales ord num + item number, is this correct. Please help me.
    Thanks,
    Veni.

    Hi
    Name is the Concatenation of Order No and Item No.
    pass the 4 parameters ID,OBJECT,NAME and LANG
    use the correct declarations for the parameters and use
    ID  = '0011'
    LANGUAGE =  'EN'
    NAME = '0001171445000010'
    OBJECT  = 'VBBP'
    See the doc
    READ_TEXT
    READ_TEXT provides a text for the application program in the specified work areas.
    The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
    After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
    If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
    Function call:
    CALL FUNCTION 'READ_TEXT'
    EXPORTING CLIENT = SY-MANDT
    OBJECT = ?...
    NAME = ?...
    ID = ?...
    LANGUAGE = ?...
    ARCHIVE_HANDLE = 0
    IMPORTING HEADER =
    TABLES LINES = ?...
    EXCEPTIONS ID =
    LANGUAGE =
    NAME =
    NOT_FOUND =
    OBJECT =
    REFERENCE_CHECK =
    WRONG_ACCESS_TO_ARCHIVE =
    Export parameters:
    CLIENT
    Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
    Reference field: SY-MANDT
    Default value: SY-MANDT
    OBJECT
    Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
    Reference field: THEAD-TDOBJECT
    NAME
    Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
    Reference field: THEAD-TDNAME
    ID
    Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
    Reference field: THEAD-TDID
    LANGUAGE
    Enter the language key of the text module. The system accepts only languages that are defined in table T002.
    Reference field: THEAD-TDSPRAS
    ARCHIVE_HANDLE
    If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
    The value '0' indicates that you do not want to read the text from the archive.
    Reference field: SY-TABIX
    Default value: 0
    Import parameters:
    HEADER
    If the system finds the desired text, it returns the text header in this parameter.
    Structure: THEAD
    Table parameters:
    LINES
    The table contains all text lines that belong to the text read.
    Structure: TLINE
    Exceptions:
    ID
    The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
    LANGUAGE
    The parameter LANGUAGE contains a language key that does not exist in table T002.
    NAME
    The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
    Possible errors:
    The field contains only blanks.
    The field contains the invalid characters ‘*’ or ‘,’.
    OBJECT
    The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
    NOT_FOUND
    The system did not find the specified text module.
    REFERENCE_CHECK
    The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
    WRONG_ACCESS_ TO_ARCHIVE
    The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
    Reward points if useful
    Regards
    Anji

  • Notes Text from sales order data

    Hy All experts.
    I wnt to put Notes into sales roder report. i type notes in va02. item line, texts. but it's field value define like structure. LV70T-TDID. so hw to put it by in my report. or via Selec statement.
    please see foll select statement used in my ALV reports.
    FORM data_retrieval.
    SELECT VBELN  NETWR KUNNR FROM VBAK INTO (ITAB-VBELN,ITAB-NETWR,ITAB-KUNNR) WHERE VBELN IN VBELN .
    SELECT NAME1 FROM KNA1 INTO (ITAB-NAME1) WHERE KUNNR = ITAB-KUNNR .
    SELECT BSTKD BSTDK FROM VBKD INTO (ITAB-BSTKD,ITAB-BSTDK) WHERE VBELN = ITAB-VBELN.
    SELECT VSNMR_V FROM VBAK INTO (ITAB-VSNMR_V) WHERE VBELN = ITAB-VBELN.
    SELECT LFGSA FROM VBUP INTO (ITAB-LFGSA) WHERE VBELN = ITAB-VBELN and LFGSA ne 'C'.
    *SELECT LFSTK FROM VBUK INTO ITAB-LFSTK WHERE VBELN = ITAB-VBELN and lfstk ne 'C'.
    SELECT LFSTK FROM VBUK INTO ITAB-LFSTK WHERE VBELN = ITAB-VBELN and lfstk ne 'C'.

    Hi,
    First you should know the details like Tex id, name, text object to read the text entered in item line.
    In VA02 for the sales document select the item and go to texts tab.Double click on item text and again double click on text editior. You will get next screen as script editor. Then goto Goto--->Header. Here you can find the details and you can pass these details in FM READ_TEXT.
    See the following code:
      call function 'READ_TEXT'
        exporting
          id        = l_txtid
          language  = l_txt
          name      = l_txtkey
          object    = l_txtobject
        tables
          lines     = lt_text
        exceptions
          id        = 1
          language  = 2
          name      = 3
          not_found = 4
          others    = 8.
      check sy-subrc eq 0.
      loop at lt_text into ls_text.
        if gs_vor-text ne ls_text-tdline.
          write: / ls_text-tdline under gs_vor-text.
        endif.
      endloop.
    Regards,
    Raju.

Maybe you are looking for