Page 1 of 1

Accessing a wrong SAP

Posted: Tue Jul 08, 2008 1:29 pm
by gpbarsky
Hi, my friends.... :)

I am exporting a job, within the same server. The original job accesses to SAP client number 221 with a given IP address.

When I import the job to the new project, I have to change the SAP address where to access. When I change the address, I click the "validate" button and everything is fine. The new SAP client accessed now is 401.

However, when I run the job, it tries to access the SAP client 221 (the client from the original job). I cleared the IP address from the new job, and anyway it is accessing the original SAP client 221.

Could someone tell me what's happening here :?:

Thanks in advance.

Posted: Tue Jul 08, 2008 2:31 pm
by gpbarsky
I got the answer.

I edited the *.DSX file (the file generated by the EXPORT process), and I discovered that the original address was stores within the file, in another parameters that I cannot change.

This is the line of the EXPORT file:
Value "DSPASSWORD=\(A)RFCSERVERCOUNT=1\(A)SAPROUTERSTRING=\(A)ACKNOWLEDGEIDOCRECEIPT=TRUE\(A)DEFAULTLANGUAGE=\(A)DATAFILESPATH=\(A)SAPSYSNUM=00\(A)DEFAULTUSERNAME=\(A)DESCRIPTION=SUNPIN\(A)SAPGROUP=\(A)DSUSERNAME=\(A)METADATAFILE=\(A)SAPMESSERVER=\(A)IDOCPORTVERSION=3\(A)DEFAULTCLIENT=\(A)READMETADATAFROMFILE=FALSE\(A)ALLOWSAPTORUNJOBS=TRUE\(A)SAPAPPSERVER=10.250.1.28\(A)EXISTS=TRUE\(A)LISTENFORIDOCS=FALSE\(A)NAME=SUNPIN\(A)MSGSVRROUTERSTRING=\(A)SAPSYSID=\(A)REFSERVERPROGID=\(A)USELOADBALANCING=FALSE\(A)DEFAULTPASSWORD=\(A)"

The IP address 10.250.1.28 is the new address that I changed manually. Instead of this, it was written 10.250.0.20, which was the original address.

Concluding: the first address written was 10.250.0.20. Then I exported the job, imported it, and changed the address to 10.250.1.28. But internally, the original address was stored yet.

How can I change this, without editing the *.DSX file ?

Posted: Tue Jul 08, 2008 3:13 pm
by ray.wurlod
I guess you have to find out where the IP address is stored as a stage property. I don't have the SAP stages here so can't advise.

Posted: Wed Jul 09, 2008 6:36 am
by PhilHibbs
How did you change the IP address? The IP address to connect to is a property of the SAP Connection. Did you select a different connection, but not change the client number? ABAP Extract stages store the SAP client number explicitly, whereas IDoc Load stages take the client number from the SAP Connection.

Is the destination project on the same DataStage server instance, or do you have a separate instance with separate SAP Connections?

Posted: Wed Jul 09, 2008 12:07 pm
by rodre
I am not sure what a SAP stage is but it seems to me that you should be able to set the IP Address as an Environment Variable.

My 2 cents

Rodre

Posted: Thu Jul 10, 2008 2:18 am
by PhilHibbs
rodre wrote:I am not sure what a SAP stage is but it seems to me that you should be able to set the IP Address as an Environment Variable
Nope. You can set the Connection Name as a Job Parameter or Env Var, and that brings the IP address, System Number, etc. with it. I've had problems with parameterising it though.

Update: I just reminded myself what the problem is - there's no way to parameterise the client number, which is another vital part of the SAP connection. For some bizarre reason, the ABAP stage doesn't use the client number contained in the Connection, you have to set it manually and you can't set it to a parameter.