Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Help on code similar to RSAX_BIW_GET_DATA_SIMPLE

Hi,

I am having some doubts using the FM that I copied from RSAX_BIW_GET_DATA_SIMPLE. Here is the portion of my code:

OPEN CURSOR WITH HOLD S_CURSOR FOR

SELECT * FROM ZZTEST

where date in l_r_date.

ENDIF. "First data package ?

FETCH NEXT CURSOR S_CURSOR

APPENDING CORRESPONDING FIELDS

OF TABLE T_ZZTEST

PACKAGE SIZE S_S_IF-MAXSIZE.

IF SY-SUBRC <> 0.

CLOSE CURSOR S_CURSOR.

RAISE NO_MORE_DATA.

ENDIF.

LOOP AT T_ZZTEST .

IF T_ZZTEST-ZOBJECT = '123456'.

MOVE-CORRESPONDING T_ZZTEST TO E_T_DATA.

APPEND E_T_DATA.

ENDIF.

ENDLOOP.

S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.

When I go to the actual table to get the number of records for a particular date range, the number of records is different from the number of records when the data gets loaded to BW. It seems that different way of writing the code produces different number of records extracted, but never the number of records match with the one from the actual table when I use SE16 to see for a certain selection.

Is there an explanation for this?

For example, when I have the following:

OPEN CURSOR WITH HOLD S_CURSOR FOR

SELECT * FROM ZZTEST.

ENDIF. "First data package ?

FETCH NEXT CURSOR S_CURSOR

APPENDING CORRESPONDING FIELDS

OF TABLE T_ZZTEST

PACKAGE SIZE S_S_IF-MAXSIZE.

IF SY-SUBRC <> 0.

CLOSE CURSOR S_CURSOR.

RAISE NO_MORE_DATA.

ENDIF.

LOOP AT T_ZZTEST .

IF T_ZZTEST-ZOBJECT = '123456' and

T_ZZTEST-DATE IN L_R_DATE.

MOVE-CORRESPONDING T_ZZTEST TO E_T_DATA.

APPEND E_T_DATA.

ENDIF.

ENDLOOP.

The number of records transferred to BW is about 300K records but only 33K records got updated in the InfoProvider.

What would be the best way to test this method to see the number of records produce by the FM to be similar to the one from the SE16 table? WOuld there be some slight differences?

Hope I am making sense.

Thank you

Former Member
Not what you were looking for? View more on this topic or Ask a question