on 06-15-2012 11:01 AM
Dear Form Members
Please can you help with my problem
I have a webdynpro abap form for registering feedback with 3 different text-edit fields on it. The user can type many words in these fields that can go over many lines.
I use a service call to call a remote function to save the data in the backend, but I cannot work out how to store the 3 text fields with many lines into the backend.
I tried using the STRING importing parameter for each field but the remote function does not allow this type.
Please can you help with as much detail as possible as this is my first attempt at this.
Many Thanks
Hi Mark,
You can achieve this on the concept of GUID.
Just create a Structure of GUID, and TableType as well, then give it in RFC Import parameters.
You use the below code to convert long text into guid_22/guid_32 etc.,, that guid can be stored on your DB.
If you wanna extract the text, you can use READ_TEXT function module.
************************************
Data: lv_guid type sysuuid_22,
lv_text type string_table,
lt_tline type oij_tline,
ltt_tline type table of tline,
ls_thead TYPE thead,
*-Generating the GUID---*
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_22 = lv_guid. """" This can be stored on DB.
CALL FUNCTION 'CONVERT_STREAM_TO_ITF_TEXT'
EXPORTING
stream_lines = lv_text
language = sy-langu
lf = abap_true
TABLES
itf_text = lt_tline.
ls_thead-tdobject = 'TEXT'
ls_thead-tdid = 'ST'.
ls_thead-tdspras = sy-langu.
ls_thead-tdname = lv_guid.
*-Saving the text----*
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
header = ls_thead
savemode_direct = 'X'
TABLES
lines = ltt_tline
EXCEPTIONS
id = 01
language = 02
name = 03
object = 04.
Hope this would be helpful to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mark,
let, suppose i've DB structure like (ZSD_DETAILS)
SID CHAR20 PK Student ID
SNAME SNAME Student Name
ADDRESS SYSUUID_22 Student Address (GUID)
:- Here Address may contain multiple lines (long text).
RFC: ZRFC_GET_SD_DETAILS
TABLES
IT_DETAILS LIKE ZSD_DETAILS
EXPORTING
EV_FAILED TYPE CHAR01.
Now for ADDRESS, we should create GUID(Generated by System dynamically), so use the above mentioned code for GUID, then populate the values onto mentioned table structure. then call the RFC to update/own operation.
If you wanna get original ADDRESS then you should use GUID which is stored on your DB table with FM - READ_TEXT.
Ex.
Call Function 'READ_TEXT'
exporting
name = <db_guid>(Address)
tables
lines = <lt_tlines>.
Hi again D Chengalarayulu
Thank you in advance again for all your help.
I have re-configured my table and structure and then adjusted my function module with your example of input parameters and code, but the required result is not happening.
Is the code you gave complete or do I need to adjust it?
Thanks again for your patience.
Mark
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.