2008 Apr 07 6:37 AM
Hi,
We have a customised report which sends outbound idocs. Since the last 2 weeks we have started having performance issues, wherein the report takes 11 hours to run for around 40,000 to 50,000 idocs. Earlier also we had similar volumes but the batch would execute in 4-5 hours.
The basis team has suggested the followin steps.
According to SAP, the calls for the QRFC serialisation should be coded as below.
To implement the qRFC with send queue, proceed as follows:
1. Assign queue names for the subsequent function call(s).
2. To pass the queue name, call function module TRFC_SET_QUEUE_NAME immediately
before each function call.
3. Call the function module using CALL FUNCTION IN BACKGROUND TASK.
The code in the report is as follows.
loop at i_voucher.
some logic
....................
CALL FUNCTION 'TRFC_SET_QUEUE_NAME'
EXPORTING
qname = c_qrfc
EXCEPTIONS
invalid_queue_name = 1
OTHERS = 2.
End TPR# 4284
End TPR# 4712
LOOP AT l_i_model INTO l_wa_model.
l_wa_edidc-rcvprn = l_wa_model-rcvsystem.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = l_wa_edidc
TABLES
communication_idoc_control = l_i_edidc
master_idoc_data = l_i_edidd
EXCEPTIONS
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 4
OTHERS = 5.
Endloop
Endloop.
My questions are:
1) What does the FM 'TRFC_SET_QUEUE_NAME' do?
2) Why should the function be called in background?
3) Why should it be called immediately before the function module MASTER_IDOC_DISTRIBUTE?
Thanks in advance.
Mick
Hi,
We have a customised report which sends outbound idocs. Since the last 2 weeks we have started having performance issues, wherein the report takes 11 hours to run for around 40,000 to 50,000 idocs. Earlier also we had similar volumes but the batch would execute in 4-5 hours.
The basis team has suggested the followin steps.
According to SAP, the calls for the QRFC serialisation should be coded as below.
To implement the qRFC with send queue, proceed as follows:
1. Assign queue names for the subsequent function call(s).
2. To pass the queue name, call function module TRFC_SET_QUEUE_NAME immediately
before each function call.
3. Call the function module using CALL FUNCTION IN BACKGROUND TASK.
The code in the report is as follows.
loop at i_voucher.
some logic
....................
CALL FUNCTION 'TRFC_SET_QUEUE_NAME'
EXPORTING
qname = c_qrfc
EXCEPTIONS
invalid_queue_name = 1
OTHERS = 2.
End TPR# 4284
End TPR# 4712
LOOP AT l_i_model INTO l_wa_model.
l_wa_edidc-rcvprn = l_wa_model-rcvsystem.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = l_wa_edidc
TABLES
communication_idoc_control = l_i_edidc
master_idoc_data = l_i_edidd
EXCEPTIONS
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 4
OTHERS = 5.
Endloop
Endloop.
My questions are:
1) What does the FM 'TRFC_SET_QUEUE_NAME' do?
2) Why should the function be called in background?
3) Why should it be called immediately before the function module MASTER_IDOC_DISTRIBUTE?
Thanks in advance.
Mick
2008 Apr 07 8:36 AM
Hi,
ABAP gurus need your inputs on this one as this is urgent.
Thanks and Regards,
Jayesh
2011 Jul 22 10:29 AM
Hello Mick,
I am 3 years late, but maybe someone else needs some information on the same topic.
FM TRFC_SET_QUEUE_NAME sets the queue name for the following FM wich have to be set IN BACKGROUND TASK because it have to run in an separated process. The FM called IN BACKGROUND TASK after TRFC_SET_QUEUE_NAME is handled by the Outgoing Queue (SMQ1).
Regards Ewald
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |