I am creating a Web Dynpro application which deals with creating outbound deliveries for existing sales orders.
In this application, I use FM BAPI_DELIVERYPROCESSING_EXEC to create the deliveries.
For one such sales order, I managed to create outbound deliveries for 2 items that it contained.
However, the status for both these items is different : One has status as "Completely Processed" and the other one has status as "Partially Processed".
The status fields that I took were VBUP-LFSTA.
How did this happen? In other words, what makes the status of an item as "Completely Processed"?
P.S. If status of an item also depends on billing + shipping, how did the first item get "completely processed" as I am working on a test system and I did not create the billing + shipping.
It is managed by the item category. In VOV7 for your Partially processed item category, check the value for the field "Completion rule"
As per the completion rule, the status of the line item is updated. If you have selected an incorrect completion status, you can change it now. You can make the completion rule same as the lC of the correct line item and then test one case to confirm this.
you should use field GBSTA (Overall status). LFSTA is the "Delivery status". The fact that an item is completely processed or not depends on the subsequnt functions defined for each particular item category: for instance, you could have a text item which is not relevant for delivery nor for invoicing; or other item categories which can be relevant only for invoicing and not for shipping. On top of that, if you set the "Reason for rejection" at item level, the overall status will be set to "Completed".
Hope to be useful.
Thanks for replying.
So you mean to say that status of an item does not depend on billing + shipping?
Even if i use GBSTA, the status is "partially processed".
And as for changing the completion rule, I am afraid thats not possible because i dont know if I have the authorizations for that.
Also, I created another sales order with the same items. This time however, after successful execution of FM, status of both the items is "partially processed".
Its weird that only for that one item in that sales order status is "completely processed".
May be the item itself is only partially processed. Check if the item is completely delivered or only partly delivered. Also completely invoiced or partly invoiced (when we say completely, it means that all the quantities for the line item in the sales order are delivered and invoiced
The status will be partially processed for the sales order till you are not through with delivering and invoicing the whole order quantity. If lets say order is of 10 and you have only delivered 5, the status will be partially processed for this sales order even if you have done invoicing for the 5. To make the status as complete, you need to reject the other 5 open quantities in the sales order. So you can change the sales order line item quantity from 10 to two lines of 5. For one line delivery would have been created. For the other line, you can put a reason for rejection and then the status for the sales order will be completed.
Thanks for replying.
I'll give more details this time.
I have a table displaying VBAP elements based on the entered sales order number. This table will display the items and their details.
I have another table displaying the schedule lines for the item selected in the first table.
In this particular sales order (the one which has one item as completely processes ), there were two schedule lines :
First schedule line had order quantity as 20, confirmed qty as 0.
Second schedule line as order qty 0 and confirmed qty 20.
Dont know how the schedule line is decided.
In spite of conflicting order qty and confirmed qty I decided to go ahead, and using BAPI_DELIVERYPROCESSING_EXEC, I created outbound deliveries for both schedule lines(with qty as 0 and 20). After this I used BAPI_TRANSACTION_COMMIT, and WS_DELIVERY_UPDATE FMs.
That is when I realised that the status field for that item in field VBUP-LFSTA has become "completely processed".
For another item in same SO with similar schedule line, I did the same process. However, for that particular item, status comes as "partially processed".
As per your suggestions, I created another sales order haivng the same item which was "completely processed" earlier.
This time however, after creating outbound delivery, status is "partially processed".
My application deals with only outbound delivery creation.
I wanted to know if I did something different for that "completely processed" item or the system itself simulated the billing and the invoice and hence its status is "completely processed".
I also wanted to know if a status of "partially processed" means that outbound delivery creation is successful, or if I need to check the FM for unsuccessful outbound delivery.
If it does mean successfull creation, What should be the status of a partial delivery, one where I have made delivery for lesser number of items than requested.
To explain the whole thing to you.
1. VBAP table has the item details of the sales order. In your case I think there are two lines for the two items of your sales order.
2. The schedule lines for each item is determined based on an available to promise check. In your case there were two lines for the processed line item because the system could not promise any quantity to be delivered on the initial requested delivery date. The system then found out availability on a future date and confirmed the item. That is why there are two scheduled lines for each item.
3. As per my understanding, from one sales order you have created two deliveries. One of these deliveries is showing as Completely processed because it has also been invoiced. The other delivery is still in being Processed status because it is not invoiced. Also the sales order would be in the being processed status.
4. Also for this second item, the delivery status has become as partially processed.
5. Where you have made a partial delivery the VBUP-LFSTA would be updated with status as B (partially processed). This is because this is the delivery status of the order.