Ejemplo
Este seria un ejemplo del código:
SELECT *
FROM jest
INTO CORRESPONDING FIELDS OF TABLE jest
WHERE objnr EQ tab_dades-objnr AND stat LIKE cst_stat AND inact EQ ' '. " cst_stat ha de començar per 'E'
SELECT SINGLE *
FROM tj30t
INTO CORRESPONDING FIELDS OF TABLE est_tj30t
FOR ALL ENTRIES IN tab_dades
WHERE stsma EQ tab_dades-stspr AND estat EQ jest-stat AND spras EQ cst_spras AND txt04 IN so_txt04. "cst_spras = 'S'.
LOOP AT tab_dades INTO est_tj30t WHERE stspr IS NOT INITIAL.
READ TABLE jest INTO estruc
WHERE ( aqui van tus condiciones)
IF sy-subrc = 0.
READ TABLE est_tj30t INTO estruc
WHERE ( aqui van tus condiciones)
IF sy-subrc = 0.
APPEND estruc TO tab_dades
O tambien puedes usar el modify
MODIFY tab_tj30t FROM est_tj30t.
ELSE.
ENDIF.
ENDIF.
ENDLOOP.
|