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

Quantity at storage location

Former Member
0 Likes
1,470

It must be simple, but we just can't find the BAPI call to get the current quantity on hand for a particular material in a specified storage location in MM. Does someone know the call?

Thanks.

Have you tried BAPI_MATERIAL_GET_ALL?

11 REPLIES 11
Read only

nablan_umar
Product and Topic Expert
Product and Topic Expert
0 Likes
1,393

Have you tried BAPI_MATERIAL_GET_ALL?

Read only

0 Likes
1,393

We have looked at this but cannot find the quantity as displayed on the Stock Overview screen. We are looking for the unrestricted use stock. Are we just overlooking something?

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,393

these values can be found in table MARD.

Regards,

Rich Heilman

Read only

0 Likes
1,393

Hi,

Rich is right; just a complementary remark: in case you also need figures from other periods than the previous period you van use FM 'MARD_EXTEND'.

Regards,

John.

Read only

0 Likes
1,393

Thank Rich. We did find these values in the MARD table, but when we access this table using .NET Connector and TABLE_READ_ALL function we get the following errors:

ASSIGN_CASTING_UNKNOWN_TYPE CX_SY_ASSIGN_CAST_UNKNOWN_TYPE

ASSIGN_BASE_WRONG_ALIGNMENT

Any suggestions?

Read only

0 Likes
1,393

We have also tried the RFC_READ_TABLE function with the same results.

Read only

nablan_umar
Product and Topic Expert
Product and Topic Expert
0 Likes
1,393

The size of MARD is probably longer than 512 bytes, the size of returned internal table DATA from function module RFC_READ_TABLE.

Read only

0 Likes
1,393

Nablan:

Any other way to get this data with .NET Connector?

Dean

Read only

nablan_umar
Product and Topic Expert
Product and Topic Expert
0 Likes
1,393

Just do like what Rich suggested. Create a custom RFC function module that just read the fields you want in MARD.

Read only

0 Likes
1,393

Thanks all. I was hoping for another solution, but we'll work on this.

Dean

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,393

Oh...never used .net connector.....just jCo. I'm assuming that they are pretty much the same, so my suggestion, if .net can not handle it, is to create your own RFC enabled function module with your import parameters, MATNR WERKS LGORT and exporting only the fields that you need. In the function module source, just hit table MARD with your parameters. Then just call this Function module in your .net program.

Good luck,

Rich Heilman