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

BAPI_MATERIAL_AVAILABILITY for ATP Quantity....

Former Member
0 Likes
639

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 ?

I am pasting my program, pl. check :

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
495

nO aNSWER

1 REPLY 1
Read only

Former Member
0 Likes
496

nO aNSWER