Threading- Can I call methods from specific threads or from all in a group?

I've just recently started working with threads. I've done a lot of searching and reading but I haven't seen the specific questions I'm wondering answered. Of course, it's about communication.
The amount of newly created threads that will exist is indefinite. Sometimes I'll have one, sometimes ten. So I'll just call them t1 - t9. When I create them, I add them to a ThreadGroup - tg.
This project contains 2 class files, Main and ThreadClass. I'll post all of the code so you can see what I'm doing.
public class Main {
    public static void main(String[] args) {
        for (int i = 1; i < 10; i++) {
            ThreadGroup tg = new ThreadGroup("tg1");
            Thread t = new Thread(tg, new ThreadClass("t" + i));
            t.start();
public class ThreadClass extends Thread {
    public ThreadClass(String name) {
        super(name);
    public void run() {
        System.out.println("New Thread - " + getName());
        while (true) {
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                System.out.println("Exception: " + e);
    public void printText() {
        System.out.println("Printing text from " + getName());
}So whenever a new thread is created, it prints "New Thread - [ThreadNameHere]". But I also have printText() in ThreadClass that has not been used yet and that is what I really want to accomplish. Is there a way to call printText() by the thread group (tg1 in this case) so it is executed across all threads that belong to the group? Is there a way to call printText() in a specific thread from my Main class, such as "t3"?
Thank you for your help!
Edited by: sdouble on Sep 9, 2008 10:10 AM - Fixed a typo

Yes, usually you want to implement Runnable, not extend Thread. You're not adding new functionality to Threads or making some kind of more-specific version of them.
You can get each thread in your ThreadGroup back out into an array by using one of the varients of Enumerate, but nothing stops you from just putting your objects (that implement Runnable) into an ArrayList or any collection of your own that you want to as you make them, and then later iterating over it and calling the method that you want.
Something like this...
public class MyThread implements Runnable {
   public void run() { ... }
   public void printStuff() { ... }
public static void main(String[] args) {
   MyThread a = new MyThread();
   MyThread b = new MyThread();
   ArrayList threadList = new ArrayList();
   threadList.add(a);
   threadList.add(b);
   for(MyThread thread : threadLIst) {
      thread.printStuff();
}

Similar Messages

  • How can i call the certificate selection dialog box from source code?

    How can i call the certificate selection dialog box from source code?
    NB: Of course if i have more than one certificate in the Microsoft Keystore 'My'.
    Thank You in advance

    I found an example of the "TestStand UI Expression Control.ctl" and it works just the way I need it. (check the link)
    Proper use of "TestStand UI ExpressionEdit Control" in LabVIEW http://forums.ni.com/ni/board/message?board.id=330&requireLogin=False&thread.id=10609 
    The "Expression Browser Dialog Box Button" F(x) stays disable while editing the VI, however it become available when the VI is called from TestStand.
    Thank you,
    Hecuba
    Mfg. Test Engineer
    Certified LabVIEW Associate Developer

  • Can I call a .htm page of view1 from another .htm page of view 2?

    Hi,
    I have a viewset QuestionnaireTabVS with a view area TABS which has two views  QuestionCondnsVS (default) and View QuestionRisksVS.
    When a variable say GV_TAB  is set as 'Questions' it navigates to the QuestionCondnsVS view and when the variable GV_TAB is set as 'Risks' it navigates to the QuestionnaireRisksVS.
    This view set QuestionnaireTabVS is contained in an overview page which  has two Radiobuttons. It works fine when  the first radiobutton is selected, i.e, when I click on the Questions it renders the QuestionCondnsVS view and when I click on the Risks it renders me the QuestionRisksVS view .
    Problem is when  I had clicked the RISK tab first and then selected the another radiobutton the rendered view QuestionRisksVS doesnt get removed
    but is present there by default which I dont want.I want the QuestionCondnsVS view to be present there by default after the second radiobutton is selected. I tried to refresh all the controllers but somehow it navigates to the  QuestionRisksVS only .
    So i thought to call the  .htm page of QuestionCondnsVS forcefully from the QuestionnaireTabVS .htm page as soon as I select the another radiobutton.
    Can I call a .htm page of QuestionCondnsVS from another .htm page of  QuestionnaireTabVS? If yes then how or any other suggestion is welcome

    Hi Dharmakasi,
    The Radiobuttons code is not added in the same HTML page but lies in a different component where the coding is on event handler.
    METHOD eh_onchecked.
      DATA: lv_option TYPE REF TO if_bol_bo_property_access,
            lv_check  TYPE char1.
      lv_option ?= typed_context->switch->collection_wrapper->get_current( ).
      lv_check = lv_option->get_property_as_string( iv_attr_name = 'OPTION'   ).
      IF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_old.
        zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_old.
      ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_new.
        zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_new.
      ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_scaf.
        zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_scaf.
        ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_scaf_anz.
        zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_scaf_anz.
      ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_sow.
        zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_sow.
      ENDIF.
    ENDMETHOD.
    Here the LV_CHECK = old is the first radiobutton whereas LV_CHECk = new is the second radiobutton. I have tried to set the value of gv_tab ='Question' here but again no success.
    The .HTM coding of QuestionanireTABVS is
    <%@page language="abap" %>
    <%@extension name="thtmlb" prefix="thtmlb" %>
    <%@extension name="chtmlb" prefix="chtmlb" %>
    <%@extension name="bsp" prefix="bsp" %>
    <% data: ls_line                type CRMT_THTMLB_LINK,
             lv_flag                type ABAP_BOOL.
        data: lv_xml                type string.
    if zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_old.
       REFRESH controller->gt_navlink_tab[].
    *   if controller->gt_navlink_tab[] is initial.
         ls_line-id = 'Questions'.
         ls_line-onclick = 'QUEST'.
         ls_line-text = page->otr_trim( 'ZGAF_CRM_70/QUESTIONS' ).
         insert ls_line into table controller->gt_navlink_tab.
         ls_line-id = 'Risks'.
         ls_line-onclick = 'RISK'.
         ls_line-text = page->otr_trim( 'ZGAF_CRM_70/GLOBAL_RISK' ).
         insert ls_line into table controller->gt_navlink_tab.
         %>
    <%--   endif.  %>--%>
    <thtmlb:tray id     = "HeaderExt"
                 indent = 'FALSE'
                 design = 'STANDARD'>
      <thtmlb:trayHeader>
        <thtmlb:grid cellSpacing = "0"
                 columnSize  = "1"
                 height      = "100%"
                 rowSize     = "1"
                 width       = "100%" >
          <thtmlb:gridCell colSpan     = "1"
                       columnIndex = "1"
                       rowIndex    = "1"
                       rowSpan     = "1"
                       >
            <thtmlb:navLink links  = "<%= controller->gt_navlink_tab %>"
                    selectedLinkId = "<%= controller->gv_tab %>" />
        <bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'TABS' ) %>"
                  url     = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'TABS' ) %>" />
          </thtmlb:gridCell>
        </thtmlb:grid>
      </thtmlb:trayHeader>
      <thtmlb:trayBody>
        <%
    *    data: lv_xml    type string.
        lv_xml    = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
        %>
        <chtmlb:config xml     = "<%= lv_xml %>"
                       mode    = "RUNTIME"  />
      </thtmlb:trayBody>
    </thtmlb:tray>
    <% elseif zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_new.
       REFRESH controller->gt_navlink_tab[].
    *   if controller->gt_navlink_tab[] is initial.
         ls_line-id = 'Questions'.
         ls_line-onclick = 'QUEST'.
         ls_line-text = page->otr_trim( 'ZGAF_CRM_70/QUESTIONS' ).
         insert ls_line into table controller->gt_navlink_tab.
    *     ls_line-id = 'Risks'.
    *     ls_line-onclick = 'RISK'.
    *     ls_line-text = page->otr_trim( 'ZGAF_CRM_70/GLOBAL_RISK' ).
    *     insert ls_line into table controller->gt_navlink_tab.
         %>
    <%--   endif.  %>--%>
    <thtmlb:tray id     = "HeaderExt"
                 indent = 'FALSE'
                 design = 'STANDARD'>
      <thtmlb:trayHeader>
        <thtmlb:grid cellSpacing = "0"
                 columnSize  = "1"
                 height      = "100%"
                 rowSize     = "1"
                 width       = "100%" >
          <thtmlb:gridCell colSpan     = "1"
                       columnIndex = "1"
                       rowIndex    = "1"
                       rowSpan     = "1"
                       >
            <thtmlb:navLink links  = "<%= controller->gt_navlink_tab %>"
                    selectedLinkId = "<%= controller->gv_tab %>" />
        <bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'TABS' ) %>"
                  url     = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'TABS' ) %>" />
          </thtmlb:gridCell>
        </thtmlb:grid>
      </thtmlb:trayHeader>
      <thtmlb:trayBody>
        <%
    *    data: lv_xml    type string.
        lv_xml    = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
        %>
        <chtmlb:config xml     = "<%= lv_xml %>"
                       mode    = "RUNTIME"  />
      </thtmlb:trayBody>
    </thtmlb:tray>
    <% elseif zcl_gaf_adm_toolbox=>gv_matrix_mnt_type EQ zcl_gaf_adm_toolbox=>GV_MATRIX_MNT_TYPE_SCAF or
              zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_scaf_anz  or
              zcl_gaf_adm_toolbox=>gv_matrix_mnt_type EQ zcl_gaf_adm_toolbox=>GV_MATRIX_MNT_TYPE_SOW.
       REFRESH controller->gt_navlink_tab[].
    *   if controller->gt_navlink_tab[] is initial.
         ls_line-id = 'Questions'.
         ls_line-onclick = 'QUEST'.
         ls_line-text = page->otr_trim( 'ZGAF_CRM_70/QUESTIONS' ).
         insert ls_line into table controller->gt_navlink_tab.
    *     ls_line-id = 'Risks'.
    *     ls_line-onclick = 'RISK'.
    *     ls_line-text = page->otr_trim( 'ZGAF_CRM_70/GLOBAL_RISK' ).
    *     insert ls_line into table controller->gt_navlink_tab.
         %>
    <%--   endif.  %>--%>
    <thtmlb:tray id     = "HeaderExt"
                 indent = 'FALSE'
                 design = 'STANDARD'>
      <thtmlb:trayHeader>
        <thtmlb:grid cellSpacing = "0"
                 columnSize  = "1"
                 height      = "100%"
                 rowSize     = "1"
                 width       = "100%" >
          <thtmlb:gridCell colSpan     = "1"
                       columnIndex = "1"
                       rowIndex    = "1"
                       rowSpan     = "1"
                       >
            <thtmlb:navLink links  = "<%= controller->gt_navlink_tab %>"
                    selectedLinkId = "<%= controller->gv_tab %>" />
        <bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'TABS' ) %>"
                  url     = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'TABS' ) %>" />
          </thtmlb:gridCell>
        </thtmlb:grid>
      </thtmlb:trayHeader>
      <thtmlb:trayBody>
        <%
    *    data: lv_xml    type string.
        lv_xml    = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
        %>
        <chtmlb:config xml     = "<%= lv_xml %>"
                       mode    = "RUNTIME"  />
      </thtmlb:trayBody>
    </thtmlb:tray>
    <% endif.
    %>

  • Can I call host file ( Unix Shell script ) from Oracle 10g trigger

    Hi,
    I am new to Oracle 10g. Can I call host file ( unix shell script ) from Oracle 10g trigger ?. I know it is possible. Pl explain me with small example
    thanks & regards
    parag

    user12009546 wrote:
    Hi,
    I am new to Oracle 10g. Can I call host file ( unix shell script ) from Oracle 10g trigger ?. I know it is possible. Pl explain me with small example
    thanks & regards
    paragIf you are in 10g, you can simple call shell script from DBMS_SCHEDULER:
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'TEST_SCRIPT',
    job_type => 'EXECUTABLE',
    job_action => 'PATH_OF_YOUR_SCRIPT',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=MINUTELY; INTERVAL=1',
    enabled => TRUE,
    comments => 'Shell script from Oracle'
    END;
    /

  • Can I Call method on one JVM from another through a dll?

    Let me explain.
    I have this java jar file that I can only have one instance of running at any given time. I'm using a shared data segment in a dll to store a bool indicating whether the program is already running or not. If it's already running, I have to not run the second instance and give focus to the current running instance.
    The jar file calls a native method "canInstantiate()" on a dll to see if there's already an app running. If there isn't, the env and obj are stored in the shared data segment of the dll and we return true. If there is already an instance of the program running, I want canInstantiate call a function on the current instance of the jar (like a callback) to tell it to request focus. It's not working. Can someone tell me if my code is right?
    The .h file
    #include "stdafx.h"
    #include <jni.h>
    #include "CardServer.h"
    #pragma data_seg("SHARED") // Begin the shared data segment.
    static volatile bool instanceExists = false;
    static JavaVM *theJavaVM = NULL;
    static JNIEnv* theJavaEnv= NULL;
    static jobject instanceObject = NULL;
    static jmethodID mid = NULL;
    static jclass cls = NULL;
    #pragma data_seg()
    #pragma comment(linker, "/section:SHARED,RWS")
    jdouble canInstantiate(JNIEnv *env, jobject obj);
    jdouble instantiate(JNIEnv *env, jobject obj);
    jdouble uninstantiate(JNIEnv *env, jobject obj);
    void grabFocus();
    </code>
    The .cpp file:
    <code>
    #include "MyFunctions.h"
    #include <string.h>
    #include <stdlib.h>
    #include "stdafx.h"
    #include <iostream.h>
    jdouble canInstantiate(JNIEnv *env, jobject obj)
    printf("In canInstantiate!!");
    if (!instanceExists)
    printf("No instance exists!!");
    return (jdouble)0.0;
    else
    printf("An instance already exists!!");
    grabFocus();
    return (jdouble)1.0;
    jdouble instantiate(JNIEnv *env, jobject obj)
    printf("**In CPP: Instantiate!!\n");
    cout << "At start, env is: " << env << endl;
    cout << "At start, obj is: " << obj << endl;
    if (instanceExists == false)
    instanceExists = true;
    theJavaEnv = env;
    instanceObject = obj;
    theJavaEnv->GetJavaVM(&theJavaVM);
    cls = (theJavaEnv)->FindClass("TheMainClassOfTheJar");
    if (cls == 0) {
    fprintf(stderr, "Can't find Prog class\n");
    exit(1);
    mid = (theJavaEnv)->GetMethodID(cls, "grabFocusInJava", "(I)I");
    if (mid == 0) {
    fprintf(stderr, "Can't find grabFocusInJava\n");
    exit(1);
    printf("About to call grabFocusInJava\n");
    grabFocus();
    printf("CPP: After the grab focus command in instantiate!!\n");
    cout << "At end, env is: " << env << endl;
    cout << "At end, obj is: " << obj << endl;
    return 0.0;
    else
    printf("CPP: Finished Instantiate!!\n");
    return 1.0;
    jdouble uninstantiate(JNIEnv *env, jobject obj)
    printf("CPP: In uninstantiate!!\n");
    if (instanceExists == true)
    instanceExists = false;
    theJavaVM = NULL;
    instanceObject = NULL;
    printf("CPP: Finishing uninstantiate!!\n");
    return 0.0;
    else
    printf("CPP: Finishing uninstantiate!!\n");
    return 1.0;
    void grabFocus()
    printf("In CPP::GrabFocus!!\n");
    instanceObject = theJavaEnv->NewGlobalRef(instanceObject);
    cls = (theJavaEnv)->FindClass("CardFormatter");
    if (cls == 0) {
    fprintf(stderr, "Can't find Prog class\n");
    exit(1);
    printf("Got the cls id again!!\n");
    if (cls == 0)
    printf("IT'S INVALID!!\n");
    mid = (theJavaEnv)->GetMethodID(cls, "grabFocusInJava", "(I)I");
    if (mid == 0) {
    fprintf(stderr, "Can't find grabFocusInJava\n");
    exit(1);
    theJavaEnv->CallIntMethod(instanceObject, mid, 2);
    printf("Called grabFocusInJava\n");
    </code>
    thanks in advance

    Can I Call method on one JVM from another through a dll
    ...The rest of your question merely expands on your title.
    And the answer to that question is no.
    When you call a method you are executing a "thread of execution." A thread of execution exists only in a single process. It can not exist in another process.
    If the dll is doing some interesting things then you could call a method that sets a flag. Data can move between instances. But you would then have to have a thread in that different process monitoring that flag. And sharing data in a dll is not a normal process, so it would have to be coded appropriately.
    If all you want to do is set the current focus to the existing application, then that can be done with existing windows functionality. You don't need to do anything special in your dll. You can probably search these forums to find the exact code. If not there are countless examples in windows repositories (like MSDN) on how to do that.

  • How can i call method defined in the binding page from popup

    I couldn't call method defined in pageDef from dialog exist in popup
    while i can call it from button or link
    how can I do that

    Hi,
    my answer to this is : yes, this can be done. So next is that you explain what you've tried so we can share our view with you
    Frank

  • Can we call a procedure defined in AM from a procedure in AM itself?

    Dear Members,
    I just want to know is it a oracle standard way to call a procedure defined in AM from another procedure defined in the same AM. For example
    AM Code:_
    public void proc1()
    System.out.println("IAM IN PROCEDURE-1");
    public void proc2()
    proc1;
    Kindly please let me know whether the above coding style is as per the standards or not.
    Many thanks in advance.
    Best Regards,
    Arun Reddy D.

    Arun,
    As Ravi mentioned this way of calling the method is correct.
    proc1() could be reusable thats why you are calling again.
    Some times few methods(procedure) is common use across the module.
    In that case you can have the method in a commonAM and you extend the commonAM in all your AMs
    that will help you to call in all the AM having a central place to call.
    Thanks,
    With regards,
    Kali.
    OSSI.

  • Calling methods located inside ActiveX objects from Java

    Hi folks,
    I understand that I can wrap ActiveX methods in C and call using JNI, but I am looking for an elegant way to call methods inside of Active X controls directly. There are a set of classes in com.ms.ActiveX package that allow this, but I am receiving a java.lang.UnsatisfiedLinkError: initPolicyEngine at runtime. I can't find any documentation from Microsoft on this (go figure). Has anyone ever used the com.ms packages, or does anyone know of an elegant solution avoiding wrappers and JNI? I have sucessfully used the neva objects vendor classes, but I find them too bulky for mainstream use. Any thoughts are appreciated. Thanks.

    Hi,
    - If you use the package com.ms.* You'll need to run your application in the Microsoft VM (jview.exe).
    - If you run it inside the browser you cannot use the java plugin, and your applet needs to be signed.
    If this doesn't help, please provide the version of your msjava.dll.
    Regards,
    Kurt.

  • How can we call methods of one web dynpro component in another one

    Hello Team,
    How do I call  one Web Dynpro component methods in another Web Dynpro component.
    How do we use public parts.
    thanks

    Hi,
    You want to use Comp2's getData() method in Comp1
    If both the WebDynpro components are in the same DC:
    1. Create a wrapper method (with the same signature) in the Comp2's Interface controller. And invoke the Component contorller's getData() method in this method using the below code.
    wdThis.wdGetComp2Controller.getData()
    2. Now Go to the Comp1 and right click on UsedWebDynproComps and add this Comp2 as a UsedWebDypro component.
    3. Now go to the Component Controller of Comp1 and in properties tab add the usage declaration of Interface controller of Comp2.
    4. Now using this below code you can access the method of InterfaceController of Comp2.
    wdThis.wdGetComp2Interface().getData();
    If both the WebDynpro components are in different DCs:
    1. Right click on Comp2 and select Add to public part on Comp2 in DC2.
    2. Now Add this public part in DC1 UsedDCs.
    Now repeat the above stpes 1...to..4. of  "If both the WebDynpro components are in the same DC" same.
    Regards,
    Charan

  • Calling method of a custom infotype from ABAP

    Hi Experts,
    I am working on an application where i need to call a method of a custom defined infotype.
    I have done this -->
    1. Create a custom infotype 9111
    2. SAP creates a class of that infotype ZCL_HRPA_INFOTYPE_9111
    3. Inside this method there are few inherited method which provide me functionality of insert , update , delete
    i want to call methods IF_HRPA_INFTY_BL~MODIFY,
    IF_HRPA_INFTY_BL~INSERT
    However when i call these method from abap report this method does not work.
    where as when i try to insert an entry using PA30 transaction it works.
    Does anyone know why does this happen and what is the solution?
    Regards,
    Ashish Shah

    Had the same problem (probably copied from the same program). The answer is that you need to commit the work at the end using something like
    * Commit
    CALL METHOD busilog->flush
      EXPORTING
        no_commit = space.
    Here is an example of my code for IT0002 which works.
    *& Report  Z_TEST2
    REPORT  z_test2.
    DATA: a_masterdata_bl TYPE REF TO if_hrpa_masterdata_bl,
          p0002         TYPE p0002,
          lo_0002 TYPE REF TO cl_hrpa_infotype_0002,
          ls_p0002_ref TYPE REF TO data,
          container_tab    TYPE hrpad_infty_container_tab,
          container  TYPE REF TO if_hrpa_infty_container,
          message_handler TYPE REF TO cl_hrpa_message_list,
          infotype_logic TYPE REF TO if_hrpa_infty_bl,
          update_mode TYPE hrpad_update_mode VALUE 'XXX',
          lt_0002_container TYPE REF TO cl_hrpa_infotype_container,
          key TYPE pskey,
          l_is_ok          TYPE boole_d.
    FIELD-SYMBOLS <p0002> TYPE p0002.
    * get business logic from masterdata factory
    CALL METHOD cl_hrpa_masterdata_factory=>get_business_logic
      IMPORTING
        business_logic = a_masterdata_bl.
    * CATCH cx_hrpa_violated_assertion .
    *ENDTRY.
    *TRY.
    CALL METHOD a_masterdata_bl->read
      EXPORTING
        tclas           = 'A'
        pernr           = '508'
        infty           = '0002'
        begda           = sy-datum
        endda           = sy-datum
        no_auth_check   = 'X'
        message_handler = message_handler
      IMPORTING
        container_tab   = container_tab
        is_ok           = l_is_ok
    * CATCH cx_hrpa_violated_assertion .
    *ENDTRY.
    READ TABLE container_tab INTO container INDEX 1.
    lt_0002_container ?= container.
    TRY.
        CALL METHOD lt_0002_container->primary_record_ref
          IMPORTING
            pnnnn_ref = ls_p0002_ref.
      CATCH cx_hrpa_violated_assertion.
    ENDTRY.
    ASSIGN ls_p0002_ref->* TO <p0002>.
    MOVE-CORRESPONDING <p0002> TO key.
    break stantric.
    <p0002>-vorna = 'Rick'.
    container ?= lt_0002_container->modify_primary_record( <p0002> ).
    TRY.
        CREATE OBJECT lo_0002
          EXPORTING
            tclas = 'A'
            infty = '0002'.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    CREATE OBJECT message_handler.
    TRY.
        CALL METHOD lo_0002->get_specific_bl
          EXPORTING
            versionid      = '01'
            tclas          = 'A'
            pskey          = key
          IMPORTING
            infotype_logic = infotype_logic.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    TRY.
        CALL METHOD infotype_logic->modify
          EXPORTING
            old_container   = lt_0002_container
            massn           = space
            massg           = space
            update_mode     = update_mode
            no_auth_check   = 'X'
            message_handler = message_handler
          IMPORTING
            is_ok           = l_is_ok
          CHANGING
            container       = container.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    * Commit
    CALL METHOD a_masterdata_bl->flush
      EXPORTING
        no_commit = space.

  • Can we call any kind of database sequence from OEDQ

    Hi Guys,
    Please let us know whether a oracle database sequence can be called from OEDQ? If yes then how? Please let us know how can we call any shell script/PL/SQl package from OEDQ. Your help is appreciated.

    Hi Mike,
    We have written a small script to call package in Oracle from OEDQ using Script Processor. Below is the script:
    #! language : groovy
    import groovy.sql.Sql
    import oracle.jdbc.driver.OracleTypes
    Sql sql = Sql.newInstance("jdbc:oracle:thin:@xxxxx.msd.ihost.com:1523:TTTTT","USERNAME","PWD",
    "oracle.jdbc.driver.OracleDriver")
    sql.call ('{call seq_upd.test_proc}')
    output1='Updated Successfully';
    We tried by hard coding the username and password and the script is successfully calling package at Oracle side. We would like to know whether there is any option to receive password dynamically using reference that can be passed as an attribute or any prompt possible in OEDQ or any alternative available.
    Please advice.
    Thanks in Advance,
    VT

  • Can I call a report in Reports 6i from Forms Services 10g?

    Hi there,
    I was wondering if I could call a report in Reports 6i from my application in Forms Services 10g. If so, how could I do it?
    Thanks!

    In Forms 6i you probably did use RUN_PRODUCT to call reports. In 9i onwards you should use RUN_REPORT_OBJECT instead.
    See http://www.oracle.com/technology/products/forms/pdf/10g/frm10gsrw10g.pdf
    Note that you should be able to run RDF files without any conversion.

  • Jobserver not available from specific client installation (from Designer)

    Hi,
    I have installed Designer on a PC and everything seems to work fine, except I can not run jobs using the associated jobserver.
    When I open up designer, I get a message that the jobserver is not available. When I go to the admin console (on the same PC) I can run jobs.
    Also, when I use another computer and log on to the same repository, I can use the jobserver from the designer.
    What can possibly be wrong at PC level which prevents me from using the jobserver from Designer?
    I have re-installed designer but it did not have any effect.
    Any help greatly appreciated - I have no idea how to troubleshoot this is also welcome.
    Thanks in advance,
    Jan.

    Hello,
    1.  Make sure that you can ping the Job Server from the client machine - Use the fully qulaified domain name (not ip address)
    2.  make sure that you can ing the client machine from the Job server - Use the fully qualified domain name (not ip address)
    if steps 1 or 2 fail then you need to contact you network admin to resolve the connectivity issues. If you are able to connect using the ip address and not the fully qualified name, you can add an entry to you local host file.
    3.  make sure that you do not have a firewall blocking the Job Server port preventing inbound connections to the job server
    4.  make sure that you do not have a firewall blocking ports from the job server to the client machine.
    The default port for the job server is 3500 make sure that this port is open for connections from the client
    you must also make sure that there is no firewall blocking any ports for connectivity FROM the Job Server TO the client.
    if so ask the network admin to unblock these or provide a port range for you to use.
    if they provide a port range for connectivity from the job server to the client you must go to Tools --> options -->   Designer -->Environment and set the port range in the Designer communication ports section

  • How do I call methods with the same name from different classes

    I have a user class which needs to make calls to methods with the same name but to ojects of a different type.
    My User class will create an object of type MyDAO or of type RemoteDAO.
    The RemoteDAO class is simply a wrapper class around a MyDAO object type to allow a MyDAO object to be accessed remotely. Note the interface MyInterface which MyDAO must implement cannot throw RemoteExceptions.
    Problem is I have ended up with 2 identical User classes which only differ in the type of object they make calls to, method names and functionality are identical.
    Is there any way I can get around this problem?
    Thanks ... J
    My classes are defined as followes
    interface MyInterface{
         //Does not and CANNOT declare to throw any exceptions
        public String sayHello();
    class MyDAO implements MyInterface{
       public String sayHello(){
              return ("Hello from DAO");
    interface RemoteDAO extends java.rmi.Remote{
         public String sayHello() throws java.rmi.RemoteException;
    class RemoteDAOImpl extends UnicastRemoteObject implements RemoteDAO{
         MyDAO dao = new MyDAO();
        public String sayHello() throws java.rmi.RemoteException{
              return dao.sayHello();
    class User{
       //MyDAO dao = new MyDAO();
       //OR
       RemoteDAO dao = new RemoteDAO();
       public void callDAO(){
              try{
              System.out.println( dao.sayHello() );
              catch( Exception e ){
    }

    >
    That's only a good idea if the semantics of sayHello
    as defined in MyInterface suggest that a
    RemoteException could occur. If not, then you're
    designing the interface to suit the way the
    implementing classes will be written, which smells.
    :-)But in practice you can't make a call which can be handled either remotely or locally without, at some point, dealing with the RemoteException.
    Therefore either RemoteException must be part of the interface or (an this is probably more satisfactory) you don't use the remote interface directly, but MyInterface is implemented by a wrapper class which deals with the exception.

  • How can I called java.lang.Math.sqr function from PL/SQL?

    JVM is loaded and I've queried the system table showing there are more than 9000 JAVA class objects.
    When I try something like:
    select java.lang.Math.sqrt(9) from dual;
    I get ORA-00904 (invalid column name) error. How can I invoke standard java.lang.Math methods in PL/SQL?
    tia

    You need to write a PL/SQL wrapper for the java call.
    Then you just call the PL/SQL function..
    -------PL/SQL wrapper
    FUNCTION GetFullName( code varchar2) RETURN NUMBER
    AS LANGUAGE JAVA
    NAME 'ResponseXml.GetPersonFullName(java.lang.String) return java.lang.String';
    Now you can do
    Select GetFullName( 'mycous' ) from dual;

Maybe you are looking for

  • How do I get my home video from IPhone to Ipad?

    How do I transfer my home video from my IPhone to Ipad?

  • Version WIN 10,1,53,64 locks windows

    Running Vista x64 Ultimate on my desktop and x64 Home Premium on my laptop.  Problem is happening on both machines.  Recently did an automatic update via Adobe's updater on the local machines.  Once installed, though, the computer will lock itself an

  • GOP Vbios for a NVIDIA GeForce GTX 770

    Hello, I am interested in a GOP Vbios for  a NVIDIA GeForce GTX 770 ( MSI N770 LIGHTNING LE), on a motherboard MSI Z87-G45 GAMING. Here is the serial number : S/N:602-V283-AASB1310087901 Could you provide me the instruction to correctly update it ple

  • Displaced Music Files

    Okay, this will probably be a bit long, because I'm long-winded basta** and it takes me forever to fully explain a problem.... I keep all of my music (18,000+ songs) in a folder entitled "iTunes Music" on an extended drive I've named "TurboTunes." It

  • Moving iTunes music folder/library to external HD

    Hi all, and happy new year: Yeah, I know I should know how to do this, but ... I want to move all my music to an external HD and delete it from my MBP HD. I would like someone to steer me to the best resource for a primer on how to do this. Thanks in