on 05-12-2011 6:58 AM
Hi Team,
I have a common requirement, I need to add 6 days to the default delivery date in the Shopping Cart.I have a Implemented BADI Using BADI Defination BBP_CHANGE_DEFAULT.In method Change_Default_Deliv_Date I have to import IS_Header and IS_ITEM.
How can i import them in my code.I am also using FM -DATE_CONVERT_TO_FACTORYDATE to get factory calender date.
Please help me how to import IS_Header and IS_ITEM.
Here is my code.
Local Variable Declaration
DATA: lv_deldate TYPE eindt,
lv_date TYPE scdatum,
lv_dateret TYPE scdatum,
lv_facid TYPE wfcid.
Function name container for dynamic call
DATA :lv_funcname TYPE rs38l_fnam.
Adding days to delivery date
lv_deldate = sy-datum + '6'.
Moving Changed Delivery date to lv_date
lv_date = lv_deldate.
Function Module to check the working day
CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
EXPORTING
correct_option = '+'
date = lv_date
factory_calendar_id = lv_facid
IMPORTING
date = lv_dateret
EXCEPTIONS
calendar_buffer_not_loadable = 1
correct_option_invalid = 2
date_after_range = 3
date_before_range = 4
date_invalid = 5
factory_calendar_not_found = 6
OTHERS = 7.
IF sy-subrc <> 0.
ELSE.
CLEAR :cv_deliv_date.
cv_deliv_date = lv_dateret.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.