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

Display text in box - SAP Scripts

0 Likes
1,833

Hi,

I have a requirement where I have to add text to a text box in SAP script.

But the window has two boxes out of which second box should be populated with text.

They are one below the other (Vertically).

But when I try to add the text, it always sits in the first box.

Please share thoughts on how to get this done.

Below is the program inside the window where text is to be added.

     ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..

/:         POSITION WINDOW

/:         BOX FRAME 10 TW

/*         {MOD01

/:         BOX  XPOS '0' MM YPOS '0' MM WIDTH '80' MM HEIGHT '4.0' MM FRAME 10 TW

/:         BOX  XPOS '0' MM YPOS '4.0' MM WIDTH '80' MM HEIGHT '9.0' MM FRAME 10 TW

/*         POSITION 10 10

*         Testing footer

/*                                                                           

/*         MOD01}

/*         IF &VBDKR-EXNUM& NE '      '

/*        

/*         Statistic Number,,&P_STAWN1& &P_TEXT1&

/*         ,,&P_STAWN2& &P_TEXT2&

/*                                                                           

/*         ENDIF

/*         &WA_MARK1&

/*         &WA_MARK2&

/*         ,,<U>Your PO number:</>,,&vbdpr-bstkd&

Also, attached is the screen shot where text is to be added in the highlighted area of the form.

Thanks,

Mamatha

Hi,

I have a requirement where I have to add text to a text box in SAP script.

But the window has two boxes out of which second box should be populated with text.

They are one below the other (Vertically).

But when I try to add the text, it always sits in the first box.

Please share thoughts on how to get this done.

Below is the program inside the window where text is to be added.

     ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..

/:         POSITION WINDOW

/:         BOX FRAME 10 TW

/*         {MOD01

/:         BOX  XPOS '0' MM YPOS '0' MM WIDTH '80' MM HEIGHT '4.0' MM FRAME 10 TW

/:         BOX  XPOS '0' MM YPOS '4.0' MM WIDTH '80' MM HEIGHT '9.0' MM FRAME 10 TW

/*         POSITION 10 10

*         Testing footer

/*                                                                           

/*         MOD01}

/*         IF &VBDKR-EXNUM& NE '      '

/*        

/*         Statistic Number,,&P_STAWN1& &P_TEXT1&

/*         ,,&P_STAWN2& &P_TEXT2&

/*                                                                           

/*         ENDIF

/*         &WA_MARK1&

/*         &WA_MARK2&

/*         ,,<U>Your PO number:</>,,&vbdpr-bstkd&

Also, attached is the screen shot where text is to be added in the highlighted area of the form.

Thanks,

Mamatha

4 REPLIES 4
Read only

sireeshach
Explorer
0 Likes
1,488

Hi Mamatha,

Add a blank line before the text need to be printed.

In your example, like below.

   ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..

/:         POSITION WINDOW

/:         BOX FRAME 10 TW

/*         {MOD01

/:         BOX  XPOS '0' MM YPOS '0' MM WIDTH '80' MM HEIGHT '4.0' MM FRAME 10 TW

/:         BOX  XPOS '0' MM YPOS '4.0' MM WIDTH '80' MM HEIGHT '9.0' MM FRAME 10 TW

/*         POSITION 10 10

*

*         Testing footer

Regards,

Sireesha Ch

Read only

0 Likes
1,488

Hi Mamatha,

If your default paragraph format is not able to fit the text as you expected, create a paragraph format as required and use that new format instead of default paragraph format.

Regards,

Sireesha Ch

Read only

Former Member
0 Likes
1,488

hi,

boxes are defined on fixed positions on your window. the easiest way is to move the text to where you want it.so if the text is printed to high, insert some empty lines befor printing the text. if it is just in some cases, define a new "entry point -> /E" and only call this entry point in your new case.

regards

Stefan Seeburger

Read only

0 Likes
1,488

Thank you all.

I could solve it by adding SAP blank space <672> on the first line and then the text.

Below is the modified code in the window

/:         POSITION WINDOW

/:         BOX FRAME 10 TW

/:         BOX  XPOS '0' MM YPOS '0' MM WIDTH '80' MM HEIGHT '4.0' MM FRAME 10 TW

/:         BOX  XPOS '0' MM YPOS '4.0' MM WIDTH '80' MM HEIGHT '9.0' MM FRAME 10 TW

/:         IF &W_KUNNR_RG& EQ <customer_num>

*         <672>

ZJ       Text to be added

/:         ENDIF

Thanks for all the help!

Regards,

Mamatha