on 12-25-2008 3:49 PM
Hi Gurus,
I have implemented a custom field in textarea. When user enters multiple lines (press Enter), the field able to capture first line only, other lines are missing.
For eg, if typing:
123 - Press Enter
456 - Press Enter
789 - Press Enter
when the page is refreshed, the textarea left 123 only.
i tried using the following but even worse, the field dissapeared from the page.
<textarea name="mail-text:80[]" cols="80">`repeat with r in mail-text; write (r, "\r\n"); end`</textarea>
Appreciate your opinions.
Thanks.
The code for your textarea looks fine. You don't say how you are reading the textarea in SAP.
I use the following code in my PAI to read multiple lines. I hope this helps.
DO.
count = count + 1.
FIELD-GET 'textareaname' count ITS_TEXT varlen.
if sy-subrc = 0.
Do something with contents of its_text.
else.
EXIT.
endif.
enddo.
Regards
Karen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Glen,
i suppose your Data where not submitted to the behind laying r/3 internal table.
so if make the roundtrip only the workarea is filled.
If have had a similar Problem, but i solved in the folling way:
ITS TEMPLATE
Where GS_TEXT is my warkaera.
In R/3:
Know i read via RFC the ITS CONTENT at PAI
Dynpro:
PBO : * using steploop for Texttable *
loop at gt_texttab cursor g_tk_cur
into gs_text.
endloop.
PAI:
PROCESS AFTER INPUT.
module rfc_import_texttab.
loop at gt_texttab.
endloop.
module rfc_import_texttab input.
perform rfc_import_texttab.
endmodule.
FORM rfc_import_texttab.
DATA: lwa_order TYPE twa_order_re,
lt_savwctxt TYPE TABLE OF savwctxt,
lwa_savtxt TYPE savwctxt,
l_index TYPE i,
l_remeng(15) TYPE c.
Importiert vollständigen Kontext vom ITS-Server
Beschafft Felder aus dem internen Datenpool (ITS) mit einem Zugriff
CALL FUNCTION 'ITS_IMPORT_CONTEXT'
TABLES
context = lt_savwctxt
EXCEPTIONS
its_not_available = 1
OTHERS = 2.
CASE sy-subrc.
WHEN space.
Texte
READ TABLE lt_savwctxt INTO lwa_savtxt WITH KEY
fieldname = 'GS_TEXT-TDLINE'.
IF sy-subrc = 0.
REFRESH gt_texttab.
CLEAR gs_text.
LOOP AT lt_savwctxt INTO lwa_savtxt
WHERE fieldname = 'GS_TEXT-TDLINE'.
MOVE lwa_savtxt-fieldcont TO gs_text-tdline.
l_index = lwa_savtxt-fieldindex.
INSERT gs_text INTO gt_texttab INDEX l_index.
ENDLOOP.
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDFORM.
I'll hope this will help you.
Regards
Thorsten
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.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.