Executing Workflow through RFC Call
Hi,
I need to execute a worklow in one system through an RFC call from another system . Is this possible?
If yes, then what all parameteres do I need to do so and what all steps are involved.
Regards,
Divyanshu
Hi Divyanshu,
It is best not to start workflows directly but rather by using events. Usually a WF will have a triggering event defined, such as EMPLOYEET.POSITIONCHANGED. Look at the WF header for the trigger.
You can remotely raise this event using FM SAP_WAPI_CREATE_EVENT. Pass it the object type, key and event name and any other parameters. It even has some documentation.
Cheers
Mike
Similar Messages
-
Send data to ECC table through RFC Call function from SAP B1 via b1if
Hi,
I have created scenario in B1if which triggers from SAP B1, now I have to send this data in to ECC table, so I have created scenario for that with inbound SAP B1, outbound void and in process RFC Call atom is there but I am not getting data in receiver and also how to write xml to send data in RFC function. Function for RFC has configured from ECC end and have access of that function.
So please help me to send data to ECC table through RFC Call function from SAP B1 (9.0) via b1if
ThanksSolved by my own.
-
Urgent: Debugging through RFC call
Hi,
I am debugging between two systems - CRM and ECC. At one point in the CRM system, a BAPI which is available in the ECC system is being called through RFC. When I press (F5) at the BAPI call, the control does not go inside but executes the BAPI and moves on to the next statement in the CRM statement.
Can you please tell me how can I enter the code inside the BAPI during debugging?
Helpful answers will be rewarded!
Thank you.hi,
if that's is the case then u just take that particular BAPI inputs form that CRM program while debugging then u can test that BAPI saperatly in se37 by giving those inputs, now u can get output of the BAPI and also u can dubugg the same BAPI.
reward points if useful,
seshu. -
Upload and Download file through RFC called by java
We are trying to download/upload file through rfc function called by java(JCO),In the rfc function,we use WS_DOWNLOAD,but it does not work.
Any one know about this,Please help ,thanks very much.
Message was edited by: gw gwHi gw,
This question looks a little confusing to me.
WS_DOWNLOAD is used to download files from SAP to the presentation server (your PC). It will not work through RFC.
BUT, also if you want to access a function module via RFC is must be RFC enabled (as Anand pointed out).
AND WS_DOWNLOAD uses a PUSH approach. It pushes a file to the PC from ABAP. So even if the two points above weren't a problem it still would not be suitable for what you are doing.
Perhaps you could explain a little what you are trying to achieve.
Cheers,
Brad -
BDC is not working in through RFC call
HI,
i have created BDC for MM41 to create article with variants, its working fine in fore ground, when i am trying to call this through RFC it is failing. please help me on this.
i have passed ctu_params also.Hi,
I dont know your complete scenario but you if you want to use your BDC in some other program you can use statement
export your itab or wa to memory id 'ZID'.
AND THEN
IN YOUR BDC PROGRAM YOU CAN
IMPORT ITAB INTO ITAB FROM MEMORY ID 'ZID'.
Submit <your bdc program> and Return.
Regards,
Edited by: ZAHID HAMEED on Nov 3, 2011 10:38 AM -
How to execute workflow through javascript in CRM 2013
Hi,
I have created a business process and I want to execute workflow on custom button through javascript. I tried this script but this script does not run after message box show. Please tell me how to execute my workflow through javascript
function RunWorkflow() {
var _return = window.confirm('Are you want to execute workflow.');
if (_return) {
var url = Xrm.Page.context.getServerUrl();
var entityId = Xrm.Page.data.entity.getId();
var workflowId = '541B45C9-3F88-4448-9690-2D4A365C3172';
var OrgServicePath = "/XRMServices/2011/Organization.svc/web";
url = url + OrgServicePath;
var request;
request = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
"<s:Body>" +
"<Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">"
+
"<request i:type=\"b:ExecuteWorkflowRequest\" xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\"
xmlns:b=\"http://schemas.microsoft.com/crm/2011/Contracts\">" +
"<a:Parameters xmlns:c=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">"
+
"<a:KeyValuePairOfstringanyType>" +
"<c:key>EntityId</c:key>" +
"<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
+ entityId + "</c:value>" +
"</a:KeyValuePairOfstringanyType>" +
"<a:KeyValuePairOfstringanyType>" +
"<c:key>WorkflowId</c:key>" +
"<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
+ workflowId + "</c:value>" +
"</a:KeyValuePairOfstringanyType>" +
"</a:Parameters>" +
"<a:RequestId i:nil=\"true\" />" +
"<a:RequestName>ExecuteWorkflow</a:RequestName>" +
"</request>" +
"</Execute>" +
"</s:Body>" +
"</s:Envelope>";
var req = new XMLHttpRequest();
req.open("POST", url, true)
// Responses will return XML. It isn't possible to return JSON.
req.setRequestHeader("Accept", "application/xml, text/xml, */*");
req.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
req.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
req.onreadystatechange = function () { assignResponse(req); };
req.send(request);
function assignResponse(req) {
if (req.readyState == 4) {
if (req.status == 200) {
alert('successfully executed the workflow');Hi,
I used this script for execute the workflow but its not working. When I used alert(req.status); then 500 show. Please tell me what did I mistake in my script.
function RunWorkflow() {
var _return = window.confirm('Are you want to execute workflow.');
if (_return) {
var url = Xrm.Page.context.getClientUrl();
var entityId = Xrm.Page.data.entity.getId();
var workflowId = '541B45C9-3F88-4448-9690-2D4A365C3172';
var OrgServicePath = "/XRMServices/2011/Organization.svc/web";
url = url + OrgServicePath;
var request;
request = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
"<s:Body>" +
"<Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">"
+
"<request i:type=\"b:ExecuteWorkflowRequest\" xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\"
xmlns:b=\"http://schemas.microsoft.com/crm/2011/Contracts\">" +
"<a:Parameters xmlns:c=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">"
+
"<a:KeyValuePairOfstringanyType>" +
"<c:key>EntityId</c:key>" +
"<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
+ entityId + "</c:value>" +
"</a:KeyValuePairOfstringanyType>" +
"<a:KeyValuePairOfstringanyType>" +
"<c:key>WorkflowId</c:key>" +
"<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
+ workflowId + "</c:value>" +
"</a:KeyValuePairOfstringanyType>" +
"</a:Parameters>" +
"<a:RequestId i:nil=\"true\" />" +
"<a:RequestName>ExecuteWorkflow</a:RequestName>" +
"</request>" +
"</Execute>" +
"</s:Body>" +
"</s:Envelope>";
var req = new XMLHttpRequest();
req.open("POST", url, true)
// Responses will return XML. It isn't possible to return JSON.
req.setRequestHeader("Accept", "application/xml, text/xml, */*");
req.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
req.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
req.onreadystatechange = function () { assignResponse(req); };
req.send(request);
function assignResponse(req) {
if (req.readyState == 4) {
alert(req.status);
if (req.status == 200) {
alert('successfully executed the workflow'); -
Excel sheet generation through RFC call from a BSP application
Hi,
I am calling a RFC FM ( in R3) in Event handler 'OnInputProcessing' of a BSP application in a SRM server.
That function submits a report program which geneates a excel sheet using download FM . Excel sheet is not getting generated.
But when i am calling this RFC FM (in R3) from a report program ( in srm server)
this is generating an ecel sheet.
I want to have call RFC from BSP application.
I tried the way of submit a program ( which contains RFC call) from BSP application ,but it is also not generating excel sheet.
My ultimate AIM is to generate excel sheet by trigerring CALL or submit from BSP
application.
can any one propose solution for it.
Useful answers will be rewarded.Hi,
Which FM is it. I guess that the download generated is a SAP gui oriented solution, which will never work in a web environment
Eddy
PS. Reward useful answers and earn points yourself -
Credit Card Encryption through RFC calls to third party software
Dear All,
I am working on credit card encryption in CRM. At our firm, we have SAP R/3 which is integrated with third party server for performing credit card encryption using RFC calls. We want to perform similar thing in SAP CRM. I was looking into SAP standard mechanism to perform encryption and it seems they use class CL_PCA_SECURITY -> External Encryption to encrypt credit card. Are there any BADIs available for me to change behaviour of this call and call our listeners (for third party server) instead of what standard SAP is calling. Here is what in the code:
call C function 'SSFENVELOPE'
CALL 'SSF_ABAP_SERVICE' "#EC CI_CCALL
ID 'OPCODE' FIELD SSF_OPCODES-ENVELOPE
ID 'SECTOOLKIT' FIELD SSFTOOLKIT
ID 'STRFORMAT' FIELD STR_FORMAT
ID 'STRFORMATL' FIELD STR_FORMAT_L
ID 'BINENC' FIELD B_INENC
ID 'IOSPEC' FIELD IO_SPEC
ID 'OSTRINPUTDATAL' FIELD OSTR_INPUT_DATA_L
ID 'STRPAB' FIELD STR_PAB
ID 'STRPABL' FIELD STR_PAB_L
ID 'STRPABPASSWORD' FIELD STR_PAB_PASSWORD
ID 'STRPABPASSWORDL' FIELD STR_PAB_PASSWORD_L
ID 'OSTRENVELOPEDDATAL' FIELD OSTR_ENVELOPED_DATA_L
ID 'CRC' FIELD CRC
ID 'OSTRINPUTDATA' FIELD OSTR_INPUT_DATA-SYS
ID 'RECIPIENTLIST' FIELD RCPTAB-SYS
ID 'OSTRENVELOPEDDATA' FIELD OSTR_ENVELOPED_DATA-SYS
ID 'STRSYMENCRALG' FIELD STR_SYM_ENCR_ALG
ID 'STRSYMENCRALGL' FIELD STR_SYM_ENCR_ALG_L.Vivek,
While it may be technically possible to accomplish what you are suggesting (leveraging the encryption functionality provided by your third-party server) I would recommend strongly that you consider a token-based solution instead. You can learn more about tokenization on this [blog|/people/eric.bushman4/blog/2009/01/02/tokenization-as-a-means-of-securing-credit-card-numbers ].
There are many reasons why a token-based solution is superior to using application specific encryption (as outlined in the blog), but specifically in the case you describe where an SAP CRM and SAP R/3 are involved there is one specific reason to consider:
When order data is replicated between SAP CRM and SAP R/3 the systems will attempt to decrypt the credit card numbers prior to passing the data and therefore the RAW card number will be stored in the middleware logs. This is especially true when using SAP's native credit card encryption logic in the CRM and R/3-ECC applications.
For example, let's say a user enters a credit card as the form of payment during Order Creation in CRM. At Order Save the system will send the credit card information to your third-party server for an authorization attempt and the results will be returned to CRM. As the Order is saved and committed to the CRM database the standard SAP encryption functionality can be leveraged to encrypt the card data. Based on your middleware configuration, eventually the Order data (including the credit card details) will be sent to the R/3 or ECC system. In order to do so the CRM system will first decrypt the card number meaning that the CRM middleware logs will contain RAW card numbers. When the Order is created in R/3 or ECC the native credit card encryption functionality in R/3 or ECC could be used to encrypt the card number prior to the Order being stored in the database.
Should you choose to use a third-party server you may find, depending on how the third-party vendor's logic works in SAP, that you must utilize a BADI to decrypt the card number in CRM so that the CRM middleware has a RAW card and so that when the Orders is saved in the R/3 or ECC system it can be encrypted again with the third-party vendor solution. In either case the RAW card number is present in all systems for some period of time and potentially stored in logs thus exposing your systems to risk and greater PCI audit scrutiny.
Eric Bushman
VP, Solutions Engineering
[Paymetric|https://www.paymetric.com] -
Hi ,
I am trying to do a call transaction through RFC call from a Middleware which is a CPIC user (only communication Non dialog User ) .
Call transaction does gets executed without any error but it does not update any data.But when I run it through my user id it works absolutely fine .
I am not sure what is causing the issue
Security authorization?
RFC through Non Dialog user ?
Paramters missing in RFC ?
Paramatertes missing in call transaction option?
If anyone of you has faced a similiar issue then please let me know the path forward.
Thanks
VikasHi Vikas,
The problem is in Authorization? And check the mode of Process Synchoronus or asynchoronous? Both the RFC and CALL transaction should be Same /
Thanks
MAnju -
Changes don't reflect using BAPI_PROJECT_MAINTAIN through RFC adapter
Hi,
I am working on a Integration Scenario in XI. In this I am executing BAPIs through RFC adapter. I am using BAPI_PROJECT_MAINTAIN to create WBS Elements in Project System. After creating WBS Elements when I try to define the hierarchy, the BAPI calls executes successfully but the hierarchy is not visible when viewed in the SAP WEB GUI.
I am using following parameters to define WBS hierarchy:
*IMethodProject
OBJECTTYPE = WBS-HIERARCHY
METHOD = CREATE
OBJECTKEY =
REFNUMBER =
OBJECTTYPE =
METHOD = SAVE
OBJECTKEY =
REFNUMBER =
*IProjectDefinition
PROJECT_DEFINITION = P-0300-00-04
*IWbsHierarchieTable
WBS_ELEMENT = WBS-001
PROJECT_DEFINITION = P-0300-00-04
UP =
DOWN = WBS-002
LEFT =
RIGHT =
WBS_ELEMENT = WBS-002
PROJECT_DEFINITION = P-0300-00-04
UP = WBS-001
DOWN =
LEFT =
RIGHT =
In normal case the WBS element 'WBS-002' should move below 'WBS-001', but when I execute BAPI with above parameters, the Hierarchy is not visible in the GUI the both WBS Elements remain at root level, even I get '000' as response with no errors.
When I run the BAPI through transaction SE37 with same parameters as above, the changes are visible in the GUI.
Can anyone please tell what am I missing here.
Thanks & Regards,
AjayHi Ajay,
I understand the problem this way, when u do something thru XI you dont see the effect (even if the the transaction is successful), whereas when it done is directly in the R/3 you can see the output.
look into the below
- check if your XI user is having necessary authorisations (you can do this by enabling the trace in ur R/3 - back end system)
- check if you are passing the input properly in the XI. (like field formats, padding characters, prefixes etc)
Hope this helps to fix ur issue
Regards
Vishnu -
Synch. RFC call error - No Sender Found
Hi,
once execute the synchronous RFC call from BPM, rfc response message returns as following;
<SAP:Code area="RCVR_DETERMINATION">MESSAGE_INCOMPLETE</SAP:Code>
<SAP:Stack>Message is incomplete. No Sender found</SAP:Stack>
i've tried adding header mappings at receiver aggreement for bpm's name as sender service and target sap system name as receiver service. Same error.
Any help is greatly appreciated. ThanksHi,
>>>>i've tried adding header mappings at receiver aggreement for bpm's name as sender service and target sap system name as receiver service. Same error.
no need for any header mapping in that case
just configure the routing correctly - via directory wizard
and everything will work
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Function group memory with RFC calls
We have a system where a web front-end interacts with our 4.6C system through RFC calls.
I am having a number of problems where variables declared in a function group are not being cleared out between separate RFC calls to functions in the same group.
I would not have expected separate RFC calls from an external system to use the same memory area.
I have seen this happen at other sites too, but have never found an explanation for it.
Has anyone else experienced this problem and if so can you give me more information about why it happens?
Thanks for you help,
Denis.This does make sense as global data within a function group is accessable by all function modules of the group. Normally, in the ABAP system, you call multiple function modules of the same group, and they all share the data. If you are calling from outside the system, I would expect a different behavior if you are connecting one by one. But if you are using a pooled connection, this may be the issue. Not sure though. It seems that the session on r/3 has not ended and you are accessing the same when calling the second function module. Is there any function module of the group that looks like it is a "refresher". In some groups, there is a function module that will refresh the global data.
http://help.sap.com/saphelp_46c/helpdata/en/9f/db992335c111d1829f0000e829fbfe/frameset.htm
Regards,
Rich Heilman -
Third party system call function module/BAPI through RFC to update Z table
Dear Friends,
We have a third party system which directly inserts a Z table in SAP through its programming, which is an auditing issue.
We want the third party system should call function module/BAPI through RFC so that the Z table gets updated.
waiting for inputs..
Thanks,
Kumarif third party system is capable of making Remote Function call, then writing a Function module & making it remote enable is not difficult task in ABAP.
You may have to prepare specifications first to decide if third party system is going to Read, insert, update, delete records from Zee table. -
RFC CALL canu00B4t execute Functions module ??
Hello everybody,
I have a problem with a Function module. The function module should open an link (it´s a Link of a Webdynpro Application).
I have the following constellation.
Bex Analyzer execute a RFC Call to open/execute the Function module. The Function module should open a URL (Webdynpro Application), but it doesn´t work.
I don´t know why. The Connection of the RFC Call is ok. I have tested the RFC with any Object´s and it works (He "answered").
What ist wrong in the Function Module, why can´t the FM open the URL??!
Simple Code of Function Module
call method cl_gui_frontend_services=>execute
exporting
document = 'URL'
exceptions
others = 1.
Endfunction.
A other test
*CALL FUNCTION 'PRGN_GENER_EXECUTE_URL'
*EXPORTING
*NODE_DATA = 'url'.
The VBA Code for RFC
Sub Login()
Dim functionCtrl As Object
Dim sapConnection As Object
Dim theFunc As Object
Dim sReturn As Boolean
Dim l_export As String
Dim objQueryTab As Variant
Set functionCtrl = CreateObject("SAP.Functions")
Set sapConnection = functionCtrl.Connection
sapConnection.Client = "100"
sapConnection.user = "xy"
sapConnection.Language = ".."
sapConnection.SystemNumber = "xy"
sapConnection.ApplicationServer = "xy"
sapConnection.Language = "x"
sapConnection.codepage = "xy"
sapConnection.Destination = "xy"
sapConnection.System = "x"
sapConnection.SystemID = "......"
sapConnection.Password = "xy"
sapConnection.autologon = 1
If sapConnection.Logon(0, True) <> True Then
MsgBox "Keine Verbindung"
Else
Set theFunc = functionCtrl.Add("SS_RFC_URL_TEST")
objQueryTab = "200"
theFunc.Exports("I_PAR") = objQueryTab
sReturn = theFunc.call
If sReturn = True Then
objQueryTab = theFunc.Imports("E_PAR")
End If
sapConnection.logoff
End If
End Sub
>E_PAR is the Exportparameter of the Function module
>I_PAR is the Importparameter of the Function module
Thanks
Edited by: Schwarzenberger Stefan on May 9, 2011 1:59 PMHi, I have a similar situation. Within VBA I am calling the RFC 'RFC_CALCULATE_TAXES_DOC'. This RFC is used to communicate with external tax software like Taxware; it gets applicable tax rates, amounts, etc. based on tax jurisdiction code and other data. The RFC is remote-enabled (has to be to talk to Taxware).
This RFC requires an RFC Destination in order to work. Within VBA, I have not been able to figure out the syntax required to enter the Destination name. I saw Shreeram's post saying to use CALL FUNCTION 'PRGN_GENER_EXECUTE_URL' DESTINATION <RFC Destination Name>. However, this looks like ABAP syntax and not VBA syntax.
Does anybody know if this is possible within VBA? Sounds like it's not but wanted to double-check.
Thanks!!
Kory Squire
<<Removed email address>>
Edited by: Matt on May 18, 2011 6:37 AM -
RFC Call through BSP - Issue with RFC logon credentials
Hi everyone,
I have an BSP application running on a 6.40 which calls a RFC function module on a backend system (4.6c) using a trusted RFC connection.
The BSP is started with an URL which contains in encoded form the username and password. So we don't use the standard sap-username & sap-password.
In the first step the user is logged in with the anonym user (user type 'service') which is entered in the SICF. So sy-uname = 'anonym'.
After a couple of checks and verifications the BSP makes a user switch using 'SUSR_INTERNET_USERSWITCH'. Exporting parameters are the now decoded values from the URL. So after the switch sy-uname is e.g. 'blabla'.
Now a function module on the backend system is called. What I would now expect is that on the backend system sy-uname is also 'blabla'. But it isn't. The sy-uname is still 'anonym', which isn't very helpful regarding object authority checks.
Only after an reload of the BSP page and a second RFC call of the function module the sy-uname = 'blabla'.
I wonder what causes this problem?
Thanks for your replies & regards
KrunoHi,
I solved it.
Before I execute function 'SUSR_INTERNET_USERSWITCH' I first check if user has a valid backend account by using function module 'BAPI_USER_EXISTENCE_CHECK'.
And this is the problem. When 'BAPI_USER_EXISTENCE_CHECK' is executed once all other RFC function calls to the backend get the wrong user.
Why? I don't know yet. Maybe I will get an useful anwer from an OSS note.
Maybe you are looking for
-
Access Migration Error Creating Migration Project - string literal too long
I get this error when attempting to create an MS Access Migration Project: ORA-20001: GET_BLOCK Error. ORA-20001: GET_STMT error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 8, column 8: PLS-00172: string literal too long
-
Ideapad U410 not working in Normal Mode
Hi, My Lenovo Ideapad U410 has suddenly stopped working in normal mode. If I need to open a link or an important document, I open it in a safe mode. Has anyone faced a similar kind of issue? I don't want to format the system as i would first like to
-
My Dv 4t has been heating and shutting down when I run video intensive processes. THe hard disk and the Video card (Nvidia geforce 9200M) literally sets the system on fire when I run my games or even HD videos for long. Noisy fan which is of no help.
-
My phone is linked to orange how to i get an unlock code
Hi - I've got an iPhone4 which is locked to orange, orange say they won't get me an unlock code as the phone isn't linked to my account [ I bought it off ebay ]. Can I get the network unlock code from Apple or do I have to go to some dodgy backstreet
-
LMS 3.2 had Path Analysis Tool. Is similar tool in LMS 4.2 ?