2007 Jul 20 4:43 PM
Is there any report or transaction code which displays Vendor account by Company Code and a specific plant. I know FK10n but it displays the Vendor account Balance for the Company Code and not for the Plant and Company Code. Please Advise.Thanks
Vik
2007 Jul 20 4:48 PM
Hi
I don't believe there's a std report you're asking for.
I think you'd think a custom solution.
Max
2007 Jul 20 4:55 PM
Do you know like the tables these data are stored in and the Function modules so that I can develop a customized report? Please help.
Thanks
Vik
2007 Jul 20 4:59 PM
Hi
U need to check BSEG table, here you should find the plant (BSEG-WERKS).
The BALANCE of certain period should be the total of the open item, so if you need to know it for the vendor:
*1) Extract the open items posted in the period (from BSIK),
SELECT * FROM BSIK INTO TABLE T_ITEMS WHERE BUKRS =
AND LIFNR =
AND BUDAT <= DATE
*2) Extract the cleared items posted in that period but cleared after that period (from BSAK):
SELECT * FROM BSAK APPENDING TABLE T_ITEMS WHERE BUKRS =
AND LIFNR =
AND AUGDT > DATE
AND BUDAT <= DATE.
*3) Get the plat from BSEG and calculate the balance
LOOP AT T_ITEMS.
SELECT SINGLE * FROM BSEG WHERE BUKRS = T_ITEMS-BUKRS
AND BELNR = T_ITEMS-BELNR
AND GJAHR = T_ITEMS-GJAHR
AND BUZEI = T_ITEMS-BUZEI.
.......................................................
ENDLOOP.
If you need the actual balance you need to select the open items only.
If the plant is not stored in BSEG table you need to read the original document, so MM documents.
max
2007 Jul 20 4:55 PM
Hi,
Please try these BAPI.
BAPI_AP_ACC_GETBALANCEDITEMS
BAPI_AP_ACC_GETCURRENTBALANCE
BAPI_AP_ACC_GETKEYDATEBALANCE
BAPI_AP_ACC_GETOPENITEMS
BAPI_AP_ACC_GETPERIODBALANCES
BAPI_AP_ACC_GETSTATEMENT
Regards,
Ferry Lianto
2007 Nov 27 1:14 PM
hi vicky,
i have same problem as u so if u have any solutions for this problem pls help me also.
regards.