on 06-19-2017 8:44 PM
Need help for one of my requirement.
When Long text entered in frontend (UI5/Web Application). Long text needs to be saved in Cutom Table in one Field in ECC System.
Is it possible to save it using Text ID(STXH-TDID) and Text Obj(STXH-TDOBJECT) ?
Please proved your inputs.
Thanks..!
If you really need explicitly in ONE field than you'll have to use a string type variable, however string data elements are not recommended in tables as then value would have different length on the DB. Also these fields are performance killers during a HANA conversion.
I would try to squeeze the process into standard SAP:
convert string into TLINE format, this might require some testwork in order to keep layout correct, if needed, e.g. context-specific example:
FIELD-SYMBOLS: <lf_stream> TYPE string.
IF NOT et_tline IS INITIAL. CLEAR et_tline. ENDIF.
lf_stream = if_text_string.
"Can't find a function for this.
REPLACE ALL OCCURRENCES OF '\n' IN lf_stream WITH cl_abap_char_utilities=>newline.
REPLACE ALL OCCURRENCES OF '\N' IN lf_stream WITH cl_abap_char_utilities=>newline.
SPLIT lf_stream AT cl_abap_char_utilities=>newline INTO TABLE lt_stream.
CALL FUNCTION 'CONVERT_STREAM_TO_ITF_TEXT'
EXPORTING
stream_lines = lt_stream[]
lf = 'X'
TABLES
itf_text = et_tline[].
FREE lt_stream.
and then use a text object such as an SO10 text, go to SO10, create text and display header, e.g.
Text Name Z228382
Language EN
Text ID ST Standard text
Text Object TEXT SAPscript standard texts
use that for creation with the TEXT_SAVE/INSERT ... modules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why not save it in a field type string?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Minneman .! for your sharing the information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I Would go with @A. Minneman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.