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

BAPI_MATERIAL_SAVEDATA doesn't work

Former Member
0 Likes
1,687

Hi,

can anybody help me. I can't find the Problem. The Bapi will not save the material.

Thanks

Thomas

data: la_headdata type BAPIMATHEAD,

la_clientdata type BAPI_MARA,

la_CLIENTDATAX type BAPI_MARAX,

la_clientMARC type BAPI_MARC,

la_clientMARD type BAPI_MARD,

la_clientMBEW TYPE BAPI_MBEW,

la_clientMARCX type BAPI_MARCX,

la_return type BAPIRET2.

data: i_materialdescription type table of BAPI_MAKT,

wa_materialdescription like line of i_materialdescription.

*HEAD

la_headdata-MATERIAL = '000000000100060124'.

la_headdata-IND_SECTOR = 'Z'.

la_headdata-MATL_TYPE = 'HIBE'.

la_headdata-BASIC_VIEW = 'X'.

la_headdata-PURCHASE_VIEW = 'X'.

la_headdata-MRP_VIEW = 'X'.

la_headdata-STORAGE_VIEW = 'X'.

la_headdata-WAREHOUSE_VIEW = 'X'.

la_headdata-ACCOUNT_VIEW = 'X'.

la_headdata-INP_FLD_CHECK = 'E'.

*MARA

la_clientdata-BASE_UOM = 'ST'.

la_clientdata-MATL_GROUP = 'V5000'.

la_clientdata-OLD_MAT_NO = 'xyzakb'.

la_clientdata-MANU_MAT = 'LEXMARK-CTOM'.

*MBEW

la_clientMBEW-VAL_AREA = 1400.

la_clientMBEW-PRICE_CTRL = 'V'.

la_clientMBEW-VAL_CLASS = '4049'.

la_clientMBEW-PRICE_UNIT = '1'.

la_clientMBEW-STD_PR_PP = '50'.

*MARAX

la_CLIENTDATAX-MATL_GROUP = 'X'.

la_CLIENTDATAX-BASE_UOM = 'X'.

*MARC

la_clientMARC-PLANT = 1400.

la_clientMARC-MRP_TYPE = 'VB'.

la_clientMARC-MRP_CTRLER = '001'.

la_clientMARC-PERIOD_IND = 'W'.

la_clientMARC-LOTSIZEKEY = 'HB'.

la_clientMARC-PUR_GROUP = '101'.

la_clientMARC-AVAILCHECK = '01'.

la_clientMARC-PLND_DELRY = '2'.

la_clientMARC-GR_PR_TIME = '1'.

la_clientMARC-PROC_TYPE = 'F'.

la_clientMARC-REORDER_PT = '5'.

la_clientMARC-MAX_STOCK = '7'.

la_clientMARC-SAFETY_STK = 0.

la_clientMARC-MINLOTSIZE = 1.

la_clientMARC-MAXLOTSIZE = 10.

la_clientMARC-FIXED_LOT = 3.

la_clientMARC-ROUND_VAL = 2.

la_clientMARC-MIN_SAFETY_STK = 1.

*MARCX

la_clientMARCX-PLANT = 1400.

la_clientMARCX-REORDER_PT = 'X'.

la_clientMARCX-SAFETY_STK = 'X'.

la_clientMARCX-MINLOTSIZE = 'X'.

la_clientMARCX-MAXLOTSIZE = 'X'.

la_clientMARCX-FIXED_LOT = 'X'.

la_clientMARCX-ROUND_VAL = 'X'.

la_clientMARCX-MAX_STOCK = 'X'.

la_clientMARCX-MIN_SAFETY_STK = 'X'.

wa_materialdescription-LANGU = 'DE'.

wa_materialdescription-MATL_DESC = 'Test'.

append wa_materialdescription to i_materialdescription.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

headdata = la_headdata

CLIENTDATA = la_clientdata

CLIENTDATAX = la_CLIENTDATAX

PLANTDATA = la_clientMARC

PLANTDATAX = la_clientMARCX

VALUATIONDATA = la_clientMBEW

*FORECASTPARAMETERS =

*FORECASTPARAMETERSX =

*PLANNINGDATA

*PLANNINGDATAX =

*STORAGELOCATIONDATAX =

*VALUATIONDATAX =

*WAREHOUSENUMBERDATA =

*WAREHOUSENUMBERDATAX =

*STORAGETYPEDATA =

*STORAGETYPEDATAX =

*FLAG_ONLINE = ' '

*FLAG_CAD_CALL = ' '

IMPORTING

RETURN = la_return

TABLES

MATERIALDESCRIPTION = i_materialdescription

*UNITSOFMEASURE =

*UNITSOFMEASUREX =

*INTERNATIONALARTNOS =

*MATERIALLONGTEXT =

*TAXCLASSIFICATIONS =

*RETURNMESSAGES =

*PRTDATA =

*PRTDATAX =

*EXTENSIONIN =

*EXTENSIONINX =

.

*----


  • Commit des Befehls

*----


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'

  • IMPORTING

  • RETURN =

.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,143

Hi Friend,

Please check messages in parameter RETURNMESSAGES under TABLES head. Hope you will get something.

And I think that when you ticked those view, you have to supply required for those views:

la_headdata-BASIC_VIEW = 'X'.

la_headdata-PURCHASE_VIEW = 'X'.

la_headdata-MRP_VIEW = 'X'.

la_headdata-STORAGE_VIEW = 'X'.

la_headdata-WAREHOUSE_VIEW = 'X'.

la_headdata-ACCOUNT_VIEW = 'X'.

Pleaes check once.

Regards

Krishnendu

4 REPLIES 4
Read only

Former Member
0 Likes
1,143

Hi,

It is not problem with the function module 'BAPI_TRANSACTION_COMMIT', but it is problem with the data you are passing to the function module 'BAPI_MATERIAL_SAVEDATA'. Please check whether the necessary data is passed to it.

Read only

Former Member
0 Likes
1,143

Are you checking the values in the table la_return after the BAPI is called.

Read only

Former Member
0 Likes
1,144

Hi Friend,

Please check messages in parameter RETURNMESSAGES under TABLES head. Hope you will get something.

And I think that when you ticked those view, you have to supply required for those views:

la_headdata-BASIC_VIEW = 'X'.

la_headdata-PURCHASE_VIEW = 'X'.

la_headdata-MRP_VIEW = 'X'.

la_headdata-STORAGE_VIEW = 'X'.

la_headdata-WAREHOUSE_VIEW = 'X'.

la_headdata-ACCOUNT_VIEW = 'X'.

Pleaes check once.

Regards

Krishnendu

Read only

Former Member
0 Likes
1,143

Hi Friends,

thanks for Help. I found the problem.

I have forgotten one parameter

Thank You very much.

Thomas