Application Development and Automation 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: 
Read only

Alignment problem

Former Member
0 Likes
467

Hi all,

I have a small problem, as i am new to SDN,

I have a part of code in my report--

WRITE: /(06) VBAP-POSNR,

(18) VBAP-MATNR RIGHT-JUSTIFIED,

(40) VBAP-ARKTX,

(04) VBAPVB-ZZCPYEAR ,

everything is ok, but VBAP-MATNR is not getting right justified in the output.

what is the reason? can anyone tell the solution?

thanks

Alankaar

3 REPLIES 3
Read only

Former Member
0 Likes
431

Hi Revanth,

You didnt specify colums positions to data elements,so they are coming in same line with out any justifications.

Just specify column positions along with output lengths.

Try as follows.

WRITE: /01(06) VBAP-POSNR,

20(18) VBAP-MATNR RIGHT-JUSTIFIED,

45(40) VBAP-ARKTX,

90(18) VBAPVB-ZZCPYEAR.

<b>WRITE: /01(06) VBAP-POSNR.

01 - Represents colum position of data content

06 - Represents output length to be displayed</b>

Thanks,

Vinay

Read only

Former Member
0 Likes
431

Hi,

Try using the shift command..

parameters: p_matnr type matnr.

shift p_matnr right deleting trailing space.

write: / p_matnr.

Thanks,

Naren

Read only

Former Member
0 Likes
431

The lenght of MATNR is 18 characters, try increasing the lenght to about 25 and test the same.

WRITE: /(06) VBAP-POSNR,

(25) VBAP-MATNR RIGHT-JUSTIFIED,

(40) VBAP-ARKTX,

(04) VBAPVB-ZZCPYEAR ,