06-02-2011 4:53 PM
Hi All,
I have created a report in which sales order and delivery gets created automatically using bapi's. When I go to my delivery number which is created thru vl02n, I see the Planned GI date gets automatically populated thru bapi.
But, my Actual GI Date is blank. I need to auto fill the Actual GI date with my Sales Order PO date.
Is there a way that I can do this automatically with delivery bapi or do I need to use copy routines to achieve this?
Please help.
Thanks.
06-03-2011 1:39 AM
06-03-2011 1:39 AM
06-03-2011 4:28 PM
Hi Tamas,
Thanks for the response. I am using 'BAPI_OUTB_DELIVERY_CREATE_SLS'.
06-03-2011 5:20 PM
The interface of that BAPI is pretty restricted and it doesn't offer the capability to specify too many header fields.
I'd rather try to achieve your goal using a copy routine that populates the field.
Or if that's not an option, then look into function modules RV_DELIVERY_CREATE_SINGLE or RV_DELIVERY_CREATE instead of the BAPI.
06-03-2011 6:27 PM
06-03-2011 6:28 PM
Can you please be able to tell me how to achieve this using copy routines. Sample snippet is appreciable.
Thanks.
06-03-2011 6:47 PM
Why don't you look at the existing copy routines and config in your system?
06-03-2011 7:02 PM
Hi Brad,
Thanks for the response. I know the transaction for copy routines is VOFM.But I do not know at what point I need to check for my Actual GI Date.
06-03-2011 8:24 PM
Go to VOFM -> Data transfer -> Deliveries. Take a look at routine 201 (or better yet, check which copy routine is currently used in your configuration to copy fields into the delivery header).
You can either modify the currenlty used copy routine (in case it is not a standard one) or you can copy it and add your code to populate the field LIKP-WADAT.
In routine 201 as the example, there is structure XKOMDLGN with field BSTDT. This should (hopefully) be already populated with the PO date from the order. If not, then you can read the order header you're delivering and use VBAK-BSTDK as the source field. Then simply set LIKP-WADAT to whatever date you need.
Please check the online documentation for exact details about copy control. If you copied a standard routine, you will have to set the new routine in the configuration so that it's used when a delivery is created referencing an order.
06-03-2011 9:04 PM
Hi,
Check the data transfer routine in transaction VTLA for the order type to delivery type at header level.
Let me know, it helps you. Thanks.
06-10-2011 5:49 PM
I am closing this thread since my problem is solved. Points issued for the useful answers. Thank you for the response Tamas.