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: 

BAPI_AP_ACC_GETKEYDATEBALANCE

harshsisodia31
Participant
0 Kudos

Dear Experts,

I am using BAPI_AP_ACC_GETKEYDATEBALANCE to get opening balance of vendor but is is not returning correct value . I tried debugging the code in bapi but is not returing the correct line items. Below are parameters I m passing to the bapi

CALL FUNCTION 'BAPI_AP_ACC_GETKEYDATEBALANCE'
   EXPORTING
     COMPANYCODE        = PA_BUKRS       "1000
     VENDOR             = PA_LIF                       "100006
     KEYDATE            = SO_DATE-LOW          "
20130401    

     BALANCESPGLI       = 'X'
     NOTEDITEMS         = 'X'
* IMPORTING
*   RETURN             =
   TABLES
     KEYBALANCE         = OPEN1               "type table of
BAPI3008_3

Kindly guide.

Best Regards

Harsh         .

7 REPLIES 7

Former Member
0 Kudos

Hi

which is the result you expect?

Max

Sijin_Chandran
Active Contributor
0 Kudos

Hello Harsh ,

Actually this BAPI returns 2 lines in the Output Internal Table  ( OPEN1 in your case ) , one for Total Credit Balance and Other for Total Debit Balance . You need to Sum up these two amounts in order to get the key date balance ( i.e FBL1N Balance )

Thanks ,

Sijin

harshsisodia31
Participant
0 Kudos

Hello Experts,

I solved the problem myself, thanks for reply.

Closing this Thread.

0 Kudos

Hi Harsh,

Can you please share the solution. We are facing similar issue.

Regards,

YS

0 Kudos

Hi Yusuf,

Can u please share the input and what is the result you are expecting ?

0 Kudos

Thanks Harsh. Resolved the issue. The preceding zeroes had been removed from the Vendor code.

Regards,

YS

0 Kudos

Can you give me the solution

Because i have a requirement

for customer opening Balance and All transaction with Closing Balance

Zreport

I need support for this requirement