on 05-03-2006 9:07 AM
hello,
is there a way, to return a success or failure code from ABAP routine to the process chain? i need to make conditional process chain. or is there any possible / better way making conditional process chain depending on a value in a table, ODS... ?
thanks in advance,
martin
Hi Martin and welcome to the SDN!
I think a abab can at least end with a error code. So if it is a custom abap and the processing failed, raise a message of type E, A or X. Additionally you might think about raising different events depending on successful/unsuccessful termination and having another subchain waiting for the success event. In case you are talking about a standard abap you may need to embed it into a custom abap to achieve the same.
regards
Siggi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
you only need to add the statement
message <msgty><msgno>.
to your coding.
<msgty>
I = information
W = warning
E = error
A = abort
X = short dump
S = success
<msgno>
a valid number of a message in your specified message-id.
Please check also the help for the abap keyword message. The easiest way for doing this is pressing F1 on the word if you are editing/displaying a abap in se38.
kind regards
Siggi
siggi,
a strange thing... it work fine while running routine with "message" in se38, but no effect in process chain... it just pass through the routine process, even when using 'X' type (not jaguar :o)) message.
best regards
martin
******************
i c, it seems i need to have abap program variant and for that i need screen selection... oh god... :o(
Message was edited by: Martin Hudik
Hi,
have a look at this HowTo (implement custom defined process type):
we created a new processtype zabapredgreen and than created an abap which you can use in your chains:
REPORT zbw_status_red_green.
*
SELECTION-SCREEN BEGIN OF BLOCK eins WITH FRAME.
PARAMETERS: red RADIOBUTTON GROUP radi,
green RADIOBUTTON GROUP radi.
SELECTION-SCREEN END OF BLOCK eins.
*
IF NOT green IS INITIAL.
MESSAGE <b>i</b>162(00) WITH 'Status' 'Green'.
ELSE.
MESSAGE <b>e</b>162(00) WITH 'Status' 'Red'.
ENDIF.
/manfred
hi,
i'm back. i'm trying to make my own process type, something general - condition, which depends on value in simple table - one field, if 0 then stop the process chain, if 1 then continue, but i have problems with all those methods... 🐵 as i said. i'm a newbie in abap programming, even in sap bw, but i will win! ;o)
martin
hi manfred,
from the link (pdf doc) you sent me i found, that i need to implement in general case at minimum those methods:
IF_RSPC_EXECUTE~EXECUTE
and
(IF_RSPC_GET_VARIANTGET_VARIANT, IF_RSPC_GET_VARIANTEXISTS, IF_RSPC_GET_VARIANT~WILDCARD_ENABLED while using IF_RSPC_GET_VARIANT interface)
or
(IF_RSPC_MAINTAIN~GET_HEADER while using IF_RSPC_MAINTAIN interface).
am i right?
thanks,
martin
Hi Manfred,
Thanks for this. It helped me to successfully create a new process type that returns the status of an ABAP report and add this to my process chain.
My scenario is this: We are using RSCRM_BAPI to populate a DB table with the resultset of a BW query, we then reference this data in the start routine of subsequently run update rules to control the load to an InfoCube.
We are currently having technical problems and cannot be confident in the job log and thus don't know if the RSCRM_BAPI has worked to populate the DB Table.
By using a new process type we are able to include an ABAP program in a process chain to:
1. check that the DB Table exists and
2. that it contains data
and then conditionally halt the processing of the Update Rules until the RSCRM_BAPI has run successfully.
Its all so simple when you know how
Many thanks,
Andrew
(SDN rocks!)
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.