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

SAP-Script Text inside the BOX

Former Member
0 Likes
2,393

i created one sap script, and used the BOX command and inside the box i insert the text , but text is appearing on the box lines can any one tell me how to align text to protect not to be appear on the lines .below is my situation.

this box like this in sap script.

DescriptionAmount
sample text sample tecxtttttttt2300

i successfully created BOX like above but text inside the box is appearing on the lines .

thanks

7 REPLIES 7
Read only

Former Member
0 Likes
1,620

Hi,

you can use

BOX Command

Syntax /: BOX

Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT and FRAME both a measurement and a unit of measurement must be specified. The INTENSITY parameter should be specified as a percentage between 0 and 100.

1. XPOS, YPOS: Upper left corner of the box, relative to the values of the POSITION command.

Default: Values specified in the POSITION command.

The following calculation is performed internally to determine the absolute output position of a box on the page: X(abs) = XORIGIN + XPOS Y(abs) = YORIGIN + YPOS

2. WIDTH: Width of the box. Default: WIDTH value of the SIZE command.

3. HEIGHT: Height of the box. Default: HEIGHT value of the SIZE command.

4. FRAME: Thickness of frame. Default: 0 (no frame).

5. INTENSITY: Grayscale of box contents as % .

pls check this link

Text Element in SAP-Script and Box | SCN

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,620

Did you try by changing the postion of the box

Read only

0 Likes
1,620

Dear i already tried but my issue is the text inside the box is appearing on line of box

and text is dynamic i dont know how much length each time

Read only

Former Member
0 Likes
1,620

Hi Jamal,

               the only way is either chop the text to a particular length and append it to new line

                                                                      OR

Determine the length or number of characters in the string using string length and move or change the position of the vertical line dynamically

Hope this helps!

Happy Coding,

Santhosh Yadav

Read only

0 Likes
1,620

dear santhosh thanks for replay could you please elaborate.

Read only

0 Likes
1,620

Hi Jamal,

               Find the length of the text using Finding the Length of a Character String (SAP Library - ABAP Programming (BC-ABA))

then set the attributes ie; width of the BOX dynamically using http://scn.sap.com/thread/1610340

If you are fine with this please mark the thread answered and close the thread.

Happy Coding,

Santhosh Yadav


Read only

Former Member
0 Likes
1,620

Hi Jamal,

your issue must be resolved by using the  sap standard " &SAPSCRIPT-COUNTER_0& "

Please try the solution provided  by me way back in 2007 in saptechnical.com

SAPTechnical.COM - Printing internal table contents dynamically

Let me know,if you face any problems.

Btw i agree that the heading was not in sync with the solution provided .

-

Lakshmi