How to call list from memory after submitting RCS13001

Can anyone help me with this problem? I am submitting RCS13001 and using option exporting list to memory and return. It was successfully displayed the ALV list (which I don't want to see) and return to the caller program. Then when calling function list_from_memory, it short dumped/returned nothing. It seems that nothing is saved in the memory when submitting the program.
So what I want to get now is call RCS13001 and process the data, don't display the ALV report but save it in memory, and then collect the memory for output.
Any help is appreciated and points awarded. Thanks in advance
Regards,
Eric
Code:
        SUBMIT ZRCS13001
          WITH PM_MTNRV INCL v_matnr
          WITH PM_WERKS INCL p_werks
          WITH PM_STLAL INCL p_stlal
          WITH PM_CAPID INCL p_capid
          WITH PM_DATUV INCL p_datuv
          WITH PM_EMENG INCL v_emeng
          EXPORTING LIST TO MEMORY
          AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        LISTOBJECT       = alv_stb
    EXCEPTIONS
      NOT_FOUND        = 1
      OTHERS           = 2

Hi Eric,
Please check Rich's sample code.
report zrich_0003 .
data: begin of listout occurs 0,
      line(1024) type c,
      end of listout.
* Submit the report and export list to memory
submit z_your_report exporting list to memory
            and return.
* Get list from memory and convert to ascii
perform retrieve_list_from_memory tables listout.
loop at listout.
  write:/ listout.
endloop.
* RETRIEVE_LIST_FROM_MEMORY
form retrieve_list_from_memory tables reportlines.
  data: list like abaplist occurs 0 with header line.
  data: txtlines(1024) type c occurs 0 with header line.
  clear list.  refresh list.
  clear reportlines. refresh reportlines.
  call function 'LIST_FROM_MEMORY'
       tables
            listobject = list
       exceptions
            not_found  = 1
            others     = 2.
  check sy-subrc = 0.
  call function 'LIST_TO_ASCI'
       tables
            listobject         = list
            listasci           = txtlines
       exceptions
            empty_list         = 1
            list_index_invalid = 2
            others             = 3.
  check sy-subrc = 0.
  reportlines[] = txtlines[].
  call function 'LIST_FREE_MEMORY'.
endform.
Also please check this link for more sample codes.
http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
Regards,
Ferry Lianto
Please reward points if helpful.

Similar Messages

  • How to remove data from page after submitting the page?

    Hi,
    I am using API to create person record.After submitting the create page the data are still
    showing on that page.
    How to remove data after submitting the page?
    Please suggest.
    Regards,
    Sagarika

    Abdul,
    Your solution is perfect if the UIX beans on the page do not have BC4J binding with a VO attribute, otherwise, Sumit's soution is appropriate.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                               

  • Calling list from Screen

    I am new in the field of SAP ABAP. So please tell me how to "call list from screen 100". please give small prg. for this

    see below
    This section describes how to switch from screen processing to list processing. It contains a short technical introduction, followed by a recommended procedure.
    Switching Between Screen and List Processing
    Screen processing always involves a screen sequence that you start either using CALL SCREEN or a transaction code. During screen processing, the ABAP program is controlled by the dialog processor. In the ABAP program, the PBO and PAI modules are executed as they are called from the screen flow logic.
    To pass control from the dialog processor to the list processor, you must include the following statement in one of the dialog modules:
    LEAVE TO LIST-PROCESSING [AND RETURN TO SCREEN <nnnn>].
    You can include this statement in either the PBO or the PAI event. Its effect is to start the list processor and display the basic list after the PAI processing of the current screen. The basic list contains any list output from all PBO and PAI modules that have been executed up to that point.
    If detail lists are defined in the corresponding event blocks of the ABAP program (AT LINE-SELECTION, AT USER-COMMAND), user actions on the basic list will lead to the detail list, and further interaction will lead to further list levels.
    You can leave list processing in two ways:
    By leaving the basic list using the Back, Exit, or Cancel function.
    By using the following statement during list processing:
    LEAVE LIST-PROCESSING.
    In both cases, control returns from the list processor to the dialog processor. Each time this occurs, the entire list system is initialized. Any subsequent list output statements in PBO and PAI modules apply to an empty basic list.
    By default, the dialog processor returns to the PBO processing of the screen from which the list processor was called. The optional addition AND RETURN TO SCREEN allows you to specify a different screen in the current screen sequence at whose PBO event you want to resume processing. In particular, the statement
    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
    can be used to end the current screen sequence and return to the point from which it had originally been called.

  • Call list from Campaign

    How can you create call list from Campaign for a selected target group ? Can anyone help me in this.

    Hi ,
    To generate a call list from the campaign all you need to do is to create your campign and then choose the send target group to channel option the call list will get generated. Please refer the campaign execution link for detials
    http://help.sap.com/saphelp_crm50/helpdata/en/4e/ac6f422f91c153e10000000a1550b0/frameset.htm
    Regards,
    Anita

  • Related documents or links on how to call webservices from WDJ

    Hi all
    i need documents & links on how to call webservices from Webdynpro for Java.
    if anybody send the documents on sample scenarios on the same then it is the great help to me...
    Thanks
    Sunil

    Hi Sunil,
    May these links help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/f7/f289c67c759a41b570890c62a03519/frameset.htm
    http://help.sap.com/saphelp_nwce10/helpdata/en/64/0e0ffd314e44a593ec8b885a753d30/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/d2/0357425e060d53e10000000a155106/frameset.htm
    and  the below thread to call weservices in java.
    Re: How to call a web service from Java
    Regards,
    Supraja

  • Error message: Error parsing properties list from memory

    When I try to open my website that I built with Adobe Muse CC in Adobe Muse CC 2014 comes the error message: "error parsing properties list from memory" an everything is stuck, I can't open anything or working not even the preview mod is working, nothing. The same problem/message comes up when I try to star a new site. So I just can't work with the new Adobe Muse CC 2014 (I updated today the new launch). Does anyone know what is going on here? Is it a bug or what?

    This just happened to me. I've had no trouble at all with the latest version of abobe muse until today...Its still working alittle..I can't access sites but not via thumbnail have to click tab. My major issue is the side toolbar not loading.
    Any fix known??

  • How to discard blocks from memory ?

    Hi,
    How to discard blocks from memory ?
    Thank you.

    To add to what has already been posted. The full Oracle version should be included on all posts since many features and most bugs are version dependend.
    Oracle will flush dirty blocks from the buffer cache and overlay unchanged blocks as needed to fit new requests to the buffer cache. It also reuses space in the shared pool so the question of which blocks you want to flush from memory and why can be important to getting the most appropriate answer to your questions.
    On a production instance it should be unnecessary to manually flush either the buffer cache or shared pool as a normal part of opertations.
    HTH -- Mark D Powell --

  • How can I clear a form after submitting and saving the data in the iOS Acrobat Reader App

    How can I clear a form after submitting and saving the data in the iOS Acrobat Reader App

    Darrell,
    Thanks for this response. After I posted mine, I saw that the resetForm JavaScript method is documented as being supported starting with version 10.5: http://www.adobe.com/devnet-docs/acrobatetk/tools/Mobile/js.html
    But I haven't been able to get it to work. Can you clarify if support was indeed added and if it works for you?

  • How can i display list from memory

    Hello,
    now i am trying to develop exit to inspect code before release change request.
    There is function module  TR_INSPECT_OBJECTS to be used.
    But it returns only error flag. the result screen is kept in abap memory.
    what i want is to count how many error / warning in result.
    as i debug, the result in in hexstring structure.
    are there any method to retrieve it and count?
    thanks & regards,
    pichet a.

    Hi
    Make use of foll. FM in such cases.
    LIST_FROM_MEMORY - Prepared list import from memory
    Other FMs used in this aspect .
    DISPLAY_LIST  - List object display
    SAVE_LIST       - Save list
    WRITE_LIST      -  Display a (saved) list obj.
    Regds,
    abhee.
    Edited by: abheesawant on Jun 9, 2010 11:43 AM

  • How do i call servlet from javascript after validation the javascript

    Hi ,
    Can anyone tell me how to call a servlet after the javascript is being validated. Here is my code to validate javascript i need to call a servlet inorder to save the data into the same form. I tried calling through the action method in the form but its directly taking me to the servlet but not validating the form. Is there any way that i can validate the form first then call the servlet.
    Thanks in advance.
    <html>
    <head>
    <title>Online Blog</title>
    <script language ="javascript" type ="text/javascript">
    function myfunction()
    var mesg = "";
    var dmesg = "";
    var dnumber = 0;
    var number = 0
    var Blogstr = document.onlineblog.BlogName;
    var Fnamestr = document.onlineblog.FirstName;
    var Lnamestr = document.onlineblog.LastName;
    var Datestr = document.onlineblog.Dateformat;
    var Imagestr = document.onlineblog.uploadimage;
    var Imageval = Imagestr.value;
    var flength = parseInt(Imageval.length) - 3;
    var fext = Imageval.substring(flength,flength + 3);
    var Dateval = Datestr.value;
    var Dformat = /^\d{2}\/\d{2}\/\d{4}/; //checks the date format.
    //splits date into mm, dd , yyyy format.
    var m = Dateval.split("/")[0];
    var d = Dateval.split("/")[1];
    var y = Dateval.split("/")[2];
    //Get today's date (removes time).
    var today = new Date();
    var dd = today.getDate();
    var mm = today.getMonth()+1;
    var yyyy = today.getFullYear();
    //checks if month and date are displayed in mm, dd format and if not sets to mm,dd.
    if (mm <10)
    mm = '0'+mm;
    if (dd <10)
    dd = '0'+dd;
    //checks if name of the blog is empty
    if(Blogstr.value == "")
    number = number+1;
    mesg += "\n" + number + "Name of the blog";
    //checks if value of Frist Name is empty;
    if(Fnamestr.value == "")
    number = number+1;
    mesg += "\n" + number + "First Name";
    //checks if value of Last Name is empty;
    if(Lnamestr.value == "")
    number = number+1;
    mesg += "\n" + number + "Last Name";
    //checks if value of date is empty;
    if(Datestr.value == "")
    number = number+1;
    mesg += "\n" + number + "Date of mm/dd/yyyy format";
    //checks if value of image field is empty;
    if(Imagestr.value == "")
    number = number+1;
    mesg += "\n" + number + "select an image";
    //displays all the error messages.
    if (number > 0)
    alert ("Please enter the following" + mesg);
    return false;
    //checks if entered date format is mm/dd/yyyy
    if(!Dformat.test(Dateval))
    dnumber = dnumber +1;
    dmesg += "\n" + dnumber + "please enter a valid date(mm/dd/yyyy)";
    //checks if date is greater than 12 and is 2 digits.
    if ((m>12 && m<100) || (m> = 100 && m<1000) || (m==0))
    dnumber = dnumber+1;
    dmesg += "\n" + dnumber + "Enter valid month(mm)";
    //checks if month has 31 or 30 days and is in dd format.
    if (((d>30) && (d<100) && (m == 04 || m == 06 || m == 9 || m == 11)) || ((m == 01 || m == 03 || m == 05 || m == 07 || m == 08 || m == 10 || m==12) && (d >31) && (d<100)) || d == 0)
    dnumber = dnumber+1;
    dmesg += "\n" + dnumber + "Enter valid date(dd)";
    //checks if month has 28 or 29 days and wheather is a leap year or not.
    if((m == 02 && d>29 && y%4 == 0) || (m == 02 && d>28 && y%4 != 0))
    dnumber = dnumber+1;
    dmesg += "\n" + dnumber + "Enter valid date(dd)";
    //checks if entered date is prior to the current date.
    if((m == mm && d == dd && y == yyyy) || (y > yyyy)|| (d>=dd && m>=mm && m<=12 && y==yyyy) || (d<=dd && m>mm && y == yyyy && m<=12))
    dnumber = dnumber + 1;
    dmesg += "\n" + dnumber + "Please enter a date prior to the current date";
    if (y == 0 || y < 1000 || y>9999) //checks if year is zero and is a 4 digit number.
    dnumber = dnumber + 1;
    dmesg += "\n" + dnumber + "Enter a valid year(yyyy)";
    //checks if image format is jpg or gif.
    if(fext != "jpg" && fext != "gif")
    dnumber = dnumber + 1
    dmesg += "\n" + dnumber + "You can only upload gif or jpg images.";
    if(dnumber>0)
    alert("please check the followin error messages"+dmesg);
    return false;
    </script>
    <style type="text/css">
    .style1 {color: #FF0000}
    body {
         background-color: #FFCCFF;
    h2 {
         color: #CC3399;
    h1 {
         color: cc3399;
    .style2 {
         font-family: Arial, Helvetica, sans-serif;
         font-weight: bold;
    .style5 {color: #000000; font-family: "Times New Roman", Times, serif;}
    </style>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><body>
    <h1 align="center">Webloggers space</h1>
    <p align="center">Home
    <p>
    <h4> Please enter the following details to register.</h4>
    <p> <b>Note:</b> All fields marked with <span class="style1">*</span>(astrick)
    are compulsory.</p>
    <form action="servlet/BlogServlet" name="onlineblog" onsubmit = "return myfunction()" method="post">
    <table width="60%" border="0" cellspacing="5" cellpadding="2">
    <tr>
    <td><span class="style1">*</span>Name of the Blog</td>
    <td><input type="text" name="BlogName"/></td>
    </tr>
    <tr>
    <td><span class="style1">*</span>First Name</td>
    <td><input type="text" name="FirstName"/></td>
    </tr>
    <tr>
    <td><span class="style1">*</span>Last Name</td>
    <td><input type="text" name="LastName"/></td>
    </tr>
    <tr>
    <td><span class="style1">*</span>Date(mm/dd/yyyy)</td>
    <td><input type="text" name="Dateformat"/></td>
    </tr>
    <tr>
    <td>Category</td>
    <td><select name="catagory" size="1">
    <option></option>
    <option>Business</option>
    <option>Education</option>
    <option>Entertainment</option>
    <option>Food</option>
    <option>Hobbies</option>
    <option>Personal</option>
    <option>Politics</option>
    <option>Sports</option>
    </select></td>
    </tr>
    <tr>
    <td>Enter your text here:</td>
    <td><textarea name="textarea" cols="45" rows="5"></textarea></td>
    </tr>
    <tr>
    <td><span class="style1">*</span>Upload Image <span class="style5">(.jpg
              or .gif)</span></td>
    <td><input type="file" name="uploadimage" /></td>
    </tr>
    <tr>
    <td></td>
    <td><input type="submit" value="save">
    <input type="reset" name="reset" value="Reset" /></td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    Your javascript code contains a syntax error. That's why the function isn't being called. Take a look at this line in your code.
    if ((m>12 && m<100) || (m> = 100 && m<1000) || (m==0))Notice the space between > and =. Remove that space.
    m >= 100

  • How to call LSMW from a Report program

    Hi,
    I have a requirment of extending vendor master data (Companycode data and Purchasing Organization data ) through Tcode XK02 using LSMW.Also I need to generate an error log file for validating the data from flat file and  must have an export option of the error log file.
    Can you help me how to proceed on this in steps.
    Also pls let me know how to call LSMW transaction through a Report.
    Based on the selection criteria I need to maintain two source structues,one for companycode data and the other for Purchasing Orgnization data for uploading  data thru LSMW.How to do this?
    pls respond ASAP,
    Thanks,
    Nagendra

    Hi,
    create 2 LSMW object (under same project and subproject)..
    one for extended vendor master data for company code data and other for  extended purchase organization data for company code data.
    Now check the radio buttons and based on that populate ur LSMW object.
    Store project
      project = < >.
    Store subproject
      subproj = < >.
    Store object
      object  = '6GSC022_TS3'.
    if r_ccode = 'X'.
    Store object
      object  = < >.
    else.
    Store object
      object  = < >.
    endif.
    Call the function module to display object (LSMW) maintenance screen
      CALL FUNCTION '/SAPDMC/LSM_OBJ_STARTER'
        EXPORTING
          project        = project
          subproj        = subproj
          object         = object
        EXCEPTIONS
          no_such_object = 1
          OTHERS         = 2.
    Generating error log:
    After the checking the field if u think for this u need to generate error message then In the Maintain Field Mapping and Conversion Rules option under the required field write the following code:
    data: v_msgtxt(100) type c.
    message  <msg ID>    <message type>   <message no>
                     with   <var1>  <var2>
                     into v_msgtxt.
    write v_msgtxt.
    Follow the next step in LSMW object till you reach the option  Convert Data.
    After you execute this option you will get the desired message here.
    Regards,
    Joy.

  • How to call methods from within run()

    Seems like this must be a common question, but I cannot for the life of me, find the appropriate topic. So apologies ahead of time if this is a repeat.
    I have code like the following:
    public class MainClass implements Runnable {
    public static void main(String args[]) {
    Thread t = new Thread(new MainClass());
    t.start();
    public void run() {
    if (condition)
    doSomethingIntensive();
    else
    doSomethingElseIntensive();
    System.out.println("I want this to print ONLY AFTER the method call finishes, but I'm printed before either 'Intensive' method call completes.");
    private void doSomethingIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    private void doSomethingElseIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    }Question: how do you call methods from within run() and still have it be sequential execution? It seems that a method call within run() creates a new thread just for the method. BUT, this isn't true, because the Thread.currentThread().getName() names are the same instead run() and the "intensive" methods. So, it's not like I can pause one until the method completes because they're the same thread! (I've tried this.)
    So, moral of the story, is there no breaking down a thread's execution into methods? Does all your thread code have to be within the run() method, even if it's 1000 lines? Seems like this wouldn't be the case, but can't get it to work otherwise.
    Thanks all!!!

    I (think I) understand the basics.. what I'm confused
    about is whether the methods are synced on the class
    type or a class instance?The short answer is; the instance for non-static methods, and the class for static methods, although it would be more accurate to say against the instance of the Class for static methods.
    The locking associated with the "sychronized" keyword is all based around an entity called a "monitor". Whenever a thread wants to enter a synchronized method or block, if it doesn't already "own" the monitor, it will try to take it. If the monitor is owned by another thread, then the current thread will block until the other thread releases the monitor. Once the synchronized block is complete, the monitor is released by the thread that owns it.
    So your question boils down to; where does this monitor come from? Every instance of every Object has a monitor associated with it, and any synchronized method or synchonized block is going to take the monitor associated with the instance. The following:
      synchronized void myMethod() {...is equivalent to:
      void myMethod() {
        synchronized(this) {
      ...Keep in mind, though, that every Class has an instance too. You can call "this.getClass()" to get that instance, or you can get the instance for a specific class, say String, with "String.class". Whenever you declare a static method as synchronized, or put a synchronized block inside a static method, the monitor taken will be the one associated with the instance of the class in which the method was declared. In other words this:
      public class Foo {
        synchronized static void myMethod() {...is equivalent to:
      public class Foo{
        static void myMethod() {
          synchronized(Foo.class) {...The problem here is that the instance of the Foo class is being locked. If we declare a subclass of Foo, and then declare a synchronized static method in the subclass, it will lock on the subclass and not on Foo. This is OK, but you have to be aware of it. If you try to declare a static resource of some sort inside Foo, it's best to make it private instead of protected, because subclasses can't really lock on the parent class (well, at least, not without doing something ugly like "synchronized(Foo.class)", which isn't terribly maintainable).
    Doing something like "synchronized(this.getClass())" is a really bad idea. Each subclass is going to take a different monitor, so you can have as many threads in your synchronized block as you have subclasses, and I can't think of a time I'd want that.
    There's also another, equivalent aproach you can take, if this makes more sense to you:
      static final Object lock = new Object();
      void myMethod() {
        synchronized(lock) {
          // Stuff in here is synchronized against the lock's monitor
      }This will take the monitor of the instance referenced by "lock". Since lock is a static variable, only one thread at a time will be able to get into myMethod(), even if the threads are calling into different instances.

  • How to call procedure from OCI ?

    How to call oracle procedure from OCI ?

    Following works on Windows, your mileage may vary. IIRC one of the standard OCI examples that install with the libraries demonstrates this too.
    /* SQL to create table and Stored Procedures */
    Create table OCI8StoredProcedureSampleTable
              (field1 number(5), field2 varchar2(30));
    CREATE OR REPLACE PROCEDURE OCI8StoredProcedureSample3
    (field1 number, field2 IN OUT varchar2)
    is
    begin
    insert into OCI8StoredProcedureSampleTable values (field1, field2);
    Commit;
    field2 := 'Successful';
    end;
    CREATE OR REPLACE PROCEDURE OCI8StoredProcedureSample4
    (field1 number, field2 char, field3 OUT varchar2)
    is
    begin
    insert into OCI8StoredProcedureSampleTable values (field1, field2);
    Commit;
    field3 := 'Successful';
    end;
    CREATE OR REPLACE FUNCTION OCI8StoredProcedureSample5
    RETURN VARCHAR2
    is
    v_Sysdate DATE;
    v_charSysdate VARCHAR2(20);
    begin
    SELECT TO_CHAR(SYSDATE, 'dd-mon-yyyy') into v_charSysdate FROM DUAL;
    return(v_charSysdate);
    end;
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <oci.h>
    static void checkerr (OCIError *p_err, sword status);
    void main()
    OCIEnv          *p_env;
    OCIError     *p_err;
    OCISvcCtx     *p_svc;
    OCIStmt          *p_sql;
    OCIBind p_Bind1 = (OCIBind ) 0;
    OCIBind p_Bind2 = (OCIBind ) 0;
    OCIBind p_Bind3 = (OCIBind ) 0;
    OCIDefine p_define1 = (OCIDefine ) 0;
    char field2[20] = "Entry 3";
    char *field3;
    //char field3[20];
    sword field1 = 3;
    text mySql = (text ) "Begin OCI8StoredProcedureSample3(:field1, :field2); END;";
    printf("OCIInitialize\n");
    checkerr(p_err, OCIInitialize((ub4) OCI_OBJECT,
              (dvoid *) 0, (dvoid * (*) ()) 0,           
              (dvoid * (*) ()) 0, (void (*) ()) 0));
    printf("OCIEnvInit\n");
    checkerr(p_err, OCIEnvInit(&p_env, (ub4) OCI_DEFAULT,
                        (size_t) 0, (dvoid **)0));
    printf("OCIHandleAlloc\n");
    checkerr(p_err, OCIHandleAlloc(p_env, &p_err, OCI_HTYPE_ERROR,
                        (size_t) 0, (dvoid **) 0));
    printf("OCIHandleAlloc\n");
    checkerr(p_err, OCIHandleAlloc(p_env, &p_svc, OCI_HTYPE_SVCCTX,
                        (size_t) 0, (dvoid **) 0));
    printf("OCIHandleAlloc\n");
    checkerr(p_err, OCIHandleAlloc(p_env, &p_sql, OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0));
    printf("OCILogon\n\n");
    checkerr(p_err, OCILogon(p_env, p_err, &p_svc, "SCOTT", 5, "TIGER", 5, "V8", 2));
    /* Example 1 - Using an IN OUT Parameters */
    printf("*************************************************\n");
    printf("Example 1 - Using an IN OUT Parameters\n");
    printf("*************************************************\n");
    printf("     OCIStmtPrepare\n");
    printf("          %s\n",mySql);
    checkerr(p_err, OCIStmtPrepare(p_sql, p_err, mySql,
                        (ub4) strlen(mySql), OCI_NTV_SYNTAX, OCI_DEFAULT));
    printf("     OCIBindByPos 1\n");
    checkerr(p_err, OCIBindByPos(p_sql, &p_Bind1, p_err, 1, (dvoid *) &field1, sizeof(sword),
                             SQLT_INT, 0, 0, 0, 0, 0, OCI_DEFAULT));
    printf("     OCIBindByPos 2\n");
    checkerr(p_err, OCIBindByPos(p_sql, &p_Bind2, p_err, 2, field2, (sizeof(field2) - 1),
                             SQLT_CHR, 0, 0, 0, 0, 0, OCI_DEFAULT));
    printf("          Field2 Before:\n");
    printf("               size     ---> %d\n", sizeof(field2));
    printf("               length     ---> %d\n", strlen(field2));
    printf("               value     ---> %s\n", field2);
    printf("     OCIStmtExecute\n");
    checkerr(p_err, OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0, (OCISnapshot *)
                   NULL, (OCISnapshot *) NULL, (ub4) OCI_COMMIT_ON_SUCCESS));
    printf("          Field2 After:\n");
    printf("               size     ---> %d\n", sizeof(field2));
    printf("               length     ---> %d\n", strlen(field2));
    printf("               value     ---> %s\n", field2);
    /* Example 2 - Using OUT Parameters */
    field1 = 4;
    strcpy(field2, "Entry 4");
    printf("\n\n*************************************************\n");
    printf("Example 2 - Using OUT Parameters\n");
    printf("*************************************************\n");
    printf("     OCIStmtPrepare\n");
    strcpy(mySql,(text *) "Begin OCI8StoredProcedureSample4(:field1, :field2, :field3); END;");
    printf("     %s\n",mySql);
    checkerr(p_err, OCIStmtPrepare(p_sql, p_err, mySql,
                        (ub4) strlen(mySql), OCI_NTV_SYNTAX, OCI_DEFAULT));
    printf("     OCIBindByPos 1\n");
    checkerr(p_err, OCIBindByPos(p_sql, &p_Bind1, p_err, 1, (dvoid *) &field1, sizeof(sword),
                             SQLT_INT, 0, 0, 0, 0, 0, OCI_DEFAULT));
    printf("     OCIBindByPos 2\n");
    checkerr(p_err, OCIBindByPos(p_sql, &p_Bind2, p_err, 2, field2, strlen(field2),
                             SQLT_CHR, 0, 0, 0, 0, 0, OCI_DEFAULT));
    printf("     OCIBindByPos 3\n");
    checkerr(p_err, OCIBindByPos(p_sql, &p_Bind3, p_err, 3, field3, 19,
                             SQLT_CHR, 0, 0, 0, 0, 0, OCI_DEFAULT));
    printf("     OCIStmtExecute\n");
    checkerr(p_err, OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0, (OCISnapshot *)
                   NULL, (OCISnapshot *) NULL, (ub4) OCI_COMMIT_ON_SUCCESS));
    printf("          Field3 After:\n");
    printf("               size     ---> %d\n", sizeof(field3));
    printf("               length     ---> %d\n", strlen(field3));
    printf("               value     ---> %s\n", field3);
    /* Example 3 - Using a Function to Return a Value */
    printf("\n\n*************************************************\n");
    printf("Example 3 - Using a Function to Return a Value \n");
    printf("*************************************************\n");
    printf("     OCIStmtPrepare\n");
    strcpy(mySql,(text *) "SELECT OCI8StoredProcedureSample5 from DUAL");
    printf("     %s\n",mySql);
    checkerr(p_err, OCIStmtPrepare(p_sql, p_err, mySql,
                        (ub4) strlen(mySql), OCI_NTV_SYNTAX, OCI_DEFAULT));
    checkerr(p_err, OCIDefineByPos(p_sql, &p_define1, p_err, 1, (dvoid *) field3,
              (sword) 20, SQLT_STR, (dvoid *) 0, (ub2 *)0,          (ub2 *)0, OCI_DEFAULT));
    printf("     OCIStmtExecute\n");
    checkerr(p_err, OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0, (OCISnapshot *)
                   NULL, (OCISnapshot *) NULL, (ub4) OCI_COMMIT_ON_SUCCESS));
    printf("          The return value:\n");
    printf("               size     ---> %d\n", sizeof(field3));
    printf("               length     ---> %d\n", strlen(field3));
    printf("               value     ---> %s\n", field3);
    return;
    static void checkerr(errhp, status)
    OCIError *errhp;sword status;
    text errbuf[512];
    ub4 errcode;
    switch (status)
              case OCI_SUCCESS:
                   break;
              case OCI_SUCCESS_WITH_INFO:
                   printf("Error - OCI_SUCCESS_WITH_INFO\n");
                   break;
              case OCI_NEED_DATA:
                   printf("Error - OCI_NEED_DATA\n");
                   break;
              case OCI_NO_DATA:
                   printf("Error - OCI_NO_DATA\n");
                   break;
              case OCI_ERROR:
                   OCIErrorGet ((dvoid *) errhp, (ub4) 1, (text *) NULL, &errcode,
                             errbuf, (ub4) sizeof(errbuf), (ub4) OCI_HTYPE_ERROR);
                   printf("Error - %s\n", errbuf);
                   break;
              case OCI_INVALID_HANDLE:
                   printf("Error - OCI_INVALID_HANDLE\n");
                   break;
              case OCI_STILL_EXECUTING:
                   printf("Error - OCI_STILL_EXECUTE\n");
                   break;
              case OCI_CONTINUE:
                   printf("Error - OCI_CONTINUE\n");
                   break;
              default:
                   break;

  • How to call WDA from PCUI link.............

    Hi friends,
    I want to call a custom WDA from a standard PCUI button. Can someone tell me how to call this.
    Once the stndard button in PCUI view is clicked, my WDA has to be displayed.
    thanks in advance,
    Niraja

    Hi,
    As said by Thomas, the WDA is just like another HTML page with URL. So what you can do is Put an entry for the button in the action list. Then in application layout  put an entry for the new WDA application(specify it as popup). select the page type as HTML.
    This is more PCUI work than a WDA work.
    Thanks,
    selvakumar M.

  • How to call xsl from java?

    Hi All,
    My main java class 'OrderCustomerEntry' is located in package 'Order.Profiles.Customer'
    I have my xml input stored in a String object. Now I have stored a xsl in the same package 'Order.Profiles.Customer'.
    I make certain updations to my xml. After that, I have to call a xsl, which will finally do some transformations on my xml.
    Kindly tell me how to call this xsl file from java.
    Thanks,
    Sabarisri. N
    Edited by: Sabarisri N on Oct 11, 2011 11:15 AM

    This can be complicated with many factors coming into play. Suppose everything is set up in good order, if the xsl is stored in the jar containing the package Order.Profiles.Customer at its root. That means, the jar has some structure like this:
    Order/Profiles/CustomerOrderCustomerEntry.class
    META-INF/...
    xyz.xsl
    etcYou may try this when load it up.
    String xslFile="xyz.xsl";
    //tf being the factory
    Transformer transformer = tf.newTransformer(new StreamSource(ClassLoader.getSystemResourceAsStream(xslFile)));The change with respect to the case where the xslFile is in the current directory is the ClassLoader part.
    Suppose it is stored in a resource directory say "res".
    Order/Profiles/CustomerOrderCustomerEntry.class
    META-INF/...
    res/xyz.xsl
    etcThe corresponding lines would look like this.
    String xslFile="res/xyz.xsl";
    //tf being the factory
    Transformer transformer = tf.newTransformer(new StreamSource(ClassLoader.getSystemResourceAsStream(xslFile)));Hopefully, this may be enough to get you going...
    ps: Although no one should force anyone on the way to name packages, the majority in the industry uses all lowercase characters whenever possible.

Maybe you are looking for