‎2006 Nov 29 8:11 AM
Hi
I have 500 records.
My requirement is to create session for every 100 records.
that means all together I need to create 5 sessions with 100 records each.
how can i do this.
<b>Points will be rewarded to all contributors.</b>
Thanks.
‎2006 Nov 29 8:15 AM
use lsmw recording for this
its very easy and fast process for such less records
create the flat files with every 100 records
feed those files into the program
it will create the session at the end of all the steps
continue with the remaining 4 files in the same way
mark helpful answers
Regards,
Naveen
‎2006 Nov 29 8:15 AM
use lsmw recording for this
its very easy and fast process for such less records
create the flat files with every 100 records
feed those files into the program
it will create the session at the end of all the steps
continue with the remaining 4 files in the same way
mark helpful answers
Regards,
Naveen
‎2006 Nov 29 8:16 AM
cal the bdc_open_group bdc_insert and bdc_close_group after the end of every 100 records.
loop at itab.
v_count = v_count + 1.
if v_count = 100.
call function 'BDC_OPEN_GROUP'
endif.
.
.
PERFORM BDC_DYNPRO.....
PERFORM BDC_FIELD...
CALL FUNCTION 'BDC_INSERT'...
IF V_COUNT = 100.
CALL FUNCTION BDC_CLOSE_GROUP..
V_COUNT = 0.
ENDIF.
endloop.
‎2006 Nov 29 8:19 AM
Hi Venkat
Please check you can work as below:
data: counter type i.
perform bdc_open_group.
loop at <itab> into <wa>.
.....
perform bdc_insert.
if counter = 100.
perform bdc_close_group.
counter = 0.
perform bdc_open_group.
endif.
counter = counter + 1.
at last.
perform bdc_close_group.
endat.
endloop.Hope this gives you some idea.
Kind Regards
Eswar
‎2006 Nov 29 8:57 AM
Hi venkat,
Do logic like this :This logic is not only for 500 records, even for million records)
1.
DATA : MYCTR TYPE I.
DATA : NEWFLAG TYPE C.
LOOP AT ITAB (containing million records)
MYCTR = MYCTR + 1.
CLEAR NEWFLAG.
IF MYCTR > 100.
MYCTR = 0.
NEWFLAG = 'X'.
ENDIF.
IF NEWFLAG = 'X'.
CALL FUNCTION BDC_OPEN_GROUP.
ENDIF.
*------
CALL FUNCTION BDC_INSERT
IF NEWFLAG = 'X'.
CALL FUNCTION BDC_CLOSE_GROUP.
ENDIF.
ENDLOOP.
2. The counter and flag will take
care of multipe sessions,
in batches of 100 records.
3. U may have to refine the logic somewhat.
Regards,
Kumar
Message was edited by:
kumar kk