Application Development 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: 

Making a field appear 5 characters when it is defined as char 10 in a table

Former Member
0 Kudos

Hello in SE11, i have a field which is defined as char10. the thing is the first five characters are zeros e.g 0000021171. i wish to make it appear as 21171 when i view it in se11. how can i do this?thx

1 ACCEPTED SOLUTION

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

You can use the Conversion Exits on that field.

Eg: MARA-MATNR is a filed of 18 chars long.

0000000000000012345678.

But whenever we use CONVERSION_EXIT_ALPHA_MATNR.

it will display as 12345678 only.

Regards,

Sreeram Kumar.Madisetty

9 REPLIES 9

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

You can use the Conversion Exits on that field.

Eg: MARA-MATNR is a filed of 18 chars long.

0000000000000012345678.

But whenever we use CONVERSION_EXIT_ALPHA_MATNR.

it will display as 12345678 only.

Regards,

Sreeram Kumar.Madisetty

0 Kudos

thanks but how do you do it? is there an associated transaction?

0 Kudos

Hello,

You can call this conversion exit before displaying the output.

DATA:
    V_IN TYPE CHAR10,
    V_OUT TYPE CHAR10.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = V_IN
      IMPORTING
        output = V_OUT.

    CONDENSE V_OUT.

    WRITE V_OUT.

BR,

Suhas

Edited by: Suhas Saha on Mar 10, 2009 9:08 AM

0 Kudos

go to the domain and assign it there ..

Former Member
0 Kudos

Hi,

try FM:CONVERSION_EXIT_ALPHA_OUTPUT

Former Member
0 Kudos

In SE11-> Display entries screen , In Menu Setting->User Parameters , Click Data Browser Tab & check Check Conversion exit

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

If you are creating any custom table , you can assign that Conversion Exit to that field at Domain level.

If you are simply using that table and field, call that exit before using that field values in your report.

Regards,

Sreeram Kumar.Madisetty

keerthy_k
Active Participant
0 Kudos

Hi,

For that u have to create a custom Data element and domain. Now in the domain u can give

'Data Type' as CHAR

'No. Characters' as '10'

'Decimal Places' as '0'.

'Output Length' as '10'

'Convers. Routine' as 'ALPHA'.

Now attach this data element to ur field in the Ztable.

This will solve ur pblm.

Keerthi

Former Member
0 Kudos

hi,

u can use conversion exits.if it is charcter field u can condense the value also.