HELP: collection as in parameter of SP using jdbc

Hi, everyone:
i'm trying to pass an array of int value to a stored_procedure using jdbc, but i cannot figure out how to write the exact code.
i always get the same exception: java.sql.SQLException: invalid name schema.
i have searched this section and found some examle(Call a procedure/function with an array as argument i tried that example code, but it cannot work too, the same exception.
here is my jdbc code:
String driver = "oracle.jdbc.driver.OracleDriver";
String strUrl = "jdbc:oracle:thin:@127.0.0.1:1521:test";
Connection conn = null;
Class.forName(driver);
conn = DriverManager.getConnection(strUrl, "zzuliTV", "123456");
CallableStatement proc = null;
proc = conn.prepareCall("{ call TEST_TABLE_INT_PARAM(?,?) }");
int elements[] = { 1, 2, 3, 4 };
ArrayDescriptor desc = ArrayDescriptor.createDescriptor("TEST_PACKAGE.ID_TABLE", conn);
//ARRAY aArray = new ARRAY(desc, conn, elements);
//proc.setInt(1,-1);
//proc.setArray(2, aArray);
//proc.execute();
proc.close();
conn.close();
pl/sql code:
create or replace
PACKAGE TEST_PACKAGE AS
type ID_TABLE is table of number(10,0);
END TEST_PACKAGE;
in the jdbc code, the statement "ArrayDescriptor desc = ArrayDescriptor.createDescriptor("TEST_PACKAGE.ID_TABLE", conn);" caused the exception.
i have tried the code "ArrayDescriptor.createDescriptor("ID_TABLE", conn);" or written the pl/sql nested table globally or written an varray instead, but all failed, always the same exception.
i use oracle 11g.
Could anyone help me, thanks a lot.

The error might be caused by your collection being defined inside of "TEST_PACKAGE", which I presume is a PL/SQL package.
JDBC does not support Object nor Collection types defined inside packages.
So, your attempt to globally define your "ID_TABLE" is the correct way to go.
create type id_table as table of integer;
or
create type id_table as varray(#) of integer;
Both are valid global definitions. I think that you said that you tried this unsuccessfully.
You may want to try rewriting your elements declaration as follows.
int elements\[] = new int\[]{1, 2, 3, 4};
However, your declaration is probably fine. Another suggestion is to use CallableState.setObject() instead of setInt() and setArray().
proc.setObject(1, new Integer(-1));
proc.setObject(2, aArray);
Also note that for 11g, the driver class is "oracle.jdbc.OracleDriver"
Only other thing I can think of is to make sure the collection is defined in your schema or, if another, you have permission to it.
That's all I can think of. Here is a link that describes using collections with JDBC. You may find it useful.
http://st-doc.us.oracle.com/11/111/java.111/b31224/oraarr.htm#g1072333

Similar Messages

  • HELP:Problem in creating a temporary CLOB using JDBC connection pooling

    Hi All,
    i am inserting a large xml document in an xml type column by creating a temporary clob of this document
    tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
    I am not having any success getting the following statement working using a JDBC connection pool rather than a hard coded URL connection
    it works with:
    "jdbc:oracle:thin:@server:port:dbname" connection
    Does NOT work with:
    datasource.getConnection()
    Does any one know how to successfully get this to work?
    urgently plz........

    Hi Dharmi
    Here is a quote of Dafna's post in [another thread in this forum|Re: Copy VC controls]
    CE7.1.1 will be released at September 2008 for ramp-up customers.
    There are many improvements and new capabilities in the new release of Visual Composer for CE7.1.1. Among the new features you can find:
    The missing features from Visual Composer 7.0 (Html view, portal Eventing support (EPCM), JDBC, Undo/Redo, and more..)
    Many layout & modeling improvements
    Additional ALV table functionality - export to Excel, switch to chart, configure ALV behavior at design time
    Integration of Visual Composer in Eclipse - additional entry point to the Visual Composer models from the NWDS. This integration provides the option to add a WD component (in case of missing functionality in Visual Composer), as a black box component to the Visual Composer model. Right-clicking the component will open the Web Dynpro perspective for creating/modifying the component.
    Regards,
       Shai

  • Calling a stored procedure with VARRAY as out parameter using JDBC

    Hi,
    I want to use the data type VARRAY as an out parameter in an Oracle stored procedure. I want to call the stored procedure from
    my java program using JDBC.
    I'm using Oracle 8.1.5 for Windows NT.
    Please help me.
    Thanks
    Sumanta
    null

    Originally posted by JDBC Development Team:
    It's very similar to other datatype except that it uses OracleTypes.ARRAY typecode and the value is mapped to a oracle.sql.ARRAY instance. The code looks as follows --
    cstmt.registerOutParameter (idx, OracleTypes.ARRAY, "VARRAY_TYPE_NAME_HERE");
    cstmt.execute ();
    ARRAY array = (ARRAY) cstmt.getObject (idx);
    Thanks for your reply.
    I have to use:-
    OracleCallableStatement cs1 = (OracleCallableStatement )conn.prepareCall
    ( "{call proj_array(?)}" ) ;
    for retrieving a collection as an OUT parameter.
    This gives me the errors:-
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Blob getBlob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Array getArray(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Clob getClob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Ref getRef(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    How do I get rid of these errors?
    null

  • Help collection not available except in English

    Hello , 
    The Help button is only available when the user has configured his locals in en-us (1033).
    Multi-language is activated, , language pack are on the server. 
    On bellow, you can see the Regional and Language configuration for the site 
    URL for 1033 : 
    https://xxxxxxxx.com/_layouts/15/help.aspx?Lcid=1033&Key=WSSEndUser&ShowNav=true
    --> No error 
    URL for 1036 : 
    https://xxxxxxxx.com/_layouts/15/help.aspx?Lcid=1036&Key=WSSEndUser&ShowNav=true
    --> Message in the help popup :
    Sorry ... It seems that help does not work.
    Sorry ... No help collection is available in the current language for the site you use.
    Any Idea? 

    Did you resolve the issue? I have exactly the same trouble....

  • Can you please tell me how can i change the parameter of Applet using Aspec

    Respect Members
    Can we apply Aspectwerkz on Applet? In our project we have to
    change the method parameters before its execution(Around Advice) , can we do this in applet using Aspectwerkz?
    Can you please tell me how can i change the parameter of Applet using Aspectwerkz or AspectJ ?
    I did it by for Java Application using the AspectJ And Aspectwerkz But not able to do for Applet.
    For Applet I Am setting the parameter in JAVA plug in for Aspectwerkz e.g. -Xdebug -Xrunaspectwerkz -Xbootclasspath & path for xml file in which pointcut is defined.
    If you any Friend working on it or any author who might be helpfull for me please Forward this mail to him/her
    THANKs in Advance
    [email protected]

    hello rodale, what you're seeing is probably a side effect of firefox not being able to save certain preferences into its profile folder.
    go to ''firefox > help > troubleshooting information'', click on ''profile folder/show folder'' and close all firefox windows afterwards. a windows explorer window should open up - in there delete the file named '''user.js'''.
    in case this didn't solve the issue yet please also refer to [[How to fix preferences that won't save]].

  • ORA-07202 sltln: invalid parameter to sltln.using

    OS:Red Hat Linux 5
    DB :11.2.0.2
    i am getting this error while creating 11g DB using DBCA ORA-07202 sltln: invalid parameter to sltln.using dbca to create

    Please check this thread (response from PavanG):
    ORA-07202 while creating DB
    Even though your DB version is 11g but this thread may help solve your problem.

  • Help setting Parameters using JDBC and Bind Variables for Oracle List

    I fully understand the concept of using Bind Variables when using JDBC to avoid hard parses everytime my SQL statement is executed when only a certain value changes. For example, perhaps I have the following statement:
    PreparedStatement ps = con.prepareStatement("select salary from employees where employee_id = ?");
    I would then set the value of the question mark (the first and in this case only parameter) using:
    ps.getStmt().setString(1,empId1);
    That is assuming I have the variable empId1 populated with what I want. Anyway, my question has to do with Oracle lists. In other words, if I am just executing the statement against the db, it might look like:
    select salary from employees where employee_id in ('123','456','789');
    I still want to use bind variables and I can do it in JDBC with something like:
    select salary from employees where employee_id in ('123','456','789');
    ps.getStmt().setString(1,empId1);
    ps.getStmt().setString(2,empId2);
    ps.getStmt().setString(3,empId3);
    BUT, what if I just want to construct my list of ids upfront as a string and do something like:
    select salary from employees where employee_id in (?)
    ps.getStmt().setString(1,listOfEmpIds);where listOfEmpIds would look something like '123','456','789'.
    That's what I want to do but it doesn't work. It would be treating the list as a single parameter as opposed to lots of individual parameters. Can someone please tell me the syntax for this if it is possible? I have tried where XX in (?) and where XX in ? (and the string I substitute has the parenthesis in it), but neither work.
    Thank you for your help.

    I always build the list myself.
    You could, however, pass the list as a varchar to a stored proc and then have the stored proc parse (or dynamically execute) using it.
    The second method might even be faster although I would suspect that is only going to be the case if the list is very large. Or it might not.

  • [TimesTen]TT2778: Cannot infer type of parameter from its use

    Hi,
    On Timesten [[TimesTen 11.2.1.5.0 ] the below query results in error TT2778.
    SELECT COUNT(1) cnt123 FROM DUAL WHERE %Var1String LIKE %Var2String,
    Here both Var1String and Var2String are variables of String type.
    Error Trace:
    Caused by: java.sql.SQLException: [TimesTen][TimesTen 11.2.1.5.0 ODBC Driver][TimesTen]TT2778: Cannot infer type of parameter from its use -- file "saCanon.c", lineno 16963, procedure "inferExprTNLike()"
    at com.timesten.jdbc.JdbcOdbc.createSQLException(JdbcOdbc.java:3287)
    at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:3436)
    at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:3401)
    at com.timesten.jdbc.JdbcOdbc.SQLPrepare(JdbcOdbc.java:2285)
    at com.timesten.jdbc.JdbcOdbcPreparedStatement.<init>(JdbcOdbcPreparedStatement.java:194)
    at com.timesten.jdbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:342)
    Any pointer will be of great help.
    Thanks and Regards,
    Sud

    While TimesTen has a high degree of compatibility with Oracle DB SQL there are still some significant differences due to them being essentially different products from a different origin. For example, Timesten is not really compatible with Oracle in terms of the bind-mode. Oracle uses late bind-mode and prepares queries on the first execution. TimeTen employs early bind-mode and TimesTen needs the data type before preparing queries. Because of this, the query you mentioned has different behavior in Timesten and Oracle.
    You can work around this in TimesTen using somethign like the following:
    SELECT COUNT(*) cnt123 FROM DUAL WHERE CAST(%Str1 AS VARCHAR2(1000)) like CAST(%Str2 AS VARCHR2(1000));
    Chris

  • Help: Connecting Tomcat to CA-IDMS Using JDBC Type 4 Drivers (JNDI)

    Hi there,
    I have a rather interesting / complex problem......creating a connection to CA-IDMS from Tomcat using JDBC type 4 drivers (CA provide the type 4 driver).
    We have a zSeries 9 IBM mainframe running CA-IDMS r16.1, and I need to connect to the IDMS from Tomcat (running on Linux) using the JDBC Type 4 drivers provided by CA.
    At this stage I am struggling with the actual setup and configuration of Tomcat’s server.xml and web.xml files. These are the files where the JDBC configuration is set (I think). I have to setup the CA-IDMS part of the configuration, but that is a different problem. Basically there is a TCP/IP listener on the IDMS, waiting for incoming connections from the JDBC type 4 driver.
    I set up a Tomcat to MySQL connection using MySQL Connector / J, which is a similar kind of process to what I am trying to achieve with IDMS. MySQL connector / J came with a jar file which is placed in Tomcat’s lib folder, and then the JDBC setup for the web application is created in Tomcat's server.xml and web.xml files. You can then connect to the MySQL database using JSP and the configured JDBC driver / connection. The CA-IDMS Server comes with an idmsjdbc.jar file, which I think is the JDBC typr 4 driver. I think it needs to be placed in the Tomcat /lib folder, but I don’t know how to set up the configuration.
    There is a JDBC DriverManager which allows JDBC drivers to connect to CA-IDMS. The DriverManager recognises the following syntax:
    jdbc:idms://hostname:port/database
    This allows the JDBC driver running within Tomcat to connect to the IDMS which is running on the IDM mainframe. CA IDMS r16 supports direct connections from the Type 4 JDBC driver to the Central Version on IDMS. "hostname" is the DNS name or IP address of the machine where the CV is running, and "port" is the IP port that was specified for the listener PTERM (setup on the IDMS side).
    There is a caidms.properties file for the JDBC driver, which is used to specify user ID, password, and optional accounting information. It can also be used to specify physical connection information, allowing an application to connect to a CA-IDMS database without requiring the definition of an ODBC style data source. However, I don’t know where to place this file within the Tomcat setup.
    There is also an IdmsDataSource class. I don’t know where to configure this or how to set it up; the CA-IDMS Server manual states the following:
    This class implements the JDBC DataSource interface. It is used with an application server (Tomcat) providing Java Naming and Directory Interface (JNDI) naming service to establish a connection to a CA IDMS database. IdmsDataSource properties conform to the Java Beans naming conventions and are implicitly defined by public “setter” and “getter” methods. For example, the “description” property, which is required for all DataSource implementations, is set using the setDescription(String) method. The application server may use the java.lang.reflection methods to discover DataSource properties and provide an interface to set them, or may simply require that they are defined in some configuration file. IdmsDataSource properties are used to specify the connection parameters. These properties are the equivalent of the DriverPropertyInfo attributes described in the previous section and can be used to completely define the parameters needed to connect to a database. Like a URL, an IdmsDataSource object can also reference an “ODBC” style data source name, where the connection parameters are defined in the configuration file on Linux.
    Is there anyone that can try to point me in the right direction to setting up the JDBC connection? I am totally new to Java and so the instructions are not making much sense at the moment. Any help, hints, tips…..anything will be greatly appreciated as I have just hit a brick wall here. I can't find much to do with setting up the CA-IDMS Server JDBC type 4 driver online either....if anyone can point me to some resources that would also be extremely useful.
    Kind regards
    Jp

    You say you've managed to get the JDBC driver working
    in an application but not in a JSP. You also say that
    the error you get is
    "com.microsoft.jdbc.sqlserver.SQLServerDriver".
    I'd be willing to bet that the exception that you have
    got is a ClassNotFoundException. I.E. your application
    server hasn't found the JDBC driver classes. The
    application server probably doesn't use your current
    CLASSPATH to look for classes. It will be setup within
    the application server in some way and you'll need to
    check your app server documentation to see how it is
    done.
    Try replacing
    e.printStackTrace();with
    e.printStackTrace(out);to get a full stack trace of your error.
    ColTried it. Got this error when I tried to run the JSP.
    Incompatible type for method. Can't convert javax.servlet.jsp.JspWriter to java.io.PrintWriter.
              e.printStackTrace(out);
    I'm currently using Apache Tomcat 4.0.3 as my JSP/Servlet Container.
    I'm also using Type 4 MS SQL Server 2000 JDBC driver version 2.0 on my NT4.0 Server.
    Do I need to set my JDBC driver in my container? if so, how do I do that?

  • Help needed Displaying ALV  Secondary list without using oops concept

    Hi Experts
    Help needed Displaying ALV  Secondary list without using oops concept.
    its urgent
    regds
    rajasekhar

    hi chk this code
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
         I_CALLBACK_PF_STATUS_SET       = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
         IS_VARIANT                     = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_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
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       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.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'Z50651_PFSTATUS' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    REPORT  Z_ALV_INTERACTIVE  MESSAGE-ID ZMSG_50651
                                    LINE-SIZE 100
                                    LINE-COUNT 60
                                    NO STANDARD PAGE HEADING.
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
       I_CALLBACK_PF_STATUS_SET         = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
        IS_VARIANT                      = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_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
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       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.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
      SUBMIT SLIS_DUMMY WITH P_MATNR EQ IT_VBAP-MATNR
                        WITH P_MTART EQ V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    plz reward if useful

  • I can't find the 2G, 3G and LTE options after updating to iOS8.1, can anyone help me with this? I'm using iPhone5s

    I can't find the 2G, 3G and LTE options after updating to iOS8.1, can anyone help me with this? I'm using iPhone5s

    I have check on my service provider about the correct APN settings, but unfortunately doesnt work still..

  • How to pass Cascading Parameter in SSRS using Java

    How to pass Cascading Parameter in SSRS using Java---
    We are having a problem with dependent parameters.There are three drop down--
    1.first dropdown is of Country.When we select a country--Accordingly next dropdown(State)will populate
    2.Second dropdown is of State. When we select a state--Accordingly next dropdown(City)will populate.
    I have three data sources are
    CountryList-
    SELECT CountryRegionCode, Name
    FROM Person.CountryRegion
    ORDER BY Name
    StateList
    SELECT StateProvinceID, StateProvinceCode, CountryRegionCode
    FROM Person.StateProvince
    WHERE CountryRegionCode = @CountryRegionCode
    ORDER BY StateProvinceCode
    CityList
    SELECT StateProvinceID, City
    FROM Person.Address
    GROUP BY StateProvinceID, City
    HAVING (StateProvinceID = @StateProvinceID)
    ORDER BY City
    Ihave to show report that has been deployed on server on the besis of these parameters
    I am using ReportViewer in JSP Page through url--
    http://192.168.90.149/ReportServer/Pages/ReportViewer.aspx?%2fReport+Project1%2fCascading_Parameters&rs:Command=Render&rs:parameter=true&Country="+Country+"&State="+State;
    But it is not accepting parameter if they are cascaded.It is working fine if Both parameters are independent.
    Edited by: kaushlee on May 11, 2010 9:22 PM

    Take a look at set_custom_property:
    public static final ID SETTEXT = ID.registerProperty("SETTEXT");
    public boolean setProperty(ID pid, Object value)
        if (pid == SETTEXT)
    String text = value.toString();
    and in forms
    set_custom_property('beans.bean_item', 1, 'SETTEXT', 'some text');
    cheers

  • I've a problem which is: Ibelieve there's someone who knows my password in some games like "Happy Day" so, could you please help me by not letting anybody to use this game except for this IMEI 01 336000 521261 1 even if they have the correct password.

    I've a problem which is: Ibelieve there's someone who knows my password in some games like "Happy Day" so, could you please help me by not letting anybody to use this game except for this IMEI 01 336000 521261 1 even if they have the correct password. Thanks alot for your help.

    Change your password.
    These are user forums. We can't do what you ask, in fact no one can.

  • Please help. When exporting a 720p video using Quicktime Conversion in FCP it saves some extra temporary files to my computer. The file is called ICMMultiPassStorage. This file gets so large that eventually the program and exporting process crashes.

    Please help. When exporting a 720p video using Quicktime Conversion in FCP it saves some extra temporary files to my computer. The temporary file it saves is called ICMMultiPassStorage. This file gets so large that eventually the program and exporting process crashes. I have been able to locate the file using GrandPerspective and close out of FCP to delete it. But when I try exporting the movie again it creates the ICMMultiPassStorage file again. I have made sure my scratch disks are set to my external hard drive so I know that isn't the issue. How do I fix this problem so these temporary files are not being stored on my internal hard drive instead of my external?Thanks!

    Try exporting the timeline "using current settings" via Make QuickTime Movie, then submit that clip to Compressor for the transcode. This should be faster and less painful.

  • From scorecard Pass parameter to be used as Measure in query of analytic Grid report in PPS in SP2013

    From scorecard Pass parameter  to be used as Measure in query of analytic grid report in PPS
    Any idea of how we can pass this parameter while connecting scorecard and report
    any use of MDX in connection formula ?
    Parameter needs to be assigned on click of scorecard cell

    Hi,
    That API has restrictions on its usage. Please see http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_util.htm#CHDICGDA
    The lines to be referred to are Also, this method requires that the parameters that describe the BLOB to be listed as the format of a valid item within the application. That item is then referenced by the function.Regards,
    PS: Your report must be on Page 98 , so it is able to reference the item P98_NAV_IMAGE. List being a Shared Component it may not be able reference that Item.
    Edited by: Prabodh on May 28, 2012 3:16 PM

