cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_MATPHYSINV_GETITEMS

Former Member
0 Kudos

Hey,

I'm trying to create an Odata Service which displays the Items from via RFC 'BAPI_MATPHYSINV_COUNT' .

But I have a Problem, i just want(can) to use 1 of the export tables. In this case just the ITEMS. So if I try to create Query for it, it shows me 'Mandatory data source parameter HEADERS is not mapped'.

But as soon as I Map a parameter from HEADERS it says 'In Query operation, only one output table can be used', which both makes sense.

I there any workaround for that? what am I doing wrong?

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

EkanshCapgemini
Active Contributor
0 Kudos

Hi Chris,

I was not able to find any HEADER table in BAPI_MATPHYSINV_COUNT. This BAPI has 2 mandatory input fields: Physical Inventory No. & Fiscal Year . So for query operation on this entity using this BAPI, you need to pass those two as input.

Regards,
Ekansh

Former Member
0 Kudos

Hi Ekansh, I made a mistake ther, I meant BAPI_MATHPHYS_GETITEMS, like in the title.

EkanshCapgemini
Active Contributor
0 Kudos

Hi Chris,

Yes, SEGW tool wouldn't allow you to map two obligatory tables in one query call. You need to take code based implementation approach for this. In the GET_ENTITYSET method of related entity, pass an empty table for HEADERS.

Regards,
Ekansh

Former Member
0 Kudos

I'll try that and give you feedback tomorrow. Thank you

Answers (1)

Answers (1)

former_member184867
Active Contributor
0 Kudos

May be the function module also expect some input whihc are to be passed by HEADERS. In this case you need to create an entity which will contain properties from both items and header. For some help refer to .

If not, a code based approach may be suitable for this case (a guess) 

http://scn.sap.com/community/gateway/blog/2013/06/18/to-code-or-not-to-code