on 12-15-2008 7:19 AM
Hi all,
Can we pass tdline and tdformat at the same time to Sapscript?
My requirement needs the tdformat to be dynamically, is this possible ?
How should I pass a dynamic format to sapscript?
If yes, could someone provide some sample code?
Thanks in advance.
HI myahsam,
Create a subroutine and and create a std text using trx SO10.Fill an internal table of the type tline using tdformat and tdline.
Use FM save_text to pass the values of tdformat and tdline dynamically.In the header parameter of the FM pass the name of the std text.
wa_header-tdobject = 'TEXT'.
wa_header-tdname = c_tname . (name of the std text)
wa_header-tdid = 'ST' .
wa_header-tdspras = spras.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
header = wa_header
insert = 'X'
savemode_direct = c_x
TABLES
lines = it_line
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.
Then in the sapscript layout use include text statement to read this std text in the script.
Hope this helps
Neerja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi swati,
Thanks for the link, however I do not understand the statement "You can use SAPscript to administer texts that have other formats that ITF. The information on the text format is stored in the text header. To pass texts with other formats to SAPscript via function modules, you must also use the structure TLINE. SAPscript, however, does not interpret the contents of the text lines but passes them on to the function modules, which call the interface to the external word processing program."
Do you have sample code for this?
Thanks.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.