‎2008 Feb 19 9:45 AM
Hi
Any existing data in other weeks gets deleted. Why?
Week 1 to 5 exists.
I want to change week 2 and 5 but week 1 , 3 and 4 are overwritten/deleted.
TYPES : BEGIN OF tp_data,
matnr LIKE bapisitemr-material,
plant Like BAPISITEMR-plant,
week LIKE scal-week,
qty(30),
END OF tp_data
DATA : t_table TYPE STANDARD TABLE OF tp_data WITH HEADER LINE.
LOOP AT t_table.
REFRESH i_requirements_schedule_in.
perform populate_requirements_schedule.
CALL FUNCTION 'BAPI_REQUIREMENTS_CHANGE'
EXPORTING
material = t_table-material
plant = t_table-plant
requirementstype = 'VSF'
version = 'AB'
reqmtsplannumber = ' '
vers_activ = 'X'
* REQUIREMENT_PARAM =
* MRP_AREA =
* IMPORTING
* REQUIREMENT_ITEM_OUT =
TABLES
requirements_schedule_in = i_requirements_schedule_in
* REQUIREMENTS_CHAR_IN =
return = return.
ENDLOOP.
FORM populate_requirements_schedule.
i_requirements_schedule_in-date_type = '2'. " W C_day.
call function 'WEEK_GET_FIRST_DAY'
exporting
week = t_table-week
importing
date = iweek
exceptions
week_invalid = 1
others = 2.
i_requirements_schedule_in-req_date = iweek
i_requirements_schedule_in-req_qty = t_table-qty .
append i_requirements_schedule_in.
ENDFORM. "populate_requirements_schedule
‎2008 Feb 19 9:59 AM
Hi Giovanni,
BAPI_REQUIREMENTS_CHANGE is used for changing the Planned Independent Requirements (PIR). However it does this by deleting the old data first
corresponding to the Mateiral and Plant. This the reason why data for week 1 , 3, 4 and overwritten / deleted. However this bapi cannot be used to delete an independent
requirement only.
Thanks
Vijay
PLZ reward points if helpful
‎2008 Feb 19 9:59 AM
Hi Giovanni,
BAPI_REQUIREMENTS_CHANGE is used for changing the Planned Independent Requirements (PIR). However it does this by deleting the old data first
corresponding to the Mateiral and Plant. This the reason why data for week 1 , 3, 4 and overwritten / deleted. However this bapi cannot be used to delete an independent
requirement only.
Thanks
Vijay
PLZ reward points if helpful
‎2008 Jul 25 2:01 PM
hi,
i'm also facing the same problem as to how to delete the requirements.
could you please tell as to how you got it resolved?
i need to delete the requiremnets for a specific period.
thanks,