We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

[sap-abap] AT SELECTION-SCREEN ON {field}

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Question from philip_jones2003 on Sep 15 at 5:24 PM
A selection-screen with two input-disabled parameters. Entry is only possible via an 'AT SELECTION SCREEN ON VALUE REQUEST FOR {field}.

works perfectly except the OBLIGATORY addition to the parameter no longer functions. Well it is input-disabled after all.

So I put a test in 'AT SELECTION SCREEN' to check both for INITIAL on both fields. Issue a type 'E' message and control goes back to the selection screen.....great!

.....except the F4 help sets sy-ucomm to 'ENT' so that control goes to AT SELECTION SCREEN and tests the fields not yet touched and the program issues a message for the other ( still ) empty field.

Not a show-stopper but a little annoying.

SO : AT SELECTION-SCREEN ON {field}

Use F4 to populate the first field. Control goes to AT SELECTION SCREEN ON {field} and tests for a value....no problem, no message.

BUT control then goes to AT SELECTION SCREEN ON { the other field}....does the test and issues an error message before returning control to the screen.

I always understood that AT SELECTION SCREEN ON {field} was executed ONLY for the field in question.....not so unless DEBUG is lying. It seems that AT SELECTION SCREEN ON {field} is executed whenever sy-ucomm gets set to 'ENT' for ALL fields.

( The F4 value request sets it to ENT)

I dont want to see error messages for fields the user has not yet reached.

Any ideas anyone?

Part of the code :






************************************************
AT SELECTION-SCREEN ON p_delim. "BOTH OF THESE ARE XEQ
*************************************************

IF p_delim IS INITIAL.
MESSAGE 'Select an entry for Delimiter.' TYPE 'E'.
ENDIF.

************************************************
AT SELECTION-SCREEN ON p_fname.
************************************************
IF p_fname IS INITIAL.
MESSAGE 'Select an entry for File name.' TYPE 'E'.
ENDIF.

*************************************************
AT SELECTION-SCREEN.
*************************************************

my_ucomm = sscrfields-ucomm.

IF p_fname IS INITIAL.


MESSAGE 'Please select a value for File Name' TYPE 'E'.

endif.

IF p_delim IS INITIAL.

MESSAGE 'Please select a value for Delimiter' TYPE 'E'.

ENDIF.




*************************************************
AT SELECTION-SCREEN OUTPUT.
*************************************************
 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
© 2016 Ziff Davis, LLC. and message author.
Ziff Davis, LLC. 28 E 28th Street New York, NY 10016
philip_jones2003  

achievements
 
View this online
Ask a new question
 
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language