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

to control lines in sapscript

Former Member
0 Likes
820

Hi

i want to draw a vertical line in sapscript according to the first and last page. i wrote the code as

/: IF &PAGE& EQ &LASTPAGE&

/: POSITION WINDOW

/: POSITION XORIGIN '2.35' CM YORIGIN '17.40' LN

/: SIZE WIDTH '0.0' CM HEIGHT '38.05' LN

/: BOX FRAME 10 TW

/: ELSE

/: POSITION WINDOW

/: POSITION XORIGIN '2.35' CM YORIGIN '17.40' LN

/: SIZE WIDTH '0.0' CM HEIGHT '10.05' LN

/: BOX FRAME 10 TW

/: ENDIF

but it is not showing me the correct result.

can i control the lines in the script dynamically

Deepak

Hi

i want to draw a vertical line in sapscript according to the first and last page. i wrote the code as

/: IF &PAGE& EQ &LASTPAGE&

/: POSITION WINDOW

/: POSITION XORIGIN '2.35' CM YORIGIN '17.40' LN

/: SIZE WIDTH '0.0' CM HEIGHT '38.05' LN

/: BOX FRAME 10 TW

/: ELSE

/: POSITION WINDOW

/: POSITION XORIGIN '2.35' CM YORIGIN '17.40' LN

/: SIZE WIDTH '0.0' CM HEIGHT '10.05' LN

/: BOX FRAME 10 TW

/: ENDIF

but it is not showing me the correct result.

can i control the lines in the script dynamically

Deepak

5 REPLIES 5
Read only

Former Member
0 Likes
776

Hi Deepak,

simply use BOX command like this..

a sample

Draw a vertical line by setting WIDTH to 0.

/:  BOX FRAME 10 TW WIDTH 0 TW HEIGHT '10' CM        
  Vertical line 10 CM long
2. with position
/:  BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW 

regards

satesh

Read only

Former Member
0 Likes
776

Hi Deepak,

You may consider setting the width of the box to more than 0 cm.

<b>/: SIZE WIDTH '0.1' CM HEIGHT '38.05' LN</b>

Regards,

Wenceslaus.

Read only

vinod_gunaware2
Active Contributor
0 Likes
776

hI

use <b>IF &NEXTPAGE& = 0</b> codition and also check BOX command properly.

regards

vinod

Read only

Former Member
0 Likes
776

Have you tried including variables in the values for the parameters (perhaps through &var& or something like that)?

I think I understand that is what you are trying to do.

Read only

Former Member
0 Likes
776

hi..

Use these commands..

1.

Box <xpos> <ypos> <width> <height> <frame> <intensity>

giving 0 as width drwas a straight line..

The BOX command draws a box as per the specifications. The x y co-ordinates are for the upper left corner relative to the values in the position command.

2.

Position <xorigin> <yorigin> <window> <page>

POSITION command is used to set the x y co-ordinates with respect to the start position of the window

regards

Ananaya.S