Call external URL from ABAP userexit, capture data and return it to SAP?
My apologies if this question has been asked before, but I've searched for a few hours today and haven't found anything directly related to my question. Thank you in advance for any help you may be able to provide!
I would like to be able to make a call from an SAP userexit during Sales Order Entry in the VA01 transaction in the SD module to an external website, allow the user to capture some data in the external site and then pass that data back into the userexit where I can use it to populate internal tables, etc.
I'm completely unfamiliar with Web Dynpro programming, but this seems like a good place to start my search for a solution.
Does this sound like a problem that can be solved with Web Dynpro and what documentation or code examples should I reference to go about building such a solution.
I should also note that I'm hoping to build a solution that could be called from any userexit in R/3, SAP ERP, SAP CRM, etc. and would obviously need to learn about what dependencies to consider (ex: SAP GUI version, SAP product release number, Web AS release, etc.).
Eric
Thank you for the response. Let me provide some additional information.
The external application will be a Hosted Web page. It is not an SAP system.
The external application will be a web page served by a separate system outside of the company domain(shouldn't matter what the technology is I would think - but the web page will be hosted by a different company than the one calling the URL) that would appear as a web page in which the user will enter data, logic will be performed on that data and then some or all of the data would need to be passed back to the calling point in SAP.
For practical discussions it doesn't matter to me if the call in ABAP occurs in an SD userexit, in a custom report, in an HR screen or in a CRM business partner screen. There will be many places where this external application may be called from and I'm just trying to figure out how to call an external HTTPS URL and return data from that web page to the calling point in ABAP.
I hope that clarifies my question.
Thanks!
Eric
Similar Messages
-
How to encrypt Password while calling Portal URL from Abap
Hi all,
My requirement is to call portal from R/3 4.6C. As part of it I'm calling Portal URL along with user id & Password by using the FM CALL_BROWSER. The problem here is User ID & Password are visible everyone in the URL.
Is there any way that I can encrypt sothat it doesn't become a security issue?
I really appreaciate for your help.
Thanks
Seshucan you please mention the abap code by which you are sending the username and password to a portal via url.....
are you able to log on to the portal...please share your code ......
Edited by: Ashutosh Shukla on Apr 18, 2008 9:17 AM -
Calling external Java from ABAP using JCo?
Does anyone know if one can use JCo to write a server application that can be called from ABAP.
We are presently using JCo to communicate from Java to SAP.
But we need to call an external Java program from within ABAP.
Is this possible?
Thanks for any input.
FredHi Gregor,
I was hoping you would reply to this -- these posted messages had been here for quite sometime now.
Anyway, here's the case. Our Basis team is installing the JCo in our SAP development server. This is our first time to implement this technology, so no one has a clue at all.
Got a couple of questions for you...
1. What do we need the JDK for? Is it mainly for editing, running, and compiling java files (e.g. Example5.java)?
2. Does the JDK need to be installed at the SAP server as well? Or it doesn't matter, as long as the java files will be accessible from where it was installed at?
Thanks for any response! -
Hi,
When an user clicks on a document display link in a SAP tranasction(for example FB02),an URL has to be called in the background(by ABAP) and the details of the URL should be displayed in a browser.
What are the possilbe options available in SAP4.7 to meet the above requirement?
Thanks in advance,
Leohi,
you can use call browser function
data url(200) type c.
url = 'your_url'.
CALL FUNCTION 'CALL_BROWSER'
EXPORTING
URL = url
WINDOW_NAME = ' '
NEW_WINDOW = ' '
BROWSER_TYPE =
CONTEXTSTRING =
EXCEPTIONS
FRONTEND_NOT_SUPPORTED = 1
FRONTEND_ERROR = 2
PROG_NOT_FOUND = 3
NO_BATCH = 4
UNSPECIFIED_ERROR = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
for this you have to enable SSO on your server.
hope this helps you, else revert back.
regards,
Hemendra -
I can add links within the iBook content, but if they're added inside an HTML widget, the new page loads *inside* the widget itself, with no ability to navigate back etc.
Is there any way to have external links inside an HTML widget open in Safari?
Thanks,
MikeThose links need to be local the the book, sorry.
As always, feel free to use the 'Provide iBooks Author Feedback' menu item for features you'd like added in the future, etc.
http://www.apple.com/feedback/ibooks-author.html -
How to call java program from ABAP
Hi Experts,
My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
parameter TYPE string VALUE 'D:java MyFirstProgram'.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = command
parameter = parameter
OPERATION = 'OPEN'
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
OTHERS = 8.
Thanks.This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
Implement an RFC server in 7.0:
http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
Implement an RFC server in 7.1 or higher:
http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm -
Call http url in Abap - Should not open Browser
Hi Friends,
I have a requirement where i need to check whether a perticular http service is running or not. For that i need a some code to call http url from abap and it should not open the browser. If that perticular url is not found or time out then i should know that in program...
Is there any way to do that..just run the following url (after changing the values for host,etc) from browser
http://<abaphost>.<domain>.com:<port>/sap/public/ping
to get the values for http://<abaphost>.<domain>.com:<port> just go to transaction se80 and choose bsp application option and choose any existing bsp application and then doubl click on a page. on the right side click on the attributes tab and at the end you can find the url
Regards
Raja -
Calling external URL with POST data
Hi:
In my action bean I have to call and external URL (outside my domain), and along with this URL 'POST' data. I have tried the following code:
try {
FacesContext lclFC = FacesContext.getCurrentInstance().getFacesContext();
lclFC.getExternalContext().getRequestMap().put("x_loc_zip","94804");
lclFC.getExternalContext().redirect("http://www.mysite.com/personals/search/search.html");
} catch (IOException e) {
throw new FacesException(e);
finally {
lclFC.responseComplete();
This works fine in calling the other URL, but no data is sent thru the post protocol. I have no control to the site I am calling....
I have also tried
ExternalContext ectx = FacesContext.getInstance().getFacesContext().getExternalContext();
HttpServletRequest request = (HttpServletRequest) ectx.getRequest();
HttpServletResponse response = (HttpServletResponse) ectx.getResponse();
RequestDispatcher dispatcher = request.getRequestDispatcher("http://www.mysite.com/personals/search/search.html");
dispatcher.forward(request, response);
But this tends to put a "/" at the front of the called URL. Can someone please recoomed the coorect way to call a URL from yr action bean and sending it data thru post protocol. I also wish that this new URL should now be displayed within the browser. This is urgent, yr quick reply is appreciatedMyfaces sandbox form gives the ability to change its action url and port. Look here:
http://myfaces.apache.org/sandbox/form.html -
Is it possible to call web service from ABAP SAP 4.6 c..If yes how
Hi Friends,
Is it possible to call web service from ABAP-SAP 4.6 c..If yes Could you please let me know how.
Thanks in Advance.
Murali Krishna K
Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:09 PM
Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:11 PMOlivier CHRETIEN wrote:>
> Hi Terry,
>
> So these function modules must use the SAPHTTPA RFC destination which uses the exe saphttp.exe ?
>
> How much abap code lines do you have for a web service call ?
> Do you have to code the call specifically for each different web service ?
> Are you able to use the WSDL ?
>
> Nice job if you have coded your own private SOAP runtime !
>
> But I don't think this is an easy solution for everybody...
>
> Regards,
>
> Olivier
Yes, SAPHTTPA (runs on application server) and/or SAPHTTP (runs on front-end pc), one of which, is required for HTTP communication. So far, nothing too elaborate as far as SOAP goes, but the logic is simplistic. Here's some sample code:
DEST = 'SAPHTTPA'.
TRANSLATE HOST TO LOWER CASE.
MYURL = 'wssrvTest/Service.asmx/GetByOrderItem'.
CONCATENATE HOST MYURL INTO MYURL.
REQUEST_HEADERS-DATA =
'Content-type: application/x-www-form-urlencoded'.
APPEND REQUEST_HEADERS.
CLEAR REQUEST_HEADERS.
*........Convert Order Number to External Format........................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ORDER
IMPORTING
OUTPUT = ORDER.
*........Convert Item Number to External Format.........................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ITEM
IMPORTING
OUTPUT = ITEM.
*........Convert Material Number to External Format.....................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = MATERIAL
IMPORTING
OUTPUT = MATERIAL.
CONCATENATE 'sOrder=' ORDER
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CONCATENATE '&sItem=' ITEM
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CONCATENATE '&sMaterial=' MATERIAL
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CALL FUNCTION 'HTTP_POST'
EXPORTING
ABSOLUTE_URI = MYURL
RFC_DESTINATION = DEST
BLANKSTOCRLF = 'X'
TABLES
RESPONSE_ENTITY_BODY = RESPONSE_BODY
REQUEST_ENTITY_BODY = REQUEST_BODY
RESPONSE_HEADERS = RESPONSE_HEADERS
REQUEST_HEADERS = REQUEST_HEADERS
EXCEPTIONS
CONNECT_FAILED = 1
TIMEOUT = 2
INTERNAL_ERROR = 3
TCPIP_ERROR = 4
DATA_ERROR = 5
SYSTEM_FAILURE = 6
COMMUNICATION_FAILURE = 7
OTHERS = 8.
CHECK SY-SUBRC = 0. "more appropriate msg goes here
LOOP AT RESPONSE_BODY.
IF RESPONSE_BODY+0(7) <> '<string' AND
RESPONSE_BODY+0(8) <> '</string' AND
RESPONSE_BODY+0(5) <> '<?xml'.
SPLIT RESPONSE_BODY-DATA AT '=' INTO FIELD_NAME FIELD_VALUE.
TRANSLATE FIELD_NAME TO UPPER CASE.
CASE FIELD_NAME.
WHEN 'HEIGHT'.
HEIGHT = FIELD_VALUE.
WHEN 'WIDTH'.
WIDTH = FIELD_VALUE.
WHEN 'LENGTH'.
LENGTH = FIELD_VALUE.
WHEN 'WEIGHT'.
WEIGHT = FIELD_VALUE.
WHEN 'QTY'.
QTY = FIELD_VALUE.
ENDCASE.
ENDIF.
ENDLOOP.
Hope this helps...
Terry
Edited by: Terry West on Feb 4, 2008 3:08 PM -
Call SXPG _ CALL _ SYSTEM from ABAP program
Hi,
Someone may help me? I need to call the function module SXPG _ CALL _ SYSTEM from ABAP program for to encrypt a file.
I created the command by SM49 , but I don't know how I can call it from ABAP program.
Thanks
Maria CHi Maria.
This is a possible code you can use:
DATA: log LIKE TABLE OF btcxpm WITH HEADER LINE.
Can contain STDOUT, STDERR
commandname =
CALL FUNCTION SXPG_CALL_SYSTEM
IMPORTING
COMMANDNAME = commandname
PARAMETERS = parameters
EXPORTING
STATUS = status
TABLES
EXEC_PROTOCOL = log
EXCEPTIONS
NO_PERMISSION = 1
COMMAND_NOT_FOUND = 2
PARAMETERS_TOO_LONG = 3
SECURITY_RISK = 4
WRONG_CHECK_CALL_INTERFACE = 5
PROGRAM_START_ERROR = 6
PROGRAM_TERMINATION_ERROR = 7
X_ERROR = 8
PARAMETER_EXPECTED = 9
TOO_MANY_PARAMETERS = 10
ILLEGAL_COMMAND = 11
OTHERS = 12.
The following are the comments of the parameters taken from:
http://help.sap.com/saphelp_40b/helpdata/en/fa/0971ee543b11d1898e0000e8322d00/content.htm
Parameters
IMPORTING Parameters
Parameter name
Use
COMMANDNAME
The name of the definition of the external command, as specified in the maintenance function (transaction SM69).
PARAMETERS
Arguments for the external command as specified by the definition in the R/3 System and by the calling program or user.
These arguments are checked for impermissible characters, such as the ; under UNIX. Problems are registered with the SECURITY_RISK exception.
EXPORTING Parameters
Parameter name
Use
STATUS
Returns the final status of the execution of the external command:
· Value O: The external command was started and ran to end successfully.
· Value E: An error occurred; the external command was not run successfully.
Tables Parameters
Parameter name
Use
EXEC_PROTOCOL
Contains the STDOUT and STDERR output of the external command and any output from the target host system.
Exceptions
Exception name
Meaning
X_ERROR
Reserved for future use.
NO_PERMISSION
The AUTHORITY-CHECK of the users authorization for the authorization object S_LOG_COM failed. The user is not authorized to carry out the command named with the specified arguments on the target system.
COMMAND_NOT_FOUND
Command name, as identified by COMMANDNAME and OPERATINGSYSTEM, has not been defined in the maintenance function (transaction SM69).
PARAMETERS_TOO_LONG
The combined argument string (ADDITIONAL_PARAMETERS and the DEFINED_PARAMETERS, as returned in ALL_PARAMETERS) exceeds the limit of 128 characters in length.
SECURITY_RISK
Either:
· The command contains impermissible characters. These are characters with potentially dangerous properties, such as ; under UNIX.
· The command definition specifies that an extra-check function module be run. This function module has rejected execution of the command.
WRONG_CHECK_CALL_
INTERFACE
The command definition specifies that an extra-check function module is to be run. Either this function module is missing, or the interface defined for this function module does not match that of the standard R/3 function module SXPG_DUMMY_COMMAND_CHECK. For more information, please see SXPG_DUMMY_COMMAND_CHECK: Interface for Extra-Check Function Modules.
TOO_MANY_PARAMETERS
The command definition specifies that user-specified arguments for the external command are not allowed. However, an additional string of command arguments was specified.
PARAMETER_EXPECTED
The command definition includes the placeholder character ?, which signifies that additional user-defined arguments are required. However, no additional arguments string was supplied.
PROGRAM_START_ERROR
An error occurred while starting the external command. The R/3 system field SY-MSGV1 contains additional information on the problem.
PROGRAM_TERMINATION_
ERROR
An error occurred while trying to obtain the return code of the external program. The R/3 system field SY-MSGV1 contains additional information on the problem.
ILLEGAL_COMMAND
The external command definition was modified "illegally". That is, the command was not modified by means of the maintenance function (transaction SM69).
The modified command is registered in the system log in its substituted form. The message is registered under the system log ID "LC".
OTHERS
Catch any new exceptions added to this function module.
Hope this will be useful.
Sandro Lombardo -
Call external application through Abap WD application
Hello All,
We are trying to call an external application using ABAP. The details are as below
1) SAP server on AIX OS
2) External Apps server: Windows OS
The external apps takes a file located on windows as input and generates a file on windows as output. The external appls is installed on the windows OS.
We are unable to trigger the VC apps from ABAP.( AIX OS).
Appreciate if you can guide and give some examples. Please note that the OS are different.
Questions:
1) How to access windows file system to execute external appls from ABAP ( AIX)
2) Would a RFC be required to be made between ABAP and the windows server where external appls is hosted
3) Any sample code/links is really help ful
We were able to get it working when the applications was hosted on local file system ( desktop) . Two problems are getting the appls executed on remote and different OS accessing windows file system through unix ( AL11 should help here i guess)
Regards
PNHi Lekha
I want to start a *.bsp page in a new external window and POST Parameters to this *.bsp page.
So it is not actually showing a bsp in a ABAP WD.
Kind regards
Paul
PS: create_external_window is alway a GET Method and I do not want to show Parameters in the URL. -
Call BSP Application From ABAP
Hi,
I want to call BSP Application from ABAP. I've searched the forum and they all are displaying BSP Page in Container of the Screen. My requirement is to show it in a web browser. For that matter I am generating URL to call BSP Application. Following is the code which is throwing short dump.
DATA: url TYPE string,
l_appl TYPE string,
l_page TYPE string,
l_params TYPE LINE OF tihttpnvp,
params TYPE tihttpnvp.
l_appl = 'ZPWLS_SCH_RPT'.
l_page = 'SELECTION_SCREEN.htm'.
call method cl_http_ext_webapp=>create_url_for_bsp_application
exporting
bsp_application = l_appl
bsp_start_page = l_page
bsp_start_parameters = params
importing
abs_url = url.
CALL FUNCTION 'CALL_BROWSER'
EXPORTING
url = url
WINDOW_NAME = ' '
new_window = 'X'
BROWSER_TYPE =
CONTEXTSTRING =
EXCEPTIONS
FRONTEND_NOT_SUPPORTED = 1
FRONTEND_ERROR = 2
PROG_NOT_FOUND = 3
NO_BATCH = 4
UNSPECIFIED_ERROR = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks,
Usman MalikWhat is the dump? also you should uncomment the following lines to receive the exception thrown by the FM
* EXCEPTIONS
* FRONTEND_NOT_SUPPORTED = 1
* FRONTEND_ERROR = 2
* PROG_NOT_FOUND = 3
* NO_BATCH = 4
* UNSPECIFIED_ERROR = 5
* OTHERS = 6 -
Opening an external URL from the Web UI
Hello,
I want to use the Web UI in order to open an external URL.
I know it can be done easily using JavaScript, but the URL is generated from one of the page controller methods, and I want to open it directly from there.
I know that there's the Window Manager in the Component Controller, that can open popup windows, but none of it's methods receive an external URL.
So how can I open an external URL from the Web UI methods?
Thanks,
Udi.Hi,
you can use the Trnsaction launcher with OP.
in the window you create an OP_X
with the code
data: lv_navigation type ref to if_crm_ui_navigation_service.
lv_navigation = cl_crm_ui_navigation_service=>get_instance( me ).
lv_navigation->navigate( iv_link_id = 'ZTO_X' ). "runtime you create the TO_X nevigation"
in your implamentation class of the view you add a preotected method OP_TO_X with the code
data:
lr_window type ref to cl_bsp_wd_window.
lr_window = me->view_manager->get_window_controller( ).
lr_window->call_outbound_plug( iv_outbound_plug = 'TO_X'
iv_data_collection = iv_data_collection ).
and you call to that method from the EVENT_HANDLER you want.
Amit. -
To send external email from ABAP
How to send external email from ABAP Program and what are the settings to be done for the same ?
Please check..
Sending External email through SAP
What is the FM for sending the external email through SAP by attaching layout set to it?
These are the FM for sending external email :-
SO_DOCUMENT_SEND_API1
SAPoffice: Send new document with attachments via RFC
SO_NEW_DOCUMENT_ATT_SEND_API1
(In 4.6C only, You can go to SE37 and click the documentation on how to use it. A sample program is provided there.)
SAPoffice: Send new document with attachments via RFC
Note : If you are using FM SO_NEW_DOCUMENT_ATT_SEND_API1 then Export Parameter DOCUMENT_DATA-OBJ_DESCR contains the Subject.
SO_NEW_DOCUMENT_SEND_API1
SAPoffice: Send new document
How to send a report to an external mail-id?
Try this sample code :-
REPORT ZREPORT_TO_EMAIL NO STANDARD PAGE HEADING LINE-SIZE 200.
DATA : BEGIN OF ITAB OCCURS 0,
PERNR LIKE PA0001-PERNR,
ENAME LIKE PA0001-ENAME,
END OF ITAB.
DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
listobject LIKE abaplist OCCURS 10,
compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
w_object_hd_change LIKE sood1,
compressed_size LIKE sy-index.
START-OF-SELECTION.
SELECT PERNR ENAME
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM PA0001
WHERE PERNR < 50.
LOOP AT ITAB.
WRITE :/02 SY-VLINE , ITAB-PERNR, 15 SY-VLINE , ITAB-ENAME, 50
SY-VLINE.
ENDLOOP.
Receivers
receiver_list-recextnam = '[email protected]'. "-->
EMAIL ADDRESS
RECEIVER_list-RECESC = 'E'. "<-
RECEIVER_list-SNDART = 'INT'."<-
RECEIVER_list-SNDPRI = '1'."<-
APPEND receiver_list.
General data
w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Object name'.
w_object_hd_change-objsns = 'P'.
Mail subject
w_object_hd_change-objdes = 'Message subject'.
Mail body
APPEND 'Message content' TO message_content.
Attachment
CALL FUNCTION 'SAVE_LIST'
EXPORTING
list_index = '0'
TABLES
listobject = listobject.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
compressed_size = compressed_size
TABLES
in = listobject
out = compressed_attachment.
DESCRIBE TABLE compressed_attachment.
CLEAR packing_list.
packing_list-transf_bin = 'X'.
packing_list-head_start = 0.
packing_list-head_num = 0.
packing_list-body_start = 1.
packing_list-body_num = sy-tfill.
packing_list-objtp = 'ALI'.
packing_list-objnam = 'Object name'.
packing_list-objdes = 'Attachment description'.
packing_list-objlen = compressed_size.
APPEND packing_list.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = w_object_hd_change
object_type = 'RAW'
owner = sy-uname
TABLES
objcont = message_content
receivers = receiver_list
packing_list = packing_list
att_cont = compressed_attachment. -
Error while calling java program from ABAP
Hi Experts,
We are trying for RFC inbound scenario.
We followed the below blog
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
We are working with SAP JCO 3.0.2
We are getting the error : 'STFC_CONNECTION' could not be found in the server repository.
After I run the Java server program if I execute the RFC destination directly from SM 59 it is showing successful messages.
If I stop the java program then this RFC is failing. Based on this we concluded that RFC to Java connection is working fine.
But as mentioned in blog if we call the RFC Destination from ABAP program it is giving the below error,
'STFC_CONNECTION' could not be found in the server repository.
If we test the RFC destination using RFC_TRUSTED_CHECK standard FM we are getting the below error.
'RFCPING' could not be found in the server repository.
We create the RFC destination of Type : TCP/IP as exactly mention in the blog.
Please help us in resolving this issue.
Thanks
PrincePabi,
Using the RFC connection,we can establish a link between Java and SAP.
Afterwards,hope we can call Java program from ABAP.
Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
DATA: REQUTEXT LIKE SY-LISEL,
RESPTEXT LIKE SY-LISEL,
ECHOTEXT LIKE SY-LISEL.
DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
DATA: RFC_MESS(128).
REQUTEXT = 'HELLO WORLD'.
RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
CALL FUNCTION 'STFC_CONNECTION'
DESTINATION RFCDEST
EXPORTING
REQUTEXT = REQUTEXT
IMPORTING
RESPTEXT = RESPTEXT
ECHOTEXT = ECHOTEXT
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
IF SY-SUBRC NE 0.
WRITE: / 'Call STFC_CONNECTION SY-SUBRC = ', SY-SUBRC.
WRITE: / RFC_MESS.
ENDIF.
Regards,
Sree
Maybe you are looking for
-
I only have 300 pictures and 2 videos, only 50 songs, I always clear my data and cookies, and history on safari, and I always delete my texting and imessaging conversations, and I clear my calling history. I also redownloaded all my apps BUT I still
-
Canon Vixia HF R400 Stops Recording?
Hello! For some reason, my Canon HF R400 Camcorder (probably a week old) stops recording in the middle of recordings. This has happened to me multiple times. Today, I was recording a Piano cover, and it stopped recording around 2 minutes into it! I d
-
My Iphone Is Locked, When I Try Sync With Itunes ,The App Ask Me For The Owner Account which Is Erased Somebody Can Help Me? I Want To Sync My Music But I Cant, Can Somebody Help Me ? Thanks
-
Can I use my Canadian iphone in Korea?
After I purchased my iPhone from Telus, I went to the Apple store to change it because of a minor problem. And now, I need to go to S.Korea for a short-term business, and want to take my iPhone with me. I heard from someone that if I get an exchange
-
External requirements from ERP to SRM with ExtendedClassic scenario for PPS
Hi all, We are having SRM 7.01 system with ERP ehp4, and we have to do PPS ( Public sector Procurement) as part of our implementation,for that we need to activate Extended classic Scenario. My question is whether we can have external requirements ( M