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 in Script

ashish_shah5
Participant
0 Likes
892

Hi friends,

We did technical upgrade from 4.6 to ECC 6.0. Here I am facing problem in ZScript. I did debugging values are coming proper in Parameters. But in out put we are facing problem.

In Script the code is written &wa_HEADER-SORTNR(5)& &wa_header-TEXT1(20)& &space(4)&

Correct O/P in 4.6

Sr No......Test..........................Specification...................................Result

01 ....... Appearance clear ......To pass the test..............................pass the test

But in ECC 6.0

Sr No Test Specification Result

01 Appearance clearTo pass the testpass the test

I did debugging in both system, both the system parameter having same records.

Please do needful.

Regards.

10 REPLIES 10
Read only

Former Member
0 Likes
873

Hi,

Increase the size of variable Text1 and then try to execute.

also increase the space between two variables.

Regards

Rajesh Kumar

Read only

Former Member
0 Likes
873

Hi,

I am supprised it did work formerly.

You to use tabs to do the alignment right.

How to do:

Create an new paragraph format (by copying the current one)

Insert tabs in the paragraph format..

Use the this new paragraph in your sapscript line with the problem.

Add between the variables ,,

And add (C) to the variables.

This will do.

Gr., Frank

Read only

0 Likes
873

Sorry. I am not getting. can u please make me understand in brif.

Read only

0 Likes
873

Go to editor command and use tabs i.e. put commos between varaibles. e.g. &wa-name& ,,,, &wa-city&.Try this.

Read only

Former Member
0 Likes
873

Are you using an proprotional font (like Helve) or a non-proportional font (like courier).

the line.

  • &wa_HEADER-SORTNR(5)& &wa_header-TEXT1(20)& &space(4)&&wa_header-SPEC(20)& &wa_header-RESULT(10)&

should work properly, but it doesn't

May be it is a solution to use tabs.

You should do this by creating a new paragraph (eg. CL)

with the tabs 6 CHAR LEFT

27 CHAR LEFT

48 CHAR LEFT

Then change the line as follows

CL &wa_HEADER-SORTNR(C)&,,&wa_header-TEXT1(C)&,,&wa_header-SPEC(C)&,,wa_header-RESULT(C)&

Hope this is clear

Gr., Frank

Read only

0 Likes
873

Thx for ur reply.

As per you suggestion I did, but I am getting O/P

Sr No......Test..........................Specification...................................Result

01.......... Appearance clear ..................To pass the testpass the test

But I want my O/P

Sr No......Test..........................Specification...................................Result

01 ....... Appearance clear ......To pass the test..............................pass the test

Because of ",,".

Any other solution...

Regards.

Read only

0 Likes
873

Hi,

Are both lines using the same paragragh format?

Maybe it is an idea to align with mm instead of char.

Gr., Frank

Read only

0 Likes
873

Dear F. Bernsen

No, both line using different Paragraph format.

And my Tabs of paragraph format are in CM.

Regards.

Read only

0 Likes
873

Hi,

if you use the same paragraph format for both lines do you get output like

Sr No......Test..........................Specification...................................Result

01.......... Appearance clear ......To pass the test..............................pass the test

or like

Sr No......Test..........................SpecificationResult

01 ......... Appearance clear ......To pass the testpass the test

Gr., Frank

Read only

ashish_shah5
Participant
0 Likes
873

Solved by own.