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

BAPI_AP_ACC_GETKEYDATEBALANCE

harshsisodia31
Participant
0 Likes
2,724

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
Read only

Former Member
0 Likes
2,148

Hi

which is the result you expect?

Max

Read only

Sijin_Chandran
Active Contributor
0 Likes
2,148

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

Read only

harshsisodia31
Participant
0 Likes
2,148

Hello Experts,

I solved the problem myself, thanks for reply.

Closing this Thread.

Read only

0 Likes
2,148

Hi Harsh,

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

Regards,

YS

Read only

0 Likes
2,148

Hi Yusuf,

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

Read only

0 Likes
2,148

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

Regards,

YS

Read only

0 Likes
2,148

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