Skip to Content
0
Former Member
Apr 20, 2007 at 01:31 AM

Help - FM 'MD_ABBL_REPORTING'

85 Views

Dear all,I tried using se37 to test this FM and i'm getting the result in the below pics. but once i call this FM in my abap program,it returns no infor that is needed by me. can anyone pls help? thanks

http://img133.imageshack.us/img133/1010/46783218hp5.jpghttp://img133.imageshack.us/img133/1010/46783218hp5.jpg">http://img133.imageshack.us/img133/1010/46783218hp5.jpg>

http://img265.imageshack.us/img265/2240/57942047ms1.jpghttp://img265.imageshack.us/img265/2240/57942047ms1.jpg">http://img265.imageshack.us/img265/2240/57942047ms1.jpg>

below is the coding i used for calling the FM n retrieving the data inside

LOOP AT PRT.

DATA : QTY LIKE STPO-MENGE,

QTY_POS LIKE STPO-MENGE,

QTY_NEG LIKE STPO-MENGE.

REFRESH I_MDPS.

QTY = 0. QTY_POS = 0. QTY_NEG = 0.

CALL FUNCTION 'MD_ABBL_REPORTING'

EXPORTING

EMATNR = PRT-NEWPART

EWERKS = '1000'

ECRPES = I_CRPES

  • IMPORTING

  • IMT61D =

  • TABLES

MDPSX = I_MDPS

  • MDEZX =

  • MDSUX =

  • PLAFM =

  • PLAFD =

  • MDFAM =

  • MDFAD =

EXCEPTIONS

ERROR_MATMASTER = 1

OTHERS = 2.

IF SY-SUBRC = 0.

LOOP AT I_MDPS.

IF I_MDPS-PLUMI = 'B' OR I_MDPS-PLUMI = '+'.

QTY_POS = QTY_POS + I_MDPS-MNG01.

ELSEIF I_MDPS-PLUMI = '-'.

QTY_NEG = QTY_NEG + I_MDPS-MNG01.

ENDIF.

ENDLOOP.

ENDIF.

QTY = QTY_POS - QTY_NEG.

MOVE QTY TO PRT-AVAIL_QTY.

MODIFY PRT.

ENDLOOP.