Hello everyone,
I have written a program that adds assortment module (LOCNR) to an existing assortment (FILIA). It works fine. However, now I need to change the date value_to (DATBI) to todays date, in order to make this assortment module (LOCNR) invalid, means out-of-date. Can I do this with the help of this BAPI? If yes, then how, because I have tried to do this on my own, but the date is not changed. Here is the piece of my code, where I try to change the date value:
wa_assortmentusers-valid_from = ls_info-datab.SELECT SINGLE datbi INTO wa_assortmentusers-valid_to FROM wrsz
WHERE asort EQ wa_assortmentusers-assortment
AND locnr EQ wa_assortmentusers-customer_site.
IF sy-subrc EQ 0.
wa_assortmentusers-valid_to = ls_info-datbi.
ELSE.
wa_assortmentusers-valid_to = ls_info-datbi.
ENDIF.
wa_assortmentusersx-valid_from = 'X'.
wa_assortmentusersx-valid_to = 'X'.
Any ideas?