Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

At selection screen event

Former Member
0 Likes
1,432

Hi experts,

Can we use AT SELECTION-SCREEN event twice in a report?

PLz tell me anybody

regards,

Praveena.

15 REPLIES 15
Read only

0 Likes
1,395

At selection screen event is trigerred at a particular happening , ie for data validation only , and hence it can be used only once.

Read only

Former Member
0 Likes
1,395

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.

Read only

Former Member
0 Likes
1,395

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.

Read only

Former Member
0 Likes
1,395

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

Read only

Former Member
0 Likes
1,395

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

Read only

0 Likes
1,395

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....

Read only

0 Likes
1,395

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

Read only

0 Likes
1,395

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?

Read only

0 Likes
1,395

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

Read only

0 Likes
1,395

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

Read only

0 Likes
1,395

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

Read only

0 Likes
1,395

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

Read only

0 Likes
1,395

Hi arun..

actually i did'nt get proper req..i will get back u soon..

any way thans a lot...

Read only

matt
Active Contributor
0 Likes
1,395

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.

Read only

Former Member
0 Likes
1,395

solved