2008 Jan 22 2:30 AM
I learnt that I will need to use SAVE_TEXT module to save what is inside my text editor with the codes as follows:
-
CALL FUNCTION 'SAVE_TEXT'
EXPORTING CLIENT = SY-MANDT
HEADER = ?...
INSERT = SPACE
SAVEMODE_DIRECT = SPACE
OWNER_SPECIFIED = SPACE
IMPORTING FUNCTION =
NEWHEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
OBJECT =
check this link
http://help.sap.com/saphelp_40b/helpdata/en/d6/0db8ef494511d182b70000e829fbfe/content.htm
-
For the line of code TABLE LINES = ?, what should I put for the ? to store the value of what is in the text editor?
May I ask if someone can give me examples of SAVE_TEXT for text editor?
Points will be given to any answer that can somehow answer my questions.
I learnt that I will need to use SAVE_TEXT module to save what is inside my text editor with the codes as follows:
-
CALL FUNCTION 'SAVE_TEXT'
EXPORTING CLIENT = SY-MANDT
HEADER = ?...
INSERT = SPACE
SAVEMODE_DIRECT = SPACE
OWNER_SPECIFIED = SPACE
IMPORTING FUNCTION =
NEWHEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
OBJECT =
check this link
http://help.sap.com/saphelp_40b/helpdata/en/d6/0db8ef494511d182b70000e829fbfe/content.htm
-
For the line of code TABLE LINES = ?, what should I put for the ? to store the value of what is in the text editor?
May I ask if someone can give me examples of SAVE_TEXT for text editor?
Points will be given to any answer that can somehow answer my questions.
2008 Jan 22 2:35 AM
Hi,
To determine the values for HEADER, Use menupath: Goto->Header in editor.
Over here, you will find details like Name, Object, Language and ID.
Observe the pattern for Name, it depends on the object. ( for sales order item it can be: <sales order number + item number).
Pass these information to the structure of type THEAD and use the same for FM: SAVE_TEXT.
Regards
Eswar
2008 Jan 22 2:38 AM
Then how about my TABLE LINES = ? code? What should I put at ? to store my text editor?
2008 Jan 22 2:41 AM
TABLE_LINES will store the text content of your editor.
Field TDLINE will have the content and TDFORMAT is to store paragraph format if any.
Regards
Eswar
2008 Jan 22 2:43 AM
So TDLINE and TDFORMAT is the default field names of my text editor?
2008 Jan 22 2:40 AM
This is the Bare minimum required parameters for SAVE_TEXT
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
HEADER = XTHEAD
SAVEMODE_DIRECT = 'X'
TABLES
LINES = TLINES.
Now going back to your question.
You have to pass the Internal table TLINES with the Text that needs to be saved inTables Parameter LINES
Hope this Helps
Vinodh Balakrishnan
2008 Jan 22 2:50 AM
Here is a sample with reference to my example in my first post
XTHEAD-tdobject = 'VBBK'.
XTHEAD-tdname = delivery number.
XTHEAD-tdspras = language.
XTHEAD-tdid = text id. "for example: Z022
Tlines-tdformat = '*'.
Tlines-tdline = your text that you want to write .
Hope this helps
Vinodh Balakrishnan
2008 Jan 22 2:55 AM
How am I going to save my text editor? From what I see your codes, you used non-text editor to save.
2008 Jan 22 2:57 AM
2008 Jan 22 3:07 AM
So I tried my codes in the SAVE-TEXT FM as:
-
TABLES
LINES = TDLINE
-
But i need to declare TDLINE first? Any example of declaration for me to refer?
2008 Jan 22 3:11 AM
Check below example:
DATA: st_head TYPE thead,
i_tline TYPE STANDARD TABLE OF tline,
wa_tline TYPE tline.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
header = st_head
savemode_direct = 'X'
TABLES
lines = i_tline.
Regards
Eswar
2008 Jan 22 3:19 AM
I tried the codes provided. But I could not really save it to my database. How am i suppose to do that?
My table name is ZPROGRAM_TABLE and I want to save what is in the text editor into the column name called PROGRAM_CODE. How am I suppose to modify the save text accordingly to be able to save to my table?
2008 Jan 22 3:11 AM
Declare
DATA: XTHEAD LIKE THEAD .
DATA: TLINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
Vinodh Balakrishnan
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |