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

IF sy-ucomm = 'ONLI'.

Former Member
0 Likes
13,300

HI What is the Purpose of the this below code...

IF sy-ucomm = 'ONLI'. What is the meaning for this 'ONLI'..?

Kindly let me know.

Akshitha.

6 REPLIES 6
Read only

Former Member
0 Likes
4,305

hi,

ONLI is the function code of execute button(F8).

so, if system field sy-ucomm eq 'ONLI'

code following the if statement executes

Read only

Former Member
0 Likes
4,305

Hi!

During dialog programming you can use text for controlling the navigation between the screens, clicking on buttons, etc...

For example if you click on the back (green arrow pointing to the left) button, your ok-code will be 'BACK'.

If you are running a report by hitting F8, or clicking on the execute button, your ok-code will be 'ONLI' (online).

Regards

Tamá

Read only

Former Member
0 Likes
4,305

Hi..,

For any action to take place , when u click any button or input any value and press any pushbutton... some <b>function code</b> will be stored in the system field <b>sy-ucomm</b>.

ONLI is the function code for the Execute button.. or u can give the function code whatever u want for a pushbutton in ur own screen...

then according to the function code placed in sy-ucomm field the next operation will takeplace... For any action to take place this function code has to be generated !!!...

This u can achieve by pressing the Function key attached to this function code ( inthis case it is F8 )...

or in the Ok code bar give =ONLI and press enter , then also the action will be the same !!!!!!

Hope u understood !!!!

regards,

sai ramesh

Read only

Former Member
0 Likes
4,305

Hi,

'ONLI' is a OKCODE. It is a OKCODE for F8.

When you write any report program and you only want to execute the block code, when user pres F8 then you write condition like,

IF sy-ucomm = 'ONLI'.

*" You code here

ENDIF.

Regards,

RS

Read only

Former Member
0 Likes
4,305

hi Akshitha,

from my knowledge point of view

ONLI is a sap provided key word which is used to take the control for the output display

that means once u give the values in the selection screen and if u go with execute and if u have the ONLI keyword, then control will be moved to output display...

If it is wrong, sorry to answer.....

~~Guduri

Read only

Former Member
0 Likes
4,305

hi,

ONLI is function code of execute button(F8).