How to read a Properties Resource File in KM with Web Dynpro Java

Hello all,
I would like to store a resource file in KM and have my web dynpro application read that file at runtime.  Is this possible?  Any examples of how to achieve this?
I hoping to be able to modify this resource file in KM to easily change certain behaviors in my webdynpro application.

Thanks Naga Raju Meesala.
How come all these methods are deprecated...getEP5User
Also, since I am building a weddynpro DC, what is the proper way to include these jar files as Used DCs?
Now proceed in the same way with the variable PORTAL_HOME and add the following .jar files:
u2022 \lib\prtapi.jar The portal runtime APIs
u2022 \portalapps\com.sap.portal.usermanagement\lib\com.sap.security.api.ep5.jar The user management APIs of the Enterprise Portal 5.0 are deprecated, but still in use in SAP NetWeaver 04
u2022 \portalapps\com.sap.netweaver.bc.rf\lib\bc.rf.framework_api.jar KM Repository Framework APIs
u2022 \portalapps\com.sap.netweaver.bc.rf.service\lib\bc.rf.global.service.urlgenerator_api.jar Repository Framework Utility: URL Generator
u2022 \portalapps\com.sap.netweaver.bc.sf\lib\bc.sf.framework_api.jar Repository Framework: Repository Services
u2022 \portalapps\com.sap.netweaver.bc.util\lib\bc.util.public_api.jar Repository Framework Utilities

