2007 Jun 05 6:15 AM
hI all,
i need logic for the following
Basically, 15.06.2007 is the Required delivery date for the plant. This means that the stock should be there in the plant by 15.06.2007.
We need to change the formula for the delivery date.
Formula: Delivery date = (15.06.2007 LEAD TIME of the material)
Say, for example the lead time for the product is 8 (this varies for different materials). Then the delivery date should be:
Delivery date = (15.06.2007 😎
= 07.06.2007
So we need to create a PO for this material on 07.06.2007
Thanks
sanjeev
2007 Jun 05 6:19 AM
hi..
Just subtract the number from the date.As date format automatically gives you the delivery date further.
eg:
data:
w_date type d,
w_required type d,
w_days type i.
w_date = sy-datum.
w_days = 10.
w_required = w_date - w_days.
write w_required.
regards,
veeresh
hI all,
i need logic for the following
Basically, 15.06.2007 is the Required delivery date for the plant. This means that the stock should be there in the plant by 15.06.2007.
We need to change the formula for the delivery date.
Formula: Delivery date = (15.06.2007 LEAD TIME of the material)
Say, for example the lead time for the product is 8 (this varies for different materials). Then the delivery date should be:
Delivery date = (15.06.2007 😎
= 07.06.2007
So we need to create a PO for this material on 07.06.2007
Thanks
sanjeev
2007 Jun 05 6:19 AM
hi..
Just subtract the number from the date.As date format automatically gives you the delivery date further.
eg:
data:
w_date type d,
w_required type d,
w_days type i.
w_date = sy-datum.
w_days = 10.
w_required = w_date - w_days.
write w_required.
regards,
veeresh
2007 Jun 05 6:19 AM
Hi,
You can do this using Minus(-) sign ....
DATE = Delivery_daete - 8.
Regards
Sudheer
2007 Jun 05 6:19 AM
Hi,
Use the FM HR_99S_DATE_ADD_SUB_DURATION. This FM subtracts days, months, years from a particular date. Use this FM to change the formula and then you can create PO for this new date.
Hope this helps.
Regards,
Richa
2007 Jun 05 6:20 AM
use this Fm
RP_CALC_DATE_IN_INTERVAL
pass i/p as date and sign as minus .
make use of this code .
pass ur lead days
data: date like sy-datum,
date1 like sy-datum.
date = sy-datum.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = date
days = 08 "take this as leadtime in days
months = 00
SIGNUM = '-'
years = 00
IMPORTING
CALC_DATE = date1. " new date
write:/ 'new date', date1.
regards,
Vijay
2007 Jun 05 6:21 AM
Hi Sanjeev,
Convert the date to yyyymmdd format and then go ahead with you calculation. Then get the date back to the format it was in.
example:
v_date = 15.06.2007
l_date type sy-datum.
concatenate v_date6(4) v_date3(2) v_date+0(2) to l_date.
l_date = l_date - Lead time of material.
Then convert it back using concatenate by adding a with '.'
Regards,
George
reward points for helpful answers
2007 Jun 05 6:22 AM
Hi
Find a Related User exit for PO where you can change this Required delivery date for the plant.
Fetch the LEAD TIME of the material from material master and
in that write the code for this formula for changing the delivery date as
Delivery date = (15.06.2007 LEAD TIME of the material)
keep a break-point and check while creating the PO whether it is triggering it or not.
Reward points if useful
Regards
Anji
2007 Jun 05 6:27 AM
Hi Anji,
can u give me the field name as well as Table name
where i can find Lead time of material
2007 Jun 05 6:23 AM
Hi,
Use the following code.
PERFORM get_delivery_date using del_date lead_time
changing final_date.
FORM get_delivery_date using
p_del_date type dats p_lead_time type i .
changing
p_final_date type dats.
p_final_date = p_del_date - lead_time.
ENDFORM.
Regards,
Sesh
2007 Jun 05 6:23 AM
Hi,
If 8 is num of days then you can directly write the statement like
Delivery date = current D t 8
Now the required date is in "Delivery date".
Sudheer.A
2007 Jun 05 6:43 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |