Skip to Content

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Dec 31, 2013 at 06:08 AM

    hi..

    use READ_TEXT Function module .

    DATA:TLINE TYPE TABLE OF TLINE.

    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.

    Above code will help you .in this Tline contains text line which is 132 char long .

    Add a comment
    10|10000 characters needed characters exceeded

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

  • Posted on Dec 30, 2013 at 02:15 PM

    To find values to use in calling READ_TEXT FM,

    • Call the transaction,
    • Put the cursor in the long text area
    • Double-click,
    • (you should now see the long text in the fullscreen mode) Navigate in the menu : Goto, header.
    • You should see the values to pass to READ_TEXT FM (You would easily identify invoice number and constants to use)

    Be aware that, depending on Customizing, there can be many texts for an invoice header. (You can identify the types thru SPRO or browsing SE16n the table TTXID with object value equal to 'VBBK')

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

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

  • Posted on Dec 30, 2013 at 02:04 PM

    Hi - You need to use READ_TEXT function module,

    There is a table STXH. Pass your billing number to the TDNAME field, check if you have any entries in this table. If yes, pass the parameters FM - READ_TEXT as similarl to this table primary keys (try in SE37 first for testing) and you can see result in table parameter LINES for FM - READ_TEXT.

    Regards,

    Atul Mohanty

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.