2006 Aug 18 10:45 PM
Folks I am trying to use BAPI_MATERIAL_SAVEDATA for creating a material. In MARA i have append a field using a ZEMARA structure. How do i pass data to this non standard field in MARA? Please provide some sample code.
Sudhakar
2006 Aug 18 11:26 PM
Hi,
I got this information from the FM documentation
Only external number assignment is supported for the material number
(MATERIAL). If you want the material number to be assigned
internally, the method BAPI_MATERIAL_GETINTNUMBER must first be
called. This method determines an internal number for the material
to be created. You must enter this internal number in field
HEADDATA-MATERIAL.
You have call the FM BAPI_MATERIAL_GETINTNUMBER before calling the BAPI_MATERIAL_SAVEDATA FM.
Thanks,
Naren
Hi,
I got this information from the FM documentation
Only external number assignment is supported for the material number
(MATERIAL). If you want the material number to be assigned
internally, the method BAPI_MATERIAL_GETINTNUMBER must first be
called. This method determines an internal number for the material
to be created. You must enter this internal number in field
HEADDATA-MATERIAL.
You have call the FM BAPI_MATERIAL_GETINTNUMBER before calling the BAPI_MATERIAL_SAVEDATA FM.
Thanks,
Naren
2006 Aug 18 11:01 PM
Hi,
Use the EXTENSIONIN tables parameter to populate the values..
Check the EXTENSIONIN parameter documentation for more details..you will have to extend the structure BAPI_TE_MARA with the fields that you added in ZEMARA...
THanks,
Naren
2006 Aug 18 11:09 PM
Strange I just realized the this function/bapi cannot be used for creating a material. Is there a function that someone know?
Sudhakar
2006 Aug 18 11:11 PM
Hi,
You can create a material master data using this BAPI...
Check the FM documentation...
Thanks,
Naren
2006 Aug 18 11:13 PM
Caution: SAP's documentation is misleading. Open the source code and see the first few lines. You will find:
IF HEADDATA-MATERIAL = SPACE.
CLEAR TMERRDAT.
SY-MSGID = MESSAGE_ID_M3.
SY-MSGTY = MESSAGE_ERROR.
SY-MSGNO = '262'.
BAPI_ERROR = 'X'.
ENDIF.
Errors if material number is not passed for this BAPI, so this BAPI is actually for Changing a material
2006 Aug 18 11:18 PM
Hi,
For a new material or changing a material we will be entering a material number correct in MM01/MM02...
That is the reason SAP is expecting a material number....
Thanks,
Naren
2006 Aug 18 11:22 PM
Trying testing it, didnt work for me. I want to create a material as we do in MM01 with internal number range.
Sudhakar
2006 Aug 18 11:26 PM
Hi,
I got this information from the FM documentation
Only external number assignment is supported for the material number
(MATERIAL). If you want the material number to be assigned
internally, the method BAPI_MATERIAL_GETINTNUMBER must first be
called. This method determines an internal number for the material
to be created. You must enter this internal number in field
HEADDATA-MATERIAL.
You have call the FM BAPI_MATERIAL_GETINTNUMBER before calling the BAPI_MATERIAL_SAVEDATA FM.
Thanks,
Naren
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |