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

help

Former Member
0 Likes
747

Hi,

I need to pull all the records from a table that has a list of tables starting with XY1, On the selection screen I am entering just 'XY1' , and in the select query i tried someting like this..

selection-screen begin of block B1 with frame title text-s01.

parameters p_table like ABC-tabname.

          • the value I am entering is 'XY1'.

selection-screen end of block B1.

Select tabname from ABCl into v_tabname where tabname+0(3) = p_table.

I am getting an erro here tabname+0(3) is unknown. Any thoughts?

Thanks,

VG

Moderator message: please use much more descriptive subject lines from now on.

Edited by: Thomas Zloch on Jul 13, 2010 4:51 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
717

Hi,

Whts the length of the tabname? Thats its showing the error.

With Regards,

Sumodh.P

6 REPLIES 6
Read only

Former Member
0 Likes
717
Select tabname from ABCl into v_tabname where tabname = p_table.

This will work and Please use a descriptive subject line while posting.

Read only

Former Member
0 Likes
718

Hi,

Whts the length of the tabname? Thats its showing the error.

With Regards,

Sumodh.P

Read only

0 Likes
717

Hi,

Thanks, I am trying to pull all the tables that are starting with the names XY1. Hence I gave the length of the p_table as 3.

The bottom line is I am pulling the entire list of these tables based on a particular pattern such as XY1*. The table is DD02L that has the field TABNAMe that lists a series of tables staritng with XY100, XY110, XY170 and so on. How to do this?

Hence I cannot give 'tabname = p_table' because it returns 0. I need to pull the entire list of tables in one shot by entering something like XY1.

VG

Read only

0 Likes
717

use LIKE

p_table value = 'XY1'

data: lv_tabname  type abc-tabname.

concantenate p_table '%' into lv_tabname.

Select tabname from ABCl into v_tabname where tabname like lv_tabname.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
717

basic question.

Read only

0 Likes
717

Thanks for the help. I got it.

VG