Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

edit_text in sapscript

Former Member
0 Likes
867

Hi All,

How we can include custom Text in sap script.

and how we can use FM's Edit_text, Create_text, read_text etc...

Regards,

Vamsykrishna.

3 REPLIES 3
Read only

Former Member
0 Likes
776

hi,

EDIT_TEXT

This function module calls the fullscreen editor. You can use the editor functions to edit the text lines. The system sets the editor interface according to the interface specification in the text object.

Usually, the system implicitly calls the function module SAVE_TEXT if you leave the editor choosing Save, provided the text is stored in the text file according to the allocated text object. To deactivate this call, use the parameter SAVE.

If the field TDFORMAT in the text header contains SPACE, the system calls the SAPscript Editor. Otherwise, it calls the function module EDIT_TEXT_FORMAT_xxx where xxx is the contents of the field TDFORMAT. This function module then calls the editor required for the specified text format. Which of the parameters passed with EDIT_TEXT the system evaluates, depends on this interface module and the called word processing program.

READ_TEXT

READ_TEXT provides a text for the application program in the specified work areas.

The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.

After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.

If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.

Hope this helps, Do reward.

Read only

0 Likes
776

Pl explain me with one example on read_text, save_text, edit_text.

regards,

vamsykrishna.

good explaination good ponits

Read only

Former Member
0 Likes
776

to include a text in SAP-Script, you need following code:

/: INCLUDE TESTTEXT OBJECT TEXT ID ST LANGUAGE &NAST-SPRAS&

this will include a SO10 Standard text "TESTTEXT" in the corresponding lagnuage in your form.

in SAP-Script you can not use statements like call funtion: edit_text, read_text, save_text, commit_text, delete_text.

to do so you need to jump off to an external perform like following:

/: Perform edit_text in program YSD_PERFORM

/: USING &NAST-SPRAS&

/: CHANGING &VARIABLE&

/: ENDPERFORM

in your external form routine you can then use all of the above named statements.