on 04-17-2008 6:48 PM
Hi All,
I am implementing an exit function in BPS for copy function. I have all the copied data correctly in an internal table itab. Now at the end of the program I want to insert/append all the records to xth_data. I don't want to loop over itab and then append it to xth_data because it is taking a lot of time. This is happening because of large number of data in the itab.
Using loop theoretically it is possible,
loop at itab into wa.
collect wa into xth_data.
endloop.
This is working fine but taking too much time (30min around) for just this loop. The structure of wa is or itab is same as xth_data.
Please note that I can not use,
append lines of itab to xth_data because xth_data is of type hashed table in Exit Functions.
Please suggest me some alternative statement where I don't need to loop over entire itab and still able to append the records to xth_data.
Thanks in advance,
Shiwesh
Hi Shiwesh,
please take a look at section Appending Several Lines at the following link
[http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb36c8358411d1829f0000e829fbfe/content.htm]
bye Matthias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
... or if you prefer the insert statement ...
[http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb361f358411d1829f0000e829fbfe/content.htm]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shiweesh,
Firstly,i suggest you to clear Xth data after copying Xth data to any internal table,then get the size(no of records) of the internal table with a Describe Statement, and then insert the extra records by index with Insert statement as mentioned below,atlast copy from internal table to Xth data.
1) Copy data from Xth data to Internal table
it_table = xth_data[].
2)get num of records from internal table
Describe table it_table into w_cnt
3) Insert the new records by index
insert wa_table into it_table index w_cnt.
4) Refresh XTH_data.
5) xth_data = it_table[].
All the best !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.