Skip to Content
author's profile photo Former Member
Former Member

Please help me out how to find the Purchase Order HeaderText

Please help me ....how to develop the Read_Text fro finding the particular PO Header Text....

Regards

Venkat Boddu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 01, 2008 at 12:24 PM

    Hi Venkat,

    Display the Purchase Order in transaction ME23N.

    Select the text you want to read, ie. "Header Text", "Shipping Instructions", etc. or (if appropriate) select the line item text, ie. "Item Text", "Delivery Text", etc. to display.

    Drill-down into the text by double-clicking anywhere in the text. You should see a fullscreen of the text.

    Choose the menu option at the following path:

    /Goto/Header

    Make a note of the Text Name, Language, Text ID and Text Object.

    To check if any text actually exists, you can read table STXH using these 4 key fields.

    To read the text into an internal table, use the Function Module READ_TEXT, passing the values you noted above in the function module import parameters NAME, LANGUAGE, ID and OBJECT, respectively.

    Note that this process is quite generic, meaning you can use this for other texts/data objects, ie. sales orders, deliveries, etc. as well.

    Hope this helps, Andy

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 01, 2008 at 12:32 PM

    Hi Venkat,

    Andrew is right , you can follow those steps to see the header text , I will give you some sample coding for this ..

    perform read_text tables intab1 " this is the internal table with entries.

    FORM read_text TABLES intab STRUCTURE itcsy

    outtab STRUCTURE itcsy.

    READ TABLE intab WITH KEY 'EKKO-EBELN'.

    CHECK sy-subrc EQ '0'.

    ebeln = intab-value.

    DATA pdesc(40) TYPE c.

    DATA td_name LIKE thead-tdname.

    DATA BEGIN OF td_lines OCCURS 1.

    INCLUDE STRUCTURE tline.

    DATA END OF td_lines.

    DATA lin TYPE i.

    td_name = ebeln.

    CALL FUNCTION 'READ_TEXT'

    EXPORTING

    client = sy-mandt

    id = 'F01'

    language = sy-langu

    name = td_name

    object = 'EKKO'

    • ARCHIVE_HANDLE = 0

    • IMPORTING

    • HEADER =

    TABLES

    lines = td_lines

    EXCEPTIONS

    id = 1

    language = 2

    name = 3

    not_found = 4

    object = 5

    reference_check = 6

    wrong_access_to_archive = 7

    OTHERS = 8.

    IF td_lines[] is initial.

    CALL FUNCTION 'READ_TEXT'

    EXPORTING

    client = sy-mandt

    id = 'F01'

    language = '1'

    name = td_name

    object = 'EKKO'

    • ARCHIVE_HANDLE = 0

    • IMPORTING

    • HEADER =

    TABLES

    lines = td_lines

    EXCEPTIONS

    id = 1

    language = 2

    name = 3

    not_found = 4

    object = 5

    reference_check = 6

    wrong_access_to_archive = 7

    OTHERS = 8.

    ENDIF.

    CLEAR lin.

    DESCRIBE TABLE td_lines LINES lin.

    IF lin = 1.

    DO 1 TIMES .

    IF sy-index = 1.

    READ TABLE td_lines INDEX sy-index.

    READ TABLE outtab WITH KEY 'OUT-VAR8'.

    CHECK sy-subrc = 0.

    outtab-value = td_lines-tdline.

    MODIFY outtab INDEX sy-tabix.

    ENDIF.

    ENDDO.

    ENDIF.

    IF lin > 1.

    DO 2 TIMES .

    IF sy-index = 1.

    READ TABLE td_lines INDEX sy-index.

    READ TABLE outtab WITH KEY 'OUT-VAR8'.

    CHECK sy-subrc = 0.

    outtab-value = td_lines-tdline.

    MODIFY outtab INDEX sy-tabix.

    ENDIF.

    IF sy-index = 2.

    READ TABLE td_lines INDEX sy-index.

    READ TABLE outtab WITH KEY 'OUT-VAR9'.

    CHECK sy-subrc = 0.

    outtab-value = td_lines-tdline.

    MODIFY outtab INDEX sy-tabix.

    ENDIF.

    ENDDO.

    ENDIF.

    ENDFORM.

    Hope atleast you will get some idea , if you have any more doubts pls let me know.

    Pls kindly reward points if helpful.

    Regards,

    Viveks

    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.