Application Development 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: 

vendor ageing report data for all doc type needed(urgent)

Former Member
0 Kudos

hello everyone

once again i need ur help guys.

in the vendor ageing report i am getting data for only one document type and not of other.

ex- see i have two documents type-

1.KD 2. EJ

so i am getting data for document type KD only.

so how to get the data of document type EJ along with KD.

below is my code .

so tell what modifications i have to made .

&----


*& Report Z_VENDOR AGEING *

*& *

&----


*& in this repoet I am calculating the vendor ageing

which is depending on formula

AGEING = Current Date(or any date entered by user) – Bline Date(BSIK-ZFBDT) *

*& *

&----


REPORT z_vendor NO STANDARD PAGE HEADING

LINE-SIZE 200

LINE-COUNT 65(3).

TABLES : bsik.

DATA : BEGIN OF t_out OCCURS 0,

bukrs LIKE bsik-bukrs,

saknr LIKE bsik-saknr,

bldat LIKE bsik-bldat,

wrbtr LIKE bsik-wrbtr,

lifnr LIKE bsik-lifnr,

zfbdt like bsik-zfbdt,

zbd1t like bsik-zbd1t,

ageing type i,

END OF t_out.

parameters : p_date1 type d.

SELECT-OPTIONS : s_bukrs FOR bsik-bukrs,

s_saknr FOR bsik-saknr,

s_lifnr FOR bsik-lifnr.

SELECT bukrs saknr bldat wrbtr lifnr zfbdt zbd1t

FROM bsik

INTO TABLE t_out

WHERE saknr IN s_saknr

AND bukrs IN s_bukrs

AND lifnr IN s_lifnr.

Loop at t_out.

CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'

EXPORTING

i_datum_bis = p_date1

i_datum_von = t_out-zfbdt

  • I_KZ_EXCL_VON = '0'

  • I_KZ_INCL_BIS = '0'

  • I_KZ_ULT_BIS = ' '

  • I_KZ_ULT_VON = ' '

  • I_STGMETH = '0'

  • I_SZBMETH = '1'

IMPORTING

E_TAGE = t_out-ageing

  • EXCEPTIONS

  • DAYS_METHOD_NOT_DEFINED = 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.

Modify t_out.

Clear t_out.

Endloop.

LOOP AT T_OUT.

IF T_OUT-SHKZG = ‘H’.

T_OUT-WRBTR = T_OUT-WRBTR * -1.

T_OUT-WRBTR = T_OUT-DMBTR * -1.

ENDIF.

DATA: TOTAL(16) TYPE P DECIMALS 2.

TOTAL = TOTAL + T_OUT-DMBTR.

Endloop.

LOOP AT t_out.

WRITE : / t_out-saknr,

t_out-lifnr,

t_out-wrbtr,

t_out-zfbdt,

T_OUT-DMBTR,

t_out-ageing.

AT LAST.

WRITE:/ TOTAL.

CLEAR TOTAL.

ENDAT.

ENDLOOP.

Message was edited by: sanjeev singh

5 REPLIES 5

Former Member
0 Kudos

u have to link BSAK also.

regards

Prabhu

0 Kudos

but prabhu

that document type is in BSIk also.

but still it is not showing .

so what to do now?

0 Kudos

Sanjeev,

Can you tell what is document type EJ representing...Secondly, if you check couple of documents of EJ type and check if data is available as per you WHERE clause filters.

Regards

Anurag

0 Kudos

document type EJ u can get from BSIK-BLART.

0 Kudos

I am aware of that my friend but my system does not show any document type as EJ..hence I asked you about the type...secondly, please try and check the data as I have mentioned in my earlier post.