Application Development 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: 

BDC for MM02

Former Member
0 Kudos

Hello,

I need to change 2 fields in the material master, specifically <b>MBEW-ZKPRS</b> and <b>MBEW-ZKDAT</b>. I began to do this by BDC, but see it's complicated when it comes to selecting the view!

In researching SDN, I see people saying to use BAPIs (<b>MATERIAL_MAINTAIN_DARK</b> or <b>BAPI_MATERIAL_SAVEDATA</b>), or direct input (<b>RMDATIND</b>).... but I am not experienced greatly in this area!

Can you provide to me an example / the best solution, based on the change to the fields as I stated above???

Thanks,

Tim

1 ACCEPTED SOLUTION

Vinod_Chandran
Active Contributor
0 Kudos

Hi Timothy,

It would be better to use LSMW for this. It is easy and you already have standard batch input. Goto the 'Object Attribute' and select the radio button 'Standard Batch/Direct input'. Now select the object '0020' and method '0000', then the program RMDATIND will come automatically.

Thanks

Vinod

5 REPLIES 5

Vinod_Chandran
Active Contributor
0 Kudos

Hi Timothy,

It would be better to use LSMW for this. It is easy and you already have standard batch input. Goto the 'Object Attribute' and select the radio button 'Standard Batch/Direct input'. Now select the object '0020' and method '0000', then the program RMDATIND will come automatically.

Thanks

Vinod

0 Kudos

When calling MM02 using BDC's you can also select the specified view by setting the parameter id MB1 for accounting data for material.

0 Kudos

I found a function module, <b>FUTURE_PRICE_MBEW_SET</b>, that meets specifically my needs.. thanks!

Former Member
0 Kudos

Hi Tim,

There is a tip for selecting view in BDC.

In you BDC record, you 'll have to <b>always</b> select the Basic Data1 view which is a mandatory view.

Then you can select your view by using the drop down menu at the end of tab block ( on the right ).

The OK-code will be the same for all mmaterial, that is to say : SP01 (BD1), SP02, SPxx .

Try that,

Regards,

Erwan.

former_member221770
Contributor
0 Kudos

Hi Tim,

Would recommend looking at BAPI_MATERIAL_SAVEDATA. Check out the VALUATIONDATA parameter. It uses structure BAPI_MBEW. the fields you need to use are FUTURE_PR and VALID_FROM. Note that there is another parameter called VALUATIONDATAX. I call these 'X' structures which you use to identify the fields you are using. Eg. if you are using VALUATIONDATA-FUTURE_PR, you must populate VALUATIONDATAX-FUTURE_PR with a 'X'.

Let me know how this goes.

Cheers,

Pat.