10-01-2007 3:47 PM
Hi Sapians ,
Actually i am bit confused about the concept of events .
so cn u please tell me ,What is the difference between event and processing block?
consider an example of report program .
START-OF-SELECTION .
SELECT MAX( prescrpt_id ) FROM zprescription INTO max_prescrption .
SELECT * FROM zprescription INTO TABLE itab_pr
WHERE prescrpt_id = max_prescrption .
READ TABLE itab_pr INTO WA_Pr WITH KEY
prescrpt_id = max_prescrption .
if WA_Pr-medicine1 = ENT6 AND
WA_Pr-medicine2 = ENT7 AND
WA_Pr-medicine3 = ENT8 AND
WA_Pr-medicine4 = ENT9 .
WRITE : 'YOUR DATA SAVED ALREADY .'.
flag2 = 1 .
My question is flag value is set first or first it calls the list processor and print the 'write/' statement .
Can i have a link of events ,so i can go thoroughly through this topic ?
With warm regards
Tarun
10-01-2007 3:51 PM
hi Tarun,
events are sun in a specific order, some people will surely copy the order here... What you ask here is slightly different. It happens so, that the system processes the WRITE statement and the list is processed in the background during program run (you can have a look at it in debugger), than the system processes the flag2 = 1. line. After the program finished, you'll get the complete list, which was built up during program run (remember you could have much more WRITE statements).
hope this helps
ec
10-01-2007 3:51 PM
hi Tarun,
events are sun in a specific order, some people will surely copy the order here... What you ask here is slightly different. It happens so, that the system processes the WRITE statement and the list is processed in the background during program run (you can have a look at it in debugger), than the system processes the flag2 = 1. line. After the program finished, you'll get the complete list, which was built up during program run (remember you could have much more WRITE statements).
hope this helps
ec
10-01-2007 4:19 PM
Hi sir
Your answer solved my problem compeletely ,actually i saw the same during debugging .
But i want to ask that all my write statement Top-of-page and end-of-page are passed to background program or ?
and if we write something like that
WRITE / 'power' .
top-of-PAGE .
WRITE / ent1 .
INITIALIZATION .
ent1 = '009' .
START-OF-SELECTION .
select * INTO TABLE itab FROM zemp
WHERE Emp_id = ENT1 .
end-OF-SELECTION .
ent1 = '008' .
The output comes like
009
power
but according to event details
it must be like that
008
power
Sir you are really too good so can i have your email_id ?
With warm regards
Tarun
10-01-2007 4:37 PM