Maybe you are looking for

  • Applet-Servlet - Creating a new file on client's mashine

    Hi all! I need to write a program, that will get a data from client through Applet text fields and save it to a new(or rewrite existing) file on client mashine. To save it, I want to use Servlet, because Applet can't do this because of security restr

  • Why can't I see my PayPal payment option in my iTunes account?

    Sorry, hit send too soon.  Tried to download from app store for last 2 days, but it said that I have to verify my PayPal account.  Nothing wrong with PayPa (verified thru PayPal) but I don't even see a PayPal option in my iTunes account.  I Remember

  • SB Audigy 2ZS clicking quest

    Before I go through the hassle of tweaking all kinds of settings in windows and scrubbing and reinstall drivers (and thereby getting progressi'vely more frustrated), I want to see if anyone else has had the same problem I am and if they found a solid

  • Alpha netting flag

    Hello All, I am sending the unpaid details info i.e. customer/vendor open items information to legacy. I need to send the Alpha-netting flag information too. What is this will indicates? Does any body know the field name that refers to Alpha netting

  • Swf url links not working on local files

    Tearing my hair out on this one. I have simple swf files with links to html pages in the same directory - they work fine on the internet, but not when they're local. I'm on a mac osx 10.4.11 FireFox and Safri. Flash pro cs3. I need the links to work