‎2007 Apr 19 2:02 PM
Hallow I use the logical data base pnpce and their I use provide_form_last
My problem is I wont all the data where
Persg = 6 and 7 and 8.
Now I doing delete after that but it take a lot performance to
take the data before
How can I solved it ?
maybe in where but how?
rp_provide_from_last t_0001 ' ' sy-datum sy-datum. "pa0001
pn-begda pn-endda.
wa_person_tab-stell = t_0001-stell.
wa_person_tab-werks = t_0001-werks.
wa_person_tab-persg = t_0001-persg.
wa_person_tab-persk = t_0001-persk.
wa_person_tab-orgeh = t_0001-orgeh.
DELETE person_tab WHERE ( persg <> '6' AND persg <> '7' AND persg <> '8' ).
‎2007 Apr 19 2:04 PM
‎2007 Apr 19 2:16 PM
Hi there. Instead of writing every person and then going in at the end to delete the ones without the persg values that you want, you could simply reject the ones who don't have the right values:
rp_provide_from_last pa0001 space sy-datum sy-datum.
IF pa0001-persg = 6 or pa0001-persg = 7 or pa0001-persg = 8.
wa_person_tab-stell = pa0001-stell.
wa_person_tab-werks = pa0001-werks.
wa_person_tab-persg = pa0001-persg.
wa_person_tab-orgeh = pa0001-orgeh.
ELSE.
REJECT.
ENDIF.
- April King
‎2007 Apr 19 4:29 PM
1. You can restrict PNPPERSG initializing the selection screen or before GET PERNR event (depends on your requirements).
2. You can get use of global PNP select-option table PNPINDEX populating it only with rerstricted set of PERNRs. You should do it before GET PERNR event either.