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

Declaring a checkbox parameter

Former Member
0 Likes
51,451

I know you can do this via GoTo in the menu in the top, but I'm wondering how do you code a checkbox parameter that would show a text longer than 8 characters.

Example:

SELECTION-SCREEN BEGIN OF BLOCK selection1 WITH FRAME.
SELECT-OPTIONS s_vbeln FOR vbak-vbeln.
SELECTION-SCREEN SKIP.
PARAMETERS p_chkbox AS CHECKBOX DEFAULT ''.
SELECTION-SCREEN END OF BLOCK selection1.

I want my checkbox to be displayed as "Click here if you could code me so I have more than 8 characters !"

How do I code that ?

Thanks in advance

Avraham

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
13,795

do this way ...


SELECTION-SCREEN BEGIN OF BLOCK selection1 WITH FRAME.
SELECT-OPTIONS s_vbeln FOR vbak-vbeln.
SELECTION-SCREEN SKIP.
selection-screen begin of line.
PARAMETERS p_chkbox AS CHECKBOX DEFAULT ''.
SELECTION-SCREEN COMMENT 4(15) text-001.
selection-screen end of line.
SELECTION-SCREEN END OF BLOCK selection1. 

7 REPLIES 7
Read only

Former Member
0 Likes
13,795

code as :

selection-screen begin of line.

selection-screen comment 1(70) text-001.

parameters : p_c as checkbox.

selection-screen end of line.

text-001 contains

"Click here if you could code me so I have more than 8 characters !"

Read only

Former Member
0 Likes
13,795

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: P_PRVPD as checkbox.

SELECTION-SCREEN POSITION 1.

SELECTION-SCREEN COMMENT 3(72) TEXT-T02 FOR FIELD P_PRVPD.

SELECTION-SCREEN END OF LINE.

write text-t02 = Click here if you could code me so I have more than 8 characters !"

Edited by: Sujamol Augustine on Jul 14, 2008 5:00 PM

Read only

Former Member
0 Likes
13,795

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(10) TEXT-001 FOR FIELD P1.

PARAMETERS: P1 LIKE SAPLANE-PLANETYPE, P2(5), P3(1).

SELECTION-SCREEN END OF LINE.

Read only

0 Likes
13,795

Kahana,

You should be able using the stataments below:

SELECTION-SCREEN BEGIN OF LINE.

...

SELECTION-SCREEN COMMENT [/][pos](len)

{text|{[text] FOR FIELD sel}}

[VISIBLE LENGTH vlen]

[MODIF ID modid]

[ldb_additions].

declare you check box.

...

SELECTION-SCREEN END OF LINE.

Any question, let me know,

Regards,

Alexandre

Read only

Former Member
0 Likes
13,796

do this way ...


SELECTION-SCREEN BEGIN OF BLOCK selection1 WITH FRAME.
SELECT-OPTIONS s_vbeln FOR vbak-vbeln.
SELECTION-SCREEN SKIP.
selection-screen begin of line.
PARAMETERS p_chkbox AS CHECKBOX DEFAULT ''.
SELECTION-SCREEN COMMENT 4(15) text-001.
selection-screen end of line.
SELECTION-SCREEN END OF BLOCK selection1. 

Read only

0 Likes
13,795

That was interesting, Santosh.

If you begin a selection screen line, the checkbox does not automatically take the name declared as the parameter variable.

Did you know that ?

Anyways, my question was answered

Thanks !

Read only

Former Member
0 Likes
13,795

Try this code:

SELECTION-SCREEN BEGIN OF BLOCK selection1 WITH FRAME.

SELECT-OPTIONS s_vbeln FOR vbak-vbeln.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(25) text-001 FOR FIELD p_chkbox.

PARAMETERS p_chkbox AS CHECKBOX DEFAULT ''.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK selection1.

Regards,

Joy.