05-19-2010 6:57 AM
Now we meet the reqeust to split the order item by quantity in order to assign wbs number to each material
For example the sales order contains one item with 10 Qty and we need to split to 10 items and each item with 1Qty
Order:
Line 0001 Material 10Qty
Change to:
Line 0001 Material 1Qty WBS-001
Line 0002 Material 1Qty WBS-002
Line 0003 Material 1Qty WBS-003
......
Line 0010 Material 1Qty WBS-010
We used bapi BAPI_SALESORDER_CHANGE to do above process but the run time seems very slowly (time out)
I tried to delete the schedule_lines and schedule_linessx from import for test.
it runs fast but the result is there is no quantity in each line item.
without schedule_line import, the order will be:
Line 0001 Material 0Qty WBS-001
Line 0002 Material 0Qty WBS-002
Line 0003 Material 0Qty WBS-003
......
Line 0010 Material 0Qty WBS-010
Does any one tried BAPI BAPI_SALESORDER_CHANGE and met the same problem (slowly)?
And any suggestion?
Thank you very much!
05-19-2010 8:11 AM
Hi,
I think two step processing may help you to improve the performance. Delete the line item first (ORDER_ITEM_INX-UPDATEFLAG = 'D') and then insert the line items (ORDER_ITEM_INX-UPDATEFLAG = 'I').
Regards
Vinod
05-19-2010 9:19 AM
05-19-2010 8:34 AM
Hi,
BAPI_SALESORDER_CHANGE should not raise time out,
unless you process huge amount of data.
Maybe some data are locked or some user-exit causes infinite loop or incorrect select on large table.
Try to perform runtime analysis with small amount of data,
and during execution check SM12 for locks and SM50 for sequential reads.
Regards,
--
Przemysław
05-19-2010 9:21 AM
Hi Przemysław
I tried with 20 Qty and it runs nearly 10 minutes.
with 3 Qty and it runs nearly 2 minutes.
I don't think the amout is large.
anyway i will try your suggestion.
Many thanks,
05-19-2010 9:25 AM
Hi,
the amount is definatelly not large
You can easily modify order with tens of items and with bigger quantity,
so some select or read statements are wrong.
Try to check execution of this 3 Qty test.
Regards,
--
Przemysław
05-19-2010 10:13 AM
But actuall the cost is occurred in BAPI.
i flag break point at the begin and end of this BAPI. it runs long time.
since it is a standrad function, i have no idea....
05-19-2010 10:16 AM
Hi,
probably some user-exits
Go to SE38->Execute->Runtime Analysis or SE93->Test->Runtime Analysis
you will get answer, what takes so much time.
Regards,
--
Przemysław
05-19-2010 10:32 AM
Hi
It shows Perform KONDITIONEN_LESEN and Open Cursor A057 cost a lot of time.
do you have any idea?
05-19-2010 10:34 AM
Hi,
no idea without debugging and checking the code - maybe missing db indices.
Go to the form and check it.
Regards,
--
Przemysław
05-25-2010 11:33 AM
Hi,
Trace your program using st05 check where conditionof table a057 in trace SQL list and create secondary index on table according to where condition found in your SQL trace for table a057
Rgds
Ravi Lanjewar
06-03-2010 2:46 PM
06-07-2010 11:20 AM
Hi,
I think this is not solution of problem, It solution of bapi not updating database.
Rgds
Ravi Lanjewar
Edited by: Ravishankar Lanjewar on Jun 8, 2010 5:36 PM
06-09-2010 2:36 PM
Rather than asking the forum about the performance of a standard SAP BAPI, you should be looking for notes or contacting OSS. There are a number of performance related notes for this.
Rob
07-28-2010 5:41 AM
Hi,
You should used the SET UPDATE TASK LOCAL before calling the BAPI.
It will seem to be improve the performance.
Rgds
Ravi