How to  read header texts in the on save user exit of VA01

Hi Experts,
I have a requirement to read the header texts in the on save user exit.
I have to check whether departmental code in header text is not initial or not.
Can any one please pour in some points of how it can be done......
Thanks in Advance.
Prem

Hi
U can use fm READ_TEXT:
DATA: THEAD LIKE THEAD,
      TLINES LIKE STANDARD TABLE OF TLINE WITH HEADER LINE.
THEAD-TDID     = <text id>.
THEAD-TDSPRAD  = <language>.
THEAD-TDOBJECT = 'VBBK'.
THEAD-TDNAME   = VBAK-VBELN.
CALL FUNCTION 'READ_TEXT'
  EXPORTING
    ID                            = THEAD-TDID
    LANGUAGE                      = THEAD-TDSPRAD
    NAME                          = THEAD-TDNAME
    OBJECT                        = THEAD-TDOBJECT
  TABLES
    LINES                         = TLINES
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.
U can use it in all situations ( inserting and updating) because that fm returns the buffered text.
Max

Similar Messages

  • How to read header text in MM contract (ME31K/ME32K) before saving record?

    Hi All,
    In ME31K / ME32K (Contracts), before saving the contract I would like to check if the user has entered header text in the contract or not.
    I am using customer exit MM06E005.
    Can anybody help me with this?
    Thanks in advance.

    Try creating dummy text id which will be part of text determination procedure @ Customers sales text & document header text.
    else, maintain the SO10-text against this text ID. whenver user createds quotation this text will be defaulted irrespective of the cusotmer.
          then based on if user want to modify the text they have to enter manually in this text id. print this text in header.
    Regards,
    Reazuddin MD

  • How to read header text from VF03 into smartfrom

    Hi all,
    i want to print header text from vf03 in smartforms
    bye

    Hi,
    Tcode VF03 enter Billing Doc no -
    >goto header-----> select header texts
    When you get the values Textname, text id, textobject to the smartform.
    call the FM read_text in the programing lines to get the long text in the internal table. Another way to retrieve the long text is to use INCLUDE but for your requirement is better to uses READ_TEXT function module.
    Once you get the data in the internal table.
    Create table and loop the long text internal table. Now in the table when create a text node, keep a condition on the text node in the conditions column that when sy-tabix = 3. Which means you are skipping two lines (Administrative data).
    Procedure:
    1. Right click > create-> programming lines.
    2. In the Input parameters pass TEXT NAME, TEXT ID, Text Object and Interanal table(itab) and In output paramaeters the Internal table (itab).
    3. call function Read_text and pass the values.
    4. create a table for Itab.
    5. create a text node.
    6. Keep a condition on the text node sy-tabix = 3 in the condition tab of the text node.
    7. &itab-line&
    <b>Check this link for sample program</b>
    long text in smartform
    Regards,
    Maha

  • How to trigger Availability check in Sales Order 'save' user exit.

    I have requirements which dictate that I change item categories of most of the line items in a user exit. If I do that the line items no longer confirm. I know that the availability check happens in 'move_Field_to_vbap' user exit. Is there any way I can re-trigger it on save. These orders will be coming through a bapi. Thanks in advance.

    Hi!
    Search the way (via menu) in VA01 to trigger the availability check manually. Then have a look, with routines are called.
    Then call this (these) routines in the exit. If you see something like 'perform okcode_...', then this should work. Be careful not to trigger recursive loops by this way. Maybe  the prepare_save-exit is a better place to do this.
    Regards,
    Christian

  • How to read printed text from the browser.

    I have an API that take 2 parameters as query string and after validating it prints back 4 parameters on the browser itself like :
    para1=abc
    para2=xyz
    para3=123
    para4=pqr
    now i want to use the value of these parameters further in my program, can anyone tell me how can i take the parameter values in variables.

    I can think of two choices offhand.
    1. In addition to displaying the values, have your servlet or JSP write out a form with <input type="hidden" name="para1" value="abc"> fields in it, and a submit button. Your values will come back to you in the next post or get request. (If this is sensitive information, however, DO NOT do this unless you can re-validate the data, since it would be possible for someone to fabricate their own static page to submit bogus data.)
    2. Put the data in the session object, using the setAttribute(...) method, and retrieve it on the next page using getAttribute(...).
    You cannot really "read" the page that is visible on the user's browser.
    Hope this helps.
    Cheers!
    Jerry Oberle

  • How can i read header text?

    how can i read header text?
    ie, i want to read two values that are stored as header text in purchase order.
    how can i retrieve that values?

    Hi,
    The long texts of a document are stored in a encrypted format in the STXH and STXL tables, where STXH stores the header information of the
    long text like TDOBJECT, which indicates which text object the long text belongs to, TDID which indicates the Text ID and TDNAME which is
    the actual name of the long text.
    As these texts are stored in a encrypted format, the text cannot be read using a SELECT statement. You will have to use the function READ_TEXT. The easiest way of getting to know the parameter values is to go to a document, open the long text in a full screen mode. For example, when you wan to see the long text for a Purchase order, go to transaction ME23n. Assume, you want to see the parameters for the Header Text. In the first Tab Strip Control, click on the Texts tab and select the Header Text node on the left hand side, which will display the text on the right hand side. Now, double click on the text editor on the right hand side. This will open the text in the full screen mode. In the menu Go To --> Header, you should be able to see the values for all the three parameters we discussed above. We will have to do the same thing for whichever text parameters we want to see.
    TREC-TDSPRAS = SY-LANGU.
    TREC-TDID = 'ECCS'.
    TREC-TDOBJECT = 'ZECCS'.
    TREC-TDNAME = Z_ACCOUNT.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    ID = TREC-TDID
    LANGUAGE = TREC-TDSPRAS
    NAME = TREC-TDNAME
    OBJECT = TREC-TDOBJECT
    TABLES
    LINES = LINES
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS = 8.
    Details:
    Language DE
    Text ID F01 Header text
    Text Object EKKO Purchasing doc. header texts
    Regards,
    Shiva Kumar

  • How to rotate a text in the adobe reader for mobile ios ?

    how to rotate a text in the adobe reader for mobile ios ?

    There's no rotate command to rotate the document. Instead, rotate the iPad. If it doesn't rotate, turn off the Rotation Lock switch on the side of your iPad.

  • How to add texts to the Header Text in the PO header

    Hi
    In our system, some already added remarks are appearing in the PO header text field when i open a PO. I wanted to edit the remarks appearing in the PO header as a default. I wanted to know where these predefined texts are filled in. Appriciate if you can help me findout the same.
    Thanks
    Venkat.

    Hi
    In the above said configuraiton path, they have mentioned "Purchase order"  in the source object and the "Header Text" in the source text.
    But i wanted to konw  where the below mentioned genereic Notes/Remarks will be entered. For all the purchase orders, this text is autmatically get copied into the header text. i wanted to know from where it is originating and where we are maintaining.
    "Notes / Remarks :
    Vendor's signature on the attached PO terms and conditions is an integral part of this PO
    All documents should have a PO number
    Invoices should be submitted to the attention of the Finance department
    Please attach a PO copy with all claims to avoid delay in receiving payment.?"

  • How to Print Sales header text at the end of last page of Main Window

    Dear All,
    I have a requirement to print Sales order header text at the end of Main of last page. I don't have footer window.When i use Bottom-End bottom.Only one line is printing.The header has 5 lines.
    Request you to provide <b>code</b>to handle this situation. Your response is highly appreciated
    Best Regards
    Praveen

    Hi,
    If u r using standard layout set RVORDER01.
    U can print that sales order header text in the following text element.
    /E SUPPLEMENT_TEXT.
    U can include ur text objects here.
    Then it gets printed.
    Regards,
    Veda Kumar

  • How to Print Header text in PO SAPScript

    Hi Gurus,
    I am working on PO Script (MEDRUCK). I copied the Standard to a Z form. ZMM_MEDRUCK, Now I need to print the the Header text at the end of MAIN window. I created a a perform and call it from the Script and read the heder text by using FM Read_text
    DEFINE &TEXT1& = ' '
    PERFORM GET_TERMS IN PROGRAM ZMM_MEDRUCK_ROUTINE
    USING &EKKO-EBELN&
    CHANGING &TEXT1&
    ENDPERFORM
    PROTECT
    &TEXT1&
    ENDPROTECT
    but while returning I am getting only one line. Can any body suggest me how I can read the Header text in PO script. Please provide the sample Code.
    Regards
    Sony

    Hi,
    Use this Function module 'READ_TEXT'
    T_lines contains the header text, you can loop it and display it in sap script
    Function module to read the header text
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                  = sy-mandt
          id                      = 'F01'
          language                = sy-langu
          name                    = ekko-ebeln
          object                  =  ekko
        TABLES
          lines                   = t_lines
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
    Regards
    Krishna

  • How to read long text in Document line item

    Hi,
    How to read long text in FI Document line item.

    Use Read_text function module.
    you need to pass
    ID
    LANGUAGE
    NAME
    OBJECT   to the function moduel
    To find the Text id name language and object these are the following steps. Example: FB02
    1. goto FB02, Enter Document number
    2. from menuselect Goto>Header-->header Text..... New window will be displayed 
    3. select the Header Text. here you can see all the text. 
    4. click on the TEXT (which you want to know the Text id) , then press log ICON (you can find in bottom right of the text window) it looks like a rolled paper. 
    5. in the Next window you will find Text Name. Text ID, Language. etc...
    Regards,
    Lalit Mohan Gupta.

  • How to read a text/html file in java regardless of its encoding?

    Hi All,
    How to read a text/html file in java regardless of its encoding?
    1. Is there any way to identify that a file (read using FileInputStream/or any other means with java.io package) has been saved with which type of encoding i.e. whether the file is using ANSI encoding or Unicode encoding or other?
    2. Is there any standard way to read an encoded file (i.e. files having UTF-16 format for Asian locales character support) and un-encoded file (i.e. files having ordinary ANSI format) correctly without knowing the user input?
    The problem is that while creating an instance of 'InputStreamReader' (ISR) we can pass the encoding type used (otherwise it takes the system's default encoding type), and the ISR expects the file to be in the same encoding format otherwise it reads it as some junk. But we don't know which file the user is going to pass whether it is Unicode (for Asian locales file should be in Unicode) with or ANSI coded (for non-Asian / English locales user generally uses ANSI encoding).
    Regards,
    Sam

    1. There is no reliable way of guessing the encoding of a file without that information. Thats why XML for example has very strict rules wrt. it's encoding (short form: use UTF-8 or UTF-16, if you use anything else, you'll have to specify it)
    2. you might be able to make an educated guess if the possible range of encodings is limited, but it will probably never be 100% certain
    3. The HTML file might have a header entry "<meta http-equiv..." that tells you about it's encoding. You could try to read the start of the file and see if you find that, then if you found it re-read the entire file.
    regards

  • Read Header Text  From VF03 Transaction

    Hi Frds,
                  I want to Read Header Text  From VF03 Transaction
    Read Transport Number and Transport Date From Vf03 Transaction.
    Guide Me Briefly
    How to pass the varaibles to the function Module
    Regards,
    Kabil

    hi Kabil ,
        Your issue completely accepted just keep in mind
    1) if you have to read both text you have to use read_text 2 times
    2) in that for first read_text
    CALL FUNCTION 'READ_TEXT'
         EXPORTING
          CLIENT                =       SY-MANDT
           ID                       =       '0002'
           LANGUAGE        =       SY-LANGU
           NAME                =        '             '          "" YOUR VARIABLE THAT CONTAINS Invoices number
           OBJECT             =        'VBRK'
          TABLES
           LINES                =         TLINE
       IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF. 
        is ok for Header note 1 .(means first text ) but for second text your ID is change other thing is same .
    CALL FUNCTION 'READ_TEXT'
         EXPORTING
          CLIENT                =       SY-MANDT
           ID                       =       '0013'
           LANGUAGE        =       SY-LANGU
           NAME                =        '             '          "" YOUR VARIABLE THAT CONTAINS Invoices number
           OBJECT             =        'VBRK'
          TABLES
           LINES                =         TLINE
       IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    Hope this will help you
    Thanking You,
    shrikant padwale.

  • How to sending simple text in the mail body

    Hi friends,
                 How to send simple text in the mail body through ABAP code
       plz send me the related code and setting for that mail.
      Thanks&Regards,
      Srinivas

    try this...
    FORM send_file_as_email_attachment .
      DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
      DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
      DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
      DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
      DATA: objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
      DATA : i_body TYPE soli_tab WITH HEADER LINE.
    DATA: it_attach LIKE it_display1 OCCURS 0 WITH HEADER LINE.
      DATA: doc_chng LIKE sodocchgi1.
      DATA: tab_lines LIKE sy-tabix.
      DATA: att_lines TYPE i.
    DATA: lv_lines TYPE i.
      DATA: file TYPE string.
      data: g_datum like sy-datum.
      data: g_datum1(10) type c.
      DATA: len TYPE n.
      LOOP AT it_email.
        CLEAR : objpack,
                objhead,
                objbin,
                objtxt,
                reclist.
        REFRESH: objpack,
                 objhead,
                 objbin,
                 objtxt,
                 reclist.
        g_datum =     sy-datum - 1.
        concatenate g_datum6(2) '.' g_datum4(2) '.' g_datum+0(4) into
        g_datum1.
    doc_chng-obj_descr = 'Aged Stock more than 45 Days'.
        CONCATENATE 'Aged Stock more than 45 Days' '-' it_email-vkbur INTO
        doc_chng-obj_descr.
        CONCATENATE 'Please find enclosed Aged Stock Details ( >45days ) report as on'
        g_datum1
        INTO objtxt-line SEPARATED BY space.
        APPEND objtxt.
        objtxt-line = ' '.
        APPEND objtxt.
        objtxt-line = 'Regards'.
        APPEND objtxt.
        objtxt-line = 'LIS SAP Projects'.
        APPEND objtxt.
        objtxt-line =
        'PS: Pls send feedback for futher improvements to SAP office.'.
        APPEND objtxt.
        DESCRIBE TABLE objtxt LINES tab_lines.
        READ TABLE objtxt INDEX tab_lines.
        doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
       CLEAR objpack-transf_bin.
        objpack-head_start = 1.
        objpack-head_num = 1.
        objpack-body_start = 1.
        objpack-body_num = tab_lines.
        objpack-doc_type = 'TXT'.
       objpack-obj_name = 'Run_prog'.
       objpack-obj_descr = 'Agestock.txt'.
       lv_lines = tab_lines.
        APPEND objpack.
    *CONCATENATE 'Plant'   'Material Number' 'Qty(More than 45days)'
    *'Amount' INTO
           it_display SEPARATED BY space.
           append objbin.
           clear: objbin.
        CLEAR:it_display2.
        REFRESH it_display2.
        it_display2-werks = 'Plant|'.
        it_display2-matnr = 'Material Number'.
        it_display2-qty = '|Qty > 45 days'.
        it_display2-amount = '      |Amount'.
        APPEND it_display2.
        it_display2-werks = ''.
        it_display2-matnr = ''.
        it_display2-qty = ''.
        it_display2-amount = ''.
        APPEND it_display2.
        CLEAR : it_display2.
        sort it_display1 by amount descending.
        LOOP AT it_display1 WHERE werks = it_email-vkbur.
         AT FIRST.
    *CONCATENATE 'Plant    '   'Material Number' 'Qty(More than 45days)'
    *'Amount' INTO
           objbin-line SEPARATED BY space.
           append objbin.
           clear: objbin.
         ENDAT.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
            EXPORTING
              input  = it_display1-matnr
            IMPORTING
              output = it_display1-matnr.
          it_display1-qty = TRUNC( it_display1-qty ).
          MOVE-CORRESPONDING it_display1 TO it_display2.
          APPEND it_display2.
          CLEAR:it_display1,it_display2,objbin.
          CLEAR:it_display1.
        ENDLOOP.
        objbin[] = it_display2[].
        DESCRIBE TABLE objbin LINES tab_lines.
        objhead = 'Suug'.
        APPEND objhead.
        objpack-transf_bin = 'X'.
        objpack-head_start = 3.
        objpack-head_num = 1.
        objpack-body_start = 1.
        objpack-body_num = tab_lines.
        objpack-doc_type = 'RAW'.
        objpack-obj_name = 'Run_prog'.
        objpack-obj_descr = 'Agestock.txt'.
        APPEND objpack.
        reclist-receiver = '[email protected]'.
        reclist-rec_type = 'U'.
        APPEND reclist.
    =====================================================================
        CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
          EXPORTING
            document_data              = doc_chng
            commit_work                = 'X'
          TABLES
            packing_list               = objpack
            object_header              = objhead
            contents_bin               = objbin
            contents_txt               = objtxt
            receivers                  = reclist
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            operation_no_authorization = 4
            OTHERS                     = 99.
        CLEAR : it_email.
      ENDLOOP.
    ENDFORM.                    "send_mail
    Message was edited by:
            Sugumar Ganesan

  • How Do I Wrap Text Like the iOS Camera App?

    Hello. I am in yearbook, and I have been challenged with designing the cover of the yearbook, and I have been having a few problems along the way. One of these problems is to wrap text. Specifically, I'm stuck on how I would wrap text like the iOS camera app on the bottom of the screen. The words seem like they are wrap around a 3D object to give it that effect, but I can't really tell. If anyone can help me, it would be greatly appreciated.

    JJMack wrote:
    There is a big difference between being a casual user than real work or development. I own a iPod its a great MP3 player and a device I can display my pictures on out of my pocket. I'll even Facetime my kids at time to see my grand kids or help fix something.  My wife has a mini iPad for quick internet access and quire music and uses her iPod to entertain our two year old grandson with games.   She uses a Canon 1D mark 4 and I a Cannon 1D mark II.  The only use the iPad and iPod cameras get is Facetime. No iOS apps are use to work on images  they have no value when you have Photoshop. The iPod is better for displaying image then the iPad mini it has a 3:2 aspect ratio display and travels better the the mini iPad which has a 4:3 aspect ratio display.  I also crop image for display on wall mounted HDTV. The iPad is better for casual internet access then the iPod. All our kids have iPhones and they all use computers either Mac or PC for work and internet access.  When you have a Unix or Windows why would you want to touch an iOS device for work or serious internet access.  Apple mobile devices are convenient for casual use and grand kids don't get that dirty finger painting on them as they do using real paint. Nothing of real value is maintained on an iOS device.
    Well...there's Photoshop Touch and Photoshop Mix as well as Lightroom Mobile. It could be argued that they're don't exactly mirror their desktop cousins, yes, but they weren't meant to be. They were meant as extensions to the desktop experience.  (e.g., Lightroom Mobile lets one work with the RAW images they have in their Lightroom desktop collections.)
    The more powerful Windows tablets can run Photoshop desktop (like Photoshop CC) too.
    @bluebocat: Are you looking for text with a perspective? Like it has a vanishing point? As if it was turned in a certain direction in 3D space?

Maybe you are looking for

  • Accessible XML

    Hi everyone The following is a section of code from my site. It works in IE but not in Firefox. I suspected that was because I was using an Active X object so I modified the code to offer an alternative for other browsers. The first section (in the f

  • Why is my File Information page blank in Photoshop Elements 13?

    I am trying to bring up the File Information tab in PS Elements 13... it comes up absolutely blank with a border around the box showing only the photo number across the top.  HELP!!!!  I need this page desperately and cannot access it.!

  • Stills: Pixel Aspect Ratio from File is Wrong

    The photo montage I'm working on is D1/DV NTSC Widescreen 16:9 (1.2121). I shoot the pix with my SONY Z5U and the raw stills are all 1440x810 72 dpi, square pixels. To conform them to my PPro project, I change their dimensions to 720x480 and I change

  • How to implement cache-aside pattern in coherence.

    Hi, Is there a way to implement Cache-Aside pattern in Coherence. ?!

  • After Archive and Reinstall...

    I was having problems with my Final Cut software and QuickTime 7.3, and the only way to fix it was to archive and reinstall my OS. I have successfully completed this process, but I see that a file named "Previous Systems" has been added to my HD. I t