Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8644

TVARVC table not getting updated due to Buffer Synchronization

$
0
0

Hi Experts,

 

The design of my data loads are as follows-

1. Sequence ID Generation program- This program generates the Sequence ID and stores the generated id in TVARVC table lets say variable used as 'SEQUENCE_NO'

2. DTP: exactly after Sequence ID Generation, the DTP loads the data to cube and the Sequence ID from TVARVC table is read and updated via routine.

 

ISSUE:

I observed a strange behavior, with the data records being updated in the cube. Lets say the initial VALUE of 'SEQUENCE_NO' is 1012. The Program updates the TVARVC table variable and the DTP is triggered. Now the DTP updates few records with Sequence ID as '1012' and few with '1013'.

I searched online for this issue and came to a conclusion that this is happening because of SAP Buffer Synchronization. The program might be updating the table variable at database level but does not commit the work.

 

I have come across a solution to modify the ABAP code as follows-

 

MOVE 'SEQUENCE_NO' to c_vname.

UPDATE tvarvc
     SET sign    = c_i
         opti    = c_eq
         low     = w_seqid
   WHERE name EQ c_vname
     AND type EQ c_type.

   IF sy-subrc IS INITIAL.

     COMMIT WORK AND WAIT.

   ENDIF.


Can you let me know if the above solution will work (to COMMIT the work exactly after the TABLE update).

Please provide your views on the solution or suggest any alternate solution..


Viewing all articles
Browse latest Browse all 8644

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>