Hello,
everyone can any one help me with this coding of this algorithm .
i have tried many different ways to code but unable to find best solution.
1) read from table ZPAT the fields PID and FID where username=sy-user
2)check, if there is a row in ZCORE with PID and FID
3)if yes
read BID FROM ZCORE where PID and FID
check, i highest Dnr in ZNEW where PIDand FID is the same value as BID in ZCORE
if no, in ZCORE set :
e_ch='n' and call screen 100
if yes, call screen 100
4) if no
add new row to ZCORE set:
a_ch='n'
e_ch='o'
BID= highest_BID
(highest_BID is highest value of Dnr from ZNEW where PID and FID)
call screen 100
information about tables:
ZNEW:
-Dnr (integer)
-PID (integer)
-FID (integer)
=>Comment: There are lines with the same PID and FID, Dnr is a number from 1 to n.
at every combination of PID and FID, Dnr is only once there
Example:
PID FID Dnr
4 1 1
4 1 2
4 1 3
4 3 1
ZCORE:
-PID
-FID
-BID
-a_ch (char)
-e_ch (char)
=>Comment: There Every line with PID and FID has a different value of BID
ZPAT:
-PID
-FID
-username(char)
=>Comment: every username is only once in the table with exactly one PID and one FID