‎2007 Oct 10 4:49 PM
Hello All,
Can we use update statement in initialization to update TVARVC table.
As I need to update a field in TVARVC table before running the program, and the same field is taken in background execution from tvarvc table.
If this is not possible or acceptable please provide an alternate solution for this.
Thanks in advance
‎2007 Oct 11 5:47 AM
Hi,
you can take update statement under the initailization event and check the sy-subrc and put it that check as flag like if sy-subrc = 0 then status = 'X', so that you can know whethere update is happend or not
Reward with points if helpful.
Regards,
Vijay
‎2007 Oct 10 5:02 PM
Hi
You can write any abap code in Initialization event. But do not use error message as it would abend the report.
Regards
Navneet.
‎2007 Oct 11 5:40 AM
Hi
what ever the lines you define under the INITILIZATION event will execute only once through out the program
if you want to write the code then you can do under INITIALIZATION or AT SELECTION-SCREEN OUTPUT
these 2 events will trigger before the selection screen display
and after selection screen display also if you do any action on screen then AT SELCTION-SCREEN OUTPUT will trigger
<b>Reward if usefull</b>
‎2007 Oct 11 5:47 AM
Hi,
you can take update statement under the initailization event and check the sy-subrc and put it that check as flag like if sy-subrc = 0 then status = 'X', so that you can know whethere update is happend or not
Reward with points if helpful.
Regards,
Vijay
‎2007 Oct 11 2:09 PM
Hi Ramesh,
When you run an executable type program (Type '1') the first event that gets executed in 'LOAD-OF-PROGRAM'. You can update the field in your table under this event. You can use INITIALIZATION event too.
‎2007 Oct 11 6:40 PM
Thanks All for your concern.
I need calrification whether this will cause any performance issue or at Q.A review is this going to get rejected.
Thanks in advance
‎2007 Oct 11 7:34 PM
Ramesh,
Where you place your code (in which event) will in no way influence performance. You need to make sure that you are using the proper indexes while accessing the table to modify the records. It is also prudent to lock the table using function module ENQUEUE_ESVARVC before updating the table and unlock it using function module DEQUEUE_ESVARVC after updating the table. If you cannot lock the table using function module ENQUEUE_ESVARVC (sy-subrc NE 0) do not attempt to update the table.