2023 Mar 10 9:43 AM
Hi, I was trying to figure out. How is the the segment E1EDK03 transferred to VBAK? or how it is populated?
E1EDK03 value is March 23, 2023 but in the sales document it shows March 13, 2023 instead.
2023 Mar 10 10:25 AM
Hello walkerist
The dates of the E1EDK03 are interpreted by the ZUORDNEN_ORDERS_E1EDK03 form routine in the LVEDAF5W include. Put a break-point there and analyze.
I can't tell you more unless you provide details e.g. segment qualifier value E1EDK03-IDDAT and which VBAK date you are concerned with.
EDIT 20230315
As per your comment, the date qualifier is 002, which means "requested delivery date". The ZUORDNEN_ORDERS_E1EDK03 gets the date from E1EDK03 segment and stores it in the WLDAT global field:
*- Wunschlieferdatum --------------------------------------------------*
*- requested delivery date --------------------------------------------*
IF E1EDK03-IDDAT = '002'.
PERFORM IDOC_MOVE USING E1EDK03-DATUM WLDAT D_FLAG_K-UER2.
ENDIF.
The IDoc creates a sales order with batch-input call to the VA01 transaction - the IDOC_INPUT_ORDERS function:
CASE xaprau.
WHEN ' '.
PERFORM call_va01_new_orders USING ok.
WHEN 'Q'.
* Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Angebot
* call transaction Order Entry VA01 with refer to quote number.
PERFORM call_va01_new_orders_angbt USING ok.
WHEN 'C'.
* Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Kontrakt
* call transaction Order Entry VA01 with refer to contract number
PERFORM call_va01_new_orders_contk USING ok.
WHEN 'L'.
* Aufruf Transaktion Auftragerfassung für Auftragsarten mit Vertiebs-
* belegtypen D,G,K,L
* call transaction Order Entry VA01 for order types with
* SD document category D,G,K,L
PERFORM call_va01_new_orders_cremo USING ok.
WHEN 'R'.
.......
So it is quite easy to see how VA01 is populated with the data. The date from WLDAT is put into the RV45A-KETDAT field, which is visible in the main screen of VA01:
However, the date can be modified with a custom logic implemented with the EXIT_SAPLVEDA_009 user exit.
EDIT 20230317
You need to understand the difference between requested delivery date, which is 28.02.2023 in your case and confirmed delivery date, which is 01.03.2023. Requested delivery date is what the customer expects and it's the date communicated in the IDoc. You can see that it is correctly transferred to the first schedule line. However you are not able to deliver on that date according to ATP logic. Sales order processing executes ATP check and order scheduling. Based on that it confirms delivery date. That is your second schedule line with delivery date of 01.03.2023. Notice that only the second schedule line has a confirmed quantity of 1 EA. The first doesn't as it is not confirmed, but requested only.
See those SAP wiki pages on ATP and order scheduling:
https://wiki.scn.sap.com/wiki/display/SD/How+to+check+the+ATP+situation
https://wiki.scn.sap.com/wiki/display/SD/Logic+of+the+ATP+Check+in+the+ERP+System
https://wiki.scn.sap.com/wiki/display/SCM/Shipping+and+transport+scheduling
Best regards
Dominik Tylczynski
2023 Mar 10 10:25 AM
Hello walkerist
The dates of the E1EDK03 are interpreted by the ZUORDNEN_ORDERS_E1EDK03 form routine in the LVEDAF5W include. Put a break-point there and analyze.
I can't tell you more unless you provide details e.g. segment qualifier value E1EDK03-IDDAT and which VBAK date you are concerned with.
EDIT 20230315
As per your comment, the date qualifier is 002, which means "requested delivery date". The ZUORDNEN_ORDERS_E1EDK03 gets the date from E1EDK03 segment and stores it in the WLDAT global field:
*- Wunschlieferdatum --------------------------------------------------*
*- requested delivery date --------------------------------------------*
IF E1EDK03-IDDAT = '002'.
PERFORM IDOC_MOVE USING E1EDK03-DATUM WLDAT D_FLAG_K-UER2.
ENDIF.
The IDoc creates a sales order with batch-input call to the VA01 transaction - the IDOC_INPUT_ORDERS function:
CASE xaprau.
WHEN ' '.
PERFORM call_va01_new_orders USING ok.
WHEN 'Q'.
* Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Angebot
* call transaction Order Entry VA01 with refer to quote number.
PERFORM call_va01_new_orders_angbt USING ok.
WHEN 'C'.
* Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Kontrakt
* call transaction Order Entry VA01 with refer to contract number
PERFORM call_va01_new_orders_contk USING ok.
WHEN 'L'.
* Aufruf Transaktion Auftragerfassung für Auftragsarten mit Vertiebs-
* belegtypen D,G,K,L
* call transaction Order Entry VA01 for order types with
* SD document category D,G,K,L
PERFORM call_va01_new_orders_cremo USING ok.
WHEN 'R'.
.......
So it is quite easy to see how VA01 is populated with the data. The date from WLDAT is put into the RV45A-KETDAT field, which is visible in the main screen of VA01:
However, the date can be modified with a custom logic implemented with the EXIT_SAPLVEDA_009 user exit.
EDIT 20230317
You need to understand the difference between requested delivery date, which is 28.02.2023 in your case and confirmed delivery date, which is 01.03.2023. Requested delivery date is what the customer expects and it's the date communicated in the IDoc. You can see that it is correctly transferred to the first schedule line. However you are not able to deliver on that date according to ATP logic. Sales order processing executes ATP check and order scheduling. Based on that it confirms delivery date. That is your second schedule line with delivery date of 01.03.2023. Notice that only the second schedule line has a confirmed quantity of 1 EA. The first doesn't as it is not confirmed, but requested only.
See those SAP wiki pages on ATP and order scheduling:
https://wiki.scn.sap.com/wiki/display/SD/How+to+check+the+ATP+situation
https://wiki.scn.sap.com/wiki/display/SD/Logic+of+the+ATP+Check+in+the+ERP+System
https://wiki.scn.sap.com/wiki/display/SCM/Shipping+and+transport+scheduling
Best regards
Dominik Tylczynski
2023 Mar 15 8:57 AM
3a9e4ce873a94034b33dc62b0ce600ee
Not sure about the segment qualifier but here are the details:
E1EDK03 002 Segment 00009 IDDAT 002 DATUM March 23, 2023.
2023 Mar 15 3:21 PM
2023 Mar 16 2:48 AM
3a9e4ce873a94034b33dc62b0ce600ee Thanks. This gave me a great overview.
However, What I'm after too is that the Delivery Date in the Schedule Line tab does not match the Req. Deliv. Date in the Sales Document Overview.
First line:
Delivery Date Order Quantity Rounded Qty Confirmed Qty
28.02.2023 1,000 1,000 0,000
01.03.2023 0,000 0,000 1,000
It should be 01.03.2023
EDIT: Additionally, I believe that the delivery dates under the schedule lines can be found in VBEP table. However, upon checking the VBEP table in the debugger, it only shows the first delivery date and not the second delivery date which is the 01.03.2023.
2023 Mar 17 7:56 AM
2023 Mar 20 4:06 AM
Thanks 3a9e4ce873a94034b33dc62b0ce600ee.I will look into the links you have provided.
2023 Mar 20 5:10 AM
3a9e4ce873a94034b33dc62b0ce600ee I created a test scenario again today.
E1EDK03 012 is: IDDAT 012 | DATUM 20230320
E1EDK03 002 is: IDDAT 002 | DATUM 20230330
However, the sales document that was generated was displaying a different value:
The requested delivery date shows:
March 21, 2023
Also in the schedule lines:
03/21/2023
Expected values in the two images above is March 30, 2023.
2023 Mar 20 7:32 AM
walkerist I've provided you with the form routine that interprets E1EDK03 segments. I've also explained how sales orders are created from the IDocs. Why don't you put a break-point in the routine and see how the dates flow from the IDoc to the sales order?
Date qualifier 012 does not look being interpreted in E1ED03 segments, with the ZUORDNEN_ORDERS_E1EDK03 routine. It is only interpreted in E1EDK14 by the ZUORDNEN_ORDERS_E1EDK14.
The entire ORDERS processing implementation sits in the VEDA function group.
I'm not able to answer all your detailed questions without access to your system and knowledge about your specific setup.
2023 Mar 20 9:15 AM
Thanks 3a9e4ce873a94034b33dc62b0ce600ee I have and currently debugging it. I have also confirmed that the data in IDOC were fetched. However, I am still checking on how it was being passed on vbak-vdatu or vbep-edatu as I was getting inccorect date.
Instead of getting the value of E1EDK03 002
The date being passed on vbak-vdatu or vbep-edatu is the date today + 1 day(Date today: March 20, 2023; The value of vbak-vdatu will be march 21,2023)
2023 Mar 20 12:03 PM
walkerist Eventually an IDoc will create a sales order with batch-input call to VA01:
You can put a break-point there an see how VA01 data is populated. Finally, you can put a break-point on CALL TRANSACTION 'VA01' statement:
If you change input_method to A, VA01 will be processed with display of the screens. This way you can see how each field of the sales order is populated.
2023 Mar 21 2:04 AM
Hi 3a9e4ce873a94034b33dc62b0ce600ee Thanks for the outstanding help! I have figured out that the VBAK-VDATU were being populated here in
using the date today + 1 day.
I have also figured out that I can overwrite the value of vbak-vdatu according to the value of E1EDK03 in a custom user-exit.
2023 Mar 21 7:09 AM