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: 

BAPI to get material details

former_member204556
Participant
0 Kudos

Hi all,

Is there any standard BAPI which takes only plant details as importing parameters and provides details of 'all' the materials within that single plant?

BAPI_MATERIAL_GET_DETAIL, BAPI_MATERIAL_GET_ALL etc., all these bapi's require material number also as a input parameter. I need only plant as importing parameter.

Thanks in advance,

Regards,

Shrusti

3 REPLIES 3

Former Member
0 Kudos

Hi Shrusti,

I have not seen a bapi that would return the result set your looking for especially with the input parameter you mentioned.

Have you thought about trying something like running a sql query against the MARD table and getting all of the matnr for a specific werks and then you can run either of the two bapi's that you mentioned above and pass both the matnr and werks into them?

If you were wanting to do this type of call often then you could easily create a Z FM that performed this logic and return a table(s) of the FM results.

Hope this helps,

Geoffery

Flavio
Active Contributor
0 Kudos

Hi Shrusti,

I don't think there is a standard BAPI for this, but you can write your own report, selecting material codes by plant from MARC, and pass each of them to the mentioned BAPI.

BAPI result can be collected and returned as applicable.

Hope this could help.

Thanks and regards,

Flavio

raymond_giuseppi
Active Contributor
0 Kudos
  • You have to call a first BAPI to get list of material reference:
  • Then call another one in loop to get detail of those material references
    • BAPI_MATERIAL_GET_DETAIL, etc.

Regards,
Raymond