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

Selection-screen value check

Former Member
0 Likes
1,888

Hi, there is a selection-screen. How can I check on the selection-screem that the asset transaction type which I typed in is whether existing to a given asset? I would like to display an informational message on the status bar about it if doesn't exist.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,074

<b>Hi

code like this

AT SELECTION-SCREEN ON <ASSET FIELD>

SELECT SINGLE ASSETNO FROM <TABLE> WHERE ASSETNO = ASSET FIELD.

IF SY-SUBRC NE 0.

MESSAGE E01(ZMB)

ENDIF.

cREATE ONE MESSAGE CLASS ZMB WITH A MESSAGE NUMBER 01.

Regs

Manas Ranjan Panda</b>

9 REPLIES 9
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,074

HI,

Try this:

AT SELECTION_SCREEN.

Select single asset into variable from dbtab where asset EQ selection-value.

If sy-subrc eq 0.

do processing.

else.

Message.

endif.

Reward if this helps.

Sands

Read only

Former Member
0 Likes
1,075

<b>Hi

code like this

AT SELECTION-SCREEN ON <ASSET FIELD>

SELECT SINGLE ASSETNO FROM <TABLE> WHERE ASSETNO = ASSET FIELD.

IF SY-SUBRC NE 0.

MESSAGE E01(ZMB)

ENDIF.

cREATE ONE MESSAGE CLASS ZMB WITH A MESSAGE NUMBER 01.

Regs

Manas Ranjan Panda</b>

Read only

Former Member
0 Likes
1,074

Hi,

AT SELECTION_SCREEN.

Select single asset into v_assest from dbtab where asset = s_asset value.

If sy-subrc <> 0.

Message e001 ' enter valid asset number'.

endif.

Regards,

Kumar

Read only

Former Member
0 Likes
1,074

Hi,

After your selection screen, use..

AT SELECTION-SCREEN ON fieldname.

Write relevent select statements under this to check if the entries exist,

display message where applicable.

Read only

Former Member
0 Likes
1,074

at selection-screen.

check by writing a select statement to check whether it exists or not.

if exists....

do further processing

else.

come out...

endif.

Read only

Former Member
0 Likes
1,074

at selection-screen.

check by writing a select statement to check whether it exists or not.

if exists....

do further processing

else.

come out...

endif.

Read only

Former Member
0 Likes
1,074

Lot of thanks.

Read only

Former Member
0 Likes
1,074

How can I check more than 1 field at selection-screen?

Read only

0 Likes
1,074

Hi

If u want to check for every field individually

then use

<b>AT SELECTION-SCREEN ON <FIELD NAME></b> THEN CODE HERE

IF U WANT TO CHECK FOR EVERY FIELD AT ONCE THEN

<b>AT SELECTION-SCREEN</b>

CHECK HERE FOR EVERY FIELDS ONE BY ONE

If un want to chk for a selection screen block

then

AT SELECTION-SCREEN ON BLOCK <block name>

then code here.

Regs

Manas Ranjan Panda