Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem in Material create through BAPI

Former Member
0 Likes
1,193

Hi All,

For creating MATERIAL first used BAPI_MATERIAL_GETINTNUMBER for material no generation and for creation material master BAPI_MATERIAL_SAVEDATA.

<garbled code removed>

Moderator message: Post relevant portions of the code only!

My problem is material no is not created and passing into second bapi.

Help me out of this

Edited by: Suhas Saha on Jun 17, 2011 8:01 PM

3 REPLIES 3
Read only

Former Member
0 Likes
817

Hi Venkatesh,

*Use This Bapi :BAPI_MATERIAL_SAVEREPLICA and pass values as mentioned below.*

Use this method to create new material master data or change existing material master data. Every time this method is called, data for one or more materials can be transferred.

When new material master data is created, the material number, the material type and the sector must be sent to the method. Furthermore, a short text and the language in which the short text has been created, have to be entered. When data is being changed, only the material number need be entered.

In the header data, at least one view has to be selected for which the data is to be created. Depending on the selected view, additional mandatory parameters that have been defined as such in Customizing have to be created. If not all mandatory fields are field with data, the method ends with an error message being displayed.

First, the appropriate fields in the tables (for example, CLIENTDATA) have to be filled with data by the user. These fields must also be flagged as the method data can only be written to the database if this is the case. The user must also provide data for the appropriate fields that have been selected in a checkbox table (for example, CLIENTDATAX). Checkbox tables exist for tables that do not contain language-dependent texts (MAKT, MLTX), European article numbers (MEAN) and tax classifications (MLAN). More than one data record can be created for a material in these tables (for all materials transferred to the method).

If a structure contains fields for a unit of measure (for example, structure CLIENTDATA, field BASE_UOM), language indicator (for example, structure MATERIALDESCRIPTION, field LANGU) or country identifier (for example, structure TAXCLASSIFICATIONS, field DEPCOUNTRY) then a similarly-named field ending with _ISO also exists. In doing so, the user has the option of using the internal SAP code or the ISO code for units of measure, language indicators or country identifiers. ISO codes are converted into an SAP code for further processing. The ISO code is only used if the SAP code is not displayed. In Customizing under "General Settings", a clear assignment has to be made between the ISO codes and the SAP codes for the following activities, if you want to use ISO codes:

If a structure contains fields for units of measurement (such as structure CLIENTDATA, field BASE_UOM), language indicators (such as structure MATERIALDESCRIPTION, field LANGU), or country indicators (such as structure TAXCLASSIFICATIONS, field DEPCOUNTRY), there is always a field of the same name with the ending _ISO. This makes it possible to transfer either the internally used SAP code or a standardized ISO code for the units of measurement, language indicators, or country indicators. ISO codes are converted to an SAP code internally for further processing. The ISO code is used only if the SAP code is not transferred. If you use ISO codes, there must be a unique assignment of the ISO code to the SAP code in the following activities in Customizing for Global Parameters:

Check Units of Measurement

Define Countries

If long texts (for example, basic data texts, internal notes, purchasing info texts, material notes or sales and distribution texts) or customer-specific fields have to be created for a material, some specific characteristics have to be taken into consideration. These characteristics are detailed in the documentation for parameters MATERIALLONGTEXT and EXTENSIONIN.

Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
817

Hey u can check this out....

BAPI_STANDARDMATERIAL_CREATE Create/Extend Material. 1001UEB BAPIs for Creating/

Changing Matl Data. BAPI_MATERIAL_SAVEDATA Create and Change Material

Note : When creating material master data, you must transfer the material

number, the material type, and the industry sector to the method. You

must also enter a material description and its language.

Regadrs,

Bhargav

Read only

madhu_vadlamani
Active Contributor
0 Likes
817

Hi Venkatesh,

1) Use this i BAPI_MATERIAL_SAVEREPLICA 2) What are the errors you are getting, and check the return messages 3) Did you used bapi_transaction_commit after that bapi in a sequence 4) It is difficult to answer with out full information . Please check all these and post if need help.

Regards,

Madhu.