How to read the Domain and Port of our server

hi guru,
Is there any method to get the portal Domain and Port .
http://<domain>:<port>/irj/portal
http://<Domain><port>  /irj/servlet/prt/portal/prtroot/com.sap.portal.appintegrator.sap.bwc.Transaction?System=NIB_Aliase&SAP_TCode=se80
in our project  we are hard coded the Domain and port .
if we transfer the application is some other server again we want to change.
So is there any solution for that.Please help me in this situation
Advance thank's
Regard's
Vivekanathan.S

Hi,
import com.sap.tc.webdynpro.services.sal.deployment.api.WDDeployableObjectPart;
import com.sap.tc.webdynpro.services.task.TaskBinder;
  WDDeployableObjectPart d = wdComponentAPI.getDeployableObjectPart();
  String hostName = TaskBinder.getCurrentTask().getProtocolAdapter().getServerName();
  int port = TaskBinder.getCurrentTask().getProtocolAdapter().getServerPort();
With the above code you can get the host name, and port.
If your problem is solved, award me the points.
Thanks,
Srini

Similar Messages

  • How to read the date and time information of a file by labview

    how to read the date and time information of a file by labview? for example, created time and modified time.
    Solved!
    Go to Solution.

    if you need to know the last modification date of file:-
    "Functions->File I/O->Advanced File Functions->File/Directory Info.vi"
    This vi returns the value of file's last modification date. This is returned as U32 number. To see it in MM/DD/YY format you must create the indicator, right-click on it and select "Format & Precision" item from drop-down menu. Then select "Time and Date" format there.
    Thanks as kudos only

  • How to configure the sort and port of a SOAP address dynamically

    Hi All,
    In the “wsdl” we have the SOAP Address defined but in practice we would like to configure the host and the port. As the server on which the service resides may/will change.
    For example:
    http://usciq74.wdf.sap.corp:50077/sap/bc/srt/rfc/sap/CPM_PLANNING_HISTORY?sap-client=003
    We would like to configure the proxy to point to say:
    http://<host>:<port>//sap/bc/srt/rfc/sap/CPM_PLANNING_HISTORY?sap-client=003
    What we see in the Proxy Code is:
    port.setSOAPAddress(new com.sap.flex.ws.runtime.SOAPAddress("http://usciq74.wdf.sap.corp:50077/sap/bc/srt/rfc/sap/CPM_PLANNING_HISTORY?sap-client=003"));
    How could this be achieved.
    Please help.

    Hi Sumit,
    Thanks for the quick response. However, I do not want to change the host and the port in the wsdl. I want it to be so, that it will pick the host and port dynamically(as you have mentioned). However, in out case, the web service has the SOAP address hardcoded as <b>http://usciq74.wdf.sap.corp:50077</b>.
    We would want to write something as http://host:port and then let it pick the host and port dynamically. How is that possible.
    Best Regards,
    Debashree.

  • How to read the method and put that code in 1 internal table

    Hi,
    Actually in the normal ABAP, if we want to read the report,  then we will write read report statement.
    If we want to read method then this statement will not work.
    So, to read the method and put that code in 1 internal table , which statement we need to write?
    Regards,
    Radhika

    Hi Naimesh,
    Thanks for your reply.
    As, i am not aware of ABAP Objects i am having some issues:
    Actually that is working for some methods in some classes.
    Here 1 issue is there:
    In se24 1 method is there in 1 class.
    Even by using that FM in SE37 i am able to get the program name by giving class and method name,
    but while using that FM in the program i am not able to get that program name.
    so, i am unable to read the source code of the program?
    1 example here:
    Class name is CL_GUI_FRONTEND_SERVICES.
    in this class, methods like FILE_EXIST , FILE_GET_SIZE, etc are there.
    By giving the class name and method name i am able to get the program name also,
    but while using that FM in the program i am not able to get that program name.
    so, i am unable to read the source code of the program?
    Here is my code:
    REPORT  Z16059_SCAN_METHOD.
    DATA: BEGIN OF I_PROGRAM OCCURS 0,
          LINE(256) TYPE C,
          END OF I_PROGRAM.
    DATA METHOD TYPE PROGRAM.
    DATA: BEGIN OF I_STRUCTURE,
          CLS_NAME(30) TYPE C,
          METH_NAME(61) TYPE C,
          END OF I_STRUCTURE.
    I_STRUCTURE-CLS_NAME = 'CL_GUI_FRONTEND_SERVICES'.
    I_STRUCTURE-METH_NAME = 'CL_GUI_FRONTEND_SERVICES-FILE_EXIST'.
    CALL FUNCTION 'SEO_METHOD_GET_INCLUDE_BY_NAME'
      EXPORTING
      MTDKEY             =  I_STRUCTURE
    IMPORTING
       PROGNAME          = METHOD
    EXCEPTIONS
       INTERNALMETHOD_NOT_EXISTING      = 1
       OTHERS                             = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ REPORT METHOD INTO I_PROGRAM.
    Please help me out in this regard.
    Thanks & Regards,
    Radhika

  • How to read the power and status LEDs on cFP2020

    Can the cFP2020 Power and Status LEDs be monitored by a host program? Also, can the Power and Ready LEDs be monitored from the other cFP Modules?

    You can not directly read the Network Module Power or Status LED from a host program. Likewise, you can not directly read the Power and Ready LED of an IO module.
    However, even though you can not directly ready the LED status, there are ways of finding out most of the information that the LEDs convey.
    For the Network Module Power LED, you can infer the status of the Power LED by looking at the channel status for any/all items that are on the bank. If the items have errors indicating that a communication timeout has occured or an addressed item does not exist, then it is probable that the unit is offline (either because of no power or a fault). The Status LED indicates the current operating status of the Network module and in most cases, if it is flashing
    , then a fault has occured that shutdown the processor. In most cases, you will not be able to determine that the Status LED is flashing, as the Status LED indicates a fault condition which will put the unit into a non-standard operating mode (e.g. firmware corruption, unassigned IP Address, or an OS fault).
    For the IO modules, each channel on a module can report status, and based upon the status you can infer the state of the LEDs. If the module does not have the Power LED lit, the most likely status will be "Addressed item does not exist". If the module has the Power LED but no Ready LED, then the status will indicate that the "item is unconfigured". If the module has both a Power and Ready LED, than the channel should report either a good status, or a channel specific error (if applicable).
    Regards,
    Aaron

  • How to read the time and then run different parts of the codes?

    I am new to LabView. I want to read the program running time and then decide what to do.
    For exaple, if time is less than 1s, output sin signal;if time is more than 1s, output sawteeth signal. It is easy to be implemented in C or Simulink, but seems difficult for me in LabView.
    Thanks.

    Hi, Bill,
    Thank you very much for your help.
    I changed your sample codes a little bit to get moving graph. I have three more questons:
    (1) If there are more cases, such as one for t=1s, the second for t=3.2s,and a third for t=6.9s, do I have to use multi-layer case structure, since it only checks the result if it is true or false?
    (2)Does labview provide us something to have the function such as 'switch...case' or 'if..else' in C/C++?
    (3)Is there anything for a time-based multi-segment function?
    Best wishes,
    Attachments:
    example2.vi ‏55 KB

  • How to configure the logging and tracing in J2EE-Server

    Hi,
    when I've been using the SAP Logging and Tracing Framework before from more or less "standalone" Applications I always used a property file which configured the levels of severity  etc.. During application startup I've read this file and configured the logging properly.
    In a J2EE-Environment (SAP WEB AS JAVA) I cannot read a file from a file - system. So I'm wondering where are those handlers and severity levels are configured ?
    Any help is greatly appreciated.
    Thanks in advance,
    Frank

    Hi Frank,
    well, first of all, your application provides log configuration information using an XML file at deployment time. This file is called log-configuration.xml (you can see the DTD description here: http://help.sap.com/saphelp_nw04/helpdata/en/48/ef8748caed894bb4b3ae953a60c592/frameset.htm). There you can set configure log controllers, which could be two types: location and category. So, you can specify your location and severity there. This is described here: http://help.sap.com/saphelp_nw04/helpdata/en/35/671c0136b4714c9e1b16b68211287b/frameset.htm.
    Then, after the application is deployed, the log configurations you provided for it are registered with the Log Configuration tool I mentioned about. Using this tool you can later on modify your configurations at runtime (for example, change the severity level) without having to redeploy the application.
    I hope it's clearer now? I guess it was me not getting your first question correctly that caused your confusion.
    Greetings,
    Ivo

  • How to Read the String and break them in to TUPULES

    HI ALL,
    i have one String like THE STRING IS --- ---- --- >>
    3122078,12/12/2005
    3122079,12/1/1988
    3122076,12/12/1999
    I want to break them into STR :=3122078 and STR1:=12/12/2005 .

    SQL> select substr('3122078,12/12/2005',1,instr('3122078,12/12/2005',',')-1) from dual;
    SUBSTR(
    3122078
    SQL> select substr('3122078,12/12/2005',instr('3122078,12/12/2005',',')+1) from dual;
    SUBSTR('31
    12/12/2005
    SQL>

  • How to Read the "text file and csv file" through powershell Scripts

    Hi All
    i need to add a multiple users in a particular Group through powershell Script how to read the text and CSV files in powershell
    am completly new to Powershell scripts any one pls respond ASAP.with step by step process pls
    Regards:
    Rajeshreddy.k

    Hi Rajeshreddy.k,
    To add multiple users to one group, I wouldn't use a .csv file since the only value you need from a list is the users to be added.
    To start create a list of users that should be added to the group, import this list in a variable called $users, the group distinguishedName in a variable called $Group and simply call the ActiveDirectory cmdlet Add-GroupMember.
    $Users = Get-Content -Path 'C:\ListOfUsernames.txt'
    $Group = 'CN=MyGroup,OU=MyOrg,DC=domain,DC=lcl'
    Add-ADGroupMember -Identity $Group -Members $Users

  • How do I set domain and range in grapher.app?

    Hey, I'm brand new to this program, and i can't figure out for the life of me how to set the domain and range of an equation.
    For example, if i had the equation y=x^2 , how would i go about setting the x values>0?
    Any quick replies are very appreciated! Its rather urgent.

    Apple's Grapher does, in fact, have this capability. It's a shame that Apple's documentation is very poor. Grapher is a wonderful application. In any case, here is how to do it:
    The general syntax is:
    y = condition(s) ? expression
    So for example, if you only wanted to graph the positive x values of x^2, you would enter:
    y = x > 0 ? x^2
    You can also have multiple conditions, separated with an ampersand (&). For example, the sinx graph from -pi to pi:
    y = x > -π & x < π ? sinx
    You can even limit the range. Example:
    y = y < 5 ? x^2
    This only shows the parabola up to the y = 5 line.
    Again, you can mix and match any set of conditions you desire with the ampersand, including limits on the domain and range within the same set of conditions. Example of x^2 only showing positive x values up to the y = 5 line:
    y = y < 5 & x > 0 ? x^2
    Hope this helps.

  • When I open iPhoto 9.2.1 it says that my library needs to be upgraded but when I upgrade the library I am trying to open (33 GB worth of pictures from 2006) the new application says it cannot read the files and how to find them on the system to reimport?!

    When I open iPhoto 9.2.1 it says that my library needs to be upgraded but when I upgrade the library I am trying to open (33 GB worth of pictures from 2006) the new application says it cannot read the files and how to find them on the system to reimport?! and then I'd like to erase the original files since the space requirement is huge!!!! Why is upgrading software iPhoto such a pain. I've gotta get a presentation done and all I get for my money is roadblock!!!

    hello, it sounds like the library is damaged.
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. 

  • How to read the and Write the PDF file give me the solution

    Hi all,
    How to read the and Write the PDF file give me the solution
    My coding is
    import java.io.File;
    import com.asprise.util.pdf.PDFImageWriter;
    import com.asprise.util.pdf.PDFReader;
    import java.io.*;
    import java.io.FileOutputStream;
    public class example {
    // public example() {
         public static void main(String a[])
              try
              PDFReader reader = new PDFReader(new File("C:\\AsprisePDF-DevGuide.pdf"));
                   reader.open(); // open the file.
                   int pages = reader.getNumberOfPages();
                   for(int i=0; i < pages; i++) {
                   String text = reader.extractTextFromPage(i);
                   System.out.println("Page " + i + ": " + text);
    // perform other operations on pages.
    PDFImageWriter writer = new PDFImageWriter(new FileOutputStream("c:\\new11.pdf"));
                   writer.open();
                   writer.addImage("C:\\sam.doc");
                   writer.close();
                   System.out.println("DONE.");
    reader.close();
              catch(Exception e){System.out.println("error:"+e);
              e.printStackTrace();
    I get the pdf content then it returns the string value but ther is no option to write the string to PDF, and we only add a image file to PDF,but i want to know how to wrote the string value to PDF file,
    Please give response immtly
    i am waiting for your reply.
    thanks,
    Suresh.G

    I have some question flow
    How library to use this code.
    I try runing but have not libary.
    Please send me it'library
    Thank you very much!

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How to read the data in spectrum analyzer (Anritsu MS2661C) and put it in Excel using Labview

    Hi all, I'm new to using the labview, and I have some trouble doing my project using the labview software.
    I have been trying to use the spectrum analyzer (Anritsu MS2661C) which connect to computer using the GPIB connection.
    I have got the instrument driver which can write and control the instrument using Labview 2010.
    and my Question is how do read the data or result from the spectrum analyzer and send it to the microsoft excel?
    Do I need to use other software or programming to do this step?
    If anyone know how is this done, please let me know.
    Regards,
    Ery

    Hi ery,
    In order to send data that you have read in from an instrument to Excel, the most convenient way to do this would be to use our Report Generation Toolkit.  The Report Generation Toolkit is a very useful tool that allows you to interface to Microsoft Office software from LabVIEW, including Word and Excel.  I am not sure if you are familiar with this, but I have attached a link that explains more about the Report Generation Toolkit below.  
    Another way would be to use the Write To Spreadsheet File VI.  While this will store your data to a spreadsheet data file, it will not allow you to programmatically perform any Excel formatting like the Report Generation Toolkit offers.  I have also attached a link to some information on the Write To Spreadsheet VI below.  
    Also, be sure to check out the Example Finder in LabVIEW for a number of examples on how to write data to a spreadsheet file.  From LabVIEW, you can go to Help»Find Examples to launch the Example Finder.  From there, you can search for "spreadsheet," which should populate examples for use in different applications.  I hope this helps, ery.  Please let me know if you have any further questions about these!
    NI LabVIEW Report Generation Toolkit for Microsoft Office
    Write To Spreadsheet File VI 
    Taylor G.
    Product Support Engineer
    National Instruments
    www.ni.com/support

  • How do I send an iMessage, a step by step answer. I have read the manual and it doesnt explain how

    Can someone explain how you send an iMessage. I know how to send texts and emails but I only want to use the iMessage so that my company bill doesnt show text numbers called. I have got iMessage turned on in settings. I have read the manual and it says you can do it but it doesnt say how.

    Thanks for your response. It helps a little. I now dont know how to change the send button from green to blue. What determines how the message is sent?
    I know in the settings I can turn off "send as sms" so that should stop text messages being sent. I went through my contact list and selected a few people at random and noticed the send button was green for some and blue for others so I am thinking it may be either something they do to let me iMessage them or it is something I have to do in my contact list.
    Do you know?

Maybe you are looking for

  • Unmountabl​e Boot Volume error in Z61T

    Hi Members, I just encountered the the Error Unmountable Boot volume error(Blue Screen)  in my Z61T Think pad laptop.  I'm not sure what caused this error. Is it possible to fix the error? I tried to go in to Recovery Console using XP CD and then rep

  • Unable to remove Workforce Planning formulae in Planning 9.3.1.1.16

    Hi All, We are on using Planning 9.3.1.1.16 and are unable to remove member formulae from Planning. Our Planning application is EPMA (9.3.1.3) enabled. When refreshing the Planning application we receive the following error: Error [1200497] detected

  • Firewall service not permitting as it should

    The firewall services in OS X Server 10.5.1 are not permitting traffic as expected. Any ideas here to help me understand why would be appreciated. IP address block 11.22.33.0/26 has been changed from the original but should have no effect on the exam

  • What can I do about Packet Loss?

    Hey Verizon Community, As the title says, what can I do about packet loss? I have been having network spike issues in the video game Starcraft II, and Blizzard support told me to run a pathping to their servers (pathping pasted below). Upon doing tha

  • Menu item stroke problems

    I am unable to add a right aligned stroke on the word 'Snowdon Super Cup' because the border cuts across the word 'Cup'. (the stroke appears where the word 'Cup' starts) How to I extend the border area in order for the menu item 'Snowdon Super Cup' t