on 10-03-2008 7:41 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.