Triggering Process chains through abap code
Hi Experts,
Can you please let me know if it is possible to trigger a BW Process chain using an abap code.
If yes , kindly let me know the sample code.
Help done would be appreciated.
Regards,
Uday
Hi Thanks for your reply.
When I am trying to execute process chain with variant as a APD ( In this APD data is getting loaded form one Query to Transactional ODS.) This process chain being executing through one ABAP program using the following code
CALL FUNCTION 'RSPC_API_CHAIN_SCHEDULE'
EXPORTING
I_CHAIN = 'XYZ'. ( Dummy Process chain name)
While executing this program I am getting following message :
You can specify the name of the application server here
on which all jobs in the chain are scheduled
If you do not specify a name, the jobs from batch
management are divided between the available servers
How to avoid this message.
Can we write any code in the above program to assign any fixed server name so that it will not ask for any server name.
Your help is much appreciated.
Similar Messages
-
Server name message when triggering process chain through ABAP PROGRAM
Hi all,
When I am trying to execute one process chain with variant as a APD ( In this APD data is getting loaded form one Query to Transactional ODS.) This process chainis being executing through one ABAP program using the following code
CALL FUNCTION 'RSPC_API_CHAIN_SCHEDULE'
EXPORTING
I_CHAIN = 'XYZ'. ( Dummy Process chain name)
While executing this program I am getting following message :
You can specify the name of the application server here
on which all jobs in the chain are scheduled
If you do not specify a name, the jobs from batch
management are divided between the available servers
How to avoid this message.
Can we write any code in the above program to assign any fixed server name so that it will not ask for any server name.
Your help is much appreciated.
Thanks,
Uday.Hi Shanthi,
How to write exception handling for this.
Quick reply is nedeed.
Thanks,
Uday. -
Trigger Process chain using ABAP code
Hi All,
As per my knowledge there are 2 ways to trigger a process chain using ABAP code :
1) Using FM RSPC_API_CHAIN_START and passing process chain name as the parameter
2)Using FM 'BP_EVENT_RAISE' and passing process event as the parameter, which you can create using SM62 transaction.
I would like to know which one is better to use, in terms of advantage and disadvantage.
Thanks,
PraveenaHi praveena,
check these links ..u .may get some help
Process Chain
Process Chain
How to run a Process Chain
Process chain-parallel process
Regards
BILL -
Trigger Process chains through ABAP program using selection screens
Hi All
I am loading flat files through process chains. My requirment is such that i need to create a ABAP selection screen so that user can load the flat file from his PC. when the user is loading the flat file i have to copy the file onto the application server folder and then display him the monitor errors/warnings (if any). when my data load is complete i need to archive the file with time stamp onto the application server folder.
Please help me in this regard....
thanks and regards
sairam phaniHi sairam
can you check this link hope this might help you out
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
Going thru your query hope i get the right solution
Thanks=points in SDN
Sanjeev kumar hamsala -
How to Trigger a Process Chain through ABAP Program
Hi
I have a Requirement to trigger a process Chain on 1st, 2nd and 3rd day of the month for 2 times in a Day.
Can any one give me any idea, how i can do it by writing a ABAP program and triggering the Process chain.
If anyone can share the Logic for ABAP program means, that will be helpful for me, as i dont have much expertise on writing ABAP program.
Regards,
Muruganand.KHi,
you can achieve this in a following way.
DATA : v_date type sy-datum,
v_day(2) type c.
v_date = sy-datum.
v_day = v_date6(2).+
if v_day = '01' or
v_day = '02" or
v_day = '03".
CALL FUNCTION RSPC_API_CHAIN_START.
pass the name of the chain to this function module.
hope this wil help. -
How-to trigger a process chain using ABAP?
Does anybody know how to trigger a process chain using ABAP code?
Any help would be appreciated!
Thanks
IoanHi Ioan,
try this in your ABAP:
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
eventid = 'Your Event'
eventparm = 'START'
target_instance = ' '
EXCEPTIONS
OTHERS = 01.
and schedule your process chain, waiting for 'Your Event'.
regards
Siggi -
Trigger process chain in ABAP program
Hi Experts,
We have a requirement to trigger the process chain from an ABAP program. I used the function module RSPC_API_CHAIN_START to trigger the process by passing the process chain name in 'I_CHAIN' and it worked. However, the client wants to trigger this using batch user name as few planners do not have authorization when they executed the custom transaction.
Based on the return code of the function module I am capturing the status for tracking.
Please suggest if there is any alternate solution to pass the user name while triggering a process chain in an abap program.
Thanks and Regards,
Pavithrahi Chintai,
in bw side, you create a abap program to trigger an event in r/3,
and include this abap program in your process chain, the abap program like
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
eventid = 'ZRUNJOB_DEL'
and in r/3 schedule the program to delete previous data with 'after event',
the event name is same as raise by bw process chain, in this sample ZRUNJOB_DEL.
hope this helps. -
How to trigger a process chain through
Hi All,
Can any one send me the steps to trigger a process chain through a job in sm37.
Thanx
KishoreJust a trigger ?
Best way I can suggest is to call the function module 'RSPC_API_CHAIN_START'...
So, create an ABAP Program, call the function in the program. You can add parameters and a selection screen to make the program generic and add variants to it.
Once you are done with this, schedule a job with this program and whichever variant you're lookin for and you should be done.
- Aditya
Assign points if helpful -
How to process process chain in ABAP program
Hi,buddy:
If I want to start Process Chain in ABAP program,then which code or function can be used?
Best Regards.
Martin XieHi Martin,
How-to trigger a process chain using ABAP?
Hope it suffice,
Cheers
SRS -
Hi Experts,
We have a meta chain which contains two local chain in sequance and consuming 10 hours to complete
Process Chain 1
Process Chain 2
We have used the events to trigger process chain 2 only when it meet certain condition and modified the meta chain as
Process Chain 1
Abap Prg to trigger Process chain 2
But now the meta chain just consume 4 hours to complete even though process chain 2 is on progres.
This is giving wrong update to the users as the load is completed.
Is it possible to retain the status of the meta chain as in progress untill the process chain 2 triggered by event gets complets.
Regards
Suresh KumarHi Suresh,
when you are using event as a process in the metachain, it checks if the event ran succesfullly or not.
once the event is succesfull(event - triggering of the process chain but not completion), the step turns green.
so follow below procedure.
1)in the abap program, instead of triggering the process chain,write a program which raises an exceptio if the condition you required is satisfied so that the step becomes red.
use the proicess chain as next step in the process chain and conect this program to processchain step with th condition failure.
Hope this helps,
Srinath. -
Help regarding calling BRFPLUS function through ABAP code
Hi,
I have a situation where I have to input data into a BRFPLUS function as a table (i.e the data is input as select options where list or range of data can be provided).The corresponding output is also in the form a table .I've created this function in BRFPLUS and is working fine .Now I have to call it through ABAP code.Can someone kindly provide me with the probable code for this scenario.
E.g:
ZT_MATNR is the table in brfplus representing the list of MATNR values input along with other such inputs to function module Z_FM
ZT_ATM is the resultant output table of the function which contains several fields.
Now I have to call this BRFPLUS function with help of ABAP code.Could someone kindly help.Hello ,
There should be a number of BRF+ tutorials available in SCN which discuss the FDT APIs. You can have a look at them to get an idea of the various APIs available and their uses.
For your usecase, you should do the following.
lo_fdt_function TYPE REF TO if_fdt_function,
lo_fdt_result TYPE REF TO if_fdt_result,
* Get function handle
CALL METHOD lo_fdt_factory->get_function
EXPORTING
iv_id = lv_function_id
RECEIVING
ro_function = lo_fdt_function.
where lv_function_id is the GUID of the BRF+ function . You can either make it a constant , or you can use a FDT API to get the function GUID from the BRF+ application name and function name.
* Set function context
TRY.
CALL METHOD lo_fdt_context->set_value
EXPORTING
iv_id =
ia_value =
This is one way to set the input context ( pass the input to the BRF+ function to process ). There are other ways to do this as well. Which one you use would depend on the kind of input you want to pass.
* Execute BRFPLUS function
TRY.
CALL METHOD lo_fdt_function->process
EXPORTING
io_context = lo_fdt_context
IMPORTING
eo_result = lo_fdt_result.
* Get result output
TRY.
CALL METHOD lo_fdt_result->get_value
IMPORTING
ea_value =
Another direct way of doing it would be to use the method PROCESS of the class CL_FDT_FUNCTION_PROCESS.
I have not gone into much explaination here , but it should provide you an idea of how you can go about it.Read the SCN docs on the APIs to get a better idea , or better still if you can get hold of a copy of the BRF+ book by Carsten Ziegler , you will get an end to end explaination of all BRF+ APIs in it.
Regards,
Indranil. -
Transportation of process chains with ABAP variants
Hi,
Could you please help me in finding out how to transport process chains with ABAP variants.
I can transport them, however when transporting them, I overwrite the already existing variants, which is very unfortunate...
Could you please advice.
Thank you in advance!
/BrianHi Ramesh,
Option 1:
You can directly create the process chain in Production. Most of the times ppl do have access to create a process chain in Prod. Kindly check whether you have the authorization to do so.
Option 2:-
I did not suggest to delete the old info-packages in QA and Prod. Let them continue to exist but you may not use them once the process chain is in place. You create the process chain, test it and move it up to Prod. I dont' think the new infopackages will hamper your delta load. The delta is not dependent on the infopackage.
If I were you, I would try the second option and if it does not work during testing then go for the first option.
Bye
Dinesh. -
Trigger Process Chain through the Web
Hi,
I am trying to allow the users to control when they trigger a process chain through the web.
The users have a number of integrated planning sheets, which they access and input, once they are happy with the inputs, then they want to trigger the process chain to carry out additional loads.
I am using function module RSPC_CHAIN_ACTIVATE_REMOTE to trigger the process chain, when I test this with the chain set to direct scheduling it works fine.
I have set a planning function to call RSPC_CHAIN_ACTIVATE_REMOTE, with the process chain in question. Now when I run it with the chain set to direct scheduling it repeatedly calls the process chain over and over again, like it is in an endless loop.
When I try setting the chain to Meta Chain or API nothing happens.
Does anyone have any ideas why I can't get this to work through the web?
Thanks
DCALL FUNCTION 'RSPC_API_CHAIN_START'
EXPORTING
i_chain = 'YOUR PROCESS CHAIN NAME'
EXCEPTIONS
error_message = 1.
IF sy-subrc <> 0.
CALL FUNCTION 'BALW_BAPIRETURN_GET1'
EXPORTING
type = sy-msgty
cl = sy-msgid
number = sy-msgno
par1 = sy-msgv1
par2 = sy-msgv2
par3 = sy-msgv3
par4 = sy-msgv4
IMPORTING
bapireturn = p_return.
RAISE STREAM_FAIL.
ELSE.
RAISE STREAM_SUCCES.
RETURN.
ENDIF. -
Uncaught Exception occured while sending mail through abap code.
Hi,
Uncaught Exception occured while sending mail through abap code.Run time Errors "UNCAUGHT_EXCEPTION" occured after excuting the call method CALL METHOD SEND_REQUEST->SEND( ).kindly help in resolving the issue.HI,
Runtime Error: UNCAUGHT_EXCEPTION details.
Runtime Errors UNCAUGHT_EXCEPTION
Exception CX_ADDRESS_BCS
Short text
An exception occurred that was not caught.
What happened?
The exception 'CX_ADDRESS_BCS' was raised, but it was not caught anywhere along
the call hierarchy.
Since exceptions represent error situations and this error was not
adequately responded to, the running ABAP program 'SAPLZSEND_MAIL' has to be
terminated.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_ADDRESS_BCS', was not caught in
procedure "SEND_MAIL" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
An exception occurred
How to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"UNCAUGHT_EXCEPTION" "CX_ADDRESS_BCS"
"SAPLZSEND_MAIL" or "LZSEND_MAILU01"
"ZSEND_EMAIL"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
The exception must either be prevented, caught within proedure
"SEND_MAIL" "(FORM)", or its possible occurrence must be declared in the
RAISING clause of the procedure.
Please help me to resolve this issue. -
Execute Process Chain Using ABAP
Hi All,
Is there any standard ABAP Code or Function Module through which we can execute the Process Chain Manually.
Regards,
AnujaHi,
this forum is for the SAP integration with SAP businessObjects BI. The entry should go to the BW forum
ingo
Maybe you are looking for
-
Adding a column in the Universe level without losing the Report Lay out
Hi all, I have one universe with three universes built on it. Now, I want to add a column to one of the tables in the universe. For that, I selected the table and gave 'Refresh the structure'. The column got added in the workspace of the universe. Wh
-
i implemented note -551932, for canceling/reverse the excise invoice automaticaly, when billing document is reversed. But it is not working . when i reverse my billing doc, excise is not getting reversed . plz guide as wher i went wrong
-
Hi: I've installed the MS Visual C++ 2012 Redistributable (version 11.0.13060) on my PC. I can see it under "Programs and Features" so I assume it was installed correctly, however I cannot find the actual executable or any related folder in any of th
-
Import problem of tables/views not installed
Hello, need urgent advice to the below error encountered whiel trying to import database using imp. receive tables/views does not exist/not installed. grateful for advice/solution. Thanks >> Username: sys Password: Connected to: Oracle8 Enterprise Ed
-
ITunes won't uprade, or uninstall
My problem is that my iTunes won't launch. I tried to fix this annoying problem by trying to uninstall then reinstall iTunes. This doesn't work because I get a message that says the path to the installation package isn't the right one. After browsing