on 12-05-2018 10:06 PM
Hi,
I am struggling with some odd problem. I wrote a report that allows a change of configuration of an item (for material characteristic) in sales order with usage of BDC (UPDATE = S , synchronously). That part works perfectly - changes are visible immediately in VA03 and by FM in SE37 for VBAK-CUOBJ (FM: VC_I_GET_CONFIGURATION_IBASE as we use VMS module).
However when program comes back to ALV after a change and I use custom Refresh button which calls the same FM (VC_I_GET_CONFIGURATION_IBASE) with exactly the same parameters the characteristic values are not retrieved 😞 When I go back to selection screen and execute again (not recall the tcode just reselect!) the characteristic is retrieved correctly.
I assume there is some buffer to be cleaned but I haven't found any hints regarding that....
Any ideas?
May be you can try to refresh some buffer. I found a function that is called by SAPMV45A (during init).
call function 'CUCB_INITIALIZER'.
You can try to call it after returning from CALL TRANSACTION.
PS:
- you can try also to call transaction with update mode "L-Local update task"
- you can share more of your code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That worked perfectly! Many thanks!
Hi,
Actually even though it is probably unnecessary to do COMMIT I got it after - changes are applied to DBT but configuration still cannot be retrieved
PS: the FM used is VC_I_GET_CONFIGURATION (I couldn't edit question)
DATA: lt_messtab TYPE TABLE OF bdcmsgcoll,
ls_ctu LIKE ctu_params.
FIELD-SYMBOLS: <lfs_msg> LIKE LINE OF lt_messtab.
ls_ctu-dismode = 'N'. "Screens are not displayed
ls_ctu-updmode = 'S'. "Synchro
CALL TRANSACTION tcode USING bdcdata
MODE ls_ctu-dismode
UPDATE ls_ctu-updmode
MESSAGES INTO lt_messtab.
* set status
READ TABLE lt_messtab ASSIGNING <lfs_msg> WITH KEY msgtyp = 'E'.
IF sy-subrc = 0.
* error
ROLLBACK WORK.
ELSE.
READ TABLE lt_messtab ASSIGNING <lfs_msg> WITH KEY msgtyp = 'S'.
IF sy-subrc = 0.
* success
COMMIT WORK AND WAIT.
ENDIF.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.