cancel
Showing results for 
Search instead for 
Did you mean: 

Printing Heaer text in scripts - urgent

Former Member
0 Kudos

Hi,

I am working on scripts.

I need to print the header text of the purchase order once on each po after all lines (within main window) but before the signature and subtotal. (signature and subtotal are on another window below main window)

I am using subroutine pool for this requirement, can anyone suggest me how to print this after all lines of PO.

Thanks in advance,

Deepa Kulkarni

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Hi , you cannot retrieve it directly.

you cannot see the header text in any table directly

you have to use READ_TEXT FM to see IT.

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.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

ID =

LANGUAGE =

NAME =

OBJECT =

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES =

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

Regards,

Shiva kumar

Former Member
0 Kudos

Hi,

I have got the header text by the same method as you have mentioned, but i am facing problem in printing it in the main window after all line items.

Can you suggest me how to print it?

Thanks and Regards,

Deepa Kulkarni

Former Member
0 Kudos

Hi,

Debug the script.By this way only u can get the correct result.Adjust the size of main window or change the script codings as per ur requirement.these done only by debugging..

Thanks,

Manjula.