Skip to Content
0
Former Member
Oct 11, 2011 at 08:08 AM

Performance in CRM_BOL_CORE

40 Views

hi experts,

I have written a report in which I looped at a table with personal numbers and for every pernr I create a Service ticket.

loop at lt_options.

create_bol_inststanz( exporting iv_betr = lv_tab-ls_betr

iv_partner = lv_tab-partner ).

  • RECEIVING rr_core = gr_core ).

if gv_error is not initial.

return.

endif.

lr_entity = get_root_entity( ).

if gv_error is not initial.

return.

endif.

partner_create( ir_entity = lr_entity

is_partner = iv_struc )."lv_tab

item_create( ir_entity = lr_entity

iv_partner = iv_struc-objid ).

set_status( ir_entity = lr_entity

ir_status = me->gv_status"lv_tab-s_status

iv_partner = iv_struc-objid ).

set_thema( ir_entity = lr_entity

ir_thema = me->gv_prod"is_code"lv_tab-s_prod

iv_partner = iv_struc-objid ).

set_reason( ir_entity = lr_entity

ir_reason = me->gv_reason"lv_tab-s_grund

iv_partner = iv_struc-objid ).

set_text( ir_entity = lr_entity

ir_text = me->gv_description"lv_tab-s_besch

iv_partner = iv_struc-objid ).

set_notiz( ir_entity = lr_entity

iv_partner = iv_struc-objid ).

set_prio_cat( ir_entity = lr_entity

ir_prio = me->gv_prio"lv_tab-s_prio

ir_channel = me->gv_channel"lv_tab-s_kanal

iv_partner = iv_struc-objid ).

if p_refnum is not initial.

connect_ticket( ir_transaction = gr_transaction

ir_guid = gr_guid

ir_entity = lr_entity ).

endif.

try.

  • me->remove_entity( ).

gr_core->modify( ).

gr_transaction->save( ).

gr_transaction->commit( ).

catch cx_root.

gr_transaction->rollback( ).

endtry.

endloop.

But for every new ticket it takes double or more time. Can somebody tell me what can I do. Is there any Buffer that I have to delete or how can I reset the bol_core for every new ticket.

Best rgeards,

rana