cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict GET PERNR

Former Member
0 Kudos

Hi,

I have a situation/special case when GET PERNR runs for all pernr.s (No input on selection screen of PNP LDB) where it causes unnecessary performance issue.

Is there any way to execute GET PERNR event conditionally or run it for specific pernrs that I want.

Accepted Solutions (1)

Accepted Solutions (1)

MarcinPciak
Active Contributor
0 Kudos

Hi,

Why don't you just restrict them in selection screen?

Anyhow if you don't what to do this and you know which EEs excatly you want to ommit do following.


RANGES: ra_pernr FOR pernr-pernr OCCURS 0.

"here hardcode all your EEs which you don't want to process. You either provide a range or add a row for each EE
ra_pernr-sign   = 'I'.
ra_pernr-option = 'EQ'.
ra_pernr-low    = "lowest EE number or exact EE number
ra_pernr-high  = "highest EE number or empty (if only one EE)
APPEND ra_pernr.

GET PERNR.
check pernr-pernr not in ra_pernr.   "if EE is within the range he/she will be processed, otherwise next pernr is taken

Alternativetly to last statement you can use


GET PERNR.
if pernr-pernr not in ra_pernr.
  REJECT.
endif.

...but it will have same result

Regards

Marcin

Answers (2)

Answers (2)

Former Member
0 Kudos

THIS CODE CAN BE USED TO RESTRICT GET PERNR EVENT TO LOOP ONLY FOR PERNR MENTIONED IN SELECT OPTIONS OF YOUR CUSTOM SELECTION SCREEN

*---CUSTOM SELECTION SCREEN

TABLES: PERNR.

SELECT-OPTIONS: R_PERNR FOR PERNR-PERNR.

*---CODING INSIDE THE PROGRAM

START-OF-SELECTION.

PNPPERNR = R_PERNR.

GET PERNR.

WRITE: / PERNR-PERNR.

END-OF-SELECTION.

Former Member
0 Kudos

Hi Amit,

Your appraoch was the one I was looking for, but only thing is my employees I need to process in the GET PERNR loop are getting populated in an internal table before get pernr. Can I pass those to PNPPERNR ?

Edited by: Mrunal Shyamkant Patki on Oct 3, 2008 2:49 PM

MarcinPciak
Active Contributor
0 Kudos

Hi,

Yes you can pass your internal table to PNPPERNR before GET PERNR, then only these EEs will be processed.

Note!

1) you have to pass not header line but table content, thus statement

PNPPERNR = R_PERNR is wrong, it should be PNPPERNR[ ] = R_PERNR[ ]

2) Make sure you are your internal table has structure of type ranges (where sign, option, low and high exists). Only then you can use above statement. Otherwise you have to move data one by another.

Regards

Marcin

former_member182426
Active Contributor
0 Kudos

hi,

check the SCREEN FIELD PERNR in START-OF-SELECTION EVENT.

IF PNPPERNR-LOW IS INITIAL.

MESSAGE ' No pernr selecetd'.

STOP.

ENDIF.

Get pernr.

Regards,

Shankar.