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'
COMPANYCODE = PA_BUKRS "1000
VENDOR = PA_LIF "100006
KEYDATE = SO_DATE-LOW "20130401
BALANCESPGLI = 'X'
NOTEDITEMS = 'X'
* RETURN =
KEYBALANCE = OPEN1 "type table of BAPI3008_3