2007 May 30 8:40 PM
Dear all.
I am using BAPI_MATERIAL_SAVEDATA to create MARD records (plant and storage location details) for materials already existing in the system on MARA and MARC levels.
My problem is that the record is created without the MRP-indicator, which is set to value '1' before the call to BAPI_MATERIAL_SAVEDATA. See code below.
Would anyone know why the record is created without the MRP-incidator?
I have debugged the BAPI down to the call to MATERIAL_MAINTAIN_DARK and I can see the the value is passed to MATERIAL_MAINTAIN_DARK.
LOOP AT lt_create INTO w_crea.
w_head-material = w_crea-matnr.
w_head-matl_type = w_crea-mtart.
w_head-ind_sector = w_crea-mbrsh.
w_head-storage_view = 'X'.
w_storagelocationdata-plant = w_crea-werks.
w_storagelocationdata-stge_loc = w_crea-lgort.
w_storagelocationdatax-stge_loc = w_crea-lgort.
w_storagelocationdatax-plant = w_crea-werks.
w_storagelocationdata-mrp_ind = '1'. """"""""""""
w_storagelocationdatax-mrp_ind = 'X'.
CLEAR w_return.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = w_head
storagelocationdata = w_storagelocationdata
storagelocationdatax = w_storagelocationdatax
IMPORTING
return = w_return
EXCEPTIONS
communication_failure = 1
system_failure = 2
resource_failure = 3.
ENDLOOP.
Thanks in advance.
Lande
2007 May 31 6:11 AM
Hi,
Try by seting the MRP_VIEW in the header
i,e
<b>w_head-mrp_view = 'X'.</b>
-
Patil
Hi,
Try by seting the MRP_VIEW in the header
i,e
<b>w_head-mrp_view = 'X'.</b>
-
Patil
2007 May 30 9:19 PM
2007 May 31 6:07 AM
The return says that it went OK. No errors. "Material changed..." or something like that.
Lande
2007 May 31 6:11 AM
Hi,
Try by seting the MRP_VIEW in the header
i,e
<b>w_head-mrp_view = 'X'.</b>
-
Patil
2007 May 31 8:04 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |