don't under why the program popup the raise statement

Question: * in table zhroutlook there is no entries

* the problem is in routine check although sy-subrc <> 0
the raise statement is popup why ? ? ?

*&---------------------------------------------------------------------*
*& Report ZOUTLOOK_CHECK *
*&---------------------------------------------------------------------*
report zoutlook_check.
tables: zhroutlook.
data: wswitch2 type c .

start-of-selection.
perform duplicate.
perform check.

*&---------------------------------------------------------------------*
*& Form duplicate
*&---------------------------------------------------------------------*
form duplicate .

call function 'BP_FIND_JOBS_WITH_PROGRAM'
exporting
abap_program_name = 'ZOUTLOOK_CHECK'
* ABAP_VARIANT_NAME = ' '
* EXTERNAL_PROGRAM_NAME = ' '
* DIALOG = ' '
status = 'R'
* TABLES
* JOBLIST =
exceptions
no_jobs_found = 1
program_specification_missing = 2
invalid_dialog_type = 3
job_find_canceled = 4
others = 5
.

if sy-subrc = 0.

select single * from zhroutlook client specified where
mandt = sy-mandt.
if sy-subrc = 0.
perform ins_value.
update zhroutlook.
else.
perform ins_value.
insert zhroutlook.
endif.
endif.

endform. " duplicate
*&---------------------------------------------------------------------*
*& Form ins_value
*&---------------------------------------------------------------------*
form ins_value .

wswitch2 = 'X'.

zhroutlook-zswitch2 = wswitch2.
zhroutlook-zdate = sy-datum.
zhroutlook-ztime = sy-uzeit.


endform. " ins_value
*&---------------------------------------------------------------------*
*& Form check
*&---------------------------------------------------------------------*
form check.

select single * from zhroutlook client specified
where mandt = sy-mandt.

if sy-subrc = 0.

if zhroutlook-zswitch = 'X' or zhroutlook-zswitch2 = 'X'.
* message 'error_occured_pu12_run_parallel' type 'E'.
raise error_occured_pu12_run_parallel.
stop.
endif.

endif.

endform. " check

Answer:
I think there is a entry in the table which causes the raise.

Answer:
i mentioned above that there isn't any entries in zhroutlook.

Answer:
Have you ever debugged your program? I think not.

You are adding an entry to table zhroutlook in form "duplicate",
so in form "check" the table zhroutlook HAS and entry!

Answer:
In your CHECK form. Do a CLEAR ZHROUTLOOK. before you do the select single. It will clear up your ZHROUTLOOK work area.

Answer:
in form "duplicate" i get sy-subrc <> 0.

form duplicate check if there are another sessions that runs the same

program in the same time.

Answer:
Are you sure you get the short dump because of the raise statement?

If I run your program, I get a CALL_FUNCTION_PARM_MISSING
short dump because parameter JOBLIST is missing while calling function "BP_FIND_JOBS_WITH_PROGRAM".

Can you post your short dump text (at least the first couple of lines)?

Answer:
in function module "BP_FIND_JOBS_WITH_PROGRAM"


you will see that joblist is optional.

Answer:
Why are you using the CLIENT SPECIFIED clause of the select statement ?

in function module "BP_FIND_JOBS_WITH_PROGRAM"


you will see that joblist is optional.

What about

* DIALOG =

It should be Y or N

KRK

Answer:
about

* DIALOG =

i don't use.

Answer:
about

* DIALOG =

i don't use.

Try Using

DIALOG = 'N'

KRK

Answer:
we deviation from the subject my problem isn't in function module:

"BP_FIND_JOBS_WITH_PROGRAM"

i asked why the raise statment in rotine "check " is always raise

the situation:

* no entires in ZHROUTLOOK.

* i get sy-subrc <> 0 after "BP_FIND_JOBS_WITH_PROGRAM" -> it's o.k
Copyright ?2007 - 2008 www.jt77.com