cancel
Showing results for 
Search instead for 
Did you mean: 

Info reqd regarding ABAP Prog in Process Chains

08-14-2006 11:58 PM
231 views 3 comments
0 Likes
SAP Managed Tags
Subscribe

Hi Experts,

I have scenario in which I have to read database table and do further processing based on this. For this I am thinking to use ABAP Program but I have following doubts regarding ABAP programs in process chain:

1) How to set the status of ABAP Program to Green (Success) or Red(Failure. I have to do further processing based on this.

2)HOw to pass value from ABAP program of some variable to next step in process chain.

3) How to make variants for ABAP program and use them so that I dont have to hardcore the values in ABAP program.

4)Also If I use custom process type, how to pass the value of variable to next step.For this "IF_RSPC_GET_INFO" can be used, but can someone provide me code for that?

Any help would really be appreciated!!

Thanks,

Sorabh

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Sorabh,

Answering your questions

1) Once you end your program with an error message, the ABAP program Process Type automatically Turns RED, with the error message you give

eg:

if A <> B.

MESSAGE e030. "e030 could be 'XYZ not maintained'

endif.

In the above case the Program process type ends with error message and displays the following logs

***************************

XYZ not maintained

Job cancelled after system exception ERROR_MESSAGE

****************************

Hope this answers your first question.

2) There is an SAP Transparent table "TVARVC" which can be used to store Variables. You have to give the following values

CLIENT

VARIABLE NAME

SELECTION TYPE

SELECTION VALUE(this will be the value that you need to pass)

Hope this answers your second question.

3) Same as above, in you next program you can read from the TVARC table for your variable name to get the value stored in the variable. Pls let me know if this is not clear.

4) Same as above, use the Table TVARC to read which ever variable you have stored to retrieve the VALUE.

Regards,

Praveen.

Former Member
0 Likes

Hi Praveen,

Thanks a lot for your mail!!!

Reply to question 1 was precisly what I was looking for...

But for 2nd, 3rd and 4th ques.......based on value which I calculate in ABAP program I need to load one of 3 cubes..so I cant read from TVARVC table or any other transparent table.Decision which cube to load would be calculated in ABAP program.

Either I can turn ABAP prog to red to stop the loadinf for cube or I need to use custom process type which can pass value ahead to next step(not sure how to do that)...

My scenario is to load one cube out of 3 based on decision to be taken in ABAP or custom process type method.( Any other way to automate this is highly welcome)..I want to automate this as global template which can be used by other projects..

Thanks again ..i hve already assigned points due for your efforts....

SOrabh

Former Member
0 Likes

Hi look a this 2 HowTO's:

HowTo integrate abap program in a process chain:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7d...

HowTo implement custom defined process type:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/45d8a990-0201-0010-a290-f22...

best would be to create a small piece of abap (as a part of a new defined process type), which ends either red or green or red (use command message either ixxx(green) or exxx(red) )

if an abapworks with parameters or select options you can create variants

/manfred