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: 

Fk10n By Plant

Former Member
0 Kudos
116

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

5 REPLIES 5

Former Member
0 Kudos
68

Hi

I don't believe there's a std report you're asking for.

I think you'd think a custom solution.

Max

0 Kudos
68

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

0 Kudos
68

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

ferry_lianto
Active Contributor
0 Kudos
68

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

Former Member
0 Kudos
68

hi vicky,

i have same problem as u so if u have any solutions for this problem pls help me also.

regards.