Can't call app module methods!

I have a web app that has two AppModules: AppModule and SFAppModule. SFAppModule is NOT nested within AppModule.
In a method inside of AppModule, I need to set a where clause for a view that is part of the data model for the SFAppModule. I can't seem to gain access to the other application module.
1. If I Make it a NESTED app module, then of course, I have a reference to it, as it adds it, BUT I'd end up having to fix the view references to this new AppModule.
2. I could always move the VIEW objects out of SFAppModule into AppModule, but the idea was that any object in SF was really specific to that "subsystem". Of course one of the main launch pages needs to read 6 different views, two from each app module (we're planning on adding one more application module).
Did we paint ourselves into a corner???
How can we get a reference to SFAppModule from inside of AppModule if it is NOT a nested application module of AppModule?
argh.

Alternatives for Help Resetting Security Questions and Rescue Mail
     1. Apple ID- All about Apple ID security questions.
     2. Rescue email address and how to reset Apple ID security questions
     3. Apple ID- Contacting Apple for help with Apple ID account security.
     4. Fill out and submit this form. Select the topic, Account Security.
     5.  Call Apple Customer Service: Contacting Apple for support in your
          country and ask to speak to Account Security.
How to Manage your Apple ID: Manage My Apple ID

Similar Messages

  • How to call Apps Module Custom Method from Entity Object / View Object ?

    Hi All,
    I create a custom method in AppsModuleImpl.java. How can I call that custom method from a setter method on Entity Object / View Object ?
    (I have tried to use Configuration.createRootApplicationModule(amDef,config); but it is not the correct way, is it? )
    Below is my code :
    The setter on MyEntityImpl.java :
    public void setKodeprd(String value) {
    setAttributeInternal(KODEPRD, value);
    if (getProduct() != null) {
    // CALL the getSalesPrice custom method from here, HOW ??
    The Application Module custom method :
    public Number getSalesPrice(String priceCode, String kodePrd) {
    Number price = new Number(0);
    String [] theKey = {priceCode, kodePrd};
    Key priceKey = new Key(theKey) ;
    ViewObject SalesPrice = getSalespricedView1();
    Row[] salesPriceRow = SalesPrice.findByKey(priceKey, 1);
    price = ((SalespricedViewRowImpl)salesPriceRow[0]).getPrice();
    SalesPrice.remove();
    return price;
    Thank you for your help,
    xtanto

    inside the EntityObjectImpl :
    YourAppModuleImpl am = (YourAppModuleImpl)getDBTransaction().getRootApplicationModule().findApplicationModule("YourAppModuleorServiceName");

  • Can we call a static method without mentioning the class name

    public class Stuff {
         public static final int MY_CONSTANT = 5;
         public static int doStuff(int x){ return (x++)*x;}
    import xcom.Stuff.*;
    import java.lang.System.out;
    class User {
       public static void main(String[] args){
       new User().go();
       void go(){out.println(doStuff(MY_CONSTANT));}
    }Will the above code compile?
    can be call a static method without mentioning the class name?

    Yes, why do it simply?
    pksingh79 wrote:
    call a static method without mentioning the class name?For a given value of   "without mentioning the class name".
        public static Object invokeStaticMethod(String className, String methodName, Object[] args) throws Exception {
            Class<?>[] types = new Class<?>[args.length];
            for(int i=0;i<args.length;++i) types[i] = args==null?Object.class:args[i].getClass();
    return Class.forName(className).getDeclaredMethod(methodName,types).invoke(null,args);

  • Can we call a BO method directly

    Hi all,
    Can we call a BO method  explicitly in a program .
    e.g. can i  call the method approve of the  FORMABSENC BO.
    Regards,
    Sateesh.

    Of course you can. You just need to include the macros include so you can create objects and call the methods. If you are not familiar with the different macros, just browse through <CNTN01> to find what you need. There is documentation in the code.
    You will probably need at least the following four macros
    SWC_CREATE_OBJECT to create an object from its type and key.
    SWC_SET_ELEMENT one or more times to fill the container with appropriate parameters.
    SWC_CALL_METHOD to call the method.
    SWC_GET_ELEMENT one or more times to retrieve returned parameters.
    Note that SWC_SET_ELEMENT does not work for table parametes, use SWC_SET_TABLE instead.

  • Can we call functional module in a subroutine? Any example?

    Can we call functional module in a subroutine? Any example?

    sample code....
    REPORT  ZPL_BDC_PA30.
    TABLES : PA0022.
    DATA : V_PERNR LIKE PA0022-PERNR,
           V_SLABS LIKE PA0022-SLABS.
    DATA : FILENAME TYPE STRING.
    DATA : BEGIN OF IT_DATA OCCURS 0,
             PERNR LIKE PA0022-PERNR,       "Personnel Number
             SLABS LIKE PA0022-SLABS,       "Certificate code
             SLABS1 LIKE PA0022-SLABS,      "Certificate code new
           END OF IT_DATA.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 1 WITH HEADER LINE.
    DATA : BEGIN OF IT_ERROR OCCURS 0,
             POS LIKE SY-TABIX,
             TEXT(40),
           END OF IT_ERROR.
    PARAMETERS : P_FNAME TYPE DXFIELDS-LONGPATH.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME.
      CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
    EXPORTING
      I_LOCATION_FLAG       = ' '
      I_SERVER              = '?'
      I_PATH                = I_PATH
      FILEMASK              = '.'
      FILEOPERATION         = 'R'
       IMPORTING
      O_LOCATION_FLAG       = O_LOCATION_FLAG
      O_SERVER              = O_SERVER
         O_PATH                = P_FNAME
      ABEND_FLAG            = ABEND_FLAG
       EXCEPTIONS
         RFC_ERROR             = 1
         ERROR_WITH_GUI        = 2
         OTHERS                = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    START-OF-SELECTION.
      FILENAME = P_FNAME.
      PERFORM UPLOAD.            "Uploading inputfile to internal table.
      PERFORM VALIDATE.          "validating the values
      PERFORM POPULATE_BDC.      "Populating bdc internal table
      PERFORM ERROR_RECORDS
            TABLES IT_ERROR.     "Error records
    *&      Form  bdc_fdata
    FORM BDC_FDATA  USING  FNAM FVAL.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-FNAM = FNAM.
      IT_BDCDATA-FVAL = FVAL.
      APPEND IT_BDCDATA.
    ENDFORM.                    " bdc_fdata
    *&      Form  bdc_hdata
    FORM BDC_HDATA  USING PROGRAM SCRNO DYNBEGIN.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM = PROGRAM.
      IT_BDCDATA-DYNPRO = SCRNO.
      IT_BDCDATA-DYNBEGIN = DYNBEGIN.
      APPEND IT_BDCDATA.
    ENDFORM.                    " bdc_hdata
    *&      Form  upload
    FORM UPLOAD .
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = FILENAME
         FILETYPE                      = 'ASC'
         HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            = VIRUS_SCAN_PROFILE
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    = FILELENGTH
      HEADER                        = HEADER
        TABLES
          DATA_TAB                      = IT_DATA
       EXCEPTIONS
         FILE_OPEN_ERROR               = 1
         FILE_READ_ERROR               = 2
         NO_BATCH                      = 3
         GUI_REFUSE_FILETRANSFER       = 4
         INVALID_TYPE                  = 5
         NO_AUTHORITY                  = 6
         UNKNOWN_ERROR                 = 7
         BAD_DATA_FORMAT               = 8
         HEADER_NOT_ALLOWED            = 9
         SEPARATOR_NOT_ALLOWED         = 10
         HEADER_TOO_LONG               = 11
         UNKNOWN_DP_ERROR              = 12
         ACCESS_DENIED                 = 13
         DP_OUT_OF_MEMORY              = 14
         DISK_FULL                     = 15
         DP_TIMEOUT                    = 16
         OTHERS                        = 17
      IF SY-SUBRC <> 0.
        MESSAGE I000(BCTRAIN) WITH 'FILE NOT UPLOADED'.
      ELSE.
       MESSAGE I000(BCTRAIN) WITH 'FILE UPLOADED'.
      ENDIF.
    ENDFORM.                    " upload
    *&      Form  populate_bdc
    FORM POPULATE_BDC .
      LOOP AT IT_DATA .
        PERFORM BDC_HDATA USING 'SAPMP50A'
                                    '1000'
                                    'X'.
        PERFORM BDC_FDATA USING 'RP50G-PERNR'
                                 IT_DATA-PERNR.
        PERFORM BDC_FDATA USING 'RP50G-CHOIC'
                                 '0022'.
        PERFORM BDC_FDATA USING 'BDC_OKCODE'
                                 '=MOD'.
        PERFORM BDC_HDATA USING 'MP002200'
                                     '2000'
                                     'X'.
        PERFORM BDC_FDATA USING 'P0022-SLABS'
                                 IT_DATA-SLABS1.
        PERFORM BDC_FDATA USING 'BDC_OKCODE'
                                 '=UPD'.
        CALL TRANSACTION 'PA30' USING IT_BDCDATA.
        REFRESH IT_BDCDATA.
      ENDLOOP.
    ENDFORM.                    " populate_bdc
    *&      Form  validate
    FORM VALIDATE .
        data : num like sy-tabix,
               num1 like sy-tabix.
      LOOP AT IT_DATA.
       num = num + 1.
    num1 = sy-tabix.
        SELECT PERNR
             FROM PA0022
             INTO V_PERNR WHERE
             PERNR EQ IT_DATA-PERNR.
        ENDSELECT.
        IF SY-SUBRC <> 0.
          MOVE num TO IT_ERROR-POS.
          MOVE 'Invalid Pernr' TO IT_ERROR-TEXT.
          APPEND IT_ERROR.
          DELETE IT_DATA .
        ELSE.
          IF IT_DATA-SLABS IS INITIAL.
            MOVE num TO IT_ERROR-POS.
            MOVE 'Certificate code is initial' TO IT_ERROR-TEXT.
            APPEND IT_ERROR.
            DELETE IT_DATA.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " validate
    *&      Form  error_records
    FORM ERROR_RECORDS TABLES IT_ERRORS.
      FORMAT COLOR COL_GROUP.
      WRITE : / 'Error in the following records : ' .
      FORMAT COLOR COL_NEGATIVE.
      LOOP AT IT_ERROR.
        WRITE : /  IT_ERROR-POS,
                   IT_ERROR-TEXT.
      ENDLOOP.
    ENDFORM.                    " error_records

  • Can we call Function Module from Process Chain?

    Hello experts,
    I have a small question.
    Can we call Function Module(SE37) from Process Chain?
    If yes can you please provide some example link?
    I m new to BI world.
    regards

    Hi,
    Create one ABAP program and call the function module from that program. Check the link to know how to call a function module from an ABAP program.
    http://help.sap.com/saphelp_wp/helpdata/en/d1/801edb454211d189710000e8322d00/content.htm
    http://help.sap.com/saphelp_wp/helpdata/en/9f/db98ef35c111d1829f0000e829fbfe/content.htm
    Then use process type "ABAP Program" in your process chain and add the program you have created. So then this program will be executed via process chain and this program will call the function module.
    Indrashis

  • Can we call function module in sap script

    hi
    can we call function module in sap script
    i want to use function module HR_TMW_GET_EMPLOYEE_NAME in sapscript
    to get Empname by using personal no
    pernr no is coming from bseg-pernr table
    so how i can use it .
    please help me
    thanks in advanced.

    hi,
    You can use like this:
    PERFORM FUNCTION_MODULE IN PROGRAM SUBROUTINE_POOL
    USING &FIELD1&
    USING &FIELD2&
    CHANGING &FIELD3&
    ENDPERFORM.
    where function_module is the func. module name defined in program SUBROUTINE_POOL , field1 n field2 are the fields to be passed, and field3 is the value which you want to display...
    You have to read field1 & field2 in the pool, process them & get the value of field to be output.
    Reward helpful answers.
    Regards,
    SIddhesh Sanghvi.

  • How can I call the create method in BO from Application Service

    Hello!
    When I create a Business Object, CAF generates some methods automatically.
    How can I call the create method in the BO from Application Service logic?
    When i call the method then the entityManager and the sessionContext is NULL.
    How can I initialize this?
    Can anybody help me?
    Thanks, Thomas

    If you are using CE 7.11...
    1) In the Application Services, add the BO as dependant object in dependencies tab.
    2) In the implemention, add the following codes to call create method of the BO:
    this.get<BO>.createMethod();
    julius

  • How can I call  a component method from OCAP ?

    I'll try to invoke Cold Fusion Component from Xlet (OCAP App), specifically I wan to invoke a query from Component(CFC) method.
    Somebody knows how to... or any idea or comments.
    Thank you so much!

    Actually, as long as the servlet returns valid javascript, you can indeed "call it" from the client. It will initiate a request and return the result to the browser.
    This example uses Perl, but it could be easily modified to go to a servlet instead.
    Note that it is only supported in DOM browsers (IE6+/NN6+/etc)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html>
    <head>
    <title> Test server-side JS </title>
    </head>
    <body>
    <script type="text/javascript">
    function checkIt(variable, value)
    var newScript = "cgi-bin/validateJS.cgi?"+variable+"="+value;
    var body = document.getElementsByTagName('body').item(0)
    var scriptTag = document.getElementById('loadScript');
    if(scriptTag) body.removeChild(scriptTag);
    script = document.createElement('script');
    script.src = newScript;
         script.type = 'text/javascript';
         script.id = 'loadScript';
         body.appendChild(script)
    </script>
    <p>Test.</p>
    <form id="f1" action="">
    <input type="text" name="t1" id="t1" onChange="checkIt(this.name, this.value)">
    </body>
    </html>
    validateJS.cgi
    #!/opt/x11r6/bin/perl
    use CGI qw(:all);
    my @valArray = split(/=/,$ENV{QUERY_STRING});
    print "Content-type: text/javascript\n\n";
    # myPass is the password
    $myPass = "foobar";
    if ("$valArray[1]" eq "$myPass")
    print "alert(\"Success!!\")";
    else
    print "alert(\"Failure!!\")";

  • How can I call a servlet method from a javascript function

    I want to call l a servlet method from a javascript function.
    Does any one have an example of code.
    Thinks in advance

    Actually, as long as the servlet returns valid javascript, you can indeed "call it" from the client. It will initiate a request and return the result to the browser.
    This example uses Perl, but it could be easily modified to go to a servlet instead.
    Note that it is only supported in DOM browsers (IE6+/NN6+/etc)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html>
    <head>
    <title> Test server-side JS </title>
    </head>
    <body>
    <script type="text/javascript">
    function checkIt(variable, value)
    var newScript = "cgi-bin/validateJS.cgi?"+variable+"="+value;
    var body = document.getElementsByTagName('body').item(0)
    var scriptTag = document.getElementById('loadScript');
    if(scriptTag) body.removeChild(scriptTag);
    script = document.createElement('script');
    script.src = newScript;
         script.type = 'text/javascript';
         script.id = 'loadScript';
         body.appendChild(script)
    </script>
    <p>Test.</p>
    <form id="f1" action="">
    <input type="text" name="t1" id="t1" onChange="checkIt(this.name, this.value)">
    </body>
    </html>
    validateJS.cgi
    #!/opt/x11r6/bin/perl
    use CGI qw(:all);
    my @valArray = split(/=/,$ENV{QUERY_STRING});
    print "Content-type: text/javascript\n\n";
    # myPass is the password
    $myPass = "foobar";
    if ("$valArray[1]" eq "$myPass")
    print "alert(\"Success!!\")";
    else
    print "alert(\"Failure!!\")";

  • Best practice for calling application module methods and plsql code

    In my application I am experiencing problems with connection pooling, I seem to be using a lot of connections in my application when only a few users are using the system. As part of our application we need to call database procedures for business logic.
    Our backing beans, call methods on the application module which in turn call a database procedure. For instance in the backing bean we have code like this to call the application module method.
    // Calling Module to generate new examination/test.
    CIGAppModuleImpl appMod = (CIGAppModuleImpl)Configuration.createRootApplicationModule("ky.gov.exam.model.CIGAppModule", "CIGAppModuleLocal");
    String testId = appMod.createTest( userId, examId, centerId).toString();
    AdfFacesContext.getCurrentInstance().getPageFlowScope().put("tid",testId);
    // Close the call
    System.out.println("Calling releaseRootApplicationModule remove");
    Configuration.releaseRootApplicationModule(appMod, true);
    System.out.println("Completed releaseRootApplicationModule remove");
    return returnResult;
    In the application module method we have the following code.
    System.out.println("CIGAppModuleImpl: Call the database and use the value from the iterator");
    CallableStatement cs = null;
    try{
    cs = getDBTransaction().createCallableStatement("begin ? := macilap.user_admin.new_test_init(?,?,?); end;", 0);
    cs.registerOutParameter(1, Types.NUMERIC);
    cs.setString(2, p_userId);
    cs.setString(3, p_examId);
    cs.setString(4, p_centerId);
    cs.executeUpdate();
    returnResult=cs.getInt(1);
    System.out.println("CIGAppModuleImpl.createTest: Return Result is " + returnResult);
    }catch (SQLException se){
    throw new JboException(se);
    finally {
    if (cs != null) {
    try {
    cs.close();
    catch (SQLException s) {
    throw new JboException(s);
    I have read in one of Steve Muench presentations (Oracle Fusion Applications Team' Best Practises) that calling the createRootApplicationModule method is a bad idea, and to call the method via the binding interface.
    I am assuming calling the createRootApplicationModule uses much more resources and database connections that calling the method through the binding interface such as
    BindingContainer bindings = getBindings();
    OperationBinding ob = bindings.getOperationBinding("customMethod");
    Object result = ob.execute()
    Is this the case? Also is using getDBTransaction().createCallableStatement the best way of calling database procedures. Would it be better to expose plsql packages as webservices and then call them from the applicationModule. Is this more efficient?
    Regards
    Orlando

    Thanks Shay, this is now working.
    I successfully got the binding to the application method in the pagedef.
    I used the following code in my backing bean.
    package view.backing;
    import oracle.binding.BindingContainer;
    import oracle.binding.OperationBinding;
    public class Testdatabase {
    private DCBindingContainer bindingContainer;
    public void setBindingContainer (DCBindingContainer bc) {this.bindingContainer = bc;}
    public DCBindingContainer getBindingContainer() {return bindingContainer;}
    public static String validateUser()
    // Calling Module to validate user and return user role details.
    System.out.println("Getting Binding Container from Home Backing Bean");
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    System.out.println("Obtain binding");
    OperationBinding operationBinding = bindings.getOperationBinding("calldatabase");
    System.out.println("Set username parameter");
    operationBinding.getParamsMap().put("p_userId",userId);
    System.out.println("Set password parameter");
    operationBinding.getParamsMap().put("p_testId",examId);
    Object result = operationBinding.execute();
    System.out.println("Obtain result");
    String userRole = result.toString();
    System.out.println("Result is "+userRole);
    }

  • Can you call a public method in a custom skin?

    I made a custom skin for a button. In the skin there's a method to change some text. Can I call this method from my application?
    I get an error message when I try to call it like a normal object:
    uploadNewBtn.setNewPhotosLabel("test");
    Error 1061: Call to a possibly undefined method setNewPhotosLabel through a reference with static type spark.components:Button.

    You said it yourself, the method is inside skin not the HostComponent (button in your case). Obviously you cannot call it.
    There is a skin protperty inside SkinnableComponent, but it is typed as UIComponent so you still cannot cal it on the skin without casting. I don't know your use case, so in theory you either push the text/label from the host towards the skin, or you listen or bind from the skin on the hostcomponent.
    C

  • Can we call function modules in SAP query or ADHOC query

    Hi ,
    Can we call afunction moudule in sap query or ADHOC query ?If yes How
    An early responce is greatly appreciated
    Thanks and best regards
    Rajeev Chhabra

    Hello Rajeev Chhabra,
       Yes; you can call function module in SAP Query. In InfoSet definition (SQ02), you can create additional field. In this field definition, you can add code snippet where you can function module.  
    However, this is not possible in Quick Viewer (SQVI) Query.
    Thanks,
    Venu

  • Why I can't call my native method from my package?

    it is fine if my java code didn't complied into a package.
    But if I complied my java code as a package, and call its native method outside. It give me "UnsatisfiedLinkError". And can not find my method. It is indeed the method is inside.
    Thank a lot any helps. Email me on [email protected]

    I have found that javah does not generate the correct JNI function names when the native function is in a class that is within a Java package. The net result is an Unsatisfied link error.
    The JNI function name must be included in the package name. The naming is a bit complicated and that's why javah should be used, except in this case it does not work. I can't quite remember exactly how it works, something like adding in packagename_1 into the JNI name. The SWIG tool (http://www.swig.org) does generate the correct names when using packages. It is a tool which takes C or C++ header files and generates the JNI and Java classes for you so that you can call C/C++ code from Java. Once you have installed SWIG and run 'make check', have a look in the directory Examples/test-suite/java for the JNI naming for packages. I'll try remember to post the exact naming if you don't want to install SWIG.

  • How can i call a main method  from a different class???

    Plzz help...
    i have 2 classes.., T1 and T2.. Tt2 is a class with a main method....i want to call the main method in T2......fromT1..is it possibl..plz help

    T2.main(args);

Maybe you are looking for

  • My iCloud Mail is not working on my iPod touch (ios 5.1)

    I cannot send or receive mail from my Mail on my iPod Touch. My Apple ID is well working on iCloud as I have tried test emailing myself on my PC on www.icloud.com. So I know that it is not my email that is the problem. I have tried following the inst

  • Idoc - BPM - Idoc

    Hi, My Scenario is as below: An Idoc is sent from ERP to XI. based on a value in a specific segment, It has to call a Web Service. The outcome of Web Service has to be put into another segment of idoc and send the Idoc to CRM. I have done configurati

  • Mail crashes after Update to 10.5.7

    Every time I try to print in word or Mail it crashes. And this began immediately after I restarted after the update. Help please???

  • Please give me advice about....what is the best virus guard in store and is virus worked in iPhone (my English is not good sorry)

    Please give me advice about....what is the best virus guard in store and is virus worked in iPhone (my English is not good sorry)

  • Regarding joins

    HI ANJI, can i use join conditions like this...using BSID,BSIK,LFA1 SELECT ABELNR ABUDAT AVBELN BLIFNR CORT01 CORT02 CPSTLZ CSTRAS INTO CORRESPONDING FIELDS OF TABLE ITAB FROM BSID AS A INNER JOIN BSIK AS B ON ( ABUKRS = BBUKRS ) AND ( ABELNR = BBELN