cancel
Showing results for 
Search instead for 
Did you mean: 

se16 problem when searching in char field

was_wasssu
Participant
0 Kudos

Hi,

I have a custom table and one of the fields is defined as CHAR Length 10. If I enter with SE16 and try to search after this field like "not equal to blank" it finds me the records. If I search inserting the value 10 in this field it doesn't finds me any record even if there are records with value 10 for this field. If i search using 10* it finds me the records with value 10 in it. Why doesn't finds me anything when I search only with value 10?

Thanks

kiran_k8
Active Contributor
0 Kudos

W.W,

Did you checked the Domain and Data Element of this Field ?

K.Kiran.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182550
Active Contributor

Ok.

If you programatically assign a value to a field with a conversion exit (and it would have helped for you to mention the domain as well) then it will be entered into the field as it is assigned.

eg

w_vbeln = '10'

Will be '10', not '00000000000010'.

When you assign a value to a field that has a conversion exit ( and you must check the domain but you get to know the majority in the end) you must use a conversion exit.

So VBELN has a conversion exit 'ALPHA', Conversion exits come in two halfs - _INPUT and _OUTPUT.

When you are populating a table field to save in the database you would use:

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    INPUT         = l_Vbeln
  IMPORTING
    OUTPUT        = ls_Vbak-Vbeln.

Or, you could assign the value to a variable of the right type and WRITE it to another field.

This is especially important when you start using WBS Elements etc since these have a full text description which is converted to an 8 character number.

Conversion exits are called implicitly with SELECT-OPTIONS, PARAMETERS and WRITE statements.

Rich

Answers (7)

Answers (7)

Former Member

Hi ,

Use conversion exit ALPHA in the domain of that field. This will solve your problem.

Thanks and Regards,

was_wasssu
Participant
0 Kudos

Is already used ALPHA.

was_wasssu
Participant
0 Kudos

Using se16, if I edit the table, delete the value 10, save, and write again the value 10, then if i display the records (using se16) this edited record is displayed like 0000000010 (I think because of the domain VBELN). So the problem is when the value is written in that field? Should be written in another way? I don't understand.

was_wasssu
Participant
0 Kudos

More info: The domain used for this field is VBELN

Sandra_Rossi
Active Contributor
0 Kudos

So, this one has ALPHA conversion exit. It means that when you enter the value "10" in the SE16 screen, SE16 will look for value "0000000010" in the table. But in the database table, you may theoritically, although abnormal, have values "10", "010", "0010", "00010", etc. Though, they are all displayed "10" because of the ALPHA conversion exit. You might even have in the database table the value "10" with leading blanks, which are not displayed if you're using the ALV grid display mode.

former_member182550
Active Contributor
0 Kudos

The OP states that it is a CHAR 10 field. Does not state that it has a domain etc (so me believing that he knows what he was talking about deleted my comment about conversion exits....)

rajkumarnarasimman
Active Contributor
0 Kudos

Hi.

Kindly remove the conversion exit which is mapped in domain. Conversion routine ALPHA accepts the space in the table.

Regards

Rajkumar Narasimman

Sandra_Rossi
Active Contributor
0 Kudos

Why not looking at the exact value of the table field and the value of the selection field? To do it, add a break point at statement "SELECT" (press F9 key in the debugger), and display the exact values via the debugger. You should then understand why they are different.

former_member192023
Active Participant
0 Kudos

Maybe it was saved as 10XXXXXXXX【X=FULL BLANK SPACE】.

You can try to see the detail content in Tr-CODE se16n. Which have the detail technical contents of database.

was_wasssu
Participant
0 Kudos

I was thinking that could be blanks after, but how can I check this exactly? (from se16n or something else).

Thanks