‎2008 Jun 10 3:08 PM
Hi,
I have a file with 1 million records and I am getting all the records into a internal table.Now I am appending 10000 rows to another internal table.This internal table will be passed to an function module.
I wnat to create a new internal table for every 10000 reocrds and pass it to function module.
How do we achieve it?
Regards,
‎2008 Jun 10 3:12 PM
Hi Srinivas,
Why do you want to create a NEW Internal table and not REUSE the same?
loop at itab.
move-correspoding itab to itab_new.
appen itab_new.
count = count + 1.
if count = 10000.
call function module.....
refresh itab_new.
count = 0.
endif.
endloop.
Regards,
Ravi
‎2008 Jun 10 3:12 PM
Hi Srinivas,
Why do you want to create a NEW Internal table and not REUSE the same?
loop at itab.
move-correspoding itab to itab_new.
appen itab_new.
count = count + 1.
if count = 10000.
call function module.....
refresh itab_new.
count = 0.
endif.
endloop.
Regards,
Ravi
‎2008 Jun 10 3:16 PM
Hi,
I am doing parallel processing,calling FM in parallel processing mode to update internal table records into DB table.Actually my input file has millions of records and I want to update DB table using parallel processing.
Could you please suggest me best approach to process six millons of records from single input file using Parallel processing.
Reg,
‎2008 Jun 10 4:03 PM
Hi Experts,
Suggest me best approach for the above scenario.
Regards,
‎2008 Jun 10 4:27 PM
Hi, You can use Append Lines of option to append rows of one internal table to other..
Just try and enhance the below logic.
DESCRIBE TABLE ITAB1 LINES zl_lines. (Get the total no. of lines)
ZL_DIV = ZL_LINES DIV 10000.
ZL_REM = ZL_LINES MOD 10000.
IF ZL_REM > 0.
ZL_DIV = ZL_DIV + 1.
ENDIF.
zl_start = 1.
DO ZL_DIV times.
zl_end = zl_start + 10000
"Append Lines of itab1 from zl_start to zl_end TO itab2".
zl_start = zl_end + 1.
CALL YOUR FM .
enddo.
Regards,
Swaroop Patri
‎2008 Jun 10 4:42 PM
Hi Swaroop,
Thanks for your response.
I am doing exactly the same as you suggested.
The point here is, I am calling the FM in parallel processing mode by passing the internal table say ITAB1.This will be executed in a different work process.meanwhile ,I want to process another set of records using ITAB2 and update the z-table in parallel proc mode using another workprocess.
Is this the right approach? Can we use same int tab (ITAB1) repeatedly in parallel processing. I am not sure abt this.
Regards,
‎2008 Jun 10 4:50 PM
Hi Srini,
I assume you are refreshing Itab1 for each loop and calling the FM.
Like
DO ZL_DIV times.
zl_end = zl_start + 10000
Refresh Itab2.
"Append Lines of itab1 from zl_start to zl_end TO itab2".
zl_start = zl_end + 1.
CALL YOUR FM .
enddo.
This should not have any effect until there is no dependency on the data which you are passing in the first run to the consecutive calls to the Fm.
Regards,
Swaroop patri
‎2008 Jun 10 5:06 PM
Hi Swarup,
Thank you very much for the quick response.
I am doing exctly the same. I am refreshing Internal table after calling FM and again appending another set of records to the same internal table to continue the process.
after calling FM in parallel processing mode,Can we refersh the ITAB and use the same to append another set of records. Right?
below is the logic i am using,
DO.
READ DATASET s_fname INTO it_item.
some calculations
Append it_item.
Count = Count + 1.
IF Count = 300k.
Call FM to update the DB table using parallel processing by passing it_item.
Clear it_item.
Refresh it_item.
Count = 0.
ENDIF.
ENDDO.
Is the above approach correct?