FTP to external system
Hi,
I am try to establish a connection to the external system. I am using the FM "FTP_CONNECT" for connection in my ABAP program. But somehow I am not able to connect.
I am getting an error message saying "Attempting to connect to (HOSTname) fail".
I have checked user authorization and it seems everything is fine.
Do I need to pass gateway parameters in this FM as this is the external system (They are optional)? Currently I am not passing anything in all three gateway information.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING USER = USER
PWD = PASSWORD
ACCT = ACCOUNT HOST = HOST
TRACE = FTP_TRACE
GUSER = ''
GPWD = ''
GHOST = ''
IMPORTING HANDLE = HANDLE
ERROR = CERROR
EXCEPTIONS SYSTEM_FAILURE = 1
COMMUNICATION_FAILURE = 2.
Appreciate your early response.
Thanks,
Samay
Hi Samay,
You need to setup RFC Destination (SM59). If you don't have authorization, please ask BASIS to help you. Otherwise please follow this steps.
When you define an RFC server program (usually an executable on a server) as RFC destination, you choose either 'START' or 'Registration'. 'Start' means the SAP application sending anything to this destination will trigger this program, while registration means this program will already be running (like a service) and have already registered itself to SAP server.
Once you have defined your RFC destination as of type 'registration', you should execute this exe with the syntax
"pgmname.exe -a<ProgramID>
-g<Gateway Host>
-x<Gateway Service>
" where programID shall be the same as the RFC destination name (I think) and gateway host and service is from the app server where you are registering this destination,
to have it started as a service and registered as the destination to the SAP server (which you can afterwards see in SMGW txn).
If you want this program to be started when something is sent to this RFC destination from SAP, make it of type 'START'.
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.
Similar Messages
-
Sender File Adapter not able to get file via FTP from an external system
Hi,
I have a Sender File Adapter using FTP which polls a server every 10 seconds looking for a file ".xml". The adapter will connect and pick up the waiting file, but sometimes the adapter not able to get file via FTP from an external system. The file is on the server, but despite the polling, the adapter does not pick up it. There is no return error.
The connect mode is Permanently and the transfer mode is Binary.
Can you help me?
Thanks.
T.Hi Teresa,
does this case appears with a file size higher the others?
Personally, I do not recommend to have a polling under 1min.
10s could be too just, if the file is not small and/or if the file server is far (several kilometers) to where the Adapter Engine is, and/or this file server is beside a firewall. Do not forget also that, with previous points, you could have like a conflict, betwen the 1st polling and the 2nd polling, if in less 10s PI adapter has not enough time: to connect to the FTP server (several Km), find the file (perhaps among 100 other files in the directory), go back to the file to Adapter Engine server (several Km again), convert your file to XML message (with a complex Content Conversion), then check the XML structure, and when all that is done, return back to FTP server (several Km), to archive the source file... Well It's my understanding of a FTP exchange with FILE adapter...
If you really need a 10s polling, that's mean your have a pseudo real time interface. In that case, in my mind file should not be used! but we should use a Web service, JDBC JMS (any exchange without a physical object like a file). For me, it's a non-sens to have a file in that case.
regards.
mickael -
FTP file on Appserver to an external system from ABAP
Hi,
I am trying to FTP a file that my program writes to the APPSERVER directory. I used FTP_CONNECT, FTP_COMMAND and FTP_DISCONNECT.
I am able to connect to the external system and change to the directory where I have to write the file using cd. The problem arises when I use lcd command to switch the local directory. Although, i specify the path, lcd /usr/sap/icomm/iface/outbound/, on execution of this command, the system points to my C:\Documents and Settings\rkademani\SapWorkDir.
How can I make it point to my appserver?
Further, this program will be scheduled as a background job in Production. I have tried to schedule this as a background job, even then it gives me the same error.
Please help. Thanks in advance.
RKWhat error do you get? When I hit "test" I see:
Connection test SAPFTPA
Connection type: TCP/IP connection
Logon: 155 msec
0 KB: 1 msec
10 KB: 15 msec
20 KB: 2 msec
30 KB: 3 msec
The only visible settings are "Activation type = Start on Application Server, and the Program = sapftp... in the RFCDES table in SE16, I see:
Destination Type Options
SAPFTP T H=%%SAPGUI%%,N=sapftp,R=N,
SAPFTPA T N=sapftp,R=N,
Jonathan -
Hi SRM specialist
<u>Scenario:External system --> SRM</u>
Now we are examining how to do the Interface.
Firstly PO data is created in External system and this data will be needed to transfer to SRM.
<u>Question</u>
What can we do when we will do the Interface from External system to SRM?
(IDOC? XML? FTP?)
Please tell me about it.Hi,
As far as I know if ur talking with SAP with SAP system than connection would be RFC and the communication in the ALE IDOC right.
But if ur talking with SAP with NON SAP system than the connection would be through some middleware like XI.
Note:- But in some case u can pass your SAP IDOC into XML format to the other NON SAP System provided that the system should be in programmed in such a formate that it can understand and mapped the details as per the business requirement.
See IDOC can be send in different format right like.
1) Files Formate,
2) TRFC Formate,
3) XML File,
4) XML Http,
5) CPI-C,
6) ABAP-PI
Is this is the ans ur looking for please revert.
BR,
Vijay Mittal
If it helps u in understanding and solving reward the points. -
How to distribute Modelview to external system such as Webmethods
Hi All,
I have a scenario like this
I have to send Delivery idoc to two external systems
Triggered through
SAP output 'ZEXA'.
system -> DESADV -> External system (A)
Triggered through
SAP output 'ZEXB'.
system -> DESADV -> External system (B)
The distirbution model allows me to add only one external system as the receiver at a time for the message type DESADV, I cannot distribute the model view also ...
How can i achieve this, I dont want to create any Z-message types.. Your suggestions will be higlhy appreciated.
Regards,
KrishnakumarHi KrishnaKumar
As far SAP distribution model (ALE ) is concerned SAP does not identify any system as SAP system or External system. It only identifies the system as logical system. And when the distribution model distributes the idoc using RFC and port setting, at that time it actually identifies the system as SAP or External.
So as far as distribution model is concerned you can add external systems also but these should be present as logical system in SAP tables.
And as Shital said there must be some middleware in your design, it could be PI also as well as some FTP server.
Regards
Pranay Gupta -
Read/Open a file in SAP DMS from an external system
Hello Sap Gurus,
I want to read/open a file in SAP DMS from an external system . External system is basically a non-sap system.
Can this be achieved through an RFC..
Does anyone know of any BAPI's/FM's that can be called from an external system (non-sap system) through RFC which will open a document which is stored in SAP DMS.
Regards,
Madan Shetty.Hi Madan,
If you want to view documents from an external system, there are many ways of achieving this.
It depends on the solution that you are approaching.
Few methods that I have come across are, OData services, Custom RFC Function Modules, to retrieve document attachments.
FTP is also a possible solution.
Please let us know your exact requirement.
Regards,
Tamilnesan G -
Scenario: Idoc - XI - external system (Idoc)
Hello,
I am trying to send an idoc from an sap 4.6c system to an external system. The external system is supporting idcos with trfc. This scenario is currently working with ALE. Now i have to set XI between these two systems.
My problem is to set up the communication channel in the integration builder (configuration) for the external system. The idoc is waitung in XI to transport. So the step XI-> external system causing problems.
My settings are:
adapter type: idoc
transport protocol: idoc
message protocol: idoc
adapter engine: integration engine
rfc destination: xyz (is working fine)
interface version: sap release 4.0 or higher
port: ??
sap release 46c
My problem is the port. should i set up a port in idx1? But the external system is not an sap system and so i dont have a client.
In XI i have defined a port in transaction we21 (transactional rfc) for the external system with rfc destination xyz. But if i enter that port in communication channel i got error messages.
Thanks for any help.Hi christian,
i'm also working in IDOC scenario between ECC to XI to MDM, if u have any document or snapshot then pls fwd it to me.
[email protected]
Thanks,
Jitendra -
HUGE amount of data in flat file every day to external system
Hello,
i have to develop several programs to export all tables data in a flat file for external system ( EG. WEB).
I have some worries like if is possible by SAP export all KNA1 data that contains a lot of data in a flat file using the extraction:
SELECT * FROM KNA1 ITO TABLE TB_KNA1.
I need some advices about these kind of huge extractions.
I also have to extract from some tables, only the data changes, new record, and deleted records; to do this I thought of developing a program that every day extract all data from MARA and save the extraction in a custom table like MARA; the next day when the programs runs compare all data of the new extraction with the old extraction in the ZMARA table to understand the datachanges, new records or deleted record.. It's a righ approach? Can have problems with performance? Do you now other methods?
Thanks a lot!
Byeyou should not have a problem with this simple approach, transferring each row to the output file rather than reading all data into an internal table first:
open dataset <file> ...
select * from kna1 into wa_kna1
transfer wa_kna1 to <file>
endselect
close dataset <file>
Thomas -
Is it possible to integrate LSO 600 with an external system without SAP PI?
Hi,
as asked in the title, i am wondering if it is possible to integrate LSO 600 with an external (non-SAP) system without using SAP PI/XI. The external system is a middleware application which can handle RFC functions, IDocs besides the usual web service communications.
However, i don't know how LSO and SAP PI are integrated so i wonder if their interfaces are such that instead of SAP PI another middleware could be used.Web Services are used. If you were to implement the services in your 3rd party middleware and configure SAP to call it, I suppose it is possible. The external course catalog can be used for CourseEnrollment and LearningProgress. See the application help for details. Don't expect to receive support from SAP with such a setup however.
-
Integration of Financials with external systems
Hi,
I am strugling with an implementation where the client is not sure if Oracle Financials suits his business processes
Overview of situation on Hand:
We do not have the product installed as yet at the client site
Products of Oracle Financials to be used :General Ledger, Account Receivable, Account Payable, Fixed Assets,India Localization Patch
Products of Oracle Applications NOT available for use :
Purchasing, Inventory, Order Management
(All these areas are being covered by developing a customized Bespoke system)
1. Is it possible to use Oracle India Localizations (with regards to the excise functionality, for e.g. claiming of ModVat, the various excise registers that are to be maintained for e.g. RG23 A, RG23C,etc ) in the above situation (without implementing Purchasing, Inventory, and Order Management?).
2. Further, while passing the Vendor’s Bills (in Oracle Payables), one of the criteria for PO Matching is to check if the ModVat has been claimed. Is this functionality available in Payables with the India localization patch?
3. Does Oracle India localization cater for VAT requirements?
4. Is an Open Interface available to transfer Purchase Order data from external systems to Oracle Purchasing tables (which are shared by Oracle Payables the names being PO_HEADERS, PO_LINES, PO_LINES_LOCATIONS, PO_DISTRIBUTIONS, PO_DISTRIBUTIONS_AP_V (VIEW OF PO_DISTRIBUTIONS), PO_RELEASES (Blanket Purchase Orders), PO_LOOKUP_CODES) at transactional frequency? However, if the oracle purchasing module is not being used, can the interface tables of Purchasing be used?
5. An open interface (Payables Open Interface) is available in Oracle Payables to import the Invoices from external systems. While importing these invoices, does the system expect to have the Purchase Order data in the PO tables mentioned in the point above?
6. Is an Open Interface available to transfer Quantity Received/Accepted data from external systems to PO_line_locations table to enable carrying out of 2/3/4 way matching of Purchase orders with invoices? Can the 4 way mathcing be carried out in AP by just importing Purchase Order data??
7. Can the Credit Card Transaction Interface be used for uploading employee expenses / advances settlement (not carried out via credit card) directly from feeder system?
8. Is it possible to use Open Item interface (including import concurrent program) even though Inventory module is not being installed ? If yes, then we would like to use this interface for updating Item master from bespoke system..
9. Can Auto Invoice API be used to import invoices from feeder system / legacy system (via RA interface Tables) into the Oracle receivable invoice tables? Is order number as column a prerequisite for successful completion of Auto Invoice API?
10. Where should the Masters be kept....OF of Bespoke
eg. Employee master, Inventory Item Master etc.
11. What is the best strategy for keeping the data in Bepoke and OF related to Masters in sync?
I have got various answers to these questions .....but some seem to contradict each other.
PLEASE HELP!!
Thanks,
KamanaDear Kamana,
Can you send me the replies given by our other Forum Friends, let me analyze the entire stuff and get back to you with a single consolidated bible for all your questions.
Gopal -
Calling a web service in external system from SRM
Hi folks,
A web service is created in the external system and I need to access this web service from a BADI. Can you tell me how can I call this web service (the external system is giving me a URL) and how I'll get a return. Please let me know in detail.
Thanks,
PremPrem,
Hi. You can call the service via HTTP protocol. Pass them values (SET_DATA), and receive a response (GET_DATA), via xml/html.
In your code you would need to create the xml data to pass them, and evaluate the returned xml.
Process...
Data setup
1) Create the XML to send them
Working with the external service
2) Open the HTTP connection
2a) cl_http_client=>create_by_url (IF_HTTP_CLIENT)
2b) lr_client->authenticate
3) Call the to send them the XML
3a) lr_client->request->set_data
3b) lr_client->send
4) Call the lr_client->receive to return the response
5) Close the connection lr_client->close
Data evaluate
6) Evaluation the returned XML and process.
Hope this helps
Cheers
Rob
Code example below.. (There are loads of SAP examples depending on which release you are on).
Process the call to the HTTP client - logic copied from RSHTML01 *
Open IF_HTTP_CLIENT
call method cl_http_client=>create_by_url
exporting
url = l_url
importing
client = lr_client
exceptions
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
others = 4.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
raising oops.
endif.
Authenticate the user
if not g_int_type-usr is initial.
move: g_int_type-usr to l_user,
g_int_type-password to l_password.
call method lr_client->authenticate
exporting
username = l_user
password = l_password.
endif.
Allow for Cookies
lr_client->propertytype_accept_cookie = lr_client->co_enabled.
Set the server protocol
select single gsval into l_server_protocol
from z77s0
where grpid = c_grpid
and semid = c_server_protocol.
if sy-subrc eq 0
and not l_server_protocol is initial.
move l_server_protocol to l_st_server_protocol.
call method lr_client->request->set_header_field
exporting
name = '~server_protocol'
value = l_st_server_protocol.
endif.
Send out the XML
Set body to XML data
lr_client->request->set_data( g_xxml ).
save_xml( i_role = cl_xml_document=>c_role_oreq ).
l_request_length = xstrlen( g_xxml ).
If Data is sent through then we need certain flags set
lr_client->request->set_header_field(
name = 'Content-Type'
value = zcl_tem_bsp=>c_xml_content ).
call method lr_client->request->set_header_field
exporting
name = '~request_method'
value = 'POST'.
Set length of string to the header fields
if not l_request_length is initial.
move l_request_length to l_st_request_length.
lr_client->request->set_header_field(
name = 'content-length'
value = l_st_request_length ).
endif.
Send the request
call method lr_client->send
exceptions
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
http_invalid_timeout = 4
others = 5.
check_for_error 'Send'.
Receive the response
call method lr_client->receive
exceptions
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
others = 4.
check_for_error 'Receive'.
Determined returned XML or HTML
g_xxml = lr_client->response->get_data( ).
Determine the header fields for failure validation
if lr_client->response->get_header_field( '~status_code' )
between 200 and 299.
save_xml( i_role = cl_xml_document=>c_role_ires ).
else.
l_status_code =
lr_client->response->get_header_field( '~status_code' ).
l_descript_1 =
lr_client->response->get_header_field( 'error' ).
l_descript_2 =
lr_client->response->get_header_field( 'errortext' ). -
Office 365 ECT to Azure Cannot connect to the LobSystem (External System)
I've tried to set up External Content Types to an Azure SQL database but when I access my page I get an error.
I basically followed http://www.pointbeyond.com/2012/12/31/surfacing-data-from-sql-azure-in-sharepoint-2013-online-office-365
Can you help me work out what i've not done, I don't know where to configure Azure firewall as this message suggests. The error is below:
Cannot connect to the LobSystem (External System). Reason: 'Cannot open server 'uf7prto4sj' requested by the login. Client with IP address '157.55.225.241' is not allowed to access the server. To enable access, use the Windows Azure Management
Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect. Login failed for user '*REMOVED*'. This session has been assigned a tracing
ID of '9389a67c-dc78-4134-9167-545ec963be3a'. Provide this tracing ID to customer support when you need assistance.'
Correlation ID:9a3fb39c-d0ea-1000-8099-2fad02009a01Hi,
It depends, if it's a static IP address for your machine, it should be OK for this one IP address; if it is a dynamic IP address in a range, you can input the IP address range which contains this mentioned IP address
157.55.225.241, or update the changed address to date.
http://stackoverflow.com/questions/8543653/windows-azure-client-with-ip-address-xxx-xxx-xxx-xx-is-not-allowed-to-access-t
Thanks,
Daniel Yang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you
have feedback for TechNet Subscriber Support, contact [email protected]
Daniel Yang
TechNet Community Support -
Cannot "Complete" Service Desk Messages in External System
Hello Solution Manager Experts!
I have an issue where we had two Solution Manager Service Desks and needed to consolidate into one. As part of that exercise, we set up an external service desk relationship between the old service desk (call it SID OLD) and the new service desk (call it SID NEW). When sending the service desk messages from OLD to NEW via the action (Send to External Service Desk) we can only set the status to "Accepted", and the status "Completed" is grayed out for the service desk message that resides in the NEW system. In the NEW system, under the Transaction Details-->Transaction Analysis there an error indicating that the message can only be closed by the external system (OLD). However, in the OLD system, the original message is already set to "Complete", and I am no longer able to do anything with the original service desk message. Even if I make another copy of the message in the OLD system and resend the copy to the NEW system (as status "new"), I still cannot mark the service desk message "Complete". In the OLD system, even of this copy of the service desk message is something other then Complete, I cannot mark it complete and synchronize with the new system. I get an error in the old system that says that "The problem message is locked in external system SM_NEWCLNT030_SERVDESK", which is obviously a reference to the RFC destination for the new external service desk.
How can I go back into the NEW system and change the message to "Complete"? Additionally, even if I could close the message in OLD and synchronize with NEW, I am curious how I would get around this issue if the OLD Solution Manager service desk needed to be decommissioned, and was no longer available, this would still be an issue of closing out service desk messages to a status of "Complete". Is there some kind of program I can run agains certain service desk message numbers which will "break" that relationship with the OLD service desk so I can set those messages that originated in OLD to be "Complete" in NEW?
Any service desk messages that are created directly in NEW can be closed out to "Completed". This is an issue that is only a problem with messages that originated in OLD. I hope this makes sense.
Your input is greatly appreciated.
Thanks!I found a workaround by going into the status profile in the NEW system, double clicking on the CONF status, changed "To be distributed" to "allowed" and "set". Then I backed up one screen so I could see all my status's; and then in the last column of the CONF status in the column labled "Trans.", I set it to RELE instead of FINI.
This enables me to set the "completed" messages from my legacy (OLD) system to "completed" in my (NEW) system. Once I have all the status's set, I'll set the status profile entry for CONF back to the way it was. -
Create Support Message from external system
HI experts,
I would like to change the Create Support Message screen(Menu->Help->Create Support Message) and add three fields namely: Category, Subject and Solution Number because currently these fields are not populated in the Service desk if I create message in this way unlike in using NOTIF_CREATE tcode where there are selection fields for these.
Also, I'm creating the support message from an external SAP system and the messsage is sent to the Solution Manager system. The NOTIF_CREATE tcode does not exist in the external system as well as the whole package DSWP.
Please let me know you rthoughts on this.
Thanks
EricHi guys,
Thanks for your answers... But is it possible to call transaction NOTIF_CREATE from an external system?
I have done something already so that those 3 fields will be automatically populated for a message sent from an external system.
I changed the screen and called FM BAPI_NOTIFICATION_CREATE(a remote enabled FM which is the one being used by transaction NOTIF_CREATE to create a message) inside FM BCOS_SEND_MSG.
I populated the category, subject and solution in the FM export parameters as well as the solution number in the sap data table. I put a destination also..
This FM calls another FM DNO_OW_CREATE_NOTIFICATION which is the one being used from the external system but do not cater the functionality to send the 3 fields that we need.
As you will notice, there are lots of standard objects that I've changed. =)
My problem now is that the system data sent is the same with the system data if you create the message using NOTIF_CREATE. Some system that were sent when a message is sent from an external system is missing but at least the sap system and client ID is sent. There is no external reference number also. But hopefullly, the users will accept it. Can't find any other solution to this.
Thanks,
Eric -
Error while connecting to external system in SM59 with ICM_HTTP_SSL_ERROR
Hi all,
we have configured an SM59 RFC destination of G type which pings to the external third party server. Before testing we have uploaded the external server certificate in PI system. it was working fine with * HTTP 200 OK* message. since 2 days we are facing the ICM_HTTP_SSL_ERROR while testing the connection. when we telnet from PI to the external system using the port no.443, its getting connected.
so any idea why it started giving the error.
We have check out this forums but of no help.
[ICM_HTTP_SSL_ERROR|ICM_HTTP_SSL_ERROR;
The trace file dev_icm says
[Thr 52] Thu Jan 20 14:34:00 2011
[Thr 52] *** ERROR during SecudeSSL_SessionStart() from SSL_connect()==SSL_ERROR_CONNECTION_LOST
[Thr 52] session uses PSE file "/usr/sap/XD1/DVEBMGS00/sec/SAPSSLDRV.pse"
[Thr 52] No Secude Error present in trace stack!
[Thr 52] SSL_get_state() returned 0x00002141 "SSLv3 read server key exchange B"
[Thr 52] SSL NI-sock: local=192.168.127.70:65243 peer=80.78.2.187:443
[Thr 52] <<- ERROR: SapSSLSessionStart(sssl_hdl=6000000000d50fd0)==SSSLERR_SSL_CONNECT
[Thr 52] *** ERROR => IcmConnInitClientSSL: SapSSLSessionStart failed (-57): SSSLERR_SSL_CONNECT {00370a03} [icxxconn_mt.c 1957]
[Thr 81] Thu Jan 20 14:34:15 2011
[Thr 81] IcmWorkerThread: end worker thread 53
[Thr 80] Thu Jan 20 14:44:45 2011
[Thr 80] IcmWorkerThread: end worker thread 52
Thanks,
AsemHareen,
We checked the the note 1318906 and followed the steps but error persists.
Could you please advice more on this.
Rahul,
The note you mentioned is for different error "ICM_HTTP_INTERNAL_ERROR".
Br
Asem
Maybe you are looking for
-
I am newbie to Lightroom but am quickly loving this program. One of the issues that led me here is date stamping. Our dSLR does not allow for date stamping (Nikon D40x). What it does is retains the "capture date" in the metadata ( i beliee most ca
-
Hey peoples, Anyone know where I can get information in regards to building custom windows? For example, the default Java Window has the Java Icon on the top right of the window and has a particular color to it. I was interested on making a window wi
-
Long story short....I restored my computer to an earlier point using time machine and now all of the previous back-ups are gone. My question has to do with itunes...is it possible to restore my itunes library to the most recent backup because the res
-
Illustrator CS6 Running an Action on Multiple files in a folder
I'm having trouble getting this to work and was hoping someone could shed some light for me. I created a action in Illustrator CS6 (on a PC) which opens PNG files, scales them onto a 8.5 x 11 page, saves them as a PDF into a output folder on my deskt
-
Photoshop Elements 8 quits with OS Lion
I am having trouble running Photoshop Elements 8 with OSX Lion. Any time I ask for "help" of any kind, the program quits. Anyone know a fix?