Record are not updated from Internal table to extract structure. When I run RSA3 its comming with zero record.
In section ' * Fill range tables BW will only pass down simple selection criteria
of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.'
Used Internal table and loop until to get condition. updating fom Itab into extract structure after the loop . But the record are not udpated to it.
Please see the below code.
Fill range tables BW will only pass down simple selection criteria
of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'ebeln'.
MOVE-CORRESPONDING L_S_SELECT TO S_EBELN.
APPEND S_EBELN.
ENDLOOP.
Loop at ITAB.
SELECT SINGLE ebeln infnr FROM ekpo INTO t_ekpo WHERE
ebeln = ITAB-ebeln.
IF sy-subrc EQ 0.
Select URZLA value from t_eina table
SELECT infnr urzla FROM eina INTO TABLE t_eina WHERE
infnr = t_ekpo-infnr.
IF sy-subrc EQ 0.
READ TABLE t_eina INDEX 1.
IF t_eina-urzla IS NOT INITIAL.
ITAB-country_orgin = t_eina-urzla.
ITAB-infnr = t_eina-infnr.
ENDIF.
ENDIF.
ENDIF.
endloop.
INSERT ZPRODOFF from table ITAB.
Determine number of database records to be read per FETCH statement
from input parameter I_MAXSIZE. If there is a one to one relation
between DataSource table lines and database entries, this is trivial.
In other cases, it may be impossible and some estimated value has to
be determined.
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT (S_S_IF-T_FIELDS) FROM ZPRODOFF
where ZREQUNR = s_s_if-requnr.
ENDIF. "First data package ?
Fetch records into interface table.
named E_T_'Name of extract structure'.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE S_S_IF-MAXSIZE.
IF SY-SUBRC <> 0.
CLOSE CURSOR S_CURSOR.
RAISE NO_MORE_DATA.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF. "Initialization mode or data extraction ?
ENDFUNCTION.