on 03-12-2009 1:23 PM
Hi experts,
My requirment is like :
I have a source as a Business service(i m picking file from its FTP location) , i need to change the control record values as per the Environment.
Is there any function which i can use in my UDF to get the name of the current environment(Like FXD,FXT,FXU) and other control segment details like sender port etc.
Regards,
Anika
FYI~~
import: com.sap.mw.jco
String sysName = (String) System.getProperty("SAPSYSTEMNAME");
if(sysName.equals("XXX"))
{
your logic here
}
Edited by: Shabarish Vijayakumar on Mar 12, 2009 7:05 PM
Edited by: Shabarish Vijayakumar on Mar 12, 2009 7:06 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI all,
Thanks for the replies.
I need the following details also to fill the control record of the IDOC.
MANDT - Client#
DOCREL - SAP Release for IDoc
SNDPOR - Sender port (SAP System, external subsystem)
SNDPRT - Partner type of sender
SNDPFC - Partner Function of Sender
SNDPRN - Partner Number of Sender
RCVPOR - Receiver port
RCVPRT - Partner Type of receiver
RCVPFC - Partner function of recipient
RCVPRN - Partner number of recipient.
Any pointers where i can get the functions for getting these values.
Regards,
Anika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
these are the mapping runtime constants u can access - http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/frameset.htm
But in your case if you have to fill all that you have mentioned, its better to use predefined fix value or value mapping table and then pass the values.
Hi shabarish/michale
I would like to go with value mapping as suggested by shabarish.I need to change the values of the control segments based on the system(its like if we move from the dev system to testing system , the values mentioned in the control segment should change accodingly...ie. all values should have testing system details)
If i go for value mapping can i acheive this.Please let me know if you are familiar with similar requirement.As i can see in the value mapping in ID ..its similar to fixed value mapping wherein we specify whch value to be replced by the corresponding value.
can you please tell me wht is the main difference between fixed value and value mapping.
what i know is value mapping is created in ID..and it can be edited even if we move to testing system.but i am not understanding how it is actually makes a differece.
Regards,
Anika
hi all,
thanks alot for all your pointers and support.I have solved my doubt.the requirement was like,certain feilds should be made available to change when we have to move from dev,to testing and then to production.What i did was,i used value mapping and mapped with some constant.All that is needed was the feild values like sndprt,client# etc should be available to change based on the environment.
With this i am closing the thread..thanks to sdn,its a great forum
regards,
Check with this,
System.getProperty("systemname")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
use this code in your UDF:
String sysID = (String)System.getProperty("SAPSYSTEMNAME");
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.