Skip to end of metadata
Go to start of metadata

Connecting to SAP is basically very simple, you copy the SAPGUI parameters like hostname, systen number, user etc into the properties of a datastore and you setup the data transport mechanism. But as there are so many different options, a checklist was created.

DI - SAP - Connecting to SAP

Testing basic connectivity

10

The first step should always be to logon to SAP via SAP GUI. Is this working? If you can logon by get the error message that this user is not setup as dialog user but CPIC user, this is okay. If cannot logon at all, let this get fixed by the SAP team.

 

 

12

What is the username?

 

 

13

the password?

 

 

14

and the Client Number (3 digits with leading zeros) taken from the login screen where you enter Username/Password in SAPGUI

 

 

20

On the SAP Logon Pad select the SAP server and click properties. Write down what it is written in....hostname

 

 

30

....and system number. The system number is a two digit number with leading zeros. So there is no System Number 7, it is 07.

 

 

40

With this information edit/create the DI datastore representing the SAP system and fill in exactly the same values for username, password, hostname, etc.

 

 

45

The execution mode should be generate_and_execute, execute in background should be unchecked and as data transport method choose "direct_download" for the time being.

 

 

50

The Client download directory and the generated abap directory should be set to any existing directory in the DI jobserver computer, e.g. c:\temp. The security profile field is left empty.

 

 

60

If you click on Okay, do you get any error message?

It just accepted it, no error

 

 

 

An error regarding username, password or hostname is shown.

Troubleshoot username, password errors

 

 

10

This not neccessarily means that you misspelled username, it can also be a permission issue. Logon the SAP via SAPGUI using this username.

 

 

20

Run transaction /nse37 and type as function module RFC_ABAP_INSTALL_AND_RUN.

 

 

30

Click on single test button...

 

 

40

and click on execute.

 

 

50

If you do not get an error like "no program found" or failed on one of the steps above, it is very likely you have not the right permissions. Show the problem to the SAP team and let them fix until you can do all of above said.

 

 

60

If you get an error like "system is locked for changes" this means we cannot simply run new programs there. Typical for Consolidation or Production Systems. In this case install the DI ABAP functions.

 

 

70

Still not working? Check the file dev_rfc.trc in the DI bin directory. This might give you a hint...


Data Transport

10

Specify a directory on the SAP server!!! where the data files should be written by the ABAP.

 

 

20

Choose the transport method for downloading that file

direct_download

Is direct_download the right method for you?

 

 

10

Did you know that direct_download is actually calling the gui_download ABAP function call?

 

 

20

That this function is very unreliable with bigger amounts of data?

 

 

30

Transport of data takes about 40!!! times longer than with the other protocols?

 

 

40

You cannot use 'execute in background'?

 

 

50

Configuring it is simple, you just specify a directory on the jobserver in the field Client Download Directory.

 

 

60

Does this directory actually exist?

 

 

shared_directory

Configuration of shared_directory

 

 

10

While the 'working directory on SAP server' is the point where the ABAP will write the file to, the 'DI path to the shared directory' is the path to access this same directory from the jobserver.

 

 

20

Keep in mind, whatever you specified as working diretory, SAP has to be able to write to. This is difficult to test from remote, so we assume you can. But keep that in mind...

 

 

30

Under what username is the Job Server running? In Windows, go to Start - Control Panel - Administrative Tasks - Services and open the Data Integrator Service properties. In the second tab it says 'logon'. What is the username specified here?

 

 

40

Logon to Windows with that username and try to access the directory you specified as DI path to working directory.

 

 

50

If all of this is working, there is just one trap left: The files generated by the SAP account, the DI user has to have read permissions for. Typically, this is done by placing the DI user into the same group as SAP is.

 

 

ftp

Configuring ftp

 

 

10

What is the hostname the ftp server is running on?

 

 

20

and the username to login to ftp

 

 

30

and its password?

 

 

40

In the command prompt, call ftp 'hostname' and type username password when asked. Can you login?

 

 

50

Next, what 'cd' (change directory) command do you have to do in order to get to the working directory on SAP server? Copy this path as the 'ftp relative path' in the datastore properties.

 

 

60

Next step would be to check permissions on the files. In general, SAP should create the files with read permission on its main group, the ftp user should be part of that SAP group so it can read the files.

 

 

70

What is the directory the file should be downloaded to? A directory on the jobserver computer.

 

 

custom_transfer_program

Configuring a custom transfer program

 

 

10

You specify a batch file that does all the download for you


The ABAP did not finish

10

What kind of error did you get?

Program exceeded processing time

resolving dialog mode timeout

 

 

10

In order to prevent users from running long time reports, in SAP a global parameter can be set to terminate all processes taking longer than e.g. 3 minutes. Solution: go to the datastore and check the "execute in background" option

 

 

20

Leave the target host field empty and SAP will choose the batch server for you or run transaction /n

 

 

30

The jobclass should remain C which means it is a long running job. This does help the SAP team.

 

 

job_close

Debugging job_close issues

 

 

10

You are executing a job in background mode - see the datastore - and this job fails for some reason.

 

 

20

Go to the SAPGUI - System - Services - Jobs - Job Overview and get a list of all batch job executed. You can click on the error icon and get more information.