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

SY-UCOMM Error

Former Member
0 Likes
1,735

Hi Experts

I have used the following code, but when i debug am not able to get the SY-UCOMM value. what could be the reason.

Pls help me on this, do we need the order of the statements or whatelse pls.

Regards

Rajaram

SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.

PARAMETERS vbeln TYPE vbrk-vbeln matchcode object ZINVOICE.

PARAMETERS rtim TYPE vbrk-ERZET.

SELECTION-SCREEN END OF BLOCK bk1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

parameter : p_org as checkbox,

p_dup as checkbox,

p_tri as checkbox,

p_qua as checkbox.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

SET PF-STATUS 'POLY'.

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'EXEC'.

PERFORM PRINT.

WHEN 'PREV1'.

ENDCASE.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,364

Raja,

1. First check you declared function codes in Set PF status

or not?

2.declare your code under AT SELECT-SCREEN event.

CASE SY-UCOMM.

WHEN 'EXEC'.

PERFORM PRINT.

WHEN 'PREV1'.

ENDCASE.

Pls. reward if useful...

9 REPLIES 9
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,364

Dear friend ...this is a duplicate post ......

Read only

0 Likes
1,364

am not able to get the value of SY-UCOMM yar

what could be the reason.

Read only

Former Member
0 Likes
1,364

See at selection screen output is used to enable disable the screen fields ..

After u pressing any button like radio button button means put tht radio button name = 'X' and check it..

Wht u want to do exactly..Can u tell tht..It will be easy to provide solution..No need to use At-user command in the at selections screen output

Read only

0 Likes
1,364

Actually i have designed two buttons in GUI Status

i want to check the button function code and call the functions accordingly.

Read only

0 Likes
1,364

Hi,

see my code.it wii work.

rgds,

bharat.

Read only

0 Likes
1,364

Now its working yar thank you very much.

Now one more problem is that am calling the smartform twice for two different conditions using different name. but it returns the error that FORM DOES NOT EXIST.

What could be the reason, my function module is

Regards

Rajaram

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = w_formname1

IMPORTING

FM_NAME = fm_name1

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3 .

IF sy-subrc 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Read only

Former Member
0 Likes
1,364

HI,

do like this.here sy-ucomm and at user command will not work.they are for list ans screen painter screens.for selection-screens u have to use like this.

tables:sscrfields."Selection SCreen FIELDS

SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.

PARAMETERS vbeln TYPE vbrk-vbeln matchcode object ZINVOICE.

PARAMETERS rtim TYPE vbrk-ERZET.

SELECTION-SCREEN END OF BLOCK bk1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

parameter : p_org as checkbox,

p_dup as checkbox,

p_tri as checkbox,

p_qua as checkbox.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

SET PF-STATUS 'POLY'.

at SELECTION-SCREEN.

CASE SSCRFIELDS-ucomm.

WHEN 'EXEC'.

PERFORM PRINT.

WHEN 'PREV1'.

ENDCASE.

rgds,

bharat.

Read only

Former Member
0 Likes
1,365

Raja,

1. First check you declared function codes in Set PF status

or not?

2.declare your code under AT SELECT-SCREEN event.

CASE SY-UCOMM.

WHEN 'EXEC'.

PERFORM PRINT.

WHEN 'PREV1'.

ENDCASE.

Pls. reward if useful...

Read only

0 Likes
1,364

Now its working yar thank you very much.

Now one more problem is that am calling the smartform twice for two different conditions using different name. but it returns the error that FORM DOES NOT EXIST.

What could be the reason, my function module is

Regards

Rajaram

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = w_formname1

IMPORTING

FM_NAME = fm_name1

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3 .

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.