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

CHECK Command in Report

Former Member
0 Likes
1,540

hi all,

i haved programmed an include in abap.

in this include, i check, if i use the code in debug mode or if the user begins with RFC.

here the code:

-


Check l_debug = 'X' OR sy-uname(3) = 'RFC'.

CALL FUNCTION 'Z_XYZ'

TABLES

T_table = T_table.

-


when i ran the programm in debugging mode and i change the l_debug flag to 'X', then the FM is called.

when i ran the report by the remote user (begins with RFC), the FM isn't called. i can see the user name in the log.

do you have ideas, why the behaviour differs in the two cases? do i have to use brackets for the two logical expressions? but normally, abap should check both expressions also without using brackets?!

regards,

phil

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,179

Hi,

I am not clear whether you have problem with FM or CHECK statement.but look at the below comments

If problem with Check:

According to ur statement it should work fine. (if all remote User ID start with 'RFC').

If problem with FM:

You are saying that, when You ran the report by the remote user, then i think fucntion should be RFC Enabled to be called by a remote user.

Thanks & Regards,

Vamsi.

Edited by: Vamsi Krishna on Mar 10, 2010 11:51 AM

7 REPLIES 7
Read only

Former Member
0 Likes
1,179

> -

-


> Check l_debug = 'X' OR sy-uname(3) = 'RFC'.

>

> CALL FUNCTION 'Z_XYZ'

> TABLES

> T_table = T_table.

> -

-


> phil

hi,

try the following code in place of yours


Check l_debug = 'X' OR sy-uname CP 'RFC*'. " use CP in place of  = .

CALL FUNCTION 'Z_XYZ'
TABLES
T_table = T_table.

regards

Ritesh

Read only

Former Member
0 Likes
1,180

Hi,

I am not clear whether you have problem with FM or CHECK statement.but look at the below comments

If problem with Check:

According to ur statement it should work fine. (if all remote User ID start with 'RFC').

If problem with FM:

You are saying that, when You ran the report by the remote user, then i think fucntion should be RFC Enabled to be called by a remote user.

Thanks & Regards,

Vamsi.

Edited by: Vamsi Krishna on Mar 10, 2010 11:51 AM

Read only

0 Likes
1,179

Hi ,

Try

Check l_debug = 'X' OR sy-uname(3) EQ 'RFC'.

CALL FUNCTION 'Z_XYZ'

TABLES

T_table = T_table.

Regards,

Kiran Kumar

Read only

0 Likes
1,179

hi,

thanks for the quick responses!

i will try the new check statements.

i'm using this code, to enhance a datasource which extracts data into the BW.

the datasource, the report and the fuba are on the sourcesystem side.

if i comment the check-command out, the FM ist called correctly. so the remote-checkbox of the FM properties shouldn't change the behaviour?!

regards,

phil

Read only

Former Member
0 Likes
1,179

Hi,

there should be no difference, and you do not have to use brackets.

Your contitions look good.

Replace RFC with first letters of your user id and check - it should work.

Regards,

--

Przemysław

Read only

Clemenss
Active Contributor
0 Likes
1,179

Hi Philip,

please create a check-point group (transaction SAAB) and use it before CHECK

Syntax

LOG-POINT ID checkpoint_group
  [SUBKEY sub_key]
  [FIELDS field1 u2026 fieldn].

i.e.

LOG-POINT ID Z_check
  subkey sy-uzeit
  fields sy-uname.

I used the SUBKEY because the log will be overwritten for each call.

I am convinced if you see the user name as it is eveluated by the check statement, you will see what is wrong.

Regards,

Clemens

Read only

Former Member
0 Likes
1,179

hi there, i found the problem. in the is-u, the customer exit is called during the mass activity for sales statistic. here, the user ist my one, not the RFC user. i thought, the exit is called during the extraction into the bw.

thanks for all the hints.

regards,

philipp