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

Selection texts

kishorepallapothula
Participant
0 Likes
1,147

Hi All,

How can i enter some text on selection screen in a box.

please give me solution.

Be sure awarded for an useful answer.

kishore

10 REPLIES 10
Read only

Former Member
0 Likes
1,057

Hi Kishore,

Use INPUT ON option.

DATA V_NAME(20).

WRITE: 'Enter your name: ', V_NAME INPUT ON,

Thanks,

Vinay

Read only

0 Likes
1,057

Hi vinay,

Thanks for your mail. I want to display some text on the selection screen in a box.

The text is like this.

"program to send email alert for performance bond, security deposits & insurance policies on" (variable) " no.of days due before the expiry date.

This matter should be on the selection screen.

please help me.

kishore

Read only

0 Likes
1,057

Hi Kishore, just add this in your SELECTION SCREEN code:


SELECTION-SCREEN COMMENT /0(100) g_text.

And in INITIALIZATION:


CONCATENATE 
'program to send email alert for performance bond, security deposits & insurance policies on'  
g_days 
'no.of days due before the expiry date'
INTO g_text.


Read only

0 Likes
1,057

Hi Sam Limbrada ,

Thanks for your answer. You solved my problem. Once again thanks.

kishore

Read only

varma_narayana
Active Contributor
0 Likes
1,057

Hi.

1. If you want to Display some Text as BOX Title this is the way.

<b> SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.

Parameters : p_matnr like mara-matnr.

SELECTION-SCREEN: end OF BLOCK B1 .</b>

Double click on the TEXT-T01 to Create the Text symbol where u can add text

2. To Display a Text Label any where in Selection-screen

SELECTION-SCREEN : COMMENT 5(20) TEXT-C01.

Double click on the TEXT-C01 to Create the Text symbol where u can add text

Here 5 is the position and 20 in the length.

Regards.

Read only

Former Member
0 Likes
1,057

Hello,

The following extract from sap will provide the required answer,

SELECTION-SCREEN - Defining Titles and Texts on Selection Screens

You can define texts for various text objects: ( comments, pushbuttons, ...)

There are two ways to do this:

Static definition: You enter the text in the form TEXT-xxx with a three-character identifier xxx as a text symbol.

The contents of the text symbol TEXT-xxx appear on the selection screen and cannot be changed dynamically.

Dynamic definition: You enter a field name of up to eight characters ex. abcdefgh.

In this case, the system creates a field with the name abcdefgh . Its contents then appear on the selection screen at runtime. You must set these texts at runtime (in the INITIALIZATION part of a report, or in the INIT routine of the logical database program SAPDBldb). You can also change them while the selection screen is being processed.

Notes

The field abcdefgh is generated automatically. You do not have to declare it using the DATA statement.

You can define texts in any of the following:

- SELECTION-SCREEN BEGIN OF SCREEN

- SELECTION-SCREEN BEGIN OF BLOCK

- SELECTION-SCREEN COMMENT

- SELECTION-SCREEN PUSHBUTTON

Example

DATA SAPLANE_WA TYPE SAPLANE.

SELECTION-SCREEN BEGIN OF BLOCK CHARLY

WITH FRAME TITLE TEXT-001.

PARAMETERS PARM(5).

SELECTION-SCREEN COMMENT /5(20) COMM1234.

SELECT-OPTIONS SEL FOR SAPLANE_WA-PLANETYPE.

SELECTION-SCREEN END OF BLOCK CHARLY.

...

INITIALIZATION.

MOVE 'Test dynamic text' TO COMM1234.

( TEXT-001 has the contents 'Block Charly').

Selection screen:

Block Charly--


| PARM _____ |

| Test dynamic text |

| SEL ________ to ________ |

-


Regards

Byju

Read only

Former Member
0 Likes
1,057

HI,

TRY THIS CODE :

data NAME(20).

skip.

uline at 10(10).

WRITE: /10 '|', 11(8) 'Text' CENTERED, 19 '|' ,NAME INPUT ON.

ULINE AT /10(10).

plz reward points if it helps.

rgds

Read only

Former Member
0 Likes
1,057

this code creates a box on 'enter name' :

data NAME(20).

skip.

uline at 10(20).

WRITE: /10 '|', 11(10) 'ENTER NAME' ,29 '|',name input on .

ULINE AT /10(20).

reward points if it helps.

rgds

Read only

Former Member
0 Likes
1,057

Hi Kishore,

The following code works, incase you cannot put all your text in one go:

selection-screen begin of block b1 with frame.

.....

selection-screen uline.

selection-screen comment /5(70) text1 for field p_gpart.

selection-screen comment /5(70) text2 for field p_gpart.

selection-screen comment /5(70) text3 for field p_gpart.

selection-screen uline.

selection-screen end of block b1.

initialization.

text1 = 'program to send email alert for performance bond'.

text2 = 'security deposits & insurance policies on...'. " or use concatenate

text3 = 'no.of days due before the expiry date'.

Read only

0 Likes
1,057

Hi Kishore,

omit the for field....

just use

selection-screen comment /5(70) text1.

selection-screen comment /5(70) text2.

selection-screen comment /5(70) text3.