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

Query in using FM AVAILABILITY_CHECK

Former Member
0 Likes
438

Hi all,

My requirement is to get the 1. Req Date

2. Req Qty

3. Commited Date

4. Commited Qty

by using the function module AVAILABILITY_CHECK...

Pls have a look at my code .. this code is written in a z function module .

DATA: li_atpcs LIKE atpcs OCCURS 0 WITH HEADER LINE.

li_atpcs-matnr = i_matnr.

li_atpcs-werks = i_werks.

li_atpcs-bdter = i_bdter.

li_atpcs-xline = 1.

li_atpcs-idxall = 1.

li_atpcs-chkflg = 'X'.

APPEND li_atpcs.

CALL FUNCTION 'AVAILABILITY_CHECK'

TABLES

p_atpcsx = li_atpcs

p_qtdergx = i_disp_erg

p_qtdobjx = i_disp_obj

EXCEPTIONS

error = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LOOP AT i_disp_erg.

e_dat00 = i_disp_erg-dat00.

e_mng01 = i_disp_erg-mng01.

e_dat02 = i_disp_erg-dat02.

e_mng03 = i_disp_erg-mng03.

ENDLOOP.

LOOP AT i_disp_obj.

e_kosch = i_disp_obj-kosch.

e_gstru = i_disp_obj-gstru.

ENDLOOP.

But I am unable to get the required values (mentioned above).. can anyone help me in this?

TIA.

Regards,

kanthi.

1 REPLY 1
Read only

Former Member
0 Likes
360

hi

check out the code in this thread

hope this helps

regards

Aakash Banga