Problem using parameter IT_EVENT_EXIT of FM   'REUSE_ALV_GRID_DISPLAY'

Hi,
I am working with FM 'REUSE_ALV_GRID_DISPLAY' .
Now when i am trying to use the parameter IT_EVENT_EXIT according to the FM documentation, its not responding accordingly.
I want that when i press the menu button for "DESELECT ALL' , i should be able to respond to the execution of the standard function before the ALV does it.
*&      Form  Z8_EVENT_EXIT
      text
-->  p1        text
<--  p2        text
form Z8_EVENT_EXIT .
DATA : L_EVENT_EXIT TYPE SLIS_EVENT_EXIT.
REFRESH R_EVENT_EXIT.
L_EVENT_EXIT-UCOMM = '&SAL'.
L_EVENT_EXIT-BEFORE = 'X'.
APPEND L_EVENT_EXIT TO R_EVENT_EXIT.
CLEAR R_EVENT_EXIT.
endform.                    " Z8_EVENT_EXIT
FORM Z8_PERFORM_ALV_GRID .
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
   IT_EVENT_EXIT                     = R_EVENT_EXIT
ENDFORM.

In fact, you should use the 'USER_COMMAND' routine to put your code, not the 'EVENT'.
eg :
*       ITAB_user_command                                             *
FORM itab_user_command  USING ucomm TYPE sy-ucomm
                        s_selfield TYPE slis_selfield.
    WHEN '&IC1'.
*     Call Transaction MM03
      IF s_selfield-fieldname = 'MATNR' .
            READ TABLE itab INDEX s_selfield-tabindex.
            SET PARAMETER ID 'MAT' FIELD itab-matnr.
            SET PARAMETER ID 'WRK' FIELD itab-werks.
        CALL TRANSACTION 'MD04' AND SKIP FIRST SCREEN.
      ENDIF.
  ENDCASE.
ENDFORM. "ITAB_user_command
Regards,
Erwan

