06-29-2012 10:26 AM
hi,
I am using the function "BAPI_MATERIAL_SAVEDATA" to create a material.. i have declared below tables..
TABLES:BAPIMATHEAD,
BAPI_MAKT,
BAPI_MARA,
BAPI_MARAX,
BAPI_MARC,
BAPI_MARCX,
BAPI_MBEW,
BAPI_MBEWX,
BAPI_MARM,
BAPI_MARMX,
BAPI_MEAN,
BAPIPAREX,
BAPIPAREXX,
BAPIRET2.
now I have additional requirement to pass the values for below fields..
ERNAM | Creator |
AENAM | Change Id |
KZKFG | Config Mat |
TDOBJECT | Long Text Object |
TDNAME | Text Name |
SPRAS_ISO | Language Key |
TDLINE | Long Description (in English) |
CLASSTYPE | Class Number |
i am not getting the above fields in the bapi structures of BAPI_MATERIAL_SAVEDATA.. so how can I pass these field values to BAPI while creating the material ??
Regards,
06-29-2012 11:10 AM
Hello,
For configuration if any use MATERIAL_SAVE_CONFIGURATION. ( see note 736873 )
For classification use BAPI_OBJCL_CHANGE.
For all the others, BAPI_MATERIAL_SAVEDATA.
Regards.
06-29-2012 10:54 AM
Hi, It looks like you are trying to update the material long texts. If yes, you can go for the tables parameter 'MATERIALLONGTEXT' of BAPI_MATERIAL_SAVEDATA.
06-29-2012 11:05 AM
Hi santosh ,
Follow this thread http://scn.sap.com/thread/172752........
06-29-2012 11:10 AM
Hello,
For configuration if any use MATERIAL_SAVE_CONFIGURATION. ( see note 736873 )
For classification use BAPI_OBJCL_CHANGE.
For all the others, BAPI_MATERIAL_SAVEDATA.
Regards.
06-29-2012 11:33 AM
I have successfully passed fields TDOBJECT & TDLINE through table MATERIALLONGTEXT to bapi "BAPI_MATERIAL_SAVEDATA".
But still not able to find out how to pass below fileds bapi "BAPI_MATERIAL_SAVEDATA".
1)
ERNAM | Creator |
AENAM | Change Id |
2)
KZKFG | Config Mat |
3)
TDNAME | Text Name |
SPRAS_ISO | Language Key |
4)
CLASSTYPE | Class Number |
pls help.
06-29-2012 11:40 AM
ERNAM Is being filled with the user who executes the program. ( You cannot chage it )
AENAM will be filled when a user or a program changes the material. ( you cannot change it )
For KZKFG use MATERIAL_SAVE_CONFIGURATION. ( see note 736873 ).
For CLASSTYPE see BAPI_OBJCL_*
TDNAME will be updated automatically. Is the long text name and it will contain the material number and SPRAS_ISO I think you can fill it in LONGTEXTS Table.
Regards.
Message was edited by: Laurent Fournier
06-29-2012 11:52 AM
Hi,
i m still confuse about the KZKFG & CLASSTYPE..
i dont have function "MATERIAL_SAVE_CONFIGURATION" in my system and not having access to note..
further i am not getting the point "For CLASSTYPE see BAPI_OBJCL_*"...
06-29-2012 11:58 AM
If you don't have FM "MATERIAL_SAVE_CONFIGURATION", you will need access to the note in order to create it in your system. With this FM you can update field KZKFG AFTER you create the material. ( First BAPI_MATERIAL_SAVEDATA And Then "MATERIAL_SAVE_CONFIGURATION".
As for the class you will need BAPI_OBJCL_CREATE again after BAPI_MATERIAL_SAVEDATA.
Regards.
06-29-2012 2:42 PM
i have applied the note and created FM "MATERIAL_SAVE_CONFIGURATION", but field KZKFG is not found in any import / export or table parameters...
in import it has below fileds :
MATERIAL
CONF_MATL
PLANT
CONF_MATL_PLANT
and in table it has below fields...
E1CUCFG
E1CUINS
E1CUVAL
E1CUCOM
E1CUCFG_W
E1CUINS_W
E1CUVAL_W
E1CUCOM_W
E1CUCFG_V
E1CUINS_V
E1CUVAL_V
E1CUCOM_V
RETURNMESSAGES
i m not getting how to update field KZKFG thru this function ???
06-29-2012 2:47 PM
The indicator will be set automatically when you configure the material.
06-29-2012 2:48 PM
If you execute the function with MATERIAL = The material you have created and CONF_MATL the Basic Material in a specific plant probably without any other values entered, the link will be created and the indicator will be set.
07-02-2012 9:37 AM
i am not able to check this.. since i m getting below error..
Field MATNR has been transferred inconsistently or is blank
i have tried most of the suggessions given on sdn through blogs.. but not able to resolve this error..
i am basically passing data through IDOCS.. and when in testing the idoc through we19 and filling all the fields.. i m getting this error.. and material is not getting created..
Regards,
07-03-2012 7:27 AM
Hi Again,
About the material error, check whether or not you are passing a material number that it's compatible with the external number range. I suppose that the material you are trying to create uses external number range so you must specify also the material number to be created.
Regards.