2024 Oct 11 12:05 PM - edited 2024 Oct 11 1:45 PM
Hello, there.
I'm using the BAPI_MATERIAL_SAVEDATA to change some materials. (Just want to change a unique field MARC-MFRGR).
The problem is the BAPI returns an error:
"The field MARC-MTVFP/BAPI_MARC-AVAILCHECK is defined as a required field; it does not contain an entry"
Strange things:
- The material is modified correctly despite the error.
- The material doesn't have created the view where this field (MARC-MTVFP) is located.
If I go to MM02 and change the material it's ok, no error is showed. If I create the view where the field is located then I see the error in MM02.
Why the bapi is returning an error message asking for a required field in a view that doesnt exist in the material?
The code I'm using is prety simple:
ls_headdata-material = p_ls_datos-matnr. ls_plantdata-plant = p_ls_datos-werks. ls_plantdata-matfrgtgrp = p_ls_datos-mfrgr. ls_plantdatax-plant = p_ls_datos-werks. ls_plantdatax-matfrgtgrp = abap_true. CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA' EXPORTING headdata = ls_headdata plantdata = ls_plantdata plantdatax = ls_plantdatax IMPORTING return = ls_return TABLES returnmessages = lt_returnmessages. |
Thanks in advance.
PS: We are using SAP ECC 6.0
Request clarification before answering.
| User | Count |
|---|---|
| 30 | |
| 17 | |
| 16 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.