cancel
Showing results for 
Search instead for 
Did you mean: 

VBAP-ROUTE doesnt match the Scheduled Delivery Date

walkerist
Participant
0 Kudos

Hi, I was having an issue with my delivery date. The route is correct but the delivery date doesnt get changed. I have used SD_ROUTE_DETERMINATION to get the route.

Ex: Route is 00001 and its description is saturday delivery. the delivery date of my sales doc doesnt get changed.

EDIT 3: I'm using FM SD_SCHEDULING to determine the delivery date based on route.

EDIT 4: Here's my code: Delivery dates or v_edatu is always or doesnt match the intended delivery date.

Ex: Route 00001 - Next Day Saturday Delivery; Its delivery date will always be next day or tomorrow instead of Saturday.

Route S00001 - 1 Day Delivery; Its result is not tomorrow. Ive created a SD which has a route of S00001. Its delivery date gets redetermined to July 24 instead.

CALL FUNCTION 'SD_SCHEDULING'
EXPORTING
if_schedule_direction = '-'
if_schedule_shipping = abap_true
if_schedule_transport = abap_true
if_shipping_point = '1234'
if_transport_route = 00001
if_date_today = sy-datlo
if_time_today = sy-timlo
if_material_avail_date = sy-datlo
if_transport_dispo_date = sy-datlo
if_loading_date = sy-datlo
if_goods_issue_date = sy-datlo
if_delivery_date = sy-datlo

IMPORTING
ef_goods_issue_date = v_wadat
ef_delivery_date = v_edatu

Sandra_Rossi
Active Contributor
0 Kudos

If you are asking what is wrong in your code, then post your code and give details about what you have investigated.

You can see how much time people spent to write their detailed answers to your question. I guess you can spend the same amount of time.

walkerist
Participant
0 Kudos

sandra.rossi I've included my code. Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

yogananda
Product and Topic Expert
Product and Topic Expert

walkerist


I can see why you're having this issue. The route determination function, SD_ROUTE_DETERMINATION, only determines the route that will be used for delivery. It does not automatically change the delivery date.

To change the delivery date, you need to use the delivery scheduling function, SD_DELIVERY_SCHEDULING. This function takes the route as input and calculates the delivery date based on the transit time of the route.

In your case, the route is 00001 and its description is Saturday delivery. This means that the transit time for the route is 1 day. So, if you want the delivery date to be on Saturday, you need to set the desired delivery date to Friday.

You can use the following steps to change the delivery date:

  1. Go to the Sales Document.
  2. Click on the "Delivery" tab.
  3. Click on the "Scheduling" button.
  4. In the "Desired Delivery Date" field, enter the desired delivery date (Friday).
  5. Click on the "Schedule" button.

The delivery date will be changed to Friday.

Here are some additional things to keep in mind:

  • The delivery scheduling function only changes the delivery date for the entire sales document. You cannot change the delivery date for individual items in the sales document.
  • The delivery scheduling function does not take into account any lead times. So, if there are any lead times for the materials in the sales document, the delivery date will be after the lead time.
walkerist
Participant
0 Kudos

Hi, I've already modified my question. I'm using the FM SD_SCHEDULING but still not getting the desired delivery date.

Currently, I'm getting delivery dates July 18 and July 19. When the expected dates were July 18 and 22.

Edit: The Transit Time in Days of my delivery route in TVRO has a value of 0.00. While the Transit Time is 240000