2010 Jul 13 3:14 PM
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
2010 Jul 13 3:20 PM
Hi,
Whts the length of the tabname? Thats its showing the error.
With Regards,
Sumodh.P
Hi,
Whts the length of the tabname? Thats its showing the error.
With Regards,
Sumodh.P
2010 Jul 13 3:18 PM
Select tabname from ABCl into v_tabname where tabname = p_table.This will work and Please use a descriptive subject line while posting.
2010 Jul 13 3:20 PM
Hi,
Whts the length of the tabname? Thats its showing the error.
With Regards,
Sumodh.P
2010 Jul 13 3:40 PM
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
2010 Jul 13 3:45 PM
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.
2010 Jul 13 3:46 PM
2010 Jul 13 4:14 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |