Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ABAP help

hi folks,

I need some help in the validation process.

The process has the selection screen where I choose the pay group(ADPCC).

step 1:

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.

Step 2:

select single abkrs into prarea from z5uff where adpcc eq Paygroup. How to change this??

Step 3:

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

date date.

if sy-subrc eq 0 and prarea ne p0001-abkrs.

wa_tab-flag = 1.

move wa_tab to error_tab.

append error_tab.

endif.

How can i change this query??

Any ideas is really helpful.

Thanks

Vinu

Tags:
Former Member
Former Member replied

Hi Vinu,

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.

Regards,

Suresh Datti

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question