cancel
Showing results for 
Search instead for 
Did you mean: 

how to change the default delivery day when i create a shopping cart?

Former Member
0 Kudos

hi,dear

i got some trouble when i was creating a shopping cart.

i want to change the default delivery day when i reference an old template.

pls see the pictures and take the details.

it seems that this forum dont support the [img][/img],so pls clike the link to open the picture.

if you cant see the picture ,pls tell me,thank you

step1:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111119338649_0.jpg

step2:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111119432170_0.jpg

step3:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111119557507_0.jpg

step4:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111120079773_0.jpg

Edited by: ming yu on Sep 11, 2009 5:22 AM

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello Ming,

Have a look at following thread concerning BAdI BBP_CHANGE_DEFAULT:

[Change the delivery date (Required on) of SC|;

You will have to check in which SC transaction you are in order to distinguish creation from reference to old template.

Regards.

Laurent.

Former Member
0 Kudos

there are two ways to create a shopping cart.

one of them is to use 'Describe Requirement',the other is to use 'old purchase orders and templates'.

both these two ways have a delivery data,but the way set the defalut delivery data is different.

i have tried that in change BADI~bbp_sc_change ,i can change the default delivery data by using 'old purchase orders and templates'.

but how can i change the default delivery data by using 'Describe Requirement'?

Former Member
0 Kudos

Hi,

For setting delivery date to a default deliv date by using 'Describe Requirement', implement Badi BBP_CHANGE_DEFAULT and then set DELIV_DATE filed to default value (Whatever default you want).

I hope this will work.

Best regards,

Vivek

Former Member
0 Kudos

thank you.

I find BADI BBP_CHANGE_DEFAULT in SE18.

it has a method tu set the default delivery data.

but there is not any codes in the method.

so how can i use it?

Edited by: ming yu on Sep 15, 2009 8:00 AM

Former Member
0 Kudos

Hi,

You have to implement that BAdi in order to write the code inside. Once you will implement it you will get the default date as you have written in the code.

for the steps to implement the Badi pls go thru:

http://www.sapdev.co.uk/enhance/enhance_badi.htm

Thanks !

Vivek

Former Member
0 Kudos

i succeed to change the default delivery date in the SRM, used the BADI you said.

but i still have a question.Is it only for Shopping cart?if i changed the default delivery date,does it influence other places which also use delivery data?

this is my code:

method IF_EX_BBP_CHANGE_DEFAULT~CHANGE_DEFAULT_DELIV_DATE.

DELIV_DATE = '20090101'.

endmethod.

Edited by: ming yu on Sep 15, 2009 9:57 AM

Former Member
0 Kudos

Hi Ming,

The field name "DELIV_DATE" belongs to shopping cart internal table.

So as per your code, you have set DELIV_DATE = '20090101'. due to this only the delivery date of the shopping cart will be defaulted to 20090101. But if you will not change the delivery date of shopping cart manually, then it will go as it is in backend documents also (e.g. PO or PR) and it may cause problem as it is hardcoded as 20090101; which is in the past.

Thanks!

Vivek

Former Member
0 Kudos

Hi,

As vivek had said, hardcoding the date like '01012009' will cause lots of problems. Instead you can put a sy-datum or have a lead time as minimum two days and calculate the next date using some function module and populate the same in your field DELIV_DATE

Thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

thanks