SAP-ABAP-BAPI debugging shp_delivery_create_from_sto bug

Source: Internet
Author: User

DebugProgramIt takes nearly three minutes to find the cause. The problem lies in the SAP standard function shp_delivery_create_from_sto.

Use simple data to test the function separately.

Purchase order Line item Quantity Unit
4600021861 360 900 M
4600021861 370 900 M
4600021861 380 600 M

Now, we need to create a dump delivery order (the delivery order for inter-company transactions) for the above data. The test data is as follows:

1. When I create a full number of rows, there is no problem and I can create them.

Input

Output (normal, number of rows, number of correct delivery order 41037971)

2. When there are only a part of the Creation quantity, it's strange...

Input (the number of items in the first row is not all, only 360 is returned. Normally, the result is the same as the preceding one, but the number of items in the second row is 899)

Output (the number of rows is gone, and the number of rows is changed to two)

Let's see more.

Input

Output (two 380 rows, the other two rows are gone)

Input

Output

Input (this is normal when only the last one is an incomplete number)

Output

This is really a problem (debugging this ghost thing, I sat down for more than seven hours), there is no way to change this function, you can only start from the called place.

Before calling the API, I proposed all the incomplete quantities separately as a single item to create a delivery order. This problem is bypassed.

It was already early in the morning, and the angry old lady did not dare to wake him up. She hid herself in a small room and sat down for a sleep.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.