How to use standard Java file in custom module

Hi All,        
I want to use some CatalogItemImpl.java file in my custom DC but i was unable to find any entry in the standard component in businessobject.xml file as <businessObject name="XYZ" className="x"/>. Can anyone let me know how can we use the file file in my custom DC.
Please provide your inputs......
Regards,
Rahul.

Hi Rahul,
You will not find the "CatalogItemImpl" in the 'businessobject.xml'. The 'businessobject.xml' is there to define session based API of modules. Those API have properties and web channel builder values injected when the user start a web session.
For the "CatalogItem", you will have to use the Generic Factory concept. The Generic Factory is used to allocate instance given a configuration. If no configuration exists, the default implementation is used. By adding an entry in the Generic Factory you can choose to allocate your class instead of the default class.
Within the catalog module, the alias to use for classes extending "CatalogItemImpl" is "com.sap.wec.app.common.module.catalog.businessobject.ext.interf.CatalogItemExtInterf".
Please refer to the extension guide on how to manage the Generic Factory configuration file.
Regards,
Robin

Similar Messages

  • How to use standard function keys as custom keys

    how to use standard function keys as custom keys.
    i have encountered that problem while developing a screen, there i'm supposed to use standard function key F2 ( which actually meant for choose) for clearing the screen fields where the cursor is present and f1 for saving data that entered in screen fields, etc...
    kindly help me out.

    Hi ,
    Solution to use SAP reserve function keys F1 .. F4 (mostly this requirement comes up for RF screens) can be acheived by assigning your new Function code using the Menu path Utilities --> F key Consistency in the Menu Painter (SE41) . Once you assign your cutom function code to the standard Fn keys the only remaining step is to make sure that you set a curson on any of the field on sceen by using the Key Word "SET CURSOR" .
    If you dont use the key word SET CURSOR in the PBO of the screen then you might not see any response for F4.
    Thanks

  • How to use standard classes to create custom modulepool program like ME21N

    I am at the Starting Point of doing a classical dynpro program via Abap Objects which address all controls with MVC Architecture .So i debugged the standard ME21n transaction to find out how i can start with. I came across this interface which has no Attributes and Methods.I wondered y .Thats y i posted a Question .I also seen a lot of Standard classes
    CL_TABLE_VIEW_MM
    CL_BASIC_MODEL_VIEW_MM
    CL_COMPOSITE_SCREEN_VIEW_MM
    CL_SCREEN_VIEW_MM
    CL_TABLE_VIEW_MM
    CL_TABSTRIP_VIEW_MM
    CL_TC_BUTTON_VIEW_MM
    CL_TC_ITEM_VIEW_MM
    CL_TOGGLE_VIEW_MM
    CL_VALUE_MODEL_VIEW_MM
    and much more for Model and Controllers ..Can u plz guide me how i can make use of this classes effictively in my custom module pool programming

    I think all these classes serve the purpose of embracing the basic ones and are used specificalty in MM module.
    If you want to create similar module pool program with nice expand/collapse buttons in relation to subscreens please refer the some tips [here|expand/collapse button functionality on module pool screen;
    Also there are transactions like BIBS, DWDM which you can follow the examples from. I think SAP has covered all GUI controlls there so you can create really complex programs with various GUI controlls independently of module used for.
    Of course you can still stick to classes you mentioned but I think the better is to learn some standard approach of creating such screens, then if you feel more advanced go for using module specific ones if you really need that.
    Regards
    Marcin

  • How to use standard java functions in a XSLT mapping

    Hi All,
    I wish to use a standard java function in a XSLT mapping, The issue is either i am giving incorrect namespace which is used to invoke the function or the signature of the function call is incorrect, I have read all the links in http://help.sap.com, and i know <b> one can enhance a XSLT mapping by writing one's own java code and thereby using java standard functions </b>, but the requirement is such that i need to try and use java standard function in XSLT mapping itself.
    Please refer to the sample code below:
    <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet version="1.0"  
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:javamap="java:java.lang.String">
    <xsl:output method="text"/>
    <xsl:template match="/">
    <xsl:variable name="input" select="Title">
    <xsl:if test="function-available('javamap:toUpperCase')">
    <xsl:value-of select="javamap:toUpperCase($input)"/>
    </xsl:if>
    Author:<xsl:value-of select="Author"/>
    </xsl:template>
    </xsl:stylesheet>
    error encountered is: Illegal number or type of arguments.
    please reply if you have tried a similar scenario in SAP XI.
    Thanks & Regards,
    Varun

    Hi Varun,
        First of all i want to tell you that as per the documentation you can only call the static function inside xslt mapping. Your toUpperCase method is a non static function.
    What i am getting is that you have an element called Author and you want to convert its value into uppercase.
    you can write your own user defined function which is static.
    Signature of your java method :
    public static string toUpperCase(String Author,Map inputparam)
    try this xslt map.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:javamap="java:JavaProgram">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:param name="Author">
                 <xsl:value-of select="//Author_name"/>
         </xsl:param>
         <xsl:param name="inputparam" />
         <xsl:template match="/">
         <Author>
                 <xsl:if test="function-available('javamap:toUpperCase')">
                  <xsl:value-of select="javamap:toUpperCase($Author,$inputparam)"/>
                 </xsl:if>
         </Author>
         </xsl:template>
    </xsl:stylesheet>
    Hope this will work.
    Thanks and Regards
    Vishal Kumar

  • How to use external java files into my project

    Hi all,
    I need your help to import my external java files in to my project.
    The files are in package folder.
    So how to tell the import command with the path of the folder.
    I read also that I can make a jar file and integrate it into the project.
    How can I make jar file.
    Best regards...

    there is one utility in j2se jar and check the option also
    put that jar file in lib folder of yr application folder
    [email protected]

  • How to use standard VS commands in custom menu (vsct)

    Hi,
    I have a .vsct file which defines a custom menu. I want to add some default Visual Studio commands to this menu as well. I already managed to add some default commands such as copy / paste:
    <UsedCommands>
    <UsedCommand guid="guidVSStd97" id="cmdidCopy"/>
    </UsedCommands>
    <CommandPlacements>
    <CommandPlacement guid="guidVSStd97" id="cmdidCopy" priority="0x0100">
    <Parent guid="guidMyMenuCommands" id="grpMyMenu"/>
    </CommandPlacement>
    </CommandPlacements>
    When I do this, the "Copy" command shows up in my custom menu, with default Icon, text and shortcut - just as it should be. However, this does not work for all commands. To be precise, when I want to add the following commands...
    <UsedCommand guid="guidVSStd2K" id="ECMD_FORMATDOCUMENT"/>
    <UsedCommand guid="guidVSStd2K" id="ECMD_COMMENT_BLOCK"/>
    <UsedCommand guid="guidVSStd2K" id="ECMD_UNCOMMENT_BLOCK"/>
    ...nothing happens - no entry is added to my custom menu. How can I include the above default commands in a custom menu?
    Thanks,
    Max

    I just found out that the above commands are there after all, but they are invisible until a source code file is opened. I expected them to be grayed out instead of being totally invisible.
    Nevertheless, there are some commands that cannot be "instantiated" with the CommandPlacement tag. Instead, one needs to create a button for the respective command to show up in the menu. The following code shows an example:
    <UsedCommands>
    <UsedCommand guid="guidVSStd97" id="cmdidGotoDefn" />
    </UsedCommands>
    <Commands>
    <Buttons>
    <Button guid="guidVSStd97" id="cmdidGotoDefn" priority="0x0400">
    <Parent guid="guidMyMenuCommands" id="grpMyMenu" />
    <Strings>
    <ButtonText></ButtonText>
    </Strings>
    </Button>
    </Buttons>
    </Commands>

  • How to compile a Java file

    Hi All,
    I am extending a seeded CO and when I try to compile it in JDev , it asks for many class files the seeded CO imports.
    I have copied all those imported files to my local system and when I try to compile , it still throws an error that some class files used by the classes imported in seeded CO are missing. Now this goes on and on. ( Seems entire server needs to be on my local system).
    Now I decided to port the custom CO to server and compile it there. Even this seems to be a hard task for me as the javac command is not working on the server. It throws following exception
    Exception in thread "main" java.lang.ClassFormatError: com.sun.tools.javac.main. Main (erroneous method access flags)......................................
    Pls suggest how to compile a java file , as downloading entire server classes is a herculean task for me.
    Thanks,
    Srikanth

    Hi Avajain & D.Ram ,
    Thanks for the reply.
    I have downloaded around 70 dependent class files to local system. Now the CO is getting compiled correctly.
    I am extending a region level controller in Payroll page where in I have to default the salary to a predefined value.
    This field is having a VO attribute to it. Now can I go ahead and set a value to the MessageTextInput or should I extend the VO to replace the desired value in the place of already queried value.
    Thanks,
    Srikanth

  • How to Generate a Java file for a JSP Page

    Hi ,
    I am using weblogic11 .
    I am working on a JSP page which nearly consists of 4000 lines of code.
    I need to debug the file , but weblogic server is not generating the java file for the JSP pages .
    Please let me know how can i genertae Java file for the jsp pages ??

    JSPs are compiled into servlets automatically and those classes are stored in WEB-INF/classes folder. Servlet engine handles servlets.

  • How can i execute "*.java " files in Workshop

    Hi,
    Im sunil,new to this weblogic workshop8.1..i dont know how to execute standalone .java files or servlets in workshop.plz help me and tell the way.
    regards
    Budati sunil

    Im not too sure about the Java project. But single normal java files with public static void maain(String [] args) are very simple to execute.
    1. Write the java code somewhere lets call this class A.
    2. Make a dummy page flow.
    3. In the begin action of this pageFlow, call the main method of the A class directly using A.main(null) since main is a static method. your code will work fine.
    4. If you have to pass a String[] as parameters. Before calling main, create this String[] and then pass it.
    In this way you can make a jsp and take the input from the user also.
    Hope it helps
    Cheeers

  • How to use a key file in the FTP Task using and SSL connection

    In the past I have used this code to set the FTP pass word in an FTP component task in SSIS.
    Does anyone know how to use a Key file in an SSL connection to download a file from an FTP site?  If not can you tell me where I can get the C# code examples to learn how to create a script task or if there is another way in SSIS to download large files
    from an SSL FTP site?  Thank you for any help offered.
    public void Main()
    ConnectionManager FTPConn;
    FTPConn = Dts.Connections["FTPServer"];
    FTPConn.Properties["ServerPassword"].SetValue(FTPConn, Dts.Variables["FTPPassword"].Value);
    Dts.TaskResult = (int)ScriptResults.Success;
    Antonio

    You can use SFTP for this.
    This is a way of implementing SFTP in SSIS using standard tasks 
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    also see
    http://blog.goanywheremft.com/2011/10/20/sftp-ftps-secure-ftp-transfers/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to use standard SAP stylesheets in WAD

    Hello ,
    I created a new Web template.
    Assigned a data provider, inserted a table.
    In order to view i include a Analaysis box in one of the cell of Table.
    Now i need to change the colours of result rows.
    How to use Standard Stylesheets provided by SAP.
    Where this stylesheets will be located
    Under which properties.
    How to use those.
    How to edit those and save as we wanted.
    An y step by step documents, please send it to [email protected]
    I want to include Information button in Template, so when executing if user click this button he/she should know,
    What are provided variables and if they chosen some specific variable restriction to see the result,
    Also by default this information should get print.
    In standard sap portal, this button is located on upper right corner.
    Please advise.

    Thanks Rusty,
    Thats exactly right,
    I included a naviagtion block and it worked well
    But while printing the query on Web template, It only prints the data that is coming in Analysis block.
    Similarly while running the query thru BEX to Portal,
    Navigation block is on left, but while printing it prints exactly every data in Information tab.
    Information is the button located on upper right corner.
    If you click, it will give you information such as , which restrictions u did, which extra filters you added everything.
    And while printing it prints this information too.
    I want to do the same designing for my custom Web template.
    How can i do that.
    I already added navigation block, so it will be easy for users to drag and drop Chars and KFs in rows and columns as well as filter if they needed.
    I hope you are trying to understand.
    Also for using stylesheets can you suggest.
    So that i can make changes to row and columns.
    I am unable to locate stylesheet in any of the properties.

  • How to compile a java file in J9 for windows mobile 5.0

    I have downloaded J9 for windows mobile 5.0 and need help on how to compile a java file.

    You can compile your source code using J2SE ;)
    may be this is important for you:
    http://awareness.ics.uci.edu/~rsilvafi/pocketPC/index.
    html
    Regards!!!Actually i am using some eSWT related classes also.. so is there any way to compile from the J9 environment using J9 console..

  • How to compile a java file(Servlet) in J2EE v1.3.1

    This is my first time using J2EE instead of J2SE!!HOw to compile a java file in J2ee\bin because there is no javac in j2ee and when i compile in J2se i got
    G:\j2sdk1.4.1_01\bin>javac HelloServlet.java
    HelloServlet.java:2: package javax.servlet does not exist
    import javax.servlet.*;
    This mean it doen;t support servlet in J2se!!so how can /what command to compile a servlet java file in j2ee.Thanks

    You'll need to add the j2ee.jar to your classpath. Usually you'll have to add some jars from your app server to your classpath as well.
    For example (using weblogic):
    javac -classpath c:\java\j2ee\j2ee1.3.1\lib\j2ee.jar;c:\tools\appserver\weblogic\wl7.1\lib\weblogic.jar
    HelloServlet.java

  • How to access the *.java file corresponding to a TypeElement T?

    Here is a problem:
    How to access the *.java file corresponding to a TypeElement T from a AnnotationProcessor environment?
    Let us say the hook method
    public boolean process(Set<? extends TypeElement> annos, RoundEnvironment roundEnv)
    is invoked with a TypeElement T such that T.getQualifiedname() = "a.b.c.X"
    And the problem is how to locate the file that has the *.java source code for a.b.c.X?
    That is the file that has the source code for a.b.c.X say "some/path/a/b/c/X.java"?
    For simplicity, let us assume that TypeElement T corresponds to a top-level Java class.

    Pinaki wrote:
    That is not something you as the annotation processor author should be asking about. That is something you the person configuring the javac environment should set up via the -d option or its equivalent.
    I strongly recommend using a separate output directory hierarchy.That is the way the current implementation is. The annotation processor takes a -Aout= <some directory path> to write generated output relative to a user-specified location (which defaults to the class output location).That is contrary to the design of the annotation processing facility. The intended use is for that information to be configured via options like "javac -d".
    Additionally, IMO it is a serious configuration error to put generated files and input files, presumably tracked under version control, in the same directory. Interesting you said that. We are just running some "field trial" with these things and some users want them to be in the same directory of the original *.java files (especially when their source files are spread across many roots) .
    Who knows what the user wants?The user does and the user is free to (mis)configure their environment however they like ;-) However, that is the user's option and the user has control of this via the javac command line. The annotation processor is not the proper place to configure this setting; see slide 7 of http://blogs.sun.com/darcy/resource/J1_2006-BOF-0606.pdf for some thoughts on different roles in annotation processing.
    presumably tracked under version control, in the same directory.version control is another 'usability issues' that we are trying to get our heads around with this stuff. "To check-in or not?" - that seems to be the question. When presented these facilities without any cue, "the users" were divided -- some wanted them to be checked-in, some did not. The context where these generated files being used -- there exists some rationale to check them in a version control system.The right answer depends on the circumstances, but IMO generally generated files should not be checked in under version control, especially if they are derived from other source files. Checking in generated files of this nature just creates the opportunity for them to get out of date with the originating files.

  • How to Use the JAVA SCRIPT code in .htm page of the component

    Hi .
    In my requirement i have to use Java Script Function in .htm code ..how to use the java script code and functions in .htm???
    thank you
    B.Mani

    Check this document  [Arun's Blog|http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebClientUI-TalkingwithJava+Script]
    Regards
    Kavindra

Maybe you are looking for

  • Hi how can i fetch the data from tree table

    Hi i am designing a UI in which i am creating a java tree table as on sun java site http://java.sun.com/products/jfc/tsc/articles/treetable2/index.html now i have to fetch the perticular column value on the mouse click.I have implemented mouse listen

  • 6 hr battery life on a Droid Eris out of the box

    Hello eveyone. I need help I just changed my blackberry storm for the Droid Eris. Right out of the box and charged the battery lasts 8 hrs tops then it's decresed to 6 hrs. THhis drop was due to my twitter and facebook usage which is very low and som

  • How to connect multiple databases

    Hi all, This is my situation , i need to set the max number of connections to one database , if the connection exceeds then i need to connect to another database , is there any way to solve it? please help me

  • How to create a connection between CRM and R73??

    Hi, I have a problem. I am working with CRM and in my program I have to access to some tables in R/3 to get some data, I have created a RFC function to get those data (it is created in R/3). In CRM there is a report that use that function but when I

  • Skype for business/ Lync feature request

    I know that Lync will soon be rebranded as 'Skype for Business' so it would be nice if this was a feature. A useful feature would be if you could set what your bitrate was for your Lync Video call. For example, I have multiple sites with synchronous