I need some help in the validation process.
The process has the selection screen where I choose the pay group(ADPCC).
parameters: Paygroup type ZPGWB obligatory.
each paygroup has two or three payroll areas attached,
For example if ADPCC has value '85W' this pay group has two payroll areas '5W' and '5U'.
I had this query reading into a varaible 'prarea' now I need to read this into a value range.
select single abkrs into prarea from z5uff where adpcc eq Paygroup. How to change this??
I need to use this range to check the employees come under the range of payroll areas.
My query is
rp-read-infotype wa_tab-pernr 0001 p0001
if sy-subrc eq 0 and prarea ne p0001-abkrs.
wa_tab-flag = 1.
move wa_tab to error_tab.
How can i change this query??
Any ideas is really helpful.
PL use the following logic..
data: begin of t_abkrs occurs 0, abkrs type abkrs, end of t_abkrs. ranges: r_abkrs for t_abkrs-abkrs. select abkrs into table t_abkrs from z5uff where adpcc eq Paygroup. loop at t_abkrs. r_abkrs-sign = 'I'. r_abkrs-option = 'EQ'. r_abkrs-low = t_abkrs-abkrs. append r_abkrs. endloop. rp-read-infotype wa_tab-pernr 0001 p0001 date date. if sy-subrc eq 0. loop at p0001 where not abkrs in r_abkrs. wa_tab-flag = 1. move wa_tab to error_tab. append error_tab. endloop. endif.