2015 Apr 17 7:41 AM
Hi all, I want to use 'BAPI_MATERIAL_SAVEDATA' to change only SALESDATA view MM02.(not create a new material)
I want to change SAL_STATUS and VALID_FROM fields. I don't want to restrict with sales organization or distr_chan.
(changing SAL_STATUS and VALID_FROM based only material number).
i pass these fields to exporting.
Which fields are necessary to implement this case?
I want to change only SALESDATA (SAL_STATUS and VALID_FROM).
HEADDATA-MATERIAL = itab-matnr.
HEADDATA-SALES_VIEW = 'X'.
SALESDATA-SAL_STATUS = 'Z1'.
SALESDATAX-SAL_STATUS = 'X'.
SALESDATA-VALID_FROM = p_mstdv.
SALESDATAX-VALID_FROM = 'X'.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = HEADDATA
SALESDATA = SALESDATA
SALESDATAX = SALESDATAX
IMPORTING
RETURN = RETURN
TABLES
RETURNMESSAGES = RETURNMESSAGES.
2015 Apr 17 1:12 PM
Hi,
You have to fill SALES_ORG and DISTR_CHAN field in SALESDATA and SALESDATAX. If You have many SALES_ORG and DISTR_CHAN values, You should run this bapi as many times as number of used pairs SALES_ORG/DISTR_CHAN (taken ex. from MVKE tables for this material).
Jarek
Hi all, I want to use 'BAPI_MATERIAL_SAVEDATA' to change only SALESDATA view MM02.(not create a new material)
I want to change SAL_STATUS and VALID_FROM fields. I don't want to restrict with sales organization or distr_chan.
(changing SAL_STATUS and VALID_FROM based only material number).
i pass these fields to exporting.
Which fields are necessary to implement this case?
I want to change only SALESDATA (SAL_STATUS and VALID_FROM).
HEADDATA-MATERIAL = itab-matnr.
HEADDATA-SALES_VIEW = 'X'.
SALESDATA-SAL_STATUS = 'Z1'.
SALESDATAX-SAL_STATUS = 'X'.
SALESDATA-VALID_FROM = p_mstdv.
SALESDATAX-VALID_FROM = 'X'.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = HEADDATA
SALESDATA = SALESDATA
SALESDATAX = SALESDATAX
IMPORTING
RETURN = RETURN
TABLES
RETURNMESSAGES = RETURNMESSAGES.
2015 Apr 17 1:12 PM
Hi,
You have to fill SALES_ORG and DISTR_CHAN field in SALESDATA and SALESDATAX. If You have many SALES_ORG and DISTR_CHAN values, You should run this bapi as many times as number of used pairs SALES_ORG/DISTR_CHAN (taken ex. from MVKE tables for this material).
Jarek
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |