‎2010 Nov 24 5:28 AM
Hi experts,
Can we use AT SELECTION-SCREEN event twice in a report?
PLz tell me anybody
regards,
Praveena.
‎2010 Nov 24 5:32 AM
At selection screen event is trigerred at a particular happening , ie for data validation only , and hence it can be used only once.
‎2010 Nov 24 5:36 AM
Hi,
Try out more things using a Test system as it would be more useful and you will learn more, rather than getting answers by posting those queries.
Regards,
M M Jaffer.
‎2010 Nov 24 5:37 AM
Hi,
Try writing the code twice.
If you want to validate use once at selection-screen and multiple at selection-screen on value-request for<fields on the selection scree>.
Thanks,
Sriram Ponna.
‎2010 Nov 24 5:49 AM
Hi Praveena ,
I dont think you can call the event 2 times , as the event is triggred by the system.
If you can tell the scenario in which you want this to happen may be we can suggest an alternative to it.
Regards,
Arun
‎2010 Nov 24 6:38 AM
Hi Praveena
i think there is a possibility that is
by using AT SELECTION SCREEN ON <FIELD_NAME>
AND, AT SELECTION SCREE OUTPUT
IN THIS WAY WE CAN USE IT TWICE.
try this and let me know.
best regards
tiru
‎2010 Nov 24 6:42 AM
Hi all
Thanks for giving replies..
I have one req on standard report i.e HRALXSYNC.In this report selection screen we have 4 check boxes..
Central persons
employee
Organizational units
Branch from organizational unit
i need to check authorization when ever user clicks check boxes.(Other than employee check box)
it should error msg like " you are not authorized".
as of now. i did one implecit enhancement in that program...code is
________
Actual code
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1 ) Include HRALXSYNC, End S
$$-Start: (1 )----
$$
ENHANCEMENT 1 ZQMGL_AUTCHECK. "active version
CASE SY-UCOMM.
WHEN 'PCO'. (F code for central persons check box)
MESSAGE E000(ZMSG) WITH 'You are not authorized person'.
WHEN 'OCO'. (F code for Organization unit check box)
MESSAGE E000(ZMSG) WITH 'You are not authorized person'.
WHEN 'BCO'. (F code for Branch org unit check box)
MESSAGE E000(ZMSG) WITH 'You are not authorized person'.
ENDCASE.
But while de bugging control is not coming to this enhancement..and error msg is not papulating..
actual code is...
AT selection-screen.
IF lstchk IS INITIAL.
activate/deactivate depending on user action
CASE sy-ucomm.
WHEN 'OCO'.
LOOP AT SCREEN.
IF screen-group1 = 'GRO'.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
control always going to here only..
Please help me....
‎2010 Nov 24 6:48 AM
Hi Praveena ,
The control will go to the event and not the code you added in the enhancement . I think you have used implicit enhancement , so may be you can try using AT SELECTION-SCREEN ON <field name> event .
In the enhancement use the AT SELECTION-SCREEN ON event and put your authorization / validation code in it.
Regards,
Arun
‎2010 Nov 24 6:51 AM
Hi arun
Thanks for reply
can you plz tell me
what is the field name in that event....actually i ma not validating the field...that is check box only.....and that check box have fcode plz tell me how can i proceed?
‎2010 Nov 24 6:54 AM
Hi arun ..
This is the way they have declared...
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 1.
PARAMETERS: orgck TYPE xflag AS CHECKBOX USER-COMMAND oco MODIF ID gr6.
SELECTION-SCREEN COMMENT 3(50) text-005 FOR FIELD orgck.
SELECTION-SCREEN POSITION 55.
SELECT-OPTIONS lt_selo FOR gv_objid NO INTERVALS MODIF ID gro.
SELECTION-SCREEN END OF LINE.
can you plz help me out
‎2010 Nov 24 7:00 AM
Hi Praveena ,
Please see the code below
at selection-screen on emplck.
if emplck = 'X'.
MESSAGE E000(SR) WITH 'You are not authorized person'.
endif..If i understand your requirement correclty when the user selects any of the check boxes other than Employee
like Centeral Person system must generate an error .
So it means that no one must be able to use the transaction selecting that checkbox.
Regards,
Arun
‎2010 Nov 24 7:19 AM
Hi arun..
Thanks a lot..
now error mesg is coming...ZMSG:000 you are not authorized..i need to display only you are not authorized and one more thing is i am not able to re edit screen...can you plz tell me
‎2010 Nov 24 7:26 AM
Hi Praveena ,
You need to know the authorization object and use the FM to check if the user has authorization for it or not.
Regarding the issue of not being able to edit the screen you will have to debugg the report , as i see some code to enable and disable the screen elements in the report.
Regards
Arun
‎2010 Nov 24 7:59 AM
Hi arun..
actually i did'nt get proper req..i will get back u soon..
any way thans a lot...
‎2010 Nov 24 8:16 AM
This is a prime example of drip-feeding a question. If you'd posted your actual requirement straight off, you would have got your answer much more quickly, and you wouldn't have wasted moderator time looking at what appeared to be a very basic, easily researched question.
‎2010 Nov 30 3:59 AM