on 08-05-2010 11:25 AM
Hello All,
I am extracting data through Generic Datasource based on Function module into BI system.
This function module intern calls BAPI and extracts data from Live cache of APO system. I am not using select statement so, opening & closing cursor to determine the packet size is not effective.
My problem is that, all the records are coming in single data packet., even I set the packet size and record number fixed in rsa3 or in info package.
Currently it is running very fine. But in future when number of record will increase, processing of single data packet will be a problem.
In this case what needs to do to get the records through various data package.
Appreciate your response.
Regards,
Krunal
Hi!
You can split selected data into data packets in you fm:
.....
DATA: from_ind TYPE i,
to_ind TYPE i,
n_lines TYPE i.
......
* Auxiliary Selection criteria structure
IF i_initflag = sbiwa_c_flag_on.
...
*call you BAPI .
...
*put selected data into lt_data table.
...
ELSE.
* split into data packets
from_ind = 1.
DESCRIBE TABLE lt_data LINES sy-tfill.
IF sy-tfill >= i_maxsize.
to_ind = i_maxsize.
ELSE.
to_ind = sy-tfill.
ENDIF.
IF to_ind >= from_ind.
LOOP AT lt_data INTO ls_data FROM from_ind TO to_ind.
e_t_data = ls_data.
APPEND e_t_data.
ENDLOOP.
DELETE lt_data FROM from_ind TO to_ind.
ENDIF.
DESCRIBE TABLE e_t_data LINES n_lines.
IF n_lines = 0.
RAISE no_more_data.
ENDIF.
s_counter_datapakid = s_counter_datapakid + 1.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Could you please elaborate more on your issue?
Will
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.