Similar Messages

  • Problems using event structure to write new parameter values to VISA

    Attachments:
    FMA_event_2.vi ‏28 KB
    FMA_event_2.vi ‏28 KB

    It seems I'm also having trouble using forums..not sure what happened...updated and corrected thread: http://forums.ni.com/t5/LabVIEW/Problems-using-event-structure-to-write-new-parameter-values-to/td-p...

  • How to use parameter id in report

    dear all
    please solve this problem
    i use parameter id in alv report and i call another report i m unable to pass parameter to another report
    regards
    abhilash

    Hi,
    Here is the example
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid,
          gt_events     type slis_t_event,
          gd_prntparams type slis_print_alv.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform build_events.
    perform build_print_params.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you  more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
                  I.e. Field type may be required in-order for
                       the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
                it_events               = gt_events
                is_print                = gd_prntparams
                i_save                  = 'X'
               is_variant              = z_template
           tables
                t_outtab                = it_ekko
           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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL
    Form  TOP-OF-PAGE                                                 *
    ALV Report Header                                                 *
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader,
          t_line like wa_header-info,
          ld_lines type i,
          ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
                        into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = t_header.
               i_logo             = 'Z_LOGO'.
    endform.
          FORM USER_COMMAND                                          *
          --> R_UCOMM                                                *
          --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
      Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
        Read data table, using index of row user clicked on
          READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
        Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
        Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDCASE.
    ENDFORM.
    *&      Form  BUILD_EVENTS
          Build events table
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = gt_events[].
      read table gt_events with key name =  slis_ev_end_of_page
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
        read table gt_events with key name =  slis_ev_end_of_list
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " BUILD_EVENTS
    *&      Form  BUILD_PRINT_PARAMS
          Setup print parameters
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " BUILD_PRINT_PARAMS
    *&      Form  END_OF_PAGE
    form END_OF_PAGE.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  END_OF_LIST
    form END_OF_LIST.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    Regards
    Mudit

  • Problem getting parameter  values at the service end point

    I am having problem getting parameter values at the service end point. I created service end point and this method is having 35 parameters and then i created test client file using Sun One Studio 5. but when i run this test client and make a call to service it sends wrong value to first three parameters to the service end point. I tried all the way round but it gave me same sort of problem. I change the order of parameters change the names of parameters but it didn�t work. And then i started chopping of parameter from the left side. And my problem is solved when my parameter list reached to 12 from 35. So is it a bug or some problem with my configuration or some thing else.
    I am using sun one studio 5 with sun one app 7. My service end point does very simple thing. It only takes out put of the parameter to the server log file. And my wsdl file seems all right. There is no conflict with the count and data type of the parameter information it contains.
    �     Service End Point Definition (in EJB)
    public java.lang.String setNewAddress(java.lang.String propertyName, java.lang.String status, java.lang.String PMSCode, java.lang.String streetNumPrefix, int streetStartNum, java.lang.String streetStartNumSuffix, int streetEndNum, java.lang.String streetEndNumSuffix, java.lang.String streetName, java.lang.String streetType, java.lang.String streetSuffix, java.lang.String localityPrefix,java.lang.String localityName, java.lang.String postcode, java.lang.String stateCode, java.lang.String countryCode, java.lang.String description, java.lang.String coordinateAccuracy, int longitude, int latitude, java.lang.String planNumber, java.lang.String lotPrefix, int lotNumber, int siteID, java.lang.String countryName, java.lang.String parishName, java.lang.String section, int portionNum, int crownAllotNum, int titleVol, java.lang.String folio, java.lang.String esa, int aliasID, int aliasTagID,String ID) {
    System.out.println(propertyName);
    System.out.println(PMSCode);
    System.out.println(streetNumPrefix);
    ........ taking printout of all the paramters
    �     This is my WSDL file
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="NMService" targetNamespace="urn:NMService/wsdl" xmlns:tns="urn:NMService/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types/>
    <message name="NMServiceServantInterface_setNewAddress">
    <part name="String_1" type="xsd:string"/>
    <part name="String_2" type="xsd:string"/>
    <part name="String_3" type="xsd:string"/>
    <part name="String_4" type="xsd:string"/>
    <part name="int_5" type="xsd:int"/>
    <part name="String_6" type="xsd:string"/>
    <part name="int_7" type="xsd:int"/>
    <part name="String_8" type="xsd:string"/>
    <part name="String_9" type="xsd:string"/>
    <part name="String_10" type="xsd:string"/>
    <part name="String_11" type="xsd:string"/>
    <part name="String_12" type="xsd:string"/>
    <part name="String_13" type="xsd:string"/>
    <part name="String_14" type="xsd:string"/>
    <part name="String_15" type="xsd:string"/>
    <part name="String_16" type="xsd:string"/>
    <part name="String_17" type="xsd:string"/>
    <part name="String_18" type="xsd:string"/>
    <part name="int_19" type="xsd:int"/>
    <part name="int_20" type="xsd:int"/>
    <part name="String_21" type="xsd:string"/>
    <part name="String_22" type="xsd:string"/>
    <part name="int_23" type="xsd:int"/>
    <part name="int_24" type="xsd:int"/>
    <part name="String_25" type="xsd:string"/>
    <part name="String_26" type="xsd:string"/>
    <part name="String_27" type="xsd:string"/>
    <part name="int_28" type="xsd:int"/>
    <part name="int_29" type="xsd:int"/>
    <part name="int_30" type="xsd:int"/>
    <part name="String_31" type="xsd:string"/>
    <part name="String_32" type="xsd:string"/>
    <part name="int_33" type="xsd:int"/>
    <part name="int_34" type="xsd:int"/>
    <part name="String_35" type="xsd:string"/></message>
    <message name="NMServiceServantInterface_setNewAddressResponse">
    <part name="result" type="xsd:string"/></message>
    <portType name="NMServiceServantInterface">
    <operation name="setNewAddress" parameterOrder="String_1 String_2 String_3 String_4 int_5 String_6 int_7 String_8 String_9 String_10 String_11 String_12 String_13 String_14 String_15 String_16 String_17 String_18 int_19 int_20 String_21 String_22 int_23 int_24 String_25 String_26 String_27 int_28 int_29 int_30 String_31 String_32 int_33 int_34 String_35">
    <input message="tns:NMServiceServantInterface_setNewAddress"/>
    <output message="tns:NMServiceServantInterface_setNewAddressResponse"/></operation></portType>
    <binding name="NMServiceServantInterfaceBinding" type="tns:NMServiceServantInterface">
    <operation name="setNewAddress">
    <input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></input>
    <output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></output>
    <soap:operation soapAction=""/></operation>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
    <service name="NMService">
    <port name="NMServiceServantInterfacePort" binding="tns:NMServiceServantInterfaceBinding">
    <soap:address location="http://localhost:80/NMService/NMService"/></port></service></definitions>
    �     I followed steps given this example. http://developers.sun.com/prodtech/javatools/jsstandard/reference/docs/s1s5/stockapp.html.
    If some one know what is wrong. Is it me or some thing wrong with the method I followed. But I am sure that I followed exactly the same method as it given in examples. So if some one can guide me
    Thanks

    I just found that there is a bug with Sun One Studio 5. It creates faulty JSP file to test the client for the web services. With above problem I tested my web services using different developing environment such as Jdeveloper 10g. I created client stub using wsdl file generated by sun one studio. And made call to my web service and all the parameter reached perfectly at service end point. And then I used stub class created by sun one studio for the client and made the same call. And it also went well. So the problem is with the test application (JSP File) sun one creates for my web service.
    This is the majore problem i faced during the development. But still there is many problem along with this which is not seriouse enough but requires attension. I would like sun developers to make sun one studio IDE simpler and handy .

  • Report using Parameter Field

    Hi,
    I have designed one report using Parameter Field which is Cost Code (string).
    When I run my report, I ask to enter cost code. When I enter cost code 30, I get report for all transaction of cost code 30 and 300.
    How could I avoid this problem.
    Thanks
    Mithani

    Try with this
    {Project_cost.EXPENSES_Code} IN {?Cost Code}
    and also
    Check the query formed after giving the input parameter. Goto Database --> Show Sql Query.

  • How can avoid the  problem of Parameter Prompting when I submitting ?

    I am developing web application in visual studio 2008 in csharp.How can avoid the issue or problem of  Parameter Prompting when I send parameters programaticaly or dyanmicaly?  I am sending the values from .net web form to crystal report but it is still asking for parameters. so when i submit second time that is when the reports is being genereated. How can i solve this problem. Please help. The code Iam using is below.
       1. using System; 
       2. using System.Collections; 
       3. using System.Configuration; 
       4. using System.Data; 
       5. using System.Linq; 
       6. using System.Web; 
       7. using System.Web.Security; 
       8. using System.Web.UI; 
       9. using System.Web.UI.HtmlControls; 
      10. using System.Web.UI.WebControls; 
      11. using System.Web.UI.WebControls.WebParts; 
      12. using System.Xml.Linq; 
      13. using System.Data.OleDb; 
      14. using System.Data.OracleClient; 
      15. using CrystalDecisions.Shared; 
      16. using CrystalDecisions.CrystalReports.Engine; 
      17. using CrystalDecisions.Web; 
      18.  
      19.  
      20. public partial class OracleReport : System.Web.UI.Page 
      21. { 
      22.     CrystalReportViewer crViewer = new CrystalReportViewer(); 
      23.     //CrystalReportSource crsource = new CrystalReportSource(); 
      24.     int nItemId; 
      25.  
      26.     protected void Page_Load(object sender, EventArgs e) 
      27.     { 
      28.         //Database Connection 
      29.         ConnectionInfo ConnInfo = new ConnectionInfo(); 
      30.         { 
      31.             ConnInfo.ServerName = "127.0.0.1"; 
      32.             ConnInfo.DatabaseName = "Xcodf"; 
      33.             ConnInfo.UserID = "HR777"; 
      34.             ConnInfo.Password = "zghshshs"; 
      35.         } 
      36.         // For Each  Logon  parameters 
      37.         foreach (TableLogOnInfo cnInfo in this.CrystalReportViewer1.LogOnInfo) 
      38.         { 
      39.             cnInfo.ConnectionInfo = ConnInfo; 
      40.  
      41.         } 
      42.  
      43.  
      44.  
      45.  
      46.  
      47.  
      48.         //Declaring varibles 
      49.          nItemId = int.Parse(Request.QueryString.Get("ItemId")); 
      50.         //string strStartDate = Request.QueryString.Get("StartDate"); 
      51.         //int nItemId = 20; 
      52.         string strStartDate = "23-JUL-2010"; 
      53.  
      54.         // object declration 
      55.         CrystalDecisions.CrystalReports.Engine.Database crDatabase; 
      56.         CrystalDecisions.CrystalReports.Engine.Table crTable; 
      57.  
      58.  
      59.         TableLogOnInfo dbConn = new TableLogOnInfo(); 
      60.  
      61.         // new report document object 
      62.         ReportDocument oRpt = new ReportDocument(); 
      63.  
      64.         // loading the ItemReport in report document 
      65.         oRpt.Load("C:
    Inetpub
    wwwroot
    cryreport
    CrystalReport1.rpt"); 
      66.  
      67.         // getting the database, the table and the LogOnInfo object which holds login onformation 
      68.         crDatabase = oRpt.Database; 
      69.  
      70.         // getting the table in an object array of one item 
      71.         object[] arrTables = new object[1]; 
      72.         crDatabase.Tables.CopyTo(arrTables, 0); 
      73.  
      74.         // assigning the first item of array to crTable by downcasting the object to Table 
      75.         crTable = (CrystalDecisions.CrystalReports.Engine.Table)arrTables[0]; 
      76.  
      77.         dbConn = crTable.LogOnInfo; 
      78.  
      79.         // setting values 
      80.         dbConn.ConnectionInfo.DatabaseName = "Xcodf"; 
      81.         dbConn.ConnectionInfo.ServerName = "127.0.0.1"; 
      82.         dbConn.ConnectionInfo.UserID = "HR777"; 
      83.         dbConn.ConnectionInfo.Password = "zghshshs"; 
      84.  
      85.         // applying login info to the table object 
      86.         crTable.ApplyLogOnInfo(dbConn); 
      87.  
      88.  
      89.  
      90.  
      91.  
      92.  
      93.         crViewer.RefreshReport(); 
      94.          
      95.                 // defining report source 
      96.         crViewer.ReportSource = oRpt; 
      97.         //CrystalReportSource1.Report = oRpt; 
      98.          
      99.         // so uptill now we have created everything 
    100.         // what remains is to pass parameters to our report, so it 
    101.         // shows only selected records. so calling a method to set 
    102.         // those parameters. 
    103.      setReportParameters();  
    104.     } 
    105.  
    106.     private void setReportParameters() 
    107.     { 
    108.       
    109.         // all the parameter fields will be added to this collection 
    110.         ParameterFields paramFields = new ParameterFields(); 
    111.          //ParameterFieldDefinitions ParaLocationContainer = new ParameterFieldDefinitions(); 
    112.        //ParameterFieldDefinition ParaLocation = new ParameterFieldDefinition(); 
    113.         
    114.         // the parameter fields to be sent to the report 
    115.         ParameterField pfItemId = new ParameterField(); 
    116.         //ParameterField pfStartDate = new ParameterField(); 
    117.         //ParameterField pfEndDate = new ParameterField(); 
    118.  
    119.         // setting the name of parameter fields with wich they will be recieved in report 
    120.        
    121.         pfItemId.ParameterFieldName = "RegionID"; 
    122.  
    123.         //pfStartDate.ParameterFieldName = "StartDate"; 
    124.         //pfEndDate.ParameterFieldName = "EndDate"; 
    125.  
    126.         // the above declared parameter fields accept values as discrete objects 
    127.         // so declaring discrete objects 
    128.         ParameterDiscreteValue dcItemId = new ParameterDiscreteValue(); 
    129.         //ParameterDiscreteValue dcStartDate = new ParameterDiscreteValue(); 
    130.         //ParameterDiscreteValue dcEndDate = new ParameterDiscreteValue(); 
    131.  
    132.         // setting the values of discrete objects 
    133.          
    134.  
    135.           dcItemId.Value = nItemId; 
    136.          
    137.         //dcStartDate.Value = DateTime.Parse(strStartDate); 
    138.         //dcEndDate.Value = DateTime.Parse(strEndDate); 
    139.          
    140.         // now adding these discrete values to parameters 
    141.           //paramField.HasCurrentValue = true; 
    142.  
    143.        
    144.  
    145.           //pfItemId.CurrentValues.Clear(); 
    146.          int valueIDD = int.Parse(Request.QueryString.Get("ItemId").ToString()); 
    147.           pfItemId.Name = valueIDD.ToString();  
    148.            
    149.         pfItemId.CurrentValues.Add(dcItemId); 
    150.         //ParaLocation.ApplyCurrentValues; 
    151.         pfItemId.HasCurrentValue = true; 
    152.         
    153.         //pfStartDate.CurrentValues.Add(dcStartDate); 
    154.         //pfEndDate.CurrentValues.Add(dcEndDate); 
    155.  
    156.         // now adding all these parameter fields to the parameter collection 
    157.         paramFields.Add(pfItemId); 
    158.          
    159.         //paramFields.Add(pfStartDate); 
    160.         //paramFields.Add(pfEndDate); 
    161.         ///////////////////// 
    162.         //Formula from Crystal 
    163.        //crViewer.SelectionFormula = "{COUNTRIES.REGION_ID} = " + int.Parse(Request.QueryString.Get("ItemId")) + ""; 
    164.         crViewer.RefreshReport(); 
    165.         // finally add the parameter collection to the crystal report viewer 
    166.         crViewer.ParameterFieldInfo = paramFields; 
    167.         
    168.          
    169.      
    170.     } 
    171. }

    Keep your post to under 1200 characters, else you loose the formatting. (you can do two posts if need be).
    Re. parameters. First, make sure yo have SP 1 for CR 10.5:
    https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe
    Next, see the following:
    [Crystal Reports for Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23]
    CR Dev help file:
    http://msdn2.microsoft.com/en-us/library/bb126227.aspx
    Samples:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Problem in parameter query.

    Post Author: eaglesoft
    CA Forum: Data Connectivity and SQL
    I'm using Crystal reports xi. I have problem on parameter fields.    field name-EmployeeCode, datatype-String.In report,I kept the following query in selection expert,(EmployeeTable.EmployeeCode) like "" +{?employeeCode}  employeeCode-String Parameter,(while selecting Single option,it'll display in report that particular employeecode only), like "" (while selecting All option  in Jsp page,it'll display All employeecodes from database).Now, I have changed my EmployeeCode datatype as integerfield name-EmployeeCode, datatype-String.In Slection Expert, I'm facing problem on previous query "String required" ,though I kept employeeCode as number.(It should fit for Single and All Option)Pls help me on Previous query with integer datatype.

    Post Author: jlspublic
    CA Forum: Data Connectivity and SQL
    It appears that your problem comes from using "+" as the concatenation operator.  From the documentation for this operator:If you want to include a value from a numeric field (for example, an account
    balance), you must first convert that value to a text string using the ToText function:
    "Your account balance is " + ToText({file.BALANCE}) + "."
    Instead of casting, you could also switch to the "&" concatenation operator which gives the added benefit of avoiding subtle bugs when attempting to concatenate strings of numbers.

  • Problem using c:forEach

    I'm having a problem using c:forEach. Eclipse is telling me the problem is with the items parameter, and for the life of me, I cannot see why, since I could swear forEach uses an items parameter. Here is my code and the exception report. Can anyone please help? Thanks.
    <table>
         <c:forEach var="user" items="${users}">
              <tr>
                   <td>${user.name}</td>
                   <c:forEach var="education" items="${education}">
                        <td>${education.school}</td>
                        <td>${education.major}</td>
                        <td>${education.degree}</td>
                        <td>${education.gpa}</td>
                   </c:forEach>
                   <c:forEach var="employment" items="${employment}">
                        <td>${employment.employer}</td>
                        <td>${employment.jobtitle}</td>
                        <td>${employment.startdate}</td>
                        <td>${employment.enddate}</td>
                   </c:forEach>
              </tr>
         </c:forEach>
    </table>
    org.apache.jasper.JasperException: /RecruiterResumeResults.jsp(46,1) According to TLD or attribute directive in tag file, attribute items does not accept any expressions
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
         org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1174)
         org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:821)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
         org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1736)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:183)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)

    In web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4"
         xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">At the top of my JSP:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

  • N-Queens Problem Using Stacks Help

    I'm trying to solve the N-Queens problem using Stacks. Quite frankly, I'm completely lost.
    Here's the pseudocode from the book:
    "Push information onto the stack indicating the first choice is a queen in row 1, column 1.
    success = false;
    while(!success && !s.isEmpty())
    Check whether the most recent choice (on top of the stack) is in the same row, same column, or same diagonal as any other choices (below the top). If so, we say there is a conflict: otherwise, there is no conflict.
    if (there is a conflict)
    -Pop items off the stack until the stack becomes empty or the top of the stack is a choice that is not in column n. If the stack is now not empty, then increase the column number of the top choice by 1.
    else if (no conflict and the stack size is n)
    -Set success to true because we have found a solution to the n-queens problem.
    else
    -Push information onto the stack indicating tat the next choice is to place a queen at row number s.size()+1 and column number 1.
    And here is my excuse for code so far. I have no idea how to check the diagonals, or how to even really make this work
    {code}import java.util.Stack;
    public class NQueens {
    int row, column, n;
    public NQueens(int n) {
    row = 0;
    column = 0;
    n = n;
    public Stack Solve(){
    boolean success, conflict;
    Stack<NQueens> Qs = new Stack<NQueens>();
    if (Qs.size() == 0)
    Qs.push(new NQueens(1));
    success = false;
    while (!success && !Qs.isEmpty())
    if (Qs.peek().row == row)
    conflict = true;
    if (Qs.peek().column == column)
    conflict = true;
    if (conflict = true)
    Qs.pop();
    Qs.peek().column += 1;
    else
    if (!conflict && Qs.size() == n)
    success = true;
    else
    Qs.push(new NQueens(Qs.size()+1));
    return Qs;
    {code}

    First off I'll address this:
        int row, column, n;
        public NQueens(int n) {
            row = 0;
            column = 0;
            n = n; //here
        }Notice the last line of that. I get what you're trying to do, but think about what the compiler sees there. If you have two variables called 'n', one at the class level, and one at the method level, the compiler must have rules so it knows which one you're talking about. And if it follows those rules, then saying 'n' inside that method must always refer to the same n. Otherwise, how would it decide which one you're talking about? The rule here is that it uses the most local variable available to it, which in this case is your method parameter. So 'n = n' is setting the parameter equal to itself. To refer to the class variable n, use "this.n", like so:
    this.n = n;Now that that's settled, let's address some logic. You'll need to figure out whether two Queens share a diagonal. I can think of at least a couple options for that. First, every time you look at a Queen you could loop through the entire board and make sure that if a piece is in r3c4, that no piece is in r2c3,r4c5,r5c6, etc. Or you could create a new variable for your class similar to your 'row' and 'column' variables that tracks the diagonal a piece is in. But that requires some calculating. And remember, there's 2 directions for diagonals, so you'll need 2 diagonal variables.
    If these are your Row and Column values:
    Row          Column
    00000000     01234567
    11111111     01234567
    22222222     01234567
    33333333     01234567
    44444444     01234567
    55555555     01234567
    66666666     01234567
    77777777     01234567And these are your diagonal values:
    Diag 1                    Diag 2
    0  1  2  3  4  5  6  7          7  6  5  4  3  2  1  0
    1  2  3  4  5  6  7  8          8  7  6  5  4  3  2  1
    2  3  4  5  6  7  8  9          9  8  7  6  5  4  3  2
    3  4  5  6  7  8  9  10          10 9  8  7  6  5  4  3
    4  5  6  7  8  9  10 11          11 10 9  8  7  6  5  4
    5  6  7  8  9  10 11 12          12 11 10 9  8  7  6  5
    6  7  8  9  10 11 12 13          13 12 11 10 9  8  7  6
    7  8  9  10 11 12 13 14          14 13 12 11 10 9  8  7Then examine the relationship between Row(R), Column(C), and Diagonals 1 and 2 (D1/D2):
    RC   D1,D2
    00 = 0,7
    01 = 1,6
    02 = 2,5
    03 = 3,4
    04 = 4,3
    05 = 5,2
    06 = 6,1
    07 = 7,0
    10 = 1,8
    11 = 2,7
    12 = 3,6
    13 = 4,5
    14 = 5,4
    15 = 6,3
    16 = 7,2
    17 = 8,1You'll notice that D1 is always the same as R + C. And D2 is always the same as C subtracted from 7 plus R, giving:
    int d1 = row + column;
    int d2 = (7 + row) - column;But remember, that 7 in the formula above, is based on how big your grid is. So whatever your 'N' is, whether its a 10x10 square or a 574x574 square, that 7 should be changed to (N-1)
    So those could be your variables to track diagonals. What I'm noticing in your current code, is that you never change your row and column variables...so every Queen is always at r0c0. You should probably put values for those in your parameters for the constructor, in addition to n. Then the diagonals can be calculated from those.
    Edited by: newark on Apr 17, 2008 10:46 AM

  • Problems with Parameter Mapping

    Hi All,
    I have problems with parameter-mapping. For me its a black box, sometimes it works sometimes not.
    Lots of times my mappings doesnt work, and I dont know the reason.
    For example: I want to map my Execution-CO to the Display-CO. For that I map the in the affected Action.
    But it doesnt work, although I do have the same Context Structures, because its the same CO. The technical Name is also the same.
    What could it be?
    Thanks for answering me
    Bye Steve

    Hi Andre,
    sorry for my late answer, but I'm writing my diploma thesis and wasnt at work since wednesday and so I dont have a access to our GP-System.
    Hope I understood you right.
    The Use Case of parameter mapping is that Users of further steps has the possibility to see the Input of previous steps.
    When I dont map the parameter inside one action, it isnt possible. I tried it out with the SAP example "Time-off-process". I took the CO "Create Request" and add it in one Action (as Display &  Execution). When I understand you right mapping inside an action is not necessary, to see the Inputs from further Actions --> But this way I cannot see the Inputs.  
    The mapping of my application works before I changed it.
    I know never touch a running system, but It was necessary, we need a new Input and Output Parameter.
    Cause I have 20 parameter the mapping was very time-consuming, to map every single parameter. I read a method to reduce the time: Adding a structure requires only mapping of the two structures. But now the Mapping doesnt work.
    Hope you can help me
    Bye Steve

  • Sun app server problem using asadmin tool

    I have installed sun app server and trying to do the simplemessage tutorial. When I run the
    ant create-cfcommand I get the following
    [exec] Invalid user or password
    [exec] CLI137 Command create-jms-resource failed.I have put an echo line in app-server-ant.xml to see what the command is and it is.
    [echo] c:/Sun2/SDK/bin/asadmin.bat create-jms-resource --user admin  --passwordfile C:/Sun2/SDK/javaee-5-doc-tutorial-1.0_03/javaeetutorial5/examples/common/admin-password.txt --host localhost --port 4850 --restype javax.jms.ConnectionFactory --enabled=true jms/ConnectionFactoryI have checked the password file and it is
    AS_ADMIN_PASSWORD=adminadminAny ideas?
    I have checked around about using parameter password but when running this I get an error saying this is not valid and that I should use passwordfile
    Kelvin

    You haven;t specified the exceptions you r getting ........while starting your default server.
    if u r getting exception about InetClass then connect your system with LAN/Internet then your problem will be solved becoz i m using same location address as you specified, space doesn't matter at all - i think so, it is running fine........

  • CTXCAT index problem: SUBSTRING_INDEX parameter doesn't work

    Hi,
    I need a help with ctxcat index on Oracle 10g. I need to improve searching using CTXCAT index. All is working quite well except SUBSTRING_INDEX parameter. I thought that following was necessary and sufficient:
    EXEC ctx_ddl.create_preference('KEVFT_WL', 'BASIC_WORDLIST');
    EXEC ctx_ddl.set_attribute('KEVFT_WL', 'substring_index', 'YES');
    EXEC ctx_ddl.set_attribute('KEVFT_WL', 'prefix_index', 'YES');
    EXEC ctx_ddl.set_attribute('KEVFT_WL', 'prefix_min_length', 1);
    EXEC ctx_ddl.set_attribute('KEVFT_WL', 'prefix_max_length', 6);
    This BASIC_WORDLIST preference set is used for index creation. But the problem is, that when I try to search using query:
    SELECT * FROM TMP_FULLTEXT
    WHERE CATSEARCH(fulltext, '%abc', null)> 0;
    then I get no rows in results. Despite the fact that row with the text 'aabc' exists in the table.
    Can anyone tell me what the problem is?
    Thank you,
    Julius Chrobak

    With a catsearch query operator, the wildcard is an asterisk (*), not a percent sign (%) as with a contains query operator. However, even with the correct wildcard, left truncation is not supported with ctxcat. However, if you use a query template, then you can use the context grammar with the % wildcard for context grammar and left truncation is supported. Please see the demonstration below that reproduces the problem, then corrects it.
    SCOTT@10gXE> SELECT * FROM v$version
      2  /
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SCOTT@10gXE> CREATE TABLE tmp_fulltext (fulltext VARCHAR2 (30))
      2  /
    Table created.
    SCOTT@10gXE> INSERT ALL
      2  INTO tmp_fulltext VALUES ('aabc')
      3  INTO tmp_fulltext VALUES ('abcd')
      4  SELECT * FROM DUAL
      5  /
    2 rows created.
    SCOTT@10gXE> BEGIN
      2    ctx_ddl.create_preference ('KEVFT_WL', 'BASIC_WORDLIST');
      3    ctx_ddl.set_attribute      ('KEVFT_WL', 'substring_index',   'YES');
      4    ctx_ddl.set_attribute      ('KEVFT_WL', 'prefix_index',        'YES');
      5    ctx_ddl.set_attribute      ('KEVFT_WL', 'prefix_min_length', 1);
      6    ctx_ddl.set_attribute      ('KEVFT_WL', 'prefix_max_length', 6);
      7  END;
      8  /
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> CREATE INDEX fulltext_idx ON tmp_fulltext (fulltext)
      2  INDEXTYPE IS CTXSYS.CTXCAT
      3  PARAMETERS ('WORDLIST KEVFT_WL')
      4  /
    Index created.
    SCOTT@10gXE> -- reproduction of original problem using wrong wildcard for catsearch:
    SCOTT@10gXE> SELECT * FROM TMP_FULLTEXT
      2  WHERE CATSEARCH (fulltext, '%abc', null) > 0
      3  /
    no rows selected
    SCOTT@10gXE> SELECT * FROM TMP_FULLTEXT
      2  WHERE CATSEARCH (fulltext, 'abc%', null) > 0
      3  /
    no rows selected
    SCOTT@10gXE> -- left truncation not supported, even with correct wildcard:
    SCOTT@10gXE> SELECT * FROM TMP_FULLTEXT
      2  WHERE CATSEARCH (fulltext, '*abc', null) > 0
      3  /
    no rows selected
    SCOTT@10gXE> SELECT * FROM TMP_FULLTEXT
      2  WHERE CATSEARCH (fulltext, 'abc*', null) > 0
      3  /
    FULLTEXT
    abcd
    SCOTT@10gXE> -- query using template with context grammar:
    SCOTT@10gXE> SELECT * FROM TMP_FULLTEXT
      2  WHERE CATSEARCH
      3            (fulltext,
      4             '<query>
      5             <textquery grammar="context">
      6               %abc
      7             </textquery>
      8              <query>',
      9             null) > 0
    10  /
    FULLTEXT
    aabc
    SCOTT@10gXE>

  • Problems using Oracle Directory

    Hi all
    I have the following problem using 9i: I would like to use oracle internet directory to register my db's. I am currently reading the online handbooks and found a section that says to start the directory by using the 'oidmon' and 'oidctl' commands. The problem is that I cannot find these tools anywhere on the server, altough i am pretty sure i intalled anything important. is this a separate product? I thought it was included in 9i 9.2?
    Anyone?
    Cheers,
    Michael

    Hi.
    Hmm, your shared lib path appears to be ok. What version of Solaris are you running? Also what JDK version are you using (I'll assume you are using the one that installed with WLS)?
    You might also try posting this to the weblogic.developer.interest.jdbc newsgroup.
    Thanks,
    Michael
    Alex wrote:
    Hi,
    Please help. While trying to do a dbping, I get the following error:
    [root@hkodsdb01 SMEloan]# java -Djava.library.path=/export/home/greenwood/bea/wlserver6.0/lib/solaris:/export/home/greenwood/bea/wlserver6.0/lib/solaris/oci817_8:/u01/oracle/product/817/lib utils.dbping ORACLE oracle smeloan 192.168.1.252
    Starting Loading jDriver/Oracle .....
    Error encountered:
    java.sql.SQLException: System.loadLibrary threw java.lang.UnsatisfiedLinkError with the message '/export/home/greenwood/bea/wlserver6.0/lib/solaris/oci817_8/libweblogicoci37.so: ld.so.1: /greenwood/bea/jdk131/jre/bin/../bin/sparc/native_threads/java: fatal: libclntsh.so.8.0: open failed: No such file or directory'.
    at weblogic.jdbcbase.oci.Driver.loadLibraryIfNeeded(Driver.java:202)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:57)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:146)
    at utils.dbping.main(dbping.java:167)
    The required file is under the Oracle directory specified. Also, I am having some problems with using the LD_LIBRARY_PATH for my shared library files. The command won't work with LD_LIBRARY_PATH and I must use the -Djava.library.path parameter. Any thoughts and suggestions?
    Thanks so much for your help in advance.
    Alex--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • FI / U102 problem: Missing parameter - Dump

    Hi,
    I have created own code within U102, program RGGBS00, and activated it.
    When I run it, e.g. from FB01, I get a dump, with note 'PERFORM_PARAMETER_MISSING'.
    When I go through the dump, I see that when the FORM u102 is called from the SAP program, the necessary BOOL_DATA is not provided as a using parameter.
    Is this an error or problem in the SAP part?
    Regards Johann

    Hi,
    check definition of form u102
    exits-name  = 'U102'.
      exits-param = c_exit_param_field.  " replace by c_exit_param_none (without parameters)
      exits-title = text-102.
      APPEND exits.

  • Using "PARAMETER.param_name  as a "Copy item from  value" reference

    I a, using forms 9i and I am having a problem using a Parameter as a reference item. The parameter item is there and I am spelling it correctly, i have even cut and pasted the parameter name into the Copy item value. No matter what I do I get the same result.
    FRM-30047: Cannot resolve item reference PARAMETER.PROJECT_UID.
    Item: PROJECT_UID
    Block: GRANT_SUMMARY
    Form: GRANTS
    FRM-30085: Unable to adjust form for output.
    I have even added a colon to the word PARAMETER but this too fails.
    Suggestions please

    You have to assign it programatically as 'Copy item from Value' is mainly there to keep the master detail relationships. It actually expects a block item rather than a parameter.
    Antony.

Maybe you are looking for

  • Using local/testing server with cs5 inserting images look fine in the split screen but do not show

    Hi If I open example: header.php and insert any photo jpeg/.html ecs i can see the images in the split screen but not in the browser if i save then refresh. I am able to make any change to the code ecs. and they are reflected just fine. I have tried

  • Error in Found Management

    Hi guru, We have an issue regarding all clearing operations with transaction: F-44, F-51, F-54. The error messages are the same for all: ERROR IN LFMPAF18. The number message is FI216. Please, could you help me? Thanks Regards

  • Hfs: Runtime corruption detected on my external Back up disk

    Using Drive Genius 3 on my iMac. I received an email from this application with Re: Drive Genius: DrivePulse™ Drive Integrity Warning. The message states: A potentially critical system error has occurred: hfs: Runtime corruption detected on FreeAgent

  • Is in Adobe Forms with ZCI "ActiveX" mandatory?

    Hi, I am wondering if in ZCI Adobe Forms ActiveX is still necessary? I hoped it was not, because our customer doesn't allow ActiveX. I thought when I have a native Form in my Web Dynpro Java I would NOT need ActiveX Controls in the browser any more.

  • Putting purchased songs on a different PC

    Hi all. I recently bought a few tracks from the iTunes store - this is the first time I've ever used the store. However, I have my iTunes on my laptop rather than my normal pc for space reasons and I don't have internet access on my laptop. When I co