Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 18, 2006 at 08:32 PM

    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

    Add comment
    10|10000 characters needed characters exceeded