05-15-2015 11:55 AM
Hi Experts,
I am trying to fetch the data with select options, data is not getting fetched because the table column space in the end so even in the standard ALV selection of the table I need to put the star in the end of the selection.
Same I tried here with CP and adding star in the end of the range but no luck can you try and suggest it.
code is like below.
TYPES: BEGIN OF ls_range,
SIGN(1),
OPTION(2),
LOW(30) TYPE C,
HIGH(30) TYPE C,
END OF ls_range.
DATA: ls_r_group_value TYPE TABLE OF ls_range,
ls_wa_group_value LIKE LINE OF ls_r_group_value.
LOOP AT p_it_conversion ASSIGNING <fs_conversion>.
ls_wa_group_value-sign = gc_rng_sign_include.
ls_wa_group_value-option = gc_rng_opt_equal. here I tried equal and CP both
CONCATENATE <fs_conversion>-old_value '*' INTO <fs_conversion>-old_value.
SHIFT <fs_conversion>-old_value RIGHT DELETING TRAILING ''.
SHIFT <fs_conversion>-old_value LEFT DELETING LEADING ''.
ls_wa_group_value-low = <fs_conversion>-old_value.
ls_wa_group_value-high = ''.
APPEND ls_wa_group_value TO ls_r_group_value.
ENDLOOP.
SELECT dashboard_id period kpi_id group1_value group2_value group3_value SUM( DATA_1 ) SUM( DATA_2 ) SUM( DATA_3 ) SUM( DATA_4 )
FROM /kpi
INTO TABLE lt_t_/kpi
WHERE dashboard_id = p_iv_dashboard_id AND hier_node IN ls_r_group_value
GROUP BY dashboard_id period kpi_id group1_value group2_value group3_value.
05-15-2015 12:04 PM
Hello Mangilal,
When using wildcard character you must use option = CP anyway.
Could you please send a screenshot of ls_r_group_value variable content (in debug mode) at select statement and a screenshot of the lines (in SE16) you expect to get in table /kpi ?
Are you sure there is not conversion exit to execute (what you see in table is not what you get, matter of internal and external value). In SE16 you can't activate and deactivate conversion exits to check.
Regards
05-27-2015 8:44 AM
Hi Brice,
Please find the attached screenshots.
There is no conversion routine, its a direct FM to update the table data.
05-27-2015 10:15 AM
Hello Mangilal,
You have an issue with lower case characters.
Your range must be based on data element that allows lower case.
You must also check the field from which you copy the value.
"Development" <> "DEVELOPMENT"
Regards
05-28-2015 8:30 AM
Hi Brice,
Values are same as in table because I copied and pasted and also this same range is working for 3 other columns.
In debugging only its showing in capitals, but same working fine for other select only column in where is different rest all is same.
I think there is some issue with column value, because while i even display the value by SE16 i need to keep * in the end of the hierarchy data column filter, else no values are displayed.
05-28-2015 10:51 AM
05-28-2015 12:47 PM
05-27-2015 8:53 AM
Hi Mangilal,
Can you declare the range table using RANGES data type.
Like:
Ranges: ls_r_group_value FOR /kpi-hier_node.
And then try.
Regards,
Praveer.
05-27-2015 10:04 AM
05-27-2015 1:45 PM
Hi Mangilal,
Try to declare your range like this:
DATA: ls_r_group_value TYPE RANGE OF /kpi-hier_node WITH HEADER LINE.
Best Regards.
Benjamin
05-28-2015 8:41 AM
Header lines are obsolete and bad practice programming. Define separate work areas instead.
05-28-2015 8:41 AM
Even so, you should use this form rather than defining the structure yourself.
05-28-2015 11:53 AM
RANGES is obsolete now, use
DATA: ls_r_group_value TYPE RANGE OF char30. " or text30 if lowercase
Did you check for conversion-exit associated with field domain?
Regards,
Raymond
05-28-2015 12:19 PM
05-28-2015 1:01 PM
05-28-2015 3:56 PM
and for the second question?
Also another question, did some not-standard program insert some records in the database table.
Hint: In case of not respected conversion-exit and use of open SQL insert/update/modify statement, some program(-er )s are able to mess the database table, e.g. writing '1234____' (_ for space) in a character field doesn't trigger any database error, but if the field carry an ALPHA conversion exit you will never be able to select it from database with some correct input criteria that will be converted to '00001234'
Regards,
Raymond
05-29-2015 5:37 AM
Hi Raymond,
Yes, there is a customized program which pickup the excel file values and insert into database table.
Is that can be reason for this?
05-27-2015 10:19 AM
Option "CP" is fine for wildcard characters. "EQ" will not work
Did you check what value you are passing in p_iv_dashboard_id WHERE dashboard_id = p_iv_dashboard_id?
05-27-2015 12:09 PM
05-28-2015 8:32 AM
guys,
Let me explain one more thing, This is something with data of that column I mean how system is interpreting...because if I select from normal SE16 even need to keep * in the end of the filter value.
Please share if someone faced such strange issue.
05-28-2015 8:42 AM
05-28-2015 9:25 AM
HI Mathew,
see my attached screenshot, I attached the range table values.
05-28-2015 10:09 AM
Hi All,
Please see the attached screenshots for normal SE16 selection screen where I need to put *, then suggest it accordingly. I think this is the reason why data is not getting selected.
selection screen with column value.
No Data
Put * in the end of selection value
Values are displayed.
05-28-2015 10:37 AM
05-28-2015 1:00 PM
05-28-2015 1:42 PM
Mangilal, as a first step try adding this as selection option. Then in the debugger you'll see the exact content of the selection table - this will help you understand how the range table should be filled in.
Then (if it can't be selection criteria), add a definition for range table (look up RANGE in ABAP Help, it even has an example). Fill it in based on your previous research with the selection option. Naturally, you'll need to use WHERE ... IN ... not WHERE ... = ... with range table, just as with the selection option.
If it still does not get the desired result, post the exact code (including all definitions) and debugger screenshot showing the range table values.
Overall this is not a rocket science - just see how it works with selection options and do the same with range, pretty much. I don't know what's the deal with the values in SE16, but whichever way they're stored that's how they also need to be retrieved. Try running SE16 with conversion exit off, maybe there is some conversion routine and "what you see is not what you get".
05-28-2015 2:47 PM
This is my guess. However, he still hasn't answered the basic question: what is the domain of the field in the table?
05-29-2015 5:34 AM
Hi Matthew,
I checked through se11 table definition for this field there is no domain, its showing as predefined type char 30..
Please let me know if i am looking at wrong place.
05-29-2015 5:41 AM
Hi Jelena,
Same range is working for same select just this column is not added in where.....so problem with column values somewhere.
05-28-2015 1:50 PM
Dear Mangilal,
Can you give the type of <fs_conversion>-old_value and the content of the field ?
Regards,
Hans
05-29-2015 5:39 AM
Hi all,
Just for information the same range is working for other three columns, I am using other three select with same range same selection, just in where the one column name is change, So this is something not correct with column....
I am suspecting the Raymond one issue...
05-29-2015 4:16 PM
First of all, check if the domain you have used for the table field can accept lowercase letters. If lowercase letters are not allowed in domain, then the database table field shouldn't be stored with lowercase values.
Secondly, ranges are case sensitive. So, if your database field has lowercase values, then your range also should have lowercase values.
If you checked both of these and still you are facing issues with select, then....
I had faced similar issues before and the issue was with the whitespace character inside the field.
White space is just not just one character that you normally get when you hit spacebar on the keyboard. There are many more whitespace characters used in many applications.
Normal spacebar is U+0020. With that at the end of "ABC", the text looks like "ABC ".
Another whitespace is U+00A0. With that at the end of "ABC", the text looks like "ABC ".
To try it yourself, goto link, and paste the following code
<!DOCTYPE html><html><body>
<p>I will display  <p>
<p>I will display  <p>
</body></html>
As you can see, both these texts look alike, but they are not equal. This is what is happening when you use I EQ condition in your range. When you build your range with I EQ ABC as value, the texts with special whitespace character at the end, doesn't get selected. But, when you build your range with I CP ABC* as value, those texts with special characters also get selected.
To check if the text inside the database table has any special characters at the end, you will have to view that text in hexadecimal format, which is possible through ABAP debugger.
Thanks,
Juwin Thomas
05-29-2015 5:11 PM
Hi Mangilal,
Try this.
SHIFT <fs_conversion>-old_value LEFT DELETING LEADING space.
use space instead of ".