cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_MATERIAL_AVAILABILITY for ATP Quantity....

Former Member
0 Kudos

Hi Experts,

I am using BAPI_MATERIAL_AVAILABILITY for mass materials in ABAP program,

but it takes very long time to execute ( 40,000 + materials ). If any other BAPI or FM available for ATP Quantity, so i can try ?

YAB

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear Yusuf,

the function BAPI_MATERIAL_AVAILABILITY is the only BAPI for availability check. There are no other BAPI's or other function modules which have the similar functionality in the ERP standard.

I am very sorry that I cannot give you a more positive response. But I hope nevertheless that this information clarify your question and is therefore helpful for you.

Kind regards,

Akmal Vakhidov

Development Support SD, SAP, Walldorf/Germany

Former Member
0 Kudos

HI,

As my understanding there is no good function module for ATP check.

i.e. if you have 100 materials then there is no fucntion module to check the total 100 materials availablility at the same time.So you have to check the availability one after one so it is time consuming factor.So as my understanding it is not possible to control time factor.

Thanks and regards,

shyla kumar.

rmazzali
Active Contributor
0 Kudos

set READ_ATP_LOCK flag to blank.

also check on OSS for some performance note.

Roberto

Former Member
0 Kudos

Hi Roberto,

I am pasting below my program...Pl. check and help me where to put ATP_LOCK.

DATA: iwmdvsx TYPE TABLE OF bapiwmdvs WITH HEADER LINE,

iwmdvex TYPE TABLE OF bapiwmdve WITH HEADER LINE.

DATA: r TYPE bapireturn, " Check it once.

FQty TYPE MENGV13.

LOOP AT it_out.

CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'

EXPORTING

plant = 'HIP' "p_werks

material = it_out-matnr "p_matnr

unit = 'EA' "p_meins

stge_loc = 'BSR'

***********

IMPORTING

return = r

***********

TABLES

wmdvsx = iwmdvsx

wmdvex = iwmdvex.

***********

IF r-type is initial OR r-type = 'S'.

LOOP AT iwmdvex.

FQty = FQty + iwmdvex-com_qty.

ENDLOOP.

it_out-free_qty = FQty.

  • MODIFY it_out TRANSPORTING free_qty WHERE matnr = it_out-matnr.

modify it_out.

FQty = 0.

ENDIF.

***********

REFRESH iwmdvex.

************

CLEAR: it_out.

***********

REFRESH iwmdvsx.

ENDLOOP.

Message was edited by:

YUSUF BHORI

rmazzali
Active Contributor
0 Kudos

it is in the xporting parameters but I can see that in your code is blank.

Roberto

Former Member
0 Kudos

Hi Roberto,

I have given in Exporting READ_ATP_LOCK = ' '.

Enenthough it takes very long time for mass materials.

Yusuf

rmazzali
Active Contributor
0 Kudos

I suggest you the sap note:

<a href="https://service.sap.com/sap/support/notes/362617">Note 362617 - ATP: Performance of BAPI_MATERIAL_AVAILABILITY</a>

Roberto

Former Member
0 Kudos

Hi Roberto,

That note is for below release 640. Our SAP ERP is 5.0 release 640.

YAB

rmazzali
Active Contributor
0 Kudos

search in OSS for sap notes about it.

also try to parallelize the calls to the BAPI, so that the program run shorter...

Roberto

Pls. reward points for the usefull hints.