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 problem

Former Member
0 Likes
2,979

Guys,

In the online this is not triggering please help on this.

IF sy-ucomm = 'ONLI'.

IF p_ml = 'X' AND p_pcfile+4(1) IS NOT INITIAL.

PERFORM f_load_pc_data.

ELSEIF p_bl = 'X' AND p_unix+11(1) IS NOT INITIA

PERFORM f_load_unix_data.

ELSEIF p_bl = 'X' AND p_ntfile IS NOT INITIAL.

PERFORM f_load_webmethod_file.

ENDIF.

ENDIF.

reg,

vijay

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,015

Hi,

If sy-batch = `X`.

then its background

else.

its foreground

endif.

Best regards,

Prashant

11 REPLIES 11
Read only

Former Member
0 Likes
2,015

Hi vijay,

1. we have to use

START-OF-SELECTION

event,

2. instead of detecting sy-ucomm.

regards,

amit m.

Read only

0 Likes
2,015

This code i wrote under start-of-selection only.

Read only

0 Likes
2,015

Hi again,

1. In that case

2. sy-ucomm will be blank.

(it won't contain ONLI)

3. Hence, remove your IF condition of sy-ucomm.

Just write the whole code

below start-of-selection.

regards,

amit m.

Read only

Former Member
0 Likes
2,015

Hi,

Change it as follows :

IF sy-ucomm = <b>'STRT'</b>.

IF p_ml = 'X' AND p_pcfile+4(1) IS NOT INITIAL.

PERFORM f_load_pc_data.

ELSEIF p_bl = 'X' AND p_unix+11(1) IS NOT INITIA

PERFORM f_load_unix_data.

ELSEIF p_bl = 'X' AND p_ntfile IS NOT INITIAL.

PERFORM f_load_webmethod_file.

ENDIF.

ENDIF.

Best regards,

Prashant

Read only

Former Member
0 Likes
2,015

Check the pf-status of the Screen. Is the function code 'ONLI' assigned to a function key and whether the pf-status is activated?

Also, instead of sy-ucomm , use OK_CODE(or whatever OK_CODE u have defined under the element list).

Regards.

Read only

0 Likes
2,015

I want to execute some statments under online and some under background.

How the program can identify online and background.

for background sy-ucomm = 'SJOB'.

like that for online.

reg,

vijay

Read only

0 Likes
2,015

Hi again,

1. simple

2. <b>IF SY-BATCH = 'X'.</b>

'''' IT MEANS BACKGROUND PROCESSING,

OTHER WISE ITS ONLINE.

regards,

amit m.

Read only

0 Likes
2,015

try to use CASE ENDCASE.

case sy-ucomm.

when 'SJOB'

action1

when 'ONLI'

action 2

endcase.

Read only

Former Member
0 Likes
2,015

Instead of START-OF-SELECTION, use AT SELECTION-SCREEN event.

AT SELECTION-SCREEN.

IF sy-ucomm = 'ONLI'.

IF p_ml = 'X' AND p_pcfile+4(1) IS NOT INITIAL.

PERFORM f_load_pc_data.

ELSEIF p_bl = 'X' AND p_unix+11(1) IS NOT INITIA

PERFORM f_load_unix_data.

ELSEIF p_bl = 'X' AND p_ntfile IS NOT INITIAL.

PERFORM f_load_webmethod_file.

ENDIF.

ENDIF.

At start-of-selection Sy-ucomm will become blank.

Regards,

Prakash.

Read only

Former Member
0 Likes
2,016

Hi,

If sy-batch = `X`.

then its background

else.

its foreground

endif.

Best regards,

Prashant

Read only

Former Member
0 Likes
2,015

Guys,

problem resolved i want to give excellent reward to all of u.

regrads,

vijay