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

function module

Former Member
0 Likes
467

hi experts,

i need to get the data of vendors dedit and credit values.

if i give the date from and date to the credit and dedit details inbetween those dates i need to get.

like in LFC1 table we are getting debit and credit details.

is there any function module or do we need to write code.

please help its urgent.

3 REPLIES 3
Read only

daixiong_jiang3
Active Participant
0 Likes
437

I think there is no such function after a search,however, it's easier to write code to fetch the data from LFC1

Read only

Former Member
0 Likes
437

Hi Hemal

As your requirement is to get the debit and credit details for a specific period, you can get these details only when you go to the transaction level.So i doubt if any FM exists for the requirement.

Kind Regards

Eswar

Read only

Former Member
0 Likes
437

Hi Hema,

Please use it like this.

REPORT YTEST_F9.

DATA:

BEGIN OF t_lfc1 OCCURS 0,

lifnr LIKE lfc1-lifnr,

bukrs LIKE lfc1-bukrs,

gjahr LIKE lfc1-gjahr,

erdat LIKE lfc1-erdat,

um01s LIKE lfc1-um01s,

um01h LIKE lfc1-um01h,

END OF t_lfc1.

RANGES:

r_erdat FOR lfc1-erdat.

r_erdat-sign = 'I'.

r_erdat-option = 'BT'.

r_erdat-low = '20071201'.

r_erdat-high = '20080109'.

SELECT lifnr bukrs gjahr erdat um01s um01h

FROM lfc1

INTO TABLE t_lfc1

WHERE erdat IN r_erdat.

IF sy-subrc EQ 0.

LOOP AT t_lfc1.

write:/ t_lfc1-lifnr,

t_lfc1-bukrs,

t_lfc1-gjahr,

t_lfc1-um01s,

t_lfc1-um01h.

ENDLOOP.

ENDIF.

Reward points if useful

Cheers,

Ananth