Skip to Content
0
Mar 05 at 09:27 AM

CAN WE USE "VB_BATCH_GET_DETAIL" FOR MULTIPLE BATCH VALUES

48 Views

Hello team,

I am using "vb_batch_get_detal" to get characteristics values in loop.

I am passing material, batch and plant to this function module to get details.

But if loop have 25000 records, I am getting dump saying Tile limit exceeded.

This function module works fine for less records.

Is there any other function module or other method where we can pass multiple Batches and materials to get characteristics.... Please suggest me.

form f_readchar using p_matnr
p_charg
p_werks
changing p_it_batch type tt_batch.

data: lt_char_of_batch type standard table of clbatch.
constants: gc_12051 type char10 value '0000012051'. "Cash date

call function 'VB_BATCH_GET_DETAIL'
exporting
matnr = p_matnr
charg = p_charg
werks = p_werks
get_classification = abap_true
tables
char_of_batch = lt_char_of_batch
exceptions
no_material = 1
no_batch = 2
no_plant = 3
material_not_found = 4
plant_not_found = 5
no_authority = 6
batch_not_exist = 7
lock_on_batch = 8
others = 9.

if lt_char_of_batch is not initial.
sort lt_char_of_batch by atinn .
read table lt_char_of_batch into data(wa_char_of_batch) with key atinn = gc_12051 binary search.
if sy-subrc = 0.
wa_batch-matnr = p_matnr.
wa_batch-charg = p_charg.
wa_batch-werks = p_werks.
wa_batch-atinn = wa_char_of_batch-atinn.
wa_batch-atwtb = wa_char_of_batch-atwtb.
append wa_batch to it_batch .
clear wa_batch.
endif.
if it_batch is not initial.
sort it_batch by matnr charg werks .
endif.
endif.

endform.