cancel
Showing results for 
Search instead for 
Did you mean: 

Performance in CRM_BOL_CORE

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for all Replies

joaquin_fornas
Active Contributor
0 Kudos

Hello

In order to restart the BOL and depending on your buffer, you can use the following:

IF sy-uname = ... THEN.

  • restart the BOL

BOL_CORE->RESET( ).

ELSE.

  • restart the BOL

BOL_CORE->RESET( IV_INCLUDE_BAL_RESET = ABAP_TRUE ).

ENDIF.

Regards

Joaquin

Former Member
0 Kudos

Hallo

Thanks for your reply. I dont understand you say depend on my buffer

I mean is this so right

IF sy-uname = sy-uname THEN.

  • restart the BOL

BOL_CORE->RESET( ).

ELSE.

  • restart the BOL

BOL_CORE->RESET( IV_INCLUDE_BAL_RESET = ABAP_TRUE ).

ENDIF.

Best rgeards,

rana

joaquin_fornas
Active Contributor
0 Kudos

Hello

I mean the following: The poor perfomance is due to a buffer getting filled with each object you are creating. When that buffer is full, the it is harder to fill the whole memory.

So, depending on the buffer size, you can either reset the BOL or not.

Regards

Joaquin

Former Member
0 Kudos

Hallo,

Thanks for your reply.

Please can you tell me which buffer is filled. Can I delete the buffer or how can I ceck the size of the Buffer.

Thanks a lot

Best rgeards,

rana

Former Member
0 Kudos

Hi,

Please can somebody help. Because it takes 83 seconds for one ticket and it is doubles for next one and so on. I have set the method reset but it dont helps. only to get the root it 20 seconds.

The code of get_root is

constants: lc_ptype type string value 'PROCESS_TYPE',

lc_template type name_komp value 'TEMPLATE_TYPE',

lc_btorder type crmt_ext_obj_name value 'BTOrder'.

data: lr_factory type ref to cl_crm_bol_entity_factory,

lt_detail type crmt_name_value_pair_tab,

ls_detail like line of lt_detail.

ls_detail-name = lc_ptype.

ls_detail-value = gc_proctype.

append ls_detail to lt_detail.

clear ls_detail.

ls_detail-name = lc_template.

append ls_detail to lt_detail.

try.

if lr_factory is not bound.

lr_factory = gr_core->get_entity_factory( iv_entity_name = lc_btorder ).

endif.

r_root = lr_factory->create( iv_params = lt_detail ).

gr_transaction = gr_core->begin_transaction( ).

catch: cx_root. "#EC CATCH_ALL

endtry.

Best rgeards,

rana

Former Member
0 Kudos

Hi,

I got the solution. The parameter CRM_EVENT_TRACE in Tcode su01 should be abap false. or deactivate it hard in Programm.

get parameter id 'CRM_EVENT_TRACE' field lv_trace_on. "for trace mode

if lv_trace_on eq abap_true.

set parameter id 'CRM_EVENT_TRACE' field abap_false. "for trace mode

endif.

Thanks a lot for your Replys

best regards

rana