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

parameters

Former Member
0 Likes
822

IF I TYPE A VALUE IN THE PARAMETER IN SELECTION SCREEN, THAN IF I PRESS THE TAB BUTTON OR CLICK THE ANOTHER FIELD, IT SHOULD AUTOMATICALLY CHECK THE DATABASE TABLE.... IF ENTERED VALUE IS FOUND IN TABLE... IT SHOULD SAY ''VALUE ALREADY EXIST'.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
799

Hello,

Use the Event

<b>At Selection-screen on 'PARAMETER_NAME'.</b>

This event is assigned to the selection screen fields corresponding to the report parameter . If the report starts an error dialog at this point, precisely these fields become ready for input.

Reffer the following code.

  • Validate Account Group.

AT SELECTION-SCREEN ON p_code.

SELECT SINGLE * FROM t001 WHERE bukrs = p_code.

IF sy-subrc <> 0.

MESSAGE e041 WITH 'Enter valid Company Code'.

ENDIF.

Reward Points for good answers

Regards,

LIJO JOHN.

6 REPLIES 6
Read only

Former Member
0 Likes
799

use event AT SELECTION-SCREEN for validations.

cheers

Sameer

Read only

Former Member
0 Likes
799

Hi,

Use this

AT SELECTION-SCREEN ON 'PARAMETERS FIELD'.

AT SELECTION-SCREEN ON 'CARRID'.

Read only

Former Member
0 Likes
799

Hi Sasi

at selection-screen.

here read the parameter calue that u have entered and check whether the value is existing in database.

select single matnr from mara where matnr eq p_matnr.

if sy-subrc eq 0.

message i000(z00) ' the material is already exits'.

endif.

reward points to all helpful answers

kiran.M

Read only

Former Member
0 Likes
799

Hello,

Message was edited by:

LIJO JOHN

Read only

Former Member
0 Likes
799

Hi

for that parameter add extra key word VALUE CHECK

LIKE

PARAMETERS : P_P1 LIKE MARA-MATNR VALUE CHECK .

REWARD IF USEFULL

Read only

Former Member
0 Likes
800

Hello,

Use the Event

<b>At Selection-screen on 'PARAMETER_NAME'.</b>

This event is assigned to the selection screen fields corresponding to the report parameter . If the report starts an error dialog at this point, precisely these fields become ready for input.

Reffer the following code.

  • Validate Account Group.

AT SELECTION-SCREEN ON p_code.

SELECT SINGLE * FROM t001 WHERE bukrs = p_code.

IF sy-subrc <> 0.

MESSAGE e041 WITH 'Enter valid Company Code'.

ENDIF.

Reward Points for good answers

Regards,

LIJO JOHN.