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

check entries

Former Member
0 Likes
1,026

On selection there is 1 variable declared as select-option.

There is one check table.

I want to check entered data on selection screen, is present or not in check table.

How can i check this?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
990

plz reply

On selection there is 1 variable declared as select-option.

There is one check table.

I want to check entered data on selection screen, is present or not in check table.

How can i check this?

Thanks.

6 REPLIES 6
Read only

Former Member
0 Likes
991

plz reply

Read only

0 Likes
990

build a my_range_table, then

in at selection-screen event, transfer ur select option inputs into my_range_table, then

you write a SELECT query for ur entries in the built my_range_table.

thanq

Read only

Peranandam
Contributor
0 Likes
990

Hi,

suppose you have declared selection screen variable as custormr from knvv.

if you seen check table of customer KNVV-KUNNR is KNA1.

here you would like to validate customer number in the selection screen based on values in check table KNA1. DO the follwoing validation

tables : knvv.

select-options: s_kunnr for knvv-kunnr.

at selection-screen.

data: l_kunnr type knvv-kunnr.

select single kunnr from kna1 into l_kunnr

where kunnr in s_kunnr.

if sy-subrc <> 0.

message 'Customer does not exit in check table' type 'E'.

endif.

Regards,

Peranandam

Edited by: peranandam chinnathambi on Apr 25, 2009 4:44 AM

Read only

Former Member
0 Likes
990

suppose your select-options is like

select-options : so_runid for yfiin_abpardoc-truni.

then ,

write like this.

at selection-screen on value-request for so_runid-low.

perform fetchf4_runidlow.

form fetchf4_runidlow.

select rundt seqno runid into table lt_runid from yfiin_abpardoc where rundt <> ' ' and extcd = '' .

endform.

Pls compare and write as per ur need.

Regards

Read only

former_member203501
Active Contributor
0 Likes
990

hi ,

i think the values are stored in the value table for that field not in the check table .....

i have a program where we can find out the check table and value table for that field ...see below



REPORT  zvalue_table        .

tables: dd03l.

types: begin of ty_value,
       ROLLNAME  type DD04L-ROLLNAME,
       ENTITYTAB type DD04L-ENTITYTAB,
       end of ty_value.

types: begin of ty_field,
       TABNAME    type DD03L-TABNAME,
       FIELDNAME  type DD03L-FIELDNAME,
       ROLLNAME   type DD03L-ROLLNAME,
       CHECKTABLE type DD03L-CHECKTABLE,
       end of ty_field.

types: begin of ty_text,
       TABNAME  type DD02T-TABNAME,
       DDTEXT  type DD02T-DDTEXT,
       end of ty_text.

data: it_field type table of ty_field with header line,
      it_value type table of ty_value with header line,
      it_text type table  of ty_text with header line.

select-options:s_table for dd03l-tabname no intervals no-extension obligatory,
               s_field for dd03l-fieldname .

start-of-selection.

select TABNAME
       FIELDNAME
       ROLLNAME
       CHECKTABLE
       from dd03l
       into table it_field
       where fieldname in s_field
       and   tabname in s_table .

if sy-subrc = 0.
select TABNAME
       DDTEXT
       from dd02t
       into table it_text
       for all entries in it_field
       where tabname = it_field-tabname
       and DDLANGUAGE = 'EN'.

endif.
if sy-subrc = 0.

select ROLLNAME
       ENTITYTAB
       from dd04l
       into table it_value
       for all entries in it_field
       where rollname = it_field-rollname
       and   ENTITYTAB ne space.

endif.

write:/1  'Field Name'   color 7,
       25 'Data Element' color 7,
       55 'Value Table'  color 7,
       80 'Check Table'  color 7,
      110 'Table Text'   color 7.

loop at it_value.
read table it_field with key rollname = it_value-rollname.
write:/1 it_field-fieldname,
       25 it_value-rollname,
       55 it_value-ENTITYTAB ,
       80 it_field-checktable .
read table it_text with key tabname    = it_field-tabname.
write: 110 it_text-ddtext.
endloop.

Read only

Former Member
0 Likes
990

what you can do is in the event

at selection screen on input <field name>.

" write a select single on the check table checking the field entered on the screen.

Regards,

Lalit Mohan Gupta.