cancel
Showing results for 
Search instead for 
Did you mean: 

Script Dynamic Box length

Former Member
0 Kudos

Hi ,

I want to change Box length depending upon number of entries in it.

Am using the following code in script.

/E 102

/: BOX HEIGHT &N& CM FRAME 10 TW

/: BOX YPOS 2 CH HEIGHT 0 CM FRAME 10 TW

/: BOX XPOS 12 CH WIDTH 0 CM FRAME 10 TW

/: BOX XPOS 20 CH WIDTH 0 CM FRAME 10 TW

P1 ,,&ITAB-MATNR(R)&,,&N&,,&X&,,

Here N is my variable , and its value is 3 in runtime.

But am not getting desired result. Can any body correct me .

Regards,

Sandeep.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi!

SAPScript accepts in this case only character type variables.

So in your printer program you have to define "N" like this:

DATA: n(10) TYPE c.

So you have to MOVE the number into a character type field.

I'm using it the same way and it is working for me.

Regards

Tamá

Former Member
0 Kudos

Hi Tamas ,

Thanks alot for ur help.

regards,

sandeep.

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

For determining number of entries in an internal table ... use DESCRIBE statement ..

i.e,

describe table itab lines v_lines.

based on that calculate the box length ..

Regards,

Santosh

Former Member
0 Kudos

Hi santosh ,

thanks for the reply.

I have the no of entries. i.e N and its value is 3.

but my box length is not getting changed.