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

Problem in se11

Former Member
0 Likes
2,798

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.

14 REPLIES 14
Read only

deependra_shekhawat3
Contributor
0 Likes
2,282

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

Read only

0 Likes
2,282

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

Read only

0 Likes
2,282

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

Read only

0 Likes
2,282

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

Read only

0 Likes
2,282

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

Read only

0 Likes
2,282

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

Read only

0 Likes
2,282

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

Read only

0 Likes
2,282

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.

Read only

0 Likes
2,282

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

Read only

former_member207480
Participant
0 Likes
2,282

Hi,

Please use CONVERSION_EXIT_ALPHA_INPUT this function module for where field.

Regards

Amol Khochare

Read only

0 Likes
2,282

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'.

Read only

Former Member
0 Likes
2,282

please start with fresh one....

and data type should N not C

Read only

0 Likes
2,282

But won't the OP get some trouble when trying to JOIN or use FOR ALL ENTRIES with standard tables ?

Regards,

Raymond

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,282

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