I am doing module pool programming and i am saving data in database table through screen..
I have to give counter to that saved data..
Following is my logic to give counter to database table...
where i have to define it in PBO or PAI
SELECT SINGLE ZRD_HDRID INTO P FROM ZRD_ORDTYP
WHERE ZRD_HDRID = ( SELECT MAX( ZRD_HDRID ) FROM ZRD_ORDTYP ) .
LOOP AT WA_ORDTYP.
P = 0.
P = P + 1.
WA_ORDTYP-ZRD_HDRID = P.
modify zrd_ordtyp from wa_ordtyp
Please Help me