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: 

Eliminating zeoes from a CHAR (10) including decimal based IO

Former Member
0 Kudos

Hi guys,

i am getting a filed CHAR (10) from a legacy system via flat file into BW. I created and mapped that incoming field to an InfoObject CHAR (10). Now from the source system field value arrives as '000087.39 ' and user would like to see it as 87.39 in the BW query report. I tried to L_Trim, Shift <field> LEFT DELETING LEADING '0' and CONVERSION_EXIT_ALPHA_OUTPUT but nothing seemed to work in transfer or update rules and Formula.....Remember value is 10 CHAR including decimal (3 max).

Any idea or thoughts?

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi there...

do as folllows...

itab-field1(C)

this way, all the leading zeros in the itab-field wil get suppressed.

regards'

8 REPLIES 8

Former Member
0 Kudos

Hi,

Try to use ' Condense' .

Thanks.

Swati.

Former Member
0 Kudos

hi there...

do as folllows...

itab-field1(C)

this way, all the leading zeros in the itab-field wil get suppressed.

regards'

Former Member
0 Kudos

Hi,

Can't you change the Target field from CHAR(10) to something like a Packed Decimal say

pack TYPE P DECIMALS 3. I guess that it should sove the problem.

Regards

Saket Sharma

0 Kudos

Well i cannot change the IO to a KeyFigure , it has to stay as either CHAR or NUMC so that i could use it as navigational attribute. If i changed it to KF then it would only be used as display and in that case i have add that to the cube drop and reload data, dont want to do that.

Also i forgot to mention that i tried CONDENSE as well with SHIFT <Field> DELETING LEADING '0' and it did not work. I will try itab and see if it makes a difference..

Any other ideas..

Thanks..

Former Member
0 Kudos

hi send the value of char into a packed decimal..

like this..

data: char(10) type c value '0000087.98',

test type p decimals 2 .

test = char .

write:/ char,test .

Former Member
0 Kudos

try to use supress leading zeroes

0 Kudos

Thanks guys.

Well i found a workaround, basically i changed the IO from characteristic to KF as Numeric(with DEC) and manipulated the query to show that as an attribute of zmaterial..So now its giving what i asked for...I guess i did not have patience to keep trying ..instead just use the available SAP functionality ...

Thanks for youe time and responses ..i am assigning points to people who were close to the original problem's resolution.

Former Member
0 Kudos

I basically changed the strategy..looked into my last comments