2014 Nov 28 1:12 PM
Hi,
In my requirement am created one z table with kunnr field char as 10.
while executing the table with kunnr field as 123456 and pass some where condition means it is not fetching any value.
without giving any input and executing means it displays all values.Because 123456 after some space is there ,,
same time pass 123456* means it executes..i gave 0000123456 means also not executes..so in report select syntax also not working..
Any one give suggestion..No w all datas stored in z table herafter am unable to change table char as 6.
Hi,
In my requirement am created one z table with kunnr field char as 10.
while executing the table with kunnr field as 123456 and pass some where condition means it is not fetching any value.
without giving any input and executing means it displays all values.Because 123456 after some space is there ,,
same time pass 123456* means it executes..i gave 0000123456 means also not executes..so in report select syntax also not working..
Any one give suggestion..No w all datas stored in z table herafter am unable to change table char as 6.
2014 Nov 28 1:17 PM
Hi Christina,
How you are passing the value in select query ?
In where condition are you passing like where kunnr = 123456 or kunnr = '123456'?
please try to pass as '123456' or assign that value to local constant of CHAR10.
Thanks
Deependra
2014 Nov 28 1:20 PM
Hi,
In report where condition am passing a~kunnr in so_cust.
so_cust[] = 0000123456..
in se11 while passing kunnr as 0000123456 it is not fetching
2014 Nov 28 1:23 PM
As this is character field, leading zero not required to pass.
i can see you are passing the value thought select option . Please check select option type e.g. SELECT-OPTION s_cust FOR ?? which data element or type you assigned here ?
if possible also share your select query.
Deependra
2014 Nov 28 1:26 PM
LOOP AT IT_VALUE.
SO_CUST-OPTION = 'BT'.
SO_CUST-SIGN = 'I'.
SO_CUST-LOW = IT_VALUE-VALUE+0(10).
SO_CUST-HIGH = IT_VALUE-VALUE+0(10).
APPEND SO_CUST.
ENDLOOP.
SELECT ZVF~KUNNR
ZVF~GJAHR
ZV~VKORG
ZV~VTWEG
FROM ZV WHERE
ZVL~KUNNR in SO_CUST
AND ZVL~GJAHR in SO_FYEAR
AND ZVF in SO_ORGAN
2014 Nov 28 1:39 PM
Hi,
If data element of ZVL~KUNNR is KUNNR then you need to use 'CONVERSION_EXIT_ALPHA_INPUT' while creating SO_CUST range for both LOW and HIGH value.
Also, you are joining 3 tables (although i can not see complete query), if there is any inner join that could be cause. because in case on inner join , same custiomer entry need to be exist in all table.
Deependra
2014 Nov 28 1:47 PM
Yeah tried conversion alpha also.Problem is in se11 zv table
while passing kunnr as 123456 in z table also not fetching..if i give only 123456* means only fetching dat...Why
2014 Nov 28 1:52 PM
If it is Z table, delete this entry and create new one.
For deleting, try to use debugg mode to delete the same.
Regards
Amol Khochare
2014 Nov 28 1:59 PM
hi,
IN DEBUGG MODE AM INSERTING THE SAME KUNNR AS NEW FIELD,SO AGAIN AM SAVING MEANS IT CORRECTLY FETCHING.BUT IN OLD RECORDS IT IS SAVING AS123456.
BUT NOW ITS HAVING 0000123456...
NOW WHAT CAN I DO FOR ALL DATAS ALL ARE HAVING 6 DIGITS.
2014 Nov 28 2:15 PM
1. Now if you pass as it is (0000123456) in where codition, it will display the records.
and if you enter the field value 123456 on your selection screen, then use conversion exist function module CONVERSION_EXIT_ALPHA_INPUT. it will add zeros before the 123456.
2. Best method is, try to change the data type of your field from char to num.
Regards
Amol Khochare
2014 Nov 28 1:22 PM
Hi,
Please use CONVERSION_EXIT_ALPHA_INPUT this function module for where field.
Regards
Amol Khochare
2014 Nov 28 1:24 PM
CONVERSION_EXIT_ALPHA_INPUT also am tried..
in table level its having some space after six digits..so it is fetching like 123456* only.
same time if it is character means correctly fetching,,like 'abcdef'.
2014 Nov 28 2:02 PM
2014 Nov 28 2:59 PM
2014 Nov 28 2:53 PM
I suppose you used standard data element, so conversion-exit ALPHA to define the database table.*
But often some programmer forget to manage this information in customer report, so sometimes some invalid data get stored in database.
Suppose a record has value for kunnr '123456 ' (trailing space) in database, if you want to select it in SE16 or SE16N (generated correct program) then selection criteria are converted giving a '0000123456' value so record is not displayed, but without selection criteria, you are able to see the wrong record...
NB: You should now better understand why SAP created FM as CONVERSION_EXIT_ALPHA_RANGE_I and CONVERSION_EXIT_ALPHA_RANGE_O in addition to CONVERSION_EXIT_ALPHA_INPUT and CONVERSION_EXIT_ALPHA_OUTPUT.
So always use ddic reference in dynpro (also selection-screen) when available, so the system will implicitly use the conversion-exit and for interface without dynpro, call explicitly the conversion-exit FM.
Regards,
Raymond
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |