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 with BAPI_MATERIAL_SAVEDATA

Former Member
0 Likes
2,117

Hi Guru's,

I am using the above BAPI to create material in the material master . I am wanted to create basic view , MRP view, accouting view.,

i am passing the necessary details to the FM . But it is giving me an error ' The field MARA-BRGEW is defined as a required field; it does not contain an entry.

I searched in MARA table it is showing it as gross wright .,But I do not have corresponding field name in client data structure of BAPI.

Please let me know how to solve this issue .

Full points will be awarded ....

Thanks & Regards,

Paveee

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,415

This field is handle in the UNITSOFMEASURE table of the BAPI.

Sample code :


  unitsofmeasure-alt_unit    = 'ST'.
  unitsofmeasurex-alt_unit   = 'ST'.

  unitsofmeasure-alt_unit_iso    = 'ST'.
  unitsofmeasurex-alt_unit_iso   = 'ST'.

  unitsofmeasure-numerator   = '1'.
  unitsofmeasurex-numerator  = 'X'.

  unitsofmeasure-denominatr  = '1'.
  unitsofmeasurex-denominatr = 'X'.


  unitsofmeasure-gross_wt    = p_brgew.
  unitsofmeasurex-gross_wt   = 'X'.

    APPEND unitsofmeasure.
    APPEND unitsofmeasurex.

Hope this helps,

Erwan

6 REPLIES 6
Read only

Former Member
0 Likes
1,416

This field is handle in the UNITSOFMEASURE table of the BAPI.

Sample code :


  unitsofmeasure-alt_unit    = 'ST'.
  unitsofmeasurex-alt_unit   = 'ST'.

  unitsofmeasure-alt_unit_iso    = 'ST'.
  unitsofmeasurex-alt_unit_iso   = 'ST'.

  unitsofmeasure-numerator   = '1'.
  unitsofmeasurex-numerator  = 'X'.

  unitsofmeasure-denominatr  = '1'.
  unitsofmeasurex-denominatr = 'X'.


  unitsofmeasure-gross_wt    = p_brgew.
  unitsofmeasurex-gross_wt   = 'X'.

    APPEND unitsofmeasure.
    APPEND unitsofmeasurex.

Hope this helps,

Erwan

Read only

0 Likes
1,415

Hi Erwan,

I was able to avoid that error with your suggestion .

I am getting one more error 'Enter the scheduling margin key'.

Please help me in getting the error resolved.,

Thanks & Regards,

Manjuantha Goudra

Read only

0 Likes
1,415

Check the field plantdata-sm_key.

You should put a value of table T436A depending on the plant.

Hope this helps,

Regards,

erwan

Read only

0 Likes
1,415

Hi Erwan,

Thanks .

I was able to create the material successfully in the system..

thanks for your help.

again thanks a lot

Regards,

Manjunatha Goudra

Read only

0 Likes
1,415

Hi Erwan,

sorry to disturb you again .I am getting the following error while creating the material with other set of data .

Unit of measure ****** is not defined; check your entry :

Please let me know how to fix this issue.

Thanks & Regards,

Paveee

Read only

Former Member
0 Likes
1,415

well if the field is in your client data structure of your bapi it is quite nice, tho be told that the field has to be filled with a non initial value as well.

and like erwan told yah, in the unitsofmeasurment structure you need to include it too.