Buenas tardes, la concatenacion ya la tengo, pero estoy teniendo problemas al actualizar la workarea.
El problema lo tengo con el segundo MODIFY (honestamente no se si la sintaxis es la adecuada).
La variable DESC_XL, es de tipo string.
Code:
*@0007
DATA GV_CADUC_M TYPE I.
DATA WA_IT_EXIST_MAT TYPE TY_EXIST_MAT.
*@0008
DATA:
GV_DESC_XL TYPE STRING,
LV_MATNR TYPE THEAD-TDNAME,
XLINE TYPE TABLE OF TLINE,
WLINE TYPE TLINE.
*@0008
TRY.
LOOP AT IT_EXIST_MAT INTO WA_IT_EXIST_MAT.
CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
EXPORTING
I_DATE_FROM = SY-DATUM
I_DATE_TO = WA_IT_EXIST_MAT-VFDAT_1
IMPORTING
E_MONTHS = GV_CADUC_M.
WA_IT_EXIST_MAT-CADUC_M = GV_CADUC_M.
MODIFY IT_EXIST_MAT INDEX SY-TABIX FROM WA_IT_EXIST_MAT TRANSPORTING CADUC_M.
* @0008
LV_MATNR = WA_IT_EXIST_MAT-MATNR.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = 'GRUN'
LANGUAGE = SY-LANGU
NAME = LV_MATNR
OBJECT = 'MATERIAL'
TABLES
LINES = XLINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
IF SY-SUBRC = 0.
LOOP AT XLINE INTO WLINE.
CONCATENATE GV_DESC_XL WLINE-TDLINE INTO GV_DESC_XL
IN CHARACTER MODE
RESPECTING BLANKS.
ENDLOOP.
MODIFY IT_EXIST_MAT INDEX SY-TABIX FROM WA_IT_EXIST_MAT TRANSPORTING DESC_XL.
ELSE.
* WRITE: / 'Error', SY-SUBRC.
ENDIF.
* @0008
CLEAR GV_CADUC_M.
ENDLOOP.
ENDTRY.
*@0007
Desde ya, agradezco su apoyo. Saludos!!