‎2010 Aug 10 5:01 PM
Hi gurus. I'm writing an ABAP program that uses BAPI_SL_GETTOTALRECORDS, as follows:
PARAMETERS: p_bukrs TYPE bukrs OBLIGATORY DEFAULT '0542',
p_gjahr TYPE gjahr OBLIGATORY DEFAULT sy-datum(4),
p_monat TYPE monat OBLIGATORY DEFAULT sy-datum+4(2).
DATA: gt_totals_spl TYPE STANDARD TABLE OF bapi1021_totals_spl.
DATA: lt_extin TYPE STANDARD TABLE OF bapiparex,
lt_extout TYPE STANDARD TABLE OF bapiparex,
lt_return TYPE bapiret2.
data: l_ledger type RLDNR,
l_peragg type BAVLD.
l_ledger = 'VW'.
l_peragg = ''.
break-point.
CALL FUNCTION 'BAPI_SL_GETTOTALRECORDS'
EXPORTING
ledger = l_ledger
* recordtype = '0'
* version = '1'
companycode = p_bukrs
* gl_account = '13179210'
fiscalyear = p_gjahr
period_agg = l_peragg
IMPORTING
RETURN = lt_return
TABLES
extensionin = lt_extin
totals_spl = gt_totals_spl
extensionout = lt_extout.
The thing is that, no matter what input parameters I enter the program, the BAPI always returns no data.
I've tested it using SE37 with the same parameters and I get desired data.
Does anyone realize if ther'se anything wrong in my code? Am I missing something here?
‎2010 Nov 25 10:11 AM
Hi
Were you able to solve it? I want to use the same BAPI.
Regards
Arjan
‎2010 Nov 25 3:00 PM
Hi
When I use for version a 3 digit value (001) then the bapi finds the data from the summary table. Using less digits (1 or 2) the bapi will not find the data.