Skip to Content
0
Former Member
Nov 15, 2006 at 09:00 AM

Error message coming in BAPI_MATERIAL_SAVEDATA

729 Views

This the bapi i am using but getting error message like 'Key fields for user data PLANTDATA and checkbox structure PLANTDATAX are different'.Please suggest the solution.

  • Material number

wa_mathead-material = <l_fs_cus_tab>-matnr.

APPEND wa_mathead TO it_mathead.

  • Populating the plant specific internal table

wa_marc-plant = wa_mat_uoi-werks.

wa_marcx-plant = c_x.

wa_marc-spproctype = l_v_sobsl.

wa_marcx-spproctype = c_x.

APPEND wa_marc TO it_marc.

APPEND wa_marcx TO it_marcx.

  • populating the internal table of unit of measures

wa_marm-alt_unit = l_v_altunit.

wa_marmx-alt_unit = c_x.

wa_marm-alt_unit_iso = l_v_altunit.

wa_marmx-alt_unit_iso = c_x.

wa_marm-numerator = wa_alt_unit-umrez.

wa_marmx-numerator = c_x.

wa_marm-denominatr = wa_alt_unit-umren.

wa_marmx-denominatr = c_x.

APPEND wa_marm TO it_marm.

APPEND wa_marmx TO it_marmx.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

headdata = wa_mathead

  • CLIENTDATA =

  • CLIENTDATAX =

plantdata = wa_marc

plantdatax = wa_marcx

  • FORECASTPARAMETERS =

  • FORECASTPARAMETERSX =

  • PLANNINGDATA =

  • PLANNINGDATAX =

  • STORAGELOCATIONDATA =

  • STORAGELOCATIONDATAX =

  • VALUATIONDATA =

  • VALUATIONDATAX =

  • WAREHOUSENUMBERDATA =

  • WAREHOUSENUMBERDATAX =

  • SALESDATA =

  • SALESDATAX =

  • STORAGETYPEDATA =

  • STORAGETYPEDATAX =

  • FLAG_ONLINE = ' '

  • FLAG_CAD_CALL = ' '

  • NO_DEQUEUE = ' '

IMPORTING

return = wa_return

TABLES

  • MATERIALDESCRIPTION =

unitsofmeasure = it_marm

unitsofmeasurex = it_marmx

  • INTERNATIONALARTNOS =

  • MATERIALLONGTEXT =

  • TAXCLASSIFICATIONS =

returnmessages = it_return_mess

  • PRTDATA =

  • PRTDATAX =

  • EXTENSIONIN =

  • EXTENSIONINX =

.

*