Java Program in MDM to call a standard java class

Hi All,
In MDM- GDS, (Global Data Synchronization), we have a scenario where, once we register the Items , it will be transported to a Data Pool called 1SYNC through SAP PI.
There is a standard Java PRoxy(Kind of java Class) in MDM, which will be triggered once we register the Item in MDM-GDS.
That Java Proxy will send the Item INfo as a XML message to PI.
So we would like to know whether its possible to automate this process.
Like,Writing a new Java Program which will check all the new items and trigger the Java Proxy and send these items as XML Messages to PI.
I m new to MDM. So it would be really helpful, If i could get some inputs on this. Like, is it possible in MDM. If so, how?

Aarthi,
you can acheive this from MDM itself, and need not to write any Java proxy.
you may consider following logic.
Create a field with the Name Status and Initilize it with Value "new". Now define syndicaiton Map to syndicate records which holds value "new" in the status field.  define a workflow with syndication step, using maps defined earlier. After syndication step, execute an assignment to change Status field value from "New" to "Syndicated".
Revert back if any question.
~ Shiv

Similar Messages

  • Call Non Standard Form Class

    Dear Experts,
    I'll try to explain my problem;
    I have created new Form Class for print Service Notifications, I create three application forms for this Form Class. This is working fine.
    Problem is:
    I want to call this Form Class from Service Notification print button (TC IQS1, IQS2), and don't know how to do this. I want a pop-up asking me for which one of three application forms I want to print. (I can achieve this with standards like MOVE-IN).
    Can anyone help me?
    Thanks in advance.

    Hello .... You'll need to call FM EFG_PRINT_EXPANED after the application form is selected.  Have a look at one of the correspondence (print) events with transaction FQEVENTS.   This sample code below is from event R380.    
    Regards,  Joe
    --- prepare print workbench
      CLEAR l_eprintparams.
    --- fill print parameters usint i_efgpp
      MOVE-CORRESPONDING x_efgpp TO l_eprintparams.
      IF NOT ( x_dfkkcoh-formkey IS INITIAL ).
        l_eprintparams-formkey   =  x_dfkkcoh-formkey.
      ELSE.
        l_eprintparams-formkey = 'IS_U_IDE_REMADV_CMPLNT'.
      ENDIF.
    --- determine Language
      IF x_dfkkcoh-spras IS INITIAL.
        l_eprintparams-langu     =  l_corr_receiver-langu.
      ELSE.
        l_eprintparams-langu     =  x_dfkkcoh-spras .
      ENDIF.
    --- fill print parameters usint i_itcpo
      MOVE-CORRESPONDING x_itcpo TO l_eprintparams.
    --- call print workbench
      CALL FUNCTION 'EFG_PRINT_EXPANDED'
        EXPORTING
          x_sendcontrol       = x_dfkkcoh-sendcontrol
          x_rec_addr          = l_corr_receiver-addrnumber
          x_rec_persnumber    = l_corr_receiver-persnumber
          x_printparams       = l_eprintparams
          x_archive_params    = x_archive_params
          x_archive_index     = x_archive_index
        EXCEPTIONS
          not_qualified       = 1
          input_error         = 2
          print_failed        = 3
          cancelled           = 4
          rec_addr_not_found  = 5
          send_addr_not_found = 6
          OTHERS              = 7.

  • How can I call a java class from within my program?

    I was wondering if there's a platform independent way to call a java class from my program.

    Here's my scenario. I'm working on a platform independent, feature rich, object-oriented command prompt program. The way I'm designing it is that users can drop classes they write into my bin directory and gain access to the class through my program. For example, they drop a class named Network.class in the bin directory. They would type Network network at my command prompt and gain access to all the methods available in that class. They can then type system.echo network.ipaddress() at my prompt and get the system's ip address. I have it designed that there's a server running in the background and the clients connect to my port. Once connected the end-user can enter their user name and password and gain access to the system. When they type a command they actually call another java program which connects to my server using a seperate thread. They can then communicate back and forth. I have it set that everything has a process id and it's used to keep track of who called what program. Once the program is done it disconnects and closes. Rather than getting into the nitty gritty (I didn't want to get into heavy detail, I know how everything will work) I'm really interested in finding out how I can call a java program from my program. I don't want it to be part of the app in any way.

  • How to call a standard BOR method in a program.

    Hi All,
    How to call a standard BOR method in a program. For example I have to call BOR method ISUSMORDER.Release in my program but don't know how to call.
    Also, plz tell me how to capture the Exceptions in case of BOR method.
    Plz help me out in this.
    Thanks,
    Mithilesh

    Would be easier (however not always possible), to determine the functionality of this method and call that in your program. I mean, normally this method calls a BAPI, or function module (or a transaction). Have a look at the coding inside of the method, and try and use this.

  • How to call a Standard SAP Program in Zprogram.

    Hi,
    how to call a SAP Standard program in SAP Program?
    Do we have to use any funtion module and pass paramters?
    I want to call a Standard SAP prg in to my prgram? can anyone explain me or give the piece of code to call standard prg.
    Thanks & Regards

    Again, ABAP related questions should be asked in the ABAP forum.
    To answer you question,  if the standard program is a report program, you can use the SUBMIT statement and pass parameters using the WITH Extention.
    Submit <report>
          with p_fld = 'X'
              and return.
    Please make sure to award points for helpful answers and mark your posts as solved when solved completely.  Thanks.
    Regards,
    RIch Heilman

  • How to call the Standard Program in our ZPROGRAM?

    Hi Frieds can you tell me the procedure how to call the Standard program
    in z----
    program and we have to get the data from standard one to our customer program.
    Thanks in advance,
    madan mohan.

    Hi,
    *Submit report but export resultant list to memory, rather than
    *it being displayed on screen
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    Once report has finished and control has returned to calling
    program, use function modules LIST_FROM_MEMORY, WRITE_LIST and
    DISPLAY_LIST to retrieve and display report.
    *Example Code (Retrieving list from memory)
    DATA  BEGIN OF itab_list OCCURS 0.
            INCLUDE STRUCTURE abaplist.
    DATA  END OF itab_list.
    DATA: BEGIN OF vlist OCCURS 0,
            filler1(01)   TYPE c,
            field1(06)    TYPE c,
            filler(08)    TYPE c,
            field2(10)    TYPE c,
            filler3(01)   TYPE c,
            field3(10)    TYPE c,
            filler4(01)   TYPE c,
            field4(3)     TYPE c,
            filler5(02)   TYPE c,
            field5(15)    TYPE c,
            filler6(02)   TYPE c,
            field6(30)    TYPE c,
            filler7(43)   TYPE c,
            field7(10)    TYPE c,
          END OF vlist.
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = itab_list
      EXCEPTIONS
        not_found  = 4
        OTHERS     = 8.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index         = -1
      TABLES
        listasci           = vlist
        listobject         = itab_list
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
    IF sy-subrc NE '0'.
      WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
    ENDIF.
    Regards
    Sudheer

  • Calling the standard program in program and getting its output in int table

    Hi there,
    I have a requirement, where I need to call the standard program (of transaction CJI3) in my Y program. CJI3 transaction produces a ALV GRID output. I need to use that data for further processing. I am getting following problems:
    1. I tried to use SUBMIT ... EXPORTING TO MEMORY statement. I need to pass the company code for the selection, but the company code is in the dynamic selection. So not getting how to pass them.
    2. Just a doubt. Can we export the ALV GRID to the memory an retrieve it back using import?
    3. I did tried to use SUBMIT .....  statement using only the parameters which are on the selection screen. However the control went to CJI3 transaction and gave an error message 'Please select "from database" or "from archive" '. Did not understood that, any IDEA?
    Or is there any other way with which I can accomplish my requirement of getting the data in my program to manipulate, other than SUBMIT.
    Points will be rewarded.
    Thanks,
    Ganesh Khumse

    Hi,
    point 1:
    SUBMIT ... EXPORTING TO MEMORY will never work, because it displays the information in an ALV grid and that grid is waiting for user interaction for manipulating the information.
    point 2:
    no, you cannot export the content of an ALV grid to the memory
    point 3:
    must you get records in an internal table or must you feed the transaction, so that this one performs a task ??  for first option read below and for the other option you might work with BDC and Transaction Recorder.
    what you have to do is read the code of transaction CJI3 in order to understand what it does, where the information is read from and what is the internal table that passes the values to the ALV Grid. You might find a user exit in the code for manipulating that information or you might create an enhancement point if there´s no user exit.

  • Call a standard po release or cancel po release in program

    Dear all,
    How can I call a standard po release (me28) or cancel po release in program
    to release or cancel release a po?
    Thanks you
    John

    You need to get the report and when you double click on field ,then it goes to ME28 Transaction.
    need to use set parameter id ,
    see the below example and which i did in ALV ,it will call MM02 transaction.
    REPORT Z_GET_REFRESH no standard page heading.
    type-pools : slis.
    tables : makt,
             mara.
    data : i_fieldcat type slis_t_fieldcat_alv.
    CONSTANTS :
      gc_refresh TYPE syucomm VALUE '&REFRESH'.
    data : begin of i_makt occurs 0,
           matnr like makt-matnr,
           maktx like makt-maktx,
           end of i_makt.
    data : v_repid like sy-repid,
           g_user_command type slis_formname value 'USER_COMMAND',
           g_status_set   type slis_formname value 'SET_PF_STATUS',
            lt_event_exit TYPE slis_t_event_exit,
            ls_event_exit TYPE slis_event_exit.
    DATA:LC_GLAY TYPE LVC_S_GLAY.
    select-options s_matnr for mara-matnr .
    start-of-selection.
      select matnr maktx from makt into table i_makt
                                  where matnr in s_matnr.
    end-of-selection.
    Fill the fieldcatlog
      perform fill_field.
    Call the FM
      perform call_fm.
    *&      Form  fill_field
          text
    -->  p1        text
    <--  p2        text
    FORM fill_field.
      data wa_fieldcat type slis_fieldcat_alv.
      clear : wa_fieldcat.
      wa_fieldcat-tabname = 'I_MAKT'.
      wa_fieldcat-fieldname = 'MATNR'.
      wa_fieldcat-outputlen = '18'.
      wa_fieldcat-seltext_l = 'Material #'.
      wa_fieldcat-col_pos = '1'.
      append wa_fieldcat to i_fieldcat.
      clear : wa_fieldcat.
      wa_fieldcat-tabname = 'I_MAKT'.
      wa_fieldcat-fieldname = 'MAKTX'.
      wa_fieldcat-outputlen = '40'.
      wa_fieldcat-seltext_l = 'Material Desc'.
      wa_fieldcat-col_pos = '2'.
      append wa_fieldcat to i_fieldcat.
    ENDFORM.                    " fill_field
    *&      Form  call_fm
          text
    -->  p1        text
    <--  p2        text
    FORM call_fm.
      v_repid = sy-repid.
      LC_GLAY-EDT_CLL_CB = 'X'.
      CLEAR ls_event_exit.
      ls_event_exit-ucomm = gc_refresh.    " Refresh
      ls_event_exit-after = 'X'.
      APPEND ls_event_exit TO lt_event_exit.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = v_repid
          I_CALLBACK_PF_STATUS_SET          = g_status_set
          I_CALLBACK_USER_COMMAND           = g_user_command
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
        I_GRID_SETTINGS                   = LC_GLAY
      IS_LAYOUT                         =
          IT_FIELDCAT                       = i_fieldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
       IT_EVENT_EXIT                     = lt_event_exit
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_ADD_FIELDCAT                   =
      IT_HYPERLINK                      =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
      IT_EXCEPT_QINFO                   =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = i_makt
       EXCEPTIONS
         PROGRAM_ERROR                     = 1
         OTHERS                            = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " call_fm
          FORM USER_COMMAND                                             *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                rs_selfield TYPE slis_selfield.                 "#EC CALLED
      data i_RSPARAMS like RSPARAMS occurs 0.
      CASE R_UCOMM.
        WHEN '&IC1'.
          read table i_makt index rs_selfield-tabindex.
         <b> SET PARAMETER ID 'MAT' FIELD i_makt-matnr.
          if not i_makt-matnr is initial.
            call transaction 'MM02' and skip first screen.
          endif.</b>
        when '&REFRESH'.
          CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
            EXPORTING
              CURR_REPORT           = v_repid
    IMPORTING
      SP                    =
            TABLES
             SELECTION_TABLE       = i_RSPARAMS
           EXCEPTIONS
             NOT_FOUND             = 1
             NO_REPORT             = 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.
          submit z_get_refresh with selection-table i_RSPARAMS.
          rs_selfield-refresh = 'X'.
      ENDCASE.
      MOVE '&REFRESH' TO r_ucomm.
    ENDFORM.
          FORM set_pf_status                                            *
    FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
    DELETE Rt_extab WHERE fcode = gc_refresh.
      SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'
          EXCLUDING Rt_extab.
    *SET PF-STATUS 'STANDARD' EXCLUDING rt_extab.
      SET TITLEBAR  sy-tcode.
    ENDFORM.
    Thanks
    Seshu

  • Call a local program in Java class on Win

    Hi
    I'm now working on a Java project. It is needed to call a local program in Java class.
    Following is the local program's source code:
    #include <stdio.h>
    main()
        char s[100];
        printf("Please input\n");
        scanf("%s", s);
        printf("Output: %s\n", s);
    } I build this simlpe C program to a exe file named TEST.EXE
    Then, I called the exe in my java class which was like following:
    final Process p = Runtime.getRuntime().exec("test.exe > a.txt");
    writer = new PrintWriter(p.getOutputStream());
    writer.println("12345\n");
    writer.close();
    p.waitFor();But after I ran the Java, it seemed not what I hope to get in a.txt. the string "12345" had not been read by the program, and not been writen to a.txt.
    Following is what appeard in a.txt:
    Please input!
    Output: Is there any error in my Java code?
    thanks!
    Edited by: JingZ on Aug 20, 2008 9:05 AM

    All above is my testing.
    In fact, my project is to encrypt/decrypt by Gnu PG.
    I need to execute a gpg command like following
    gpg -r Luna --encrypt test.txt
    I could execute this command line in CMD normaly:
    C:\WP_ECL~1.4\TESTCE~1>gpg -r 8104EFB8 --encrypt test.txt
    gpg: 997D0744: There is no assurance this key belongs to the named user
    pub  4096g/997D0744 2002-07-31 Baker &Taylor Inc. <[email protected]>
    Primary key fingerprint: BBBC F196 C1D5 CF26 170F  D1FB 870A 3F60 8104 EFB8
          Subkey fingerprint: C161 4C33 F15C 5347 FD09  C2BE 8CC6 2302 997D 0744
    It is NOT certain that the key belongs to the person named
    in the user ID.  If you *really* know what you are doing,
    you may answer the next question with yes.
    Use this key anyway? (y/N) y
    C:\WP_ECL~1.4\TESTCE~1>Please pay attention to the line which I have to type a 'y' to confirm.
    This make me have to invoke this command in Java class like following(in my understanding):
    final Process p = Runtime.getRuntime().exec("cmd /C gpg -r Luna --encrypt test.txt");
    writer = new PrintWriter(p.getOutputStream());
    writer.println("y");
    writer.close();
    p.waitFor();But while the java code was being run, it would be blocked, waiting, waiting and waiting.
    But this method was succeed in my test which invoked test.exe above.
    I cannot understand what difference exists between my test.exe and gpg.
    thanks.

  • Calling an standard program

    Hi all,
    I am coding an Z Program and in this Zprogram i have to call an Standard Program(RFFOUS_T) and after giving the Necessary input Manually in the first selection screen (1000)of the Standard program i have to return back to my Z program
    How can i do this
    Regards
    Ajya

    Hi Ajay,
    You can use addition WITH SELECTION-TABLE rspar to pass the selection screen parameters.
    SUBMIT report1 WITH SELECTION-TABLE rspar_tab.
    Here table rspar_tab contains values for Selection Screen.
    Also you can pass value to selection screen field dirsctly
    SUBMIT report1
    WITH sel_screed_field1 BETWEEN 'H' AND 'K'
    WITH sel_screed_field2 IN range_tab.
    If Found Help Full Do Reward.
    Regards.
    Eshwar.

  • Calling Same C program from Java Classes

    Hi!
    Can anyone let me know how to call the same C program using JNI from multiple Java Classes/programs?.
    Cheers
    Sai

    JNI creates a shared library.
    Any application that needs to can use the shared library at the same time.
    Ideally you use the same interface that you created for one application via JNI in the other applications.

  • Error while trying to call Java Class from Peoplecode

    Gurus,
    I am trying to read a property file from peoplecode using standard java classes. However, I am getting this error more than one overload matches
    Below are 2 ways in which I tried doing this and both ended up in the same error
    Code 1>_
         Local JavaObject &file = CreateJavaObject("java.io.File", "D:\\psft.properties");
         Local JavaObject &properties = CreateJavaObject("java.util.Properties");
         Local JavaObject &reader = CreateJavaObject("java.io.FileReader", &file);
         &properties.load(); Error thrown : "Calling Java java.io.FileReader.<init>: more than one overload matches"
    Code 2>_
         Local JavaObject &file = CreateJavaObject("java.io.File", "D:\\psft.properties");
         Local JavaObject &properties = CreateJavaObject("java.util.Properties");
         Local JavaObject &properyFile = CreateJavaObject("java.io.FileInputStream", &file);
         &properties.load();
    Error thrown : "Calling Java java.io.FileInputStream.<init>: more than one overload matches."
    The above error is thrown on the 3rd line when I try to invoke the FileInputStream or FileReader class/constructor.
    In fact both the above code pieces work absolutely fine when I write them into a java class and run them on a java runtime. Any inputs would be of great help !! Alternatively, I will have to use peoplecode file.readline(), etc to read the property file. Since java has this smarter way to reading a property file, I thought of giving it a try ..
    -Sudripta

    I tested this on one of my windows servers using PT 8.50:
    Local JavaObject &joCurrFile = CreateJavaObject("java.io.File", "c:/temp/test-date.txt");
    Local JavaObject &jlongtime = CreateJavaObject("java.util.Date");
    Local number &modifytime = &jlongtime.getTime();
    MessageBox(0, "", 0, 0, "original time: " | &joCurrFile.lastModified());
    Local boolean &filemodified = &joCurrFile.setLastModified(&modifytime);
    MessageBox(0, "", 0, 0, "&modifytime: " | &modifytime, "");
    MessageBox(0, "", 0, 0, "&filemodified: " | &filemodified, "");
    MessageBox(0, "", 0, 0, "new time: " | &joCurrFile.lastModified());Here are the results:
    PeopleTools 8.50.05 - Application Engine
    Copyright (c) 1988-2010 PeopleSoft, Inc.
    All Rights Reserved
    original time: 1287677026144 (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: original time: 1287677026144 (0,0) (0,0)
    &modifytime: 1287677277845 (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: &modifytime: 1287677277845 (0,0) (0,0)
    &filemodified: True (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: &filemodified: True (0,0) (0,0)
    new time: 1287677277845 (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: new time: 1287677277845 (0,0) (0,0)
    Application Engine program DSS_TEST_IO ended normallyDoes your app server have permissions to modify the files you are trying to modify? Also, how did you verify the date/time of the files? Were you using Windows Explorer? Did you refresh the view first? Or did you use the console dir/ls? I seriously doubt there is a security manager in place that would restrict what you can do with Java. Security managers are common in applets/browser context, but not in apps.

  • Standard Java class communicating with a servlet

    Hey,
    I am trying to access a standard java classes member via a servlet class however the data is never received even though the member is visible on compilation. is there something Im doing wrong ?
    public class Start {
    //lots of stuff
         static List<Plug> plugList = Collections.synchronizedList(new LinkedList<Plug>());
    //lots more stuff
    public class wah extends HttpServlet{
            public void doGet( HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException{
                    doPost(request, response);
        public void doPost(HttpServletRequest request,
                                    HttpServletResponse res)throws ServletException, IOException{
                    res.setContentType("text/html");
                    PrintWriter out = res.getWriter();
                    out.println("wahwahwah");
                    synchronized(Start.plugList){
                            out.println("pluglist");
                            Iterator i1 = Start.plugList.iterator();
                            while (i1.hasNext()) {
                                    Plug oldPlug = (Plug)i1.next();
                                    out.println("PLug : " + oldPlug.getaddress64());
            }//doPost
    }

    Don't post all your code. Instead, make a simplified version of the code that demonstrates what your problem is and that we could compile and see what is going on. Make it as simple as possible but still demonstrating the problem.
    Who knows, when you make the SSCCP (small, self contained, compileable program) you will find your mistake as well.
    But without seeing any code all I can say is that the date you are accessing in the list has not been made available when you try to get it from the servlet. Perhaps the servlet call is blocking the other threads from accessing the list to put data into it, perhaps the other threads haven't begun working yet, perhaps the list you give to the servlet isn't the same list (but instead a copy of the list) that the data is being entered into, or many other reasons.
    One thing I would assume you need to do, since the Servlet is the data consumer, you need to make sure the data has been entered before the servlet tries to read it. The best way to do that is to put a wait() in the servlet code so that it knows it can't do anything until the producers are finished. Then the producers would add a notify() to tell the servlet to go ahead and display the data.
    So some modification might be:
    public class Start {
    //lots of stuff
         static List<Plug> plugList = Collections.synchronizedList(new LinkedList<Plug>());
            //marker to let servlet know that it can consume data
            private static boolean done = false;
            //producers call this method when list is ready for use
            static void setReadyToConsume() { done = true; }
            //servlet calls this to check if the list is ready
            public static boolean isReadyToConsume() { return done; }
    //lots more stuff
        public void doPost(HttpServletRequest request,
                                    HttpServletResponse res)throws ServletException, IOException{
                    res.setContentType("text/html");
                    PrintWriter out = res.getWriter();
                    out.println("wahwahwah");
                    synchronized(Start.plugList){
                           //Hold off trying to use list until list is ready
                            while (!Start.isReadyToConsume()) {
                                  try {
                                          Start.plugList.wait();
                                  } catch (InterruptedException ie) {
                                          log("Waiting for Plugs to be ready interrupted.  Continuing to wait.");
                                          log(ie.getMessage(), ie);
                            out.println("pluglist");
                            Iterator i1 = Start.plugList.iterator();
                            while (i1.hasNext()) {
                                    Plug oldPlug = (Plug)i1.next();
                                    out.println("PLug : " + oldPlug.getaddress64());
            }//doPostAnd don't forget to add a Start.plugList.notify() or Start.plugList().notifyAll() in the producer code after it calls the setReadyToConsume() method.

  • How to call a PL/SQL procedure from a Java class?

    Hi,
    I am new to the E-BusinessSuite and I want to develop a Portal with Java Portlets which display and write data from some E-Business databases (e.g. Customer Relationship Management or Human Resource). These data have been defined in the TCA (Trading Community Architecture) data model. I can access this data with PL/SQL API's. The next problem is how to get the data in the Java class. So, how do you call a PL/SQL procedure from a Java program?
    Can anyone let me know how to solve that problem?
    Thanks in advance,
    Chang Si Chou

    Have a look at this example:
    final ApplicationModule am = panelBinding.getApplicationModule();
    try
         final CallableStatement stmt = ((DBTransaction)am.getTransaction()).
                                                                                         createCallableStatement("{? = call some_pck.some_function(?, ?)}", 10);
         stmt.registerOutParameter(1, OracleTypes.VARCHAR);
         stmt.setInt(2, ((oracle.jbo.domain.Number)key.getAttribute(0)).intValue());
         stmt.setString(3, "Test");
         stmt.execute();
         stmt.close();
         return stmt.getString(1);
    catch (Exception ex)
         panelBinding.reportException(ex);
         return null;
    }Hope This Helps

  • Calling a Standard SAP transaction VA03 from another web dynpro application

    Hi All,
    I have a requirement wherein I need to call the standard SAP transaction VA03 whenever a sales order is selected in some other we dynpro application so that the sales order gets displayed.
    No regarding usage of OBN for the above functionality I have certain queries:
    1. In order to call VA03 do I need to create a transactional iview for it or is there any direct method.Also how to pass this sales order number as parameter to the T.Code.
    2. Can we use standard business object BUS2032 for OBN or a new Business object is created.What exactly is the purpose of these standard business objects in portal and when should they be used.
    Thanks in advance
    Aman Gupta

    Hi Aman - Do you have a portal team in your project or you have to create the IVIEWS yourself?
    I do have a portal team and I dont know how they create the IVIEWs but for example, I will go to my portal team and I will ask them to create an IVIEW for TCODE VA03, they will created and they will tell me the input parameters they entered for the IVIEW so I can call OBN and display in webdynpro.
    SAP in SRM has webdynpro e.g. for BUS2121 and they have an IVIEW already implemented in the portal context pointing to the webdynpro of BUS2121 so we can used the IVIEW by calling OBN and passing the parameters; in my case the object_type will be 'shc' and the operation will be 'display' and the paremeters itab will be the GUID of my shopping cart, that way the OBN can understand which Shopping cart open and in which operation mode.
    I also did something like your requirement, I need it to display a specific case in Records Management but SAP has a standard IVIEW for records management 'RMREGEDIT' that didn't work for my requirement so I went to SE38 created a program that displayed the case based on GUID and I created a TCODE of my custom program. Portal team created a custom IVIEW of my custom TCODE and they told me the input parameters to call the TCODE in OBN and I pass in the itab parameter the GUID of the case using the FM that I post before.
    The action to call the OBN is in the event handler ON_CLICK of my ALV and the action is getting trigger when the user actually clicks a HYPERLINK in the ALV.
    Hope this helps you!
    Please feel free to ask me more details if you need.
    Jason PV

Maybe you are looking for