Similar Messages

  • How to READ/SAVE Transformantation / Conversion File in BPC with ABAP

    hi Experts
    I would like to READ/SAVE Transformantation / Conversion File in BPC with ABAP
    When I interface Transaction File From Other Cube,
    I want to run Interface test from ABAP using Transformantation / Conversion File before run DM.
    and, l want to Manage files with ABAP Program ,if need to modify Transformantation / Conversion File
    Thank you.

    Hi Young,
    In addition to the above suggestions, would like to inform you that, if your requirement can be met by running those files in BPC Excel itself, what is the point in running ABAP program for the same?
    It would be much more easier for you to run those files in BPC Excel itself and that is how BPC is designed.
    Hope this clarifies further.
    Rgds,
    Poonam

  • HI Masters , I need information for file upload program in web dynpro java

    Hi masters,
           i need some inforamtion and documentation on file upload program in web dynpro java

    Hi surya,
    You can follow this procedure to upload the file
    i) Take One Context Attribute named as "D1" of Type "binary".
    ii) Take one FileUpload UI Element in the Layout Tab.
    iii) Bind FileUpload UI Element's data Property to the taken Context Attribute. Here it is "D1".
    iv) Take one Button UI Element in the Layout Tab named "Upload" and in the Action of that Button write the following Code.
    v) The following code Generates one Folder in the Server & inside that Folder given file is Uploaded.
    File ff=new File("FolderXYZ"); // Creates One Folder with the given Name ( Here Folder name is "FolderXYZ")
    ff.mkdir();
    try
    byte b[]=null;
    IWDAttributeInfo objAttinfo=null;
    IWDModifiableBinaryType binType=null;
    File f=null;
    FileOutputStream fos=null;
    if(wdContext.currentContextElement().getD1()!=null)
    b=wdContext.currentContextElement().getD1();
    objAttinfo=wdContext.getNodeInfo().getAttribute(IPrivateAttachView.IContextElement.D1);
    binType=(IWDModifiableBinaryType)objAttinfo.getModifiableSimpleType();
    f=new File(ff.getName()+"
    "+binType.getFileName());
    fos=new FileOutputStream(f);
    fos.write(b);
    fos.flush();
    fos.close();
    objMessageManager.reportSuccess("File uploaded to server");
    } catch (Exception e)
    objMessageManager.reportException("Unable to upload file to server, error is:"+e,false);
    return;
    The Uploaded file is stored in the folder & that folder is stored in the Server's following Path.
    <Your Server>\c$\usr\sap\J2E\JC00\j2ee\cluster\server0
    You can access your Uploaded file from the following Path
    <Your Server>\c$\usr\sap\J2E\JC00\j2ee\cluster\server0\FolderXYZ
    Regards
    Sagar Ingalwar

  • Reading and displaying Ms.Word document with web dynpro java

    Hi,
    I'm using NetWever developer studio 7..0.21.
    I'm developing web dynpro java application.I'm in difficulty to read and display word document with its original format in web dynpro view. Is it possible?
    If possible , is there a blog etc.?
    Thanks.

    Hello,
    You have to use the Office Integration Library. Please, follow the documentation below:
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/32853febec3c17e10000000a114084/frameset.htm
    I hope this helps you.
    Regards,
    Blanca

  • How to read from a xml file(in String format) using a java program

    hi friends
    i have a string , which is xml format. i want read the values and display it.can any one suggest how to read a xml file of string format using a javaprogram
    thanks

            final DocumentBuilder db =  DocumentBuilderFactory.newInstance().newDocumentBuilder();      
            final InputStream documentStream = new ByteArrayInputStream(documentXMLSourceString.getBytes("utf-8"));
            final Document document = db.parse(documentStream);

  • How to read a text delimited file using 2 dimentional array in java ??

    hi,
    I am new to java programming.. I have to do a task where in i have to read a text delimeted file in an array.. For example.. If the file is as follows
    Name place Value
    adi goa 20
    shri mumbai 30
    riya bangalr 45
    I want it to be read in java so as to get an array[row][columns]
    This is something i am currently upto, but cant get any further.
    import java.io.BufferedReader;
    import java.io.FileReader;
    public class generateGML{
    public static void main(String[] argv)
    throws Exception{
    BufferedReader fh = new BufferedReader(new FileReader("filename.txt"));
    String s;
    while ((s=fh.readLine())!=null){
    String[] columns = s.split("\t");
    String name = columns[0];
    String place = columns[1];
    String value = columns[2];
    It reads columns,But I want it two dimentionally,as in something like matrix[row_num][column_num].
    Can anyone please suggest me..

    You could do the following:
    String[][] array = new String[rows][];
    int row_num = 0;
    while ((s=fh.readLine())!=null) {
       array[row_num++] = s.split("\t");
    }However, you need to know ahead of time how many rows to allocate. If you allocate more than needed, you'll need to copy to a new array, or you'll need to keep track of how much is actually populated. If you allocate less than needed, you'll get an ArrayIndexOutOfBoundsException.
    Another (likely better) approach is:
    Do you really need it as a 2-dimensional array? Can you make a List of objects that have a name, place, and value? Then you don't need to know how big of a list to allocate ahead of time, assuming you use a list that grows itself (like ArrayList or LinkedList). Your code would be much easier to read if you could say:
    String name = list.get(10).getName();instead of
    String name = array[10][0];

  • How to Disable Portal Links with Web Dynpro Java?

    Hi all,
    I have configured some access to my apps through iviews in my portal content, each application is included in a PCD Structure inside a User Role; according the roles asigned to my users are the access to the applications the user wolud have
    For example:
    Role 1
    RootApp
         iView1.1
         iView1.2
         iView1.3
    Role 2
    RootApp
         iView2.1
         iView2.2
    Role 3
    RootApp2
         iView3.1
    My users might have one or even the 3 roles, and depending on their roles is the access to the applications that they may have.
    Now I have a requirement of the user wherein when the user logs in to the portal and clic in the RootApp link the Dynpro Application must to present an iView showing a set of terms and conditions; if the users accept the terms then they can continue using the application defined by the PCD definition, but if the users don't accept the terms, the aplication links in the portal must be disabled and the user can not use the aplications defined, but this only has to be applied to the root link selected (RootApp) in wich the user doesn't agreet the terms and conditions, however, other applications that are non dependent of the root link (RootApp) can be used (RootApp2).
    Are there any way to disable only certain portal links using a web Dynpro implementation?
    Thanks In Advance

    Hi
    IMyService portalservice=(IMyService)WDPortalUtils.getServiceRefrence(IMyService.KEY);
    portalservice.myMethod();
    This is the code to get portal service reference and call methods implemented in the service
    Also, add prtapi.jar to build path. Add sharing refernce to portal:sap.com/<Portal Application name>
    Regards,
    Yoga

  • How to read from properties file

    Hi,
    I am using JSR 168.
    while creating a new portlet, a folder gets created with the name as "portlet". Under which is resource package and <PortletName>Bundle.java.
    pls tell me how to read from .properties file.
    waiting eagerly for some reply
    Thanks & Regards,
    HP
    Edited by: user9003827 on Apr 13, 2010 3:42 AM

    I think i have mixed it up :)
    I have looked at it again and believe you are using regular JSP portlets.
    Can you tell what you want to achieve by reading .properties file. Are you meaning the preferences of the portlet or what exactly are you trying to do?
    Reading propertie files is easy:
    // Read properties file.
    Properties properties = new Properties();
    try {
        properties.load(new FileInputStream("filename.properties"));
        String myKey = properties.getProperty("yourKey");
    } catch (IOException e) {
    }Edited by: Yannick.O on 13-Apr-2010 05:52

  • How to read the properties file available in Server File structure in webdy

    hi all,
    I have developed one webdynpro application. In this application i need to access mdm server to continue. For getting the connection i need to pass the IP addresses.
    Can i have code  how to read the properties file which is residing in the server file. with out included along with the application. keeping some where in the file structure in the server. I want to read that properties file by  maintain the iP addresses and users in  properties file based on the key i want to read like below.
    servername="abcServer"
    username="john"
    password="test123"
    Please send me the code how to read this properties file from the file structure and how to read this values by key  in webdynpro application
    Regards
    Vijay

    Hi Vijay,
    You can try this piece of code too:
    Properties props = new Properties();
    //try retrieve data from file
    //catch exception in case properties file does not exist
    try {
             props.load(new FileInputStream("c:\property\Test.properties")); //File location
             String serverName = props.getProperty("servername"); //Similarly, you can access the other properties
             if(serverName==null)
               //....do appropriate handling
         }     catch(IOException e)
                   e.printStackTrace();
    Regards,
    Alka.

  • How to read waveset.properties

    Hi group
    Please let me know how to read waveset.properties file for finding SOURCES.RESOURCENAME.HOSTS where I ll have different host name to get connected to Authoritative Resource.
    Please Help me.
    Thanks in advance.
    Regards
    Gajendra Nagapurkar

    Hi,
    You can invoke static java method getProperty on class com.waveset.util.WavesetProperties.
    Argument is name of your property.

  • How to read a whole text file into a pl/sql variable?

    Hi, I need to read an entire text file--which actually contains an email message extracted from a content management system-- into a variable in a pl/sql package, so I can insert some information from the database and then send the email. I want to read the whole text file in one shot, not just one line at a time. Shoud I use Utl_File.Get_Raw or is there another more appropriate way to do this?

    how to read a whole text file into a pl/sql variable?
    your_clob_variable := dbms_xslprocessor.read2clob('YOUR_DIRECTORY','YOUR_FILE');
    ....

  • How to read data from a file that was formatted by excel?

    Hi everyone, I'm familiar with java.io and the ability to read from files, can anyone tell me how to read data from a file that was formatted by excel? Or at least give me some web references so that I can learn about it?

    http://jakarta.apache.org/poi/hssf/index.html
    HSSF stands for Horrible Spreadsheet Format, but it still works!

  • How to read list of all files in folder on application server?

    How to read list of all files in folder on application server?

    Hi,
    First get the files in application server using the following function module.
        CALL FUNCTION 'RZL_READ_DIR_LOCAL'
          EXPORTING
            name     = loc_fdir
          TABLES
            file_tbl = int_filedir.
    Here loc_fdir contains the application server path.
    int_filedir contains all the file names in that particular path.
    Now loop at int_filedir.
    OPEN DATASET int_filedir-name FOR INPUT IN TEXT MODE ENCODING  DEFAULT MESSAGE wf_mess.
    MESSAGE wf_mess.
        IF sy-subrc = 0.
          DO.
            READ DATASET pa_sfile INTO wf_string.
            IF sy-subrc <> 0.
              EXIT.
    endif.
    close datset int_filedir-name.
    endloop.

  • How to read text in .kep files

    hey friends,
    how to read text in .kep files
    please help me .
    with regards,
    s.jagadeesh babu

    Hi,
    check this link:
    http://help.sap.com/saphelp_nw04s/helpdata/en/8f/42a293e35011d29b340000e8a4b41d/content.htm
    .kep files are SapShow Training Files. They can be played with sapshow.exe in Knowledge Warehouse.
    SAP Show is KW Viewer Application. You can use it to see “Kep” files. It can be run in windows without the SAP environment. To run SAP Show (4.6D version) you just need 3 files. First is SAP show executable file, another two are “Sapstg.dll” and “ZLib.dll”. You can easily find these files on internet.
    Regards,
    Niraj

  • How to read a text/html file in java regardless of its encoding?

    Hi All,
    How to read a text/html file in java regardless of its encoding?
    1. Is there any way to identify that a file (read using FileInputStream/or any other means with java.io package) has been saved with which type of encoding i.e. whether the file is using ANSI encoding or Unicode encoding or other?
    2. Is there any standard way to read an encoded file (i.e. files having UTF-16 format for Asian locales character support) and un-encoded file (i.e. files having ordinary ANSI format) correctly without knowing the user input?
    The problem is that while creating an instance of 'InputStreamReader' (ISR) we can pass the encoding type used (otherwise it takes the system's default encoding type), and the ISR expects the file to be in the same encoding format otherwise it reads it as some junk. But we don't know which file the user is going to pass whether it is Unicode (for Asian locales file should be in Unicode) with or ANSI coded (for non-Asian / English locales user generally uses ANSI encoding).
    Regards,
    Sam

    1. There is no reliable way of guessing the encoding of a file without that information. Thats why XML for example has very strict rules wrt. it's encoding (short form: use UTF-8 or UTF-16, if you use anything else, you'll have to specify it)
    2. you might be able to make an educated guess if the possible range of encodings is limited, but it will probably never be 100% certain
    3. The HTML file might have a header entry "<meta http-equiv..." that tells you about it's encoding. You could try to read the start of the file and see if you find that, then if you found it re-read the entire file.
    regards

Maybe you are looking for

  • How to get Payment Advice details using REGUH  REGUP tables

    Hi, How to fetch payment Advice details in REGUH  REGUP tables by passing Header details of Payment document (BEKNR, BUKRS and GJAHR) ? My observation: E.g. for Payment document 1500000135 i am getting following records from REGUH table MANDT     LAU

  • ITunes Match program not responding step 1

    Whenever I click update iTunes Match, it goes to step 1 and about 1/4 of the way through it (scanning my library), itunes program stops responding and closes itself.  I have tried unistalling and reinstalling iTunes serveral times.  My iTunes is also

  • XSS/ESS Web Dynpro Design Principles

    Dear NetWeaver Web Dynproers Kind of wondering if any of you have any high level/detailed documentation on Web Dynpro Design principles used by SAP while building XSS business package? Looking at the Web Dynpro XSS Code there seems to use a consisten

  • Real-time mic level

    Hi, Not sure if this is the right subforum. I'm trying to access the level of the mic through Java. I don't need to record anything, I just want to know a relative scale of sound level. Is this possible in real-time?

  • How do I initialize a new from WD HD in my HP laptop?

    Hi,  My HP laptop hard drive went south.  I need to know how to initialize a replacement.  I have a set of Recovery Discs I made 4-5 years ago.  Will they initialize, partition and format the new hard drive or do I need a WD utility and which one(s)