cancel
Showing results for 
Search instead for 
Did you mean: 

header text

Former Member
0 Kudos

hi,

how to create a header text in smartforms.

please give me exact steps to proceed.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

if u asking for putting some text on top of page during printing , then u can define it as normal as other TEXT ELEMENTS .

and if u define a TABLE in SF it it self have Header ROW.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

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

2.How do I create a long text for a document?*Please refer to the important parameters that are discussed in the previous question of reading texts. We will need the same parameters for saving the text as well. The function modules that you can use for this will be SAVE_TEXT followed by COMMIT_TEXT. The parameters play a very important roles as you might not see the saved text in the standard transaction if you give wrong parameter values.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

HEADER =

  • INSERT = ' '

  • SAVEMODE_DIRECT = ' '

  • OWNER_SPECIFIED = ' '

  • LOCAL_CAT = ' '

  • IMPORTING

  • FUNCTION =

  • NEWHEADER =

TABLES

LINES =

  • EXCEPTIONS

  • ID = 1

  • LANGUAGE = 2

  • NAME = 3

  • OBJECT = 4

  • OTHERS = 5

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'COMMIT_TEXT'

  • EXPORTING

  • OBJECT = '*'

  • NAME = '*'

  • ID = '*'

  • LANGUAGE = '*'

  • SAVEMODE_DIRECT = ' '

  • KEEP = ' '

  • LOCAL_CAT = ' '

  • IMPORTING

  • COMMIT_COUNT =

  • TABLES

  • T_OBJECT =

  • T_NAME =

  • T_ID =

  • T_LANGUAGE =

.

Regards,

Shiva Kumar

Former Member
0 Kudos

Hi,

What do you mean header text in smartform?

Cheers.