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

FM for Material Availability Check

premal_mistry2
Active Participant
0 Likes
5,422

Hi all,

I am using FM CO_ZA_AVAILABILITY_CHK_ORDER to perform ATP check based on order number, but for any order number that I test I am getting the same error stating "No Material component pr PRTs exist". Transaction CN22 also uses the same FM to perform the ATP check, in that case it is working but when I am using the same FM it is not working for me.

Do I need to use the FM in conjunction with any other FM's. Please advise

8 REPLIES 8
Read only

Former Member
0 Likes
3,742

try using BAPI_MATERIAL_EXISTENCECHECK as well.

Read only

0 Likes
3,742

Hi,

thanks for the reply but this FM is not applicable to my scenario.

Read only

0 Likes
3,742

Hi,

check the below link which uses BAPI_MATERIAL_AVAILABILITY for material availablity check.

Regards,

Pawan

Read only

0 Likes
3,742

Hey Pawan.. thanks for the update ... but will this BAPI be useful in my case .. as I am trying ti get ATP for material under a activity under a network ID ?

I mean I need to check ATP based on an AUFNR (order num.)

Edited by: Premal Mistry on Oct 4, 2010 6:11 PM

Read only

Former Member
0 Likes
3,742

Hi,

try to set a breakpoint in the FM: CO_ZA_AVAILABILITY_CHK_ORDER

and look into the parameters wich will set by CN22 (is this the tcode you use??).

Compare this values with your function call.

Hope it helps.

regards, Dieter

Read only

0 Likes
3,742

I tried that approach.. but it seems that this FM cannot be called individually as it requires some internal table data, which won't be available if I call it individually ...

The system basically reads the order header (CAUFV) and then passes it along with other data to the FM in question ....

I have emulated the same thing in my code but I am not getting the result which I get in CN22/CN23 ...

I suppose there are some specific FM's that one needs to call before calling FM CO_ZA_AVAILABILITY_CHK_ORDER.

Read only

0 Likes
3,742

Hi,

i think you are right.

If you sook into the FM you can see that are some IMPORT-call from the memory, and

this memory isn't fillend, if the FM is called via SE37 or your own Report.

Regards, Dieter

Read only

anne_angsmann
Explorer
3,742

In case this problem is still relevant for anyone after > 10 years: use FM CO_SF_CAUFVD_GET to fill the structure caufvd_imp for FM CO_ZA_AVAILABILITY_CHK_ORDER.

This works perfectly for me.