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 updating salesdata view by using BAPI_MATERIAL_SAVEDATA

Former Member
0 Likes
538

Hi Experts,

I am updating the material by using the bapi BAPI_MATERIAL_SAVEDATA.

I am exporting the data for the following views

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

headdata = wa_headdata

clientdata = wa_bapi_mara

clientdatax = wa_bapi_marax

plantdata = wa_bapi_marc

plantdatax = wa_bapi_marcx

salesdata = wa_bapi_mvke

salesdatax = wa_bapi_mvkex

IMPORTING

return = wa_ret.

Bu the BAPI returna an error message as follows

"Enter a validity date"

There are any manditory fields are there in Clientdata or Salesdata structurers?

KIndly suggest me how to resolve this error.

Thanks

Brahma

1 REPLY 1
Read only

Former Member
0 Likes
411

Bramha,

to know the mandatory fileds in each view( sales/ mrp etc..) , you would need to look at your config settings .

Alternatively,

try to create one material of the same material type your creating by bapi manually.

while creating a material manually, note down each mandatory field on each screen and then pass all these values in BAPI.

this would ensure successful processing of your bapi.

dont forget to call commite wiork bapi after the save_date call.