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

CHECKBOX

Former Member
0 Likes
1,475

Hi,

What's event for activing checkbox?

i have 2 parameters on my selection screen: checkbox and field. I want if checkbox = 'X' -


> set cursor on field. I need the event

Thanks.

Hope this might help you

In At selection-screen event.

IF checkbox = 'X'.

GET CURSOR field field name.

ENDIF.

Thanks & Regards,

Vivek Gaur

10 REPLIES 10
Read only

Former Member
0 Likes
1,421

Hi,

At selection-screen.

if checkbox eq 'x'.

get cursor field field name.

endif.

Hope it helps you.

Regards

Manjari.

Read only

Former Member
0 Likes
1,421

There are no events specifically for checkbox. All you have to do is to check if the checkbox is selected (X) and use some coding in PBO event to set the cursor.

Try the following link from SAP help,

http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbac0b35c111d1829f0000e829fbfe/content.htm

Read only

Former Member
0 Likes
1,421

Hope this might help you

In At selection-screen event.

IF checkbox = 'X'.

GET CURSOR field field name.

ENDIF.

Thanks & Regards,

Vivek Gaur

Read only

Former Member
0 Likes
1,421

Hi SIMO,

It all depends upon your requirement as to what you need to do.

If you have to modify the selection screen accoridng to the checkbox input, you have to do that in the event AT SELECTION-SCREEN OUTPUT.

If you want to validate anything on selection screen then you have to do it in the event AT SELECTION-SCREEN.

If you have to do any type of processing depending upon the checkbox selected then do this in the event START-OF-SELECTION.

Regards,

Swapna.

Read only

0 Likes
1,421

Thanks but it's not helpful....:(

Me i want the event is triggered (started) when I check the checkbox

Read only

0 Likes
1,421

PARAMETERS : p_ AS CHECKBOX USER-COMMAND uc01 .

Read only

0 Likes
1,421

'PARAMETERS : p_ AS CHECKBOX USER-COMMAND uc01 .'

Yes Eric it's good...:)

but 'SET CURSOR FIELD 'DATE'' not work....:(

Read only

0 Likes
1,421

this is how it works..

REPORT  ZTEST_CHECKBOX.


parameters:  p_date type sy-datum,          
p_chec as checkbox user-command aaa.
         

at selection-screen output.

if p_chec = 'X'.
 set cursor field 'P_DATE'.
endif.

Read only

0 Likes
1,421

small example:

PARAMETERS : p_check AS CHECKBOX USER-COMMAND uc01.
PARAMETERS : p_bukrs TYPE bkpf-bukrs.

AT SELECTION-SCREEN OUTPUT.
  IF p_check EQ 'X'.
    SET CURSOR FIELD 'P_BUKRS'.
  ELSE.
    SET CURSOR FIELD 'P_CHECK'.
  ENDIF.

Read only

0 Likes
1,421

Ohhhhhhh yes thank y very very match

I omit 'OUTPUT'. I put 'AT SELECTION-SCREEN ON CHECKBOX'

It's very helpful.....:)