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.