cancel
Showing results for 
Search instead for 
Did you mean: 

Routine Help.

Former Member
0 Kudos
78

Hi All,

I have the following dilemma: I have data coming from R/3 for account numbers that have zeroes in first and second characters. Like for example 01234567 or 00123456.

I want those zeroes to remain the same in BW. The infoobject is defined as a characteristic with length 8.

Is there a routine where I can keep the zeroes in front.

Thanks,

Ashmith Roy

Accepted Solutions (0)

Answers (2)

Answers (2)

edwin_harpino
Active Contributor
0 Kudos

hi Ashmith Roy,

and make sure your account number infoobject has Convers. Rou 'ALPHA' in infoobject maintenance.

if the checkbox isn't available you may try following code

data : lv_acc_no (8) value '00000000',

lv_length type I.

RESULT = TRAN_STRUCTURE-/BIC/ZACC_NO.

lv_length = 8 - strlen( RESULT ).

if lv_length > 0 and lv_length < 9 and RESULT(1) <> '0'.

shift RESULT right by lv_length places.

RESULT(lv_length) = lv_acc_no(lv_length).

endif.

Former Member
0 Kudos

Hi Ashmit,

if you need to do some coding use the standard fm for conversion instead of doing it by your own. Check out the fm 'CONVERSION_EXIT_ALPHA_INPUT' --> puts the leading zeroes in front of a value and checks whether a value is numeric or not.

So in a routine you will have the following:

call function 'CONVERSION_EXIT_ALPHA_INPUT'

exporting input = <your field>

importing output = result.

That's all.

regards

Siggi

Former Member
0 Kudos

Hi,

Select the check box 'Conversion Exit' in transfer rules against your account number .

Hope it works ...

Ravi