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: 

How to use left-justified with Move command??

Former Member
0 Kudos
1,925

Hi,

I have a field BKPF-XBLNR which I have to download to an final output table. I am using the command "Move"...

Move T_BKPF-XBLNR to T_OUTPUT-XBLNR.

My problem is that for some records this field is a combination of characters and numbers ... but some are purely numbers ... The records which are a combination of character & numbers are left justified where as the numeric one's are getting right justified once I get the output in the excel sheet ... How do I make these numeric ones left justified ... ??

Thank You,

SB.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
409

I think this is due to Excel interpreting the fields that only contain numbers as numeric. So I think the solution is to trick Excel into accepting these fields as character.

I think I've seen a solution somewhere. I'll see if I can find it.

Rob

9 REPLIES 9

asarat
Explorer
0 Kudos
409

You can use this:

shift T_BKPF-XBLNR left deleting leading space.

Move T_BKPF-XBLNR to T_OUTPUT-XBLNR.

if it does not work then

data : temp_xblnr type char16.

Move T_BKPF-XBLNR to temp_XBLNR.

shift temp_XBLNR left deleting leading space.

Move temp_XBLNR to T_OUTPUT-XBLNR.

I am sure it will work.

Former Member
0 Kudos
409

Nopes Sarat that is not working

alejandro_lpez
Contributor
0 Kudos
409

Hi,

you can try using the statement SHIFT:

SHIFT T_OUTPUT-XBLNR RIGHT DELETING TRAILING space.

regards,

Alejandro

Former Member
0 Kudos
410

I think this is due to Excel interpreting the fields that only contain numbers as numeric. So I think the solution is to trick Excel into accepting these fields as character.

I think I've seen a solution somewhere. I'll see if I can find it.

Rob

0 Kudos
409

Now I remember. Our problem was just the reverse. We were downloading numeric fields. But whenever we had a negative value, Excel would interpret the cell as character rather than numeric.

So this won't help you. The only solution I know of us to format the column as text in Excel after downloading. This should be simple enough.

Rob

Former Member
0 Kudos
409

Hi,

Try this way..

Move T_BKPF-XBLNR to T_OUTPUT-XBLNR.

shift T_OUTPUT-XBLNR right deleting trailing space.

..........

........

append i_output.

0 Kudos
409

Nopes that does not work ... I think what Rob is saying may work out ... even I am trying to find the solution of how to get the numeric values to char in excel sheet ...

0 Kudos
409

Highlight the column. On the menu bar: Format->Cell.

On the "Number" tab, select "text".

This works on my version of Excel. Something similar should work for you.

Rob

Former Member
0 Kudos
409

Write : b to a left-justified.

Regards

Vick