Hi everybody!
I have to create a lot of long input texts (And the client ask for multilineal input texts [there are like 50 elements]) so i made this to fix the problem:
Just a cut code for example:
PARAMETERS: tipo TYPE Z_STRING.
at selection-screen on value-request for tipo.
perform editor_texto using 'tipo'.
form editor_texto using param.
FIELD-SYMBOLS: <parametro> type any.
DATA: lt_lines TYPE STANDARD TABLE OF tline,
lv_line like line of lt_lines,
lv_ind type i,
lv_tope type i,
lv_cant type i.
ASSIGN (param) to <parametro>.
if <parametro> is not initial.
lv_cant = 130.
while lv_ind lt strlen( <parametro> ).
lv_tope = lv_cant + lv_ind.
if lv_tope gt strlen( <parametro> ).
lv_cant = strlen( <parametro> ) - lv_ind.
endif.
lv_line-TDLINE = <parametro>+lv_ind(lv_cant).
append lv_line to lt_lines.
add lv_cant to lv_ind.
ENDWHILE.
endif.
CALL FUNCTION 'TERM_CONTROL_EDIT'
EXPORTING
titel = text-046
langu = sy-langu
TABLES
textlines = lt_lines
EXCEPTIONS
user_cancelled = 1
OTHERS = 2.
while lt_lines[] is not initial and sy-subrc is initial.
read table lt_lines into lv_line index 1.
CONCATENATE <parametro> lv_line into <parametro> SEPARATED BY ' '.
delete lt_lines index 1.
ENDWHILE.
endform.
The problem is when you call with the F4 in the specific text input, Sap Automatically clear the value of the parameter before performing the rutine.
So, this only work to put new codes but not for changing an existing one...
How can I fix this problem?
If I can manage to keep the information avoiding the sap auto cleaning it will be great!
Thanks for your time and effort!
PS: I cant belive that in a SAP forum ABAPS isent one of the admit codes to get highlighted xD