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

Problem in SAP Script

Former Member
0 Likes
704

Hi all,

In printing description of a material, i defined the size as of 40 characters.

If it crosses 40 characters i need to print that in next line.

For Example:

1)HANDLE SOLID SHANK SHUNG SOLID LIQUID GAS LINK->now 40th character is A of GAS, but i need to print 'GAS LINK' in next line.

How i can overcome this,Please help me.

Points will be rewarded.

Regards,

Karthick.

5 REPLIES 5
Read only

Former Member
0 Likes
674

Hi,

In the script editor, for continuation of same line, you have to use the option "=" in the leftmost command field.

thanks,

sksingh

Read only

Former Member
0 Likes
674

Hi

You can't predict for every material that 41 position letter.

sometimes it will be Ok for certain materials

so better try to print the description in the next line where there is enough space.

as such there is no rule to avoid such texts.

reward if useful

regards,

Anji

Read only

Former Member
0 Likes
674

Hello,

The only thing you can do is to is indexing the lines:

ie:

/: &VAR(40)&

/: IF &VAR(40)+10& EQ ' '

/: &VAR(40)+10& " For example

/:ENDIF

This Will print in case it still has data to output.

Hope this helps

Gabriel

Read only

Former Member
0 Likes
674

Karthick - try function split_line. You can specify the maximum line length and the function will return a table of lines split correctly. Loop at the table and assign your form variables as needed.

Regards,

Lawrence Schmit

Read only

Former Member
0 Likes
674

Hi,

The complete printer command normally resides in the print control.

If characters belonging to the print command follow after the print control in the text (only useful for the HPL2 printer driver for PCL-5 printers), the text line following after the PRINT-CONTROL command should begin with an equals sign (=) in the format column.

Example:

/: PRINT-CONTROL SESCP = *c5G

If you do not use the equals sign, a space character is inserted between the print control SESCP and the character *c5G.

Refer to OSS note 5996 - How can SAPscript include printer commands?

Regards,

Bhaskar