i am developing an ABAP report using the PSM BAPIs
within a DO ... WHILE.
In the first iteration I update the funds center using BAPI (1). In a later iteration I need to read the funds center again using BAPI (2).
The problem is: In the later iteration I still get the old data of the funds center. The data changed using BAPI (1) are not regarded. Once the program is finished, the data is updated correctly - in a later program execution the updated data are present. I tried several options of committing between the two BAPIs:
Unfortunately, none of these commands helped. I tried also several combinations of them. Has anyone an idea, why this problem appears?
Here a code snippet:
" Tried with and without this one
" SET UPDATE TASK LOCAL.
CALL FUNCTION 'FM_FUNDS_CTR_CHANGE_NO_SCREEN'
EXPORTING
I_FIKRS = gv_fikrs
I_FISTL = gv_fictr
IT_FUNDS_CTR = lt_fistl
IT_FUNDS_CTR_TEXT = lt_fistl_t
IT_FUNDS_CTR_HISV = lt_fistl_h
I_FLG_TEST = pa_test
I_FLG_COMMIT = 'X' "Tried with and without this one
IMPORTING
ET_MESSAGES = lt_return
EXCEPTIONS
[...]
.
" Several commit options tried
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
" COMMIT WORK.
" COMMIT WORK AND WAIT.
" WAIT UP TO 10 SECONDS.
CALL FUNCTION 'FM_FICTR_READ_SINGLE'
EXPORTING
I_FIKRS = gv_fikrs
I_FICTR = gv_fictr
I_FLAG_TEXT = 'X'
I_FLAG_HIER = 'X'
I_LANGUAGE = c_spras
I_DATE = sy-datum
IMPORTING
E_F_FMFCTR = ls_current_fistl
E_F_FMFCTRT = ls_current_fistl_t
E_F_FMHISV = ls_current_fistl_h
EXCEPTIONS
[...]
.
Thank you in advance! Jonathan
As I see FM_FICTR_READ_SINGLE
stores the read data in statics inside the forms. I cannot see a refreshing, clearing method available, meaning if once read it won't get changed in a program run.
Looked at the function group and I see FM_FICTR_READ_MULTIPLE
FM there. In there I see no caching, you can try that, passing only one object in parameters.
Where I checked, EA-PS is on 617/05 version.