BC4J and checkbox

Hi,
I use the function useCheckBoxGroup from the
class EditCurrentRecord.
(useCheckBoxGroup("Id","select * from myTable ","NAME","ID");)
So I have several checkboxes for the same column.
The problem is that all my CheckBoxes have
the same name, so when I want to retrieve the
selected values I just find one of them even
if several checkboxes were checked.
Is it a bug?
If no, how to do this?
Regards.
null

This is expected, we designed the input controls to update a single attribute. When you submit the checkbox group, your application has to decide what to do with the various checked values. If you need a different behavior, I recommend that you use a combination of the DataTags and HTML to create your HTML FORM.

Similar Messages

  • [URGENT] Performance problem with BC4J and partioned data

    Hi all,
    I have a big performance probelm with BC4J and partitioned data. As as partitioned table shouldn't have a primary key like a sequence (or something else) my partitioned table doesn't have any primary key.
    When I debug my BC4J application I can see a message showing me "ignoring row with no primary key" from EntityCache. It takes a long time to retrieve my data even if I use the partition keys. A quick & dirty forms application was multiple times faster!
    Is this a bug in BC4J, or is BC4J not suitable for partitioned data? Can anyone give me a hint what to do, do make the BC4J application fast even with partitioned data? In a non-partitioned environment the application works quite well. So it seams that it must be an "error" somewhere in this part.
    Thanks,
    Axel

    Here's a SQL statement that creates the table.
    CREATE TABLE SEARCH
    (SEAR_PARTKEY_DAY              NUMBER(4)        NOT NULL
    ,SEAR_PARTKEY_EMP            VARCHAR2(2)      NOT NULL
    ,SEAR_ID                     NUMBER(20)       NOT NULL
    ,SEAR_ENTRY_DATE             TIMESTAMP        NOT NULL
    ,SEAR_LAST_MODIFIED            TIMESTAMP             NOT NULL
    ,SEAR_STATUS                 VARCHAR2(100)    DEFAULT '0'
    ,SEAR_ITC_DATE               TIMESTAMP        NOT NULL
    ,SEAR_MESSAGE_CLASS          VARCHAR2(15)     NOT NULL
    ,SEAR_CHIPHERING_TYPE        VARCHAR2(256)   
    ,SEAR_GMAT                   VARCHAR2(1)      DEFAULT 'U'
    ,SEAR_NATIONALITY            VARCHAR2(3)      DEFAULT 'XXX'
    ,SEAR_MESSAGE_ID             VARCHAR2(32)     NOT NULL
    ,SEAR_COMMENT                VARCHAR2(256)    NOT NULL
    ,SEAR_NUMBER_OF              NUMBER(3)        NOT NULL
    ,SEAR_INTERCEPTION_SYSTEM    VARCHAR2(40)    
    ,SEAR_COMM_PRIOD_H           NUMBER(5)        DEFAULT -1
    ,SEAR_PRIOD_R                  NUMBER(5)        DEFAULT -1
    ,SEAR_INMARSAT_CES           VARCHAR2(40)    
    ,SEAR_BEAM                   VARCHAR2(10)    
    ,SEAR_DIALED_NUMBER          VARCHAR2(70)    
    ,SEAR_TRANSMIT_NUMBER        VARCHAR2(70)    
    ,SEAR_CALLED_NUMBER          VARCHAR2(40)    
    ,SEAR_CALLER_NUMBER          VARCHAR2(40)    
    ,SEAR_MATERIAL_TYPE          VARCHAR2(3)      NOT NULL
    ,SEAR_SOURCE                 VARCHAR2(10)    
    ,SEAR_MAPPING                VARCHAR2(100)    DEFAULT '__REST'
    ,SEAR_DETAIL_MAPPING         VARCHAR2(100)
    ,SEAR_PRIORITY               NUMBER(3)        DEFAULT 255
    ,SEAR_LANGUAGE               VARCHAR2(5)      DEFAULT 'XXX'
    ,SEAR_TRANSMISSION_TYPE      VARCHAR2(40)    
    ,SEAR_INMARSAT_STD           VARCHAR2(1)     
    ,SEAR_FILE_NAME              VARCHAR2(100)    NOT NULL
    PARTITION BY RANGE (SEAR_PARTKEY_DAY, SEAR_PARTKEY_EMP)
      PARTITION SEARCH_MAX VALUES LESS THAN (MAXVALUE, MAXVALUE) MIRA4_SEARCH_EVEN
    );of course SEAR_ID is filled by a sequence but the field is not the primary key as it would decrease the performance of partitioned data.
    We moved to native JDBC with our application and the performance is like we never expected to be!

  • Is it possible to have sorting by group and checkboxes in the same ALV

    Hi there,
    Does anyone know whether it is possible to have sorting and group on one field in ALV and checkboxes set on another field in ALV?
    eg.
    Fieldname
    ===========
    Name----
    Text
    Allowance----
    Numeric -> Sort & Group
    Verified----
    Checkbox
    How do I code it if it is possible to have grouping and check box all in one ALV.  Meaning I want some data that are the same to merge using sort, while still having the checkbox available for my other field (Verified).
    Thanks in advance.
    Lawrence

    hi,
    GROUP BY clause is used on database tables with select statement.
    sort is used on internal tables.
    can u clearly explain y u need group by and sort on the same field.
    if u are extracting from dbtable using grou by clause on a field, then no need to sort it again.
    if u want sort u can do it by giveing "sort itab by field". thats not a problem.
    now coming to check box.instead of using SLIS type field catalog, u use LVC type.
    in LVC_S_LAYO, u can fine box_fname.
    while defining layout, u declare a variable of type LVC_S_LAYO
    AND GIVE BOX_FNAME = internal table field name

  • Commandlink and checkbox in a region(.jsff).

    Hi all,
    I have a commandlink and checkbox in a region(.jsff).
    when i tried to call a method using propertychangeListener or Actionlistener ..
    methosd is not calling ...
    Plase give any solution...

    Hi,
    not enough information - sorry
    Frank

  • BC4J and OAS with Java Application Client

    Could you show me an example about using the BC4J and OAS with Java Application client.
    The JDeveloper Help is not enough to solve this kind of problem.
    Configuration:
    Jdeveloper 3.1
    OAS 4.0.8.1
    Database 7.3.4
    null

    if you can logon with client tools then that should be an indication that the service account running the CMS IS working! Good news.
    So the problem is likely with the java portion (krb5/bsclogin or java options)
    If the files are in c:\winnt\ (if not copy them there) and perform c:\program files\business objects\javasdk\bin\kinit username
    then enter and password/enter again
    Probably get the same message. To note in your krb5.ini all domain info must be in CAPS (the .com appears to be in lower case)
    kinit works with just the krb5.ini, java SDK and AD (removing BO config and the service account from the picture). Once that works if your java options are specified properly you should be able to login to CMC/infoview.
    also 1 last point. Add udp_preference_limit = 1 to the krb5 lib defaults section
    libdefaults
    default_realm = BD.com
    dns_lookup_kdc = true
    dns_lookup_realm = true
    udp_preference_limit = 1
    Regards,
    Tim

  • About BC4j and java stored procedure

    Is it possible create a java stored procedure using BC4j and deploy to Oracle9iR2 VM?
    If it is possible, how about the performance compare to PL/SQL stored procedure?

    In 9.0.3.3 it will be possible again. The ability to deploy a BC4J-based, local-mode Java Stored Procedure was broken in 9.0.3 before this upcoming maintenance release.
    PL/SQL will almost surely be faster if you are talking about just doing basic DML type of operations, when compared to Java stored procedures.

  • Alv and checkboxs

    Guys,
    Ive a problem with a ALV and checkboxs. i have one with column type checkbox, i need mark rows and take them afterward using a button (in ALV) but rows arent marked when i use button. i have seen that it only happend when i use double click in grid (alv).
    How could i use only button after marked my rows ?????
    Thanks

            wa_fieldcat-edit = 'X'.
            modify i_fieldcat from wa_fieldcat index sy-tabix.
    * Form f_alv_edit_oruser                                               *
    * Form for display alv                                                 *
    form f_alv_edit_oruser.
        call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
            it_fieldcat                 = i_fieldcat[]
            is_layout                   = pt_grplayout2
            i_callback_program          = 'YSCCU0007'
            i_callback_html_top_of_page = p_header
            i_callback_user_command     = v_user_command1
            it_events                   = i_events[]
          tables
            t_outtab                    = i_yscchdr.
    endform.                                 " F_alv_edit_oruser
    * Form  f_user_command1                                                *
    * This form will handle the user command from fm REUSE                 *
    form f_user_command1 using p_ucomm type sy-ucomm
                         rs_selfield type  slis_selfield.
      data p_ref1 type ref to cl_gui_alv_grid.      "<<<
      call function 'GET_GLOBALS_FROM_SLVC_FULLSCR' "<<<
        importing                                   "<<< 
          e_grid = p_ref1.                          "<<
      call method p_ref1->check_changed_data.   " <<<<
      case p_ucomm.
        when '&DATA_SAVE'.
       endcase.
      rs_selfield-refresh = c_x.             " Grid refresh
    endform.                                 " F_user_command1

  • Text Field and Checkboxes

    Ok... i wish i can show my form without  letting everyone have axx to it.
    But anyway, ive searched and i think i found part of the answer but i am still confused.  http://forums.adobe.com/message/2033382#2033382
    I have a form created completely. It has radio fields, text fields and checkboxes.  I have two problems
    One when ppl are typing in the text field area, it seems to lend in with the question, so if not paying attn, u wont know that they answered a question.
    Currently i have the stuff set at Myriad Pro  size 10.. Thats what i used to type comments and what not.
    But when the end user flls out the form, i want it to at least be in bold or something.. Or maybe Times new roman Or something different from the question font itself.
    Two.. in checkboxes, the default is X. Thats very light.  I need that to be noticeable... So either make em a bod X or  a way to increase the size of the tick without increasing the size of the box itself.. I just tried to use the STAR..And its bold enuf, but its small. It would be better if the star was a lil bigger.
    Currently i think i have 150 checkboxes and about 50 text area and fields.
    I thought about making the text thing rich format, but they cant do that for every field...  id rather tdo that by default in the back end of the form itself.
    I hope im not sounding confusinf

    i know the square and circle are a bit ugly - but there is no chance you'll miss them
    alternatively try adjusting the size a bit under -size you can take a standard checkboxes size from 10 to 12 without increasing its area for example - select the checkbox-objects-field-size - change to 12 eg - adds a bit of weight
    i use squares when i need visual weigh -
    for the text - might be worth having a test at setting input field values with a baseline shift -- thats basically make text bigger or smaller than, you guessed it, baseline -- this from the livecycle scripting reference
    TextField1.font.baselineShift = "+5pt"; should do it for example --
    scripting reference follows --- good luck
    ""baselineShift
    Specifies a positive measurement that shifts a font up from the baseline or a negative measurement that
    shifts a font down from the baseline.
    Syntax
    Reference_Syntax.baselineShift = "0in | measurement"
    Type Values
    String ● fit (default)
    The application scales the image proportionally to the maximum size of the container’s
    content region.
    ● none
    The application scales the image to the size of entire container’s content region. This may
    result in different scale values being applied to the image's X and Y coordinates.
    ● actual
    The image is rendered using the dimensions stored in the image content. The extent of the
    container’s region does not affect the sizing of the image.
    ● width
    The application scales the image proportionally to the width of the container’s content
    region. The image might be taller or shorter than the content region.
    ● height
    The application scales the image proportionally to the height of the container’s content
    region. The image might be wider or narrower than the content region.
    Model Object
    Form Model image
    Adobe LiveCycle Designer ES Scripting Properties
    LiveCycle Designer ES Scripting Reference before 156
    Values
    Applies to
    Version
    XFA 2.1
    Examples
    JavaScript
    TextField1.font.baselineShift = "-5pt";
    FormCalc
    TextField1.font.baselineShift = "-5pt"

  • Demo applications with BC4J and JClient

    Are there any demo applications with BC4J and JClient, which go beyond the one frame samples, tutorials and how to's?
    This would deliver a better insight to develop a complete application.
    Bye
    Holger

    Thanks,
    the Virtual Shopping Mall sample is quite not I have searched for, because it is primarily an Web application and I am searching for an JClient application without Application Server, but it is a beginning.
    Bye
    Holger

  • (UIX XML) Sharing Connection objects between BC4J and custom java.

    If I have a UIX XML page that contains some BC4J application modules, then in the event handler I call [public static EventResult handleMyEventEvent (BajaContext context, Page page, PageEvent event..) ], which in turn calls some java classes I have written that take a java.sql.Connection object and access the database doing some updates/inserts with this Connection object (via JDBC)....HOW CAN I USE THE SAME TRANSACTION AS WAS USED IN THE BC4J APPLICATION MODULE...i.e. CAN I SHARE THE CONNECTION OBJECT BETWEEN BC4J AND MY OWN JAVA CLASSES THAT USE JDBC?
    What are the best ways to share such a transaction?
    Thanks,
    Paul.

    Would it be easier to use a custom method on the bc4j Application module?
    Take this scenario...
    1. User opens UIX XML web page which opens a bc4j App Module..it has a VO based on all employees.
    2. User presses the add button and a new employee is created (using the bc4j App Module).
    (Notice: no commit yet!)
    3. User presses the submit button...fires event REVIEW_SALARY.
    4. This event is 'handled' in the event section of the UML XML...it calls:-
    public static EventResult handleREVIEW_SALARYEvent (BajaContext context, Page page, PageEvent event)...
    5. I now want to call a java class I wrote that computes an employees new salary and updates the employee record with this new salary. This update will fail unless it is part of the same transaction as the one used by the bc4j App Module (that inserted the new employee).
    How best to proceed from here?
    How about having a method on the bc4j App Mod's VO called 'reviewSalary'? Calling this would use the same transaction? I could then call my java class from within the VO's method? However do I still have the same problem in that my java class expects to be passed the connection object?
    The approach you suggested previously seems a touch dangerous....in that these are not 'publically exposed'...and a new release of JDev may break my code.
    Thanks,
    Paul.

  • Radio buttons and checkboxes using panels......

    Please help..
    I am using radiobuttons and checkboxes with prices on them.. and once an item is selected the total is output.. this works when I don't use panels.. the minute I use panels it does not register what I am using.. can anyone help..
    is there something that I am leaving out.. the basics would be great. please help.
    Asmeen

    Are you really sure this is an advanced language topic?

  • BC4J and CVS

    When I update an BC4J component's XML file It's not updated. This can be v. dangerous e.g. Developer A working on a project, meanwhile Developer B remove a column from an entity object and commits it's work. Developer A run update to include Developer B's changes in its version. But Entity Object in A is not get updated properly and when Developer A commits it's work, the column that developer B had removed appears again.

    Hi,
    At the moment, the architecture of JDeveloper is that the SCM support is a completely separate and distinct module from BC4J. Because of this, there is no special awareness in the SCM support about BC4J and dependencies between files it uses, so there's no way it can automatically check files out when the BC4J design time needs to update them. For the user, this is somewhat inconvenient: the user must anticipate what BC4J is going to change and check those files out in advance. We recognize this as a usability problem that needs to be resolved.
    We are hoping to provide better integration with components of the IDE by providing an interface to the version system through the extension API in the IDE. However, adopting this in the main areas of the IDE (such as BC4J) will involve a significant investment of time and this is unlikely to be completed for the next (9.0.3) release. We are targetting this improved integration for a future release of the IDE (possibly the 9.0.4 or 9.2 release).
    Thanks,
    Brian
    JDeveloper Team (SCM)

  • IF EXIT and Checkbox.. need help

    Hi there,
    i have a Problem.
    I am new in ABAP and try out now a lot of thing. Now i have a problem and i dont know how to solve it... Here is my Code.. After that i tell you my problem.
    *& Report  Z_TEILNEHMERLISTE_EINFUEGEN
    REPORT  Z_TEILNEHMERLISTE_EINFUEGEN.
    *Tabelle deklarieren
    TABLES zteilnehmer02.
    SELECTION-SCREEN BEGIN OF BLOCK teilnehmer WITH FRAME TITLE text-001.
    *Eingabefelder deklarieren
    PARAMETERS: nummer TYPE zteilnehmer02-tnummer,
                name   TYPE zteilnehmer02-tname LOWER CASE,
                gebdat TYPE zteilnehmer02-tgeburtsdatum LOWER CASE,
                geschl TYPE zteilnehmer02-tgeschlecht LOWER CASE,
                kurspr TYPE zteilnehmer02-tkurspreis LOWER CASE,
                waehru TYPE zteilnehmer02-twaehrung LOWER CASE,
                kfz    TYPE zteilnehmer02-zzkfztyp LOWER CASE,
                kursti TYPE zteilnehmer02-zzkurstitel LOWER CASE.
    SELECTION-SCREEN END OF BLOCK teilnehmer.
    *Workarea deklarieren die dann in die DB Tabelle zteilnehmer02 gechrieben wird
    DATA: wa_teil LIKE zteilnehmer02.
    *deklarieren der Felder
    wa_teil-tnummer = nummer.
    wa_teil-tname = name.
    wa_teil-tgeburtsdatum = gebdat.
    wa_teil-tgeschlecht = geschl.
    wa_teil-tkurspreis = kurspr.
    wa_teil-twaehrung = waehru.
    wa_teil-zzkfztyp = kfz.
    wa_teil-zzkurstitel = kursti.
    *Daten werden nun aus der Workarea wa_teil in die Tabelle zteilnehmer02 geschrieben
    INSERT INTO zteilnehmer02 VALUES wa_teil.
    *Wenn das Feld tnummer leer ist dann mache nichts... AUSSER es ist oben die Checkbox vollstli angehackt.. dann zeige die komplette Liste
    IF wa_teil-tnummer IS INITIAL.
      EXIT.
    ENDIF.
    *wenn Returncode irgendwas anderes als NULL dann gib Fehlermeldung aus und schreibe den Datensatz NICHT
    IF sy-subrc NE 0.
      ROLLBACK WORK.
      WRITE: / 'Fehler beim anlegen des neuen Teilnehmer mit der Nummer', wa_teil-tnummer, '. Diese Nummer existiert bereits.'.
      ELSE.
    *Wenn RC=0 dann gib folgende Meldung aus nachdem der Datensatz geschrieben wurde
      WRITE: / 'Neuer Teilnehmer mit Teilnehmernummer ', wa_teil-tnummer, 'eingetragen'.
    ENDIF.
    SELECTION-SCREEN BEGIN OF BLOCK anzeige WITH FRAME TITLE text-002.
      PARAMETERS vollstli AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK anzeige.
    *Checkbox prüfen
    IF NOT vollstli IS INITIAL.
    * vollständigen Tabelleninhalt ausgeben
      SELECT * FROM zteilnehmer02.
        WRITE: / zteilnehmer02-tnummer,
                 zteilnehmer02-tname,
                 zteilnehmer02-tgeburtsdatum,
                 zteilnehmer02-tgeschlecht,
                 zteilnehmer02-tkurspreis,
                 zteilnehmer02-twaehrung,
                 zteilnehmer02-zzkfztyp,
                 zteilnehmer02-zzkurstitel.
       ENDSELECT.
       SKIP.
    ENDIF.
    As you can see above i wrote:
    IF wa_teil-tnummer IS INITIAL.
      EXIT.
    ENDIF.
    But in a another BLOCK i have a CHECKBOX. When i "check" the Box i become a List of all Members. But this will not work because the field wa_teil-tnummer IS INITIAL so the program EXIT.
    How can i solve this?
    Thanks
    Bjoern
    Edited by: bjoern bayerschmidt on Jun 3, 2009 1:27 PM
    Edited by: bjoern bayerschmidt on Jun 3, 2009 1:28 PM

    Sorry,
    i did not see that the code look so horrible ^^
    So i have a EXIT here:
    IF wa_teil-tnummer IS INITIAL.
      EXIT.
    ENDIF.
    But AFTER this Code i have a CHECKBOX too.
    SELECTION-SCREEN BEGIN OF BLOCK anzeige WITH FRAME TITLE text-002.
      PARAMETERS vollstli AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK anzeige.
    *Checkbox prüfen
    IF NOT vollstli IS INITIAL.
    * vollständigen Tabelleninhalt ausgeben
      SELECT * FROM zteilnehmer02.
        WRITE: / zteilnehmer02-tnummer,
                 zteilnehmer02-tname,
                 zteilnehmer02-tgeburtsdatum,
                 zteilnehmer02-tgeschlecht,
                 zteilnehmer02-tkurspreis,
                 zteilnehmer02-twaehrung,
                 zteilnehmer02-zzkfztyp,
                 zteilnehmer02-zzkurstitel.
       ENDSELECT.
       SKIP.
    ENDIF.
    So the CHECKBOX do not work when the FIELD wa_teil-tnummer IS INITIAL, because it comes BEFORE the CHECKBOX comes. Do you know what i mean.
    The CHECKBOX do Only work when i put some DATA in the field wa_teil-tnummer. But i want that the CHECKBOX works too when the Field is empty.
    Thanks
    Bjoern
    Edited by: bjoern bayerschmidt on Jun 3, 2009 1:33 PM
    Edited by: bjoern bayerschmidt on Jun 3, 2009 1:34 PM

  • Problem with BC4J and PostrgreSQL 7.2

    I successful configure connection to PostgreSQL DB.
    Then I create simple table on DB and create BC4J appmodule.
    In appmodule properties I change jbo.sql92.JdbcDriverClass = org.postgresql.Driver
    I run test appmodule in BC4J browser. I see my row in table but when I try to put something in table
    JBO-27123: SQL error during call statement preparation. Statement: INSERT INTO CITIES(name,last) VALUES (?,?)
    Callable Statements are not supported at this time.
    Same thing is happening on delete or update ???
    When I put some data into table from connection/sqlworksheet in Jdeveloper everething is ok.
    I use JDeveloper 9.0.2.829

    REPOST

  • REUSE_ALV_GRID_DISPLAY_LVC and checkboxes

    Hi all,
    please forgive the HUGE post, the code snip is quite significant. My task is to provide a search option for contract numbers then, after selection's done, show a grid with all the results from the search option where every row represents a contract. Addictionally, I want a checkbox for selection for every row, in order to provide a second, decisional step before processing these contracts.
    In order to do so, I used the REUSE_ALV_GRID_DISPLAY but cannot manage to make the checkboxes visible. Note that the solution is working, because clicking in the first field of a row implies adding the row (so, the contract) to a table that will then processed after a particular event's raised (in this case, clicking a specified button).
    Can anybody help me understanding why there are no checkboxes in the first columns? A very similar solution worked for me on another project... can't understand what's wrong with this.
    Here's the code:
    REPORT  z_myproject         .
    * PARAMETERS
    TYPES: BEGIN OF t_ztab_alv,
            sel,
    *        cancellato TYPE c,
            object_id TYPE crmt_object_id,
            description TYPE crmt_process_description,
            logical_system TYPE crmt_logsys,
           END OF t_ztab_alv.
    TYPES: ty_tt_crmd_orderadm_h TYPE TABLE OF crmd_orderadm_h.
    DATA:  it_contract TYPE TABLE OF t_ztab_alv,
           wa_contract TYPE t_ztab_alv,
           l_index TYPE i,
           conditions TYPE string.
    INITIALIZATION.
    * Selection Screens and Parameters
    SELECTION-SCREEN BEGIN OF BLOCK main_sel WITH FRAME TITLE text-001.
    SKIP.
    SELECT-OPTIONS s_ctrid FOR wa_contract-object_id.
    SKIP.
    SELECTION-SCREEN END OF BLOCK main_sel.
    PARAMETERS: flag TYPE xfeld.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_ctrid-low.
      DATA: it_help_item TYPE TABLE OF t_ztab_alv,
            it_return TYPE TABLE OF ddshretval.
      SELECT *
        INTO CORRESPONDING FIELDS OF TABLE it_help_item
        FROM crmd_orderadm_h
        WHERE object_type = 'BUS2000113'.
      IF sy-subrc = 0.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield    = 'OBJECT_ID'
            dynprofield = 'OBJECT_ID'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
          TABLES
            value_tab   = it_help_item
            return_tab  = it_return.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_ctrid-high.
      DATA: it_help_item TYPE TABLE OF t_ztab_alv,
            it_return TYPE TABLE OF ddshretval.
      SELECT *
        INTO CORRESPONDING FIELDS OF TABLE it_help_item
        FROM crmd_orderadm_h
        WHERE object_type = 'BUS2000113'.
      IF sy-subrc = 0.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield    = 'OBJECT_ID'
            dynprofield = 'OBJECT_ID'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
          TABLES
            value_tab   = it_help_item
            return_tab  = it_return.
      ENDIF.
    START-OF-SELECTION.
    * Retrieve values from the sel_opt.
      SELECT * FROM crmd_orderadm_h
        INTO CORRESPONDING FIELDS OF TABLE it_contract
          WHERE object_id IN s_ctrid.
    * Now let's kick our ALV out!
    * General Data
      TYPE-POOLS: slis.
      DATA: gs_layout TYPE lvc_s_layo,
            g_exit_caused_by_caller,
            gs_exit_caused_by_user TYPE slis_exit_by_user,
            g_repid LIKE sy-repid.
      DATA:
          gt_events      TYPE slis_t_event,
          gt_list_top_of_page TYPE slis_t_listheader,
          g_status_set   TYPE slis_formname VALUE 'PF_STATUS_SET',
          g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
          g_top_of_page  TYPE slis_formname VALUE 'TOP_OF_PAGE',
          g_top_of_list  TYPE slis_formname VALUE 'TOP_OF_LIST',
          g_end_of_list  TYPE slis_formname VALUE 'END_OF_LIST',
          it_fieldcat TYPE lvc_t_fcat,
          wa_fieldcat TYPE lvc_s_fcat.
    *"Variants
      DATA: gs_variant LIKE disvariant,
            g_save.
      g_repid = sy-repid.
      g_save           = 'A'.
    * This is the main flow. Initialize the layout and manage events.
      PERFORM layout_init USING gs_layout.
      PERFORM eventtab_build USING gt_events[].
      gs_variant-report = g_repid.
      g_save           = 'A'.
    END-OF-SELECTION.
    *"List Header for Top-Of-Page
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
    *       I_BACKGROUND_ID    = 'ALV_BACKGROUND'
             i_buffer_active    = 'X'
             i_callback_program = g_repid
             i_callback_pf_status_set = 'SET_PF_STATUS'
             i_callback_user_command  = g_user_command
             i_structure_name   = 'ZCTR_TAB_ALV'
             is_layout_lvc          = gs_layout
             it_fieldcat_lvc    = it_fieldcat
             i_save             = g_save
             is_variant         = gs_variant
             it_events          = gt_events[]
    *      I_SCREEN_START_COLUMN    = 0     "Use coordinates for
    *      I_SCREEN_START_LINE      = 0     "display as dialog box
    *      I_SCREEN_END_COLUMN      = 0
    *      I_SCREEN_END_LINE        = 0
        IMPORTING
             e_exit_caused_by_caller = g_exit_caused_by_caller
             es_exit_caused_by_user  = gs_exit_caused_by_user
        TABLES
             t_outtab = it_contract
        EXCEPTIONS
             program_error = 1
             OTHERS        = 2.
      IF sy-subrc = 0.
        IF g_exit_caused_by_caller = 'X'.
    *"  Forced Exit by calling program
    *"  <do_something>.
        ELSE.
    *"  User left list via F3, F12 or F15
          IF gs_exit_caused_by_user-back = 'X'.       "F3
    *"    <do_something>.
          ELSE.
            IF gs_exit_caused_by_user-exit = 'X'.     "F15
    *"      <do_something>.
            ELSE.
              IF gs_exit_caused_by_user-cancel = 'X'. "F12
    *"        <do_something>.
              ELSE.
    *"        should not occur!
    *"        <do_Abnormal_End>.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ELSE.
    *"Fatal error callin ALV
    * MESSAGE AXXX(XY) WITH ...
      ENDIF.
    *"Form routines
    *&      Form  LAYOUT_INIT
    *       text
    *      -->RS_LAYOUT  text
    FORM layout_init USING rs_layout TYPE lvc_s_layo.
    *"Build layout for list display
      rs_layout-cwidth_opt = 'X'.
      rs_layout-zebra             = 'X'.
      rs_layout-box_fname     = 'SEL'.
    ENDFORM.                    "LAYOUT_INIT
    *&      Form  EVENTTAB_BUILD
    *       text
    *      -->RT_EVENTS  text
    FORM eventtab_build USING rt_events TYPE slis_t_event.
    *"Registration of events to happen during list display
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = rt_events.
      READ TABLE rt_events WITH KEY name = slis_ev_top_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE g_top_of_page TO ls_event-form.
        APPEND ls_event TO rt_events.
      ENDIF.
    ENDFORM.                    "EVENTTAB_BUILD
    *&      Form  TOP_OF_PAGE
    *       text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
    *           I_LOGO             = 'ENJOYSAP_LOGO'
                it_list_commentary = gt_list_top_of_page.
    ENDFORM.                    "TOP_OF_PAGE
    *       FORM SET_PF_STATUS                                         *
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'STANDARD'.
      "Copy of 'STANDARD' pf_status from fgroup SALV
    ENDFORM.                    "set_pf_status
    *       FORM USER_COMMAND                                             *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
      DATA : it_sel_lines TYPE TABLE OF t_ztab_alv,
             l_lines TYPE i,
             l_mult_lines TYPE flag,
             l_obj_id TYPE char35,
             t_contratti TYPE ty_tt_crmd_orderadm_h,
             wa_contratti TYPE crmd_orderadm_h.
    * Calculate sel_lines.
      REFRESH it_sel_lines.
      CASE r_ucomm.
        WHEN  'ZCANCELLA'.                 "set attribute button
          REFRESH t_contratti.
          LOOP AT it_contract INTO wa_contract WHERE sel = 'X'.
            SELECT SINGLE *
               FROM crmd_orderadm_h
                 INTO wa_contratti
                    WHERE object_id = wa_contract-object_id.
            IF sy-subrc = 0.
              APPEND wa_contratti TO t_contratti.
            ENDIF.
          ENDLOOP.
        MOVE 'X' TO rs_selfield-refresh.
    *  do something with the selected entries.
        PERFORM do something USING t_contratti.
      ENDCASE.
      COMMIT WORK AND WAIT.
      CLEAR r_ucomm.
      MOVE 'X' TO rs_selfield-refresh.
    ENDFORM.                    "USER_COMMAND

    Hello Byju, hello all...
    ...first of all, sorry for the BIG delay in answering but I had to leave a bit this task for other priorities... now I'm back on it to work. Oh, and obviously, happy new year mates
    I tried by myself to follow what you called "option(2)"... a popup screen (simpliest possible).
    In order to do so, I tried the following code, but I don't know how to manage the "no" answer.... I mean, the popup works but if I press "No", I don't want the code to follow to be executed (sounds like I have to translate into code "do nothing of what follows, simply return to the alv screen").
    The code:
    WHEN  'ZCANCELLA'.                 "set attribute button
          REFRESH t_contratti.
          LOOP AT it_contract INTO wa_contract WHERE sel = 'X'.
           IF wa_contract-object_id BETWEEN 8400000000 AND 8499999999.
            popupneeded = 'X'.
           ENDIF.
          ENDLOOP.
          IF popupneeded EQ 'X'.
           CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
    *          TITLEBAR                    = 'ATTENZIONE'
    *          DIAGNOSE_OBJECT             = ' '
               text_question               = '84* contracts in the selection. Continue?  '
    *          TEXT_BUTTON_1               = 'Yes'(001)
    *          ICON_BUTTON_1               = ' '
    *          TEXT_BUTTON_2               = 'No'(002)
    *          ICON_BUTTON_2               = ' '
    *          DEFAULT_BUTTON              = '1'
               DISPLAY_CANCEL_BUTTON       = SPACE
    *          USERDEFINED_F1_HELP         = ' '
    *          START_COLUMN                = 25
    *          START_ROW                   = 6
    *          POPUP_TYPE                  =
    *          IV_QUICKINFO_BUTTON_1       = ' '
    *          IV_QUICKINFO_BUTTON_2       = ' '
            IMPORTING
               ANSWER                      = w_answer.
    *        TABLES
    *          PARAMETER                   =
    *        EXCEPTIONS
    *          TEXT_NOT_FOUND              = 1
    *          OTHERS                      = 2
           IF w_answer ne '1'.
    * to manage -> refresh the alv of selection and do nothing.
           endif.
          ENDIF.
          LOOP AT it_contract INTO wa_contract WHERE sel = 'X'.
            SELECT SINGLE *
                FROM crmd_orderadm_h INTO wa_contratti
                   WHERE object_id = wa_contract-object_id.
            IF sy-subrc = 0.
              APPEND wa_contratti TO t_contratti.
            ENDIF.
          ENDLOOP.
        MOVE 'X' TO rs_selfield-refresh.
    *  delete selected contracts.
      PERFORM cancella_ctr USING t_contratti.
    Also...I added a new field in the ALV mask, called "deleted"... it's a checkbox I'd like to check after the deletion phase to show that a selected contract's been deleted. The behaviour in my mind should be as follows:
    - ALV screen that shows contracts;
    - selection of some of these contracts;
    - click on the button "delete";
    - eventually, popup of the warning screen;
    - after the deletion, return to the previous ALV in which the previously selected lines have the "deleted" field marked (it's not significant to verify that these entries have really been deleted... if something goes wrong, an exception is raised and managed).
    Guess it's a simple "come back to the alv screen and refresh" issue, so maybe you can help me with a clarifying example
    Thanks in advance!
    Edited by: Matteo Montalto on Jan 7, 2009 10:15 AM

Maybe you are looking for

  • Can I use the HD from my prior HP PC as a 2d HD in the new one?

    I have a new HP Pavilion P7-1020, and i use windows 7, 64 bit. Can I take the HD from my prior HP PC, which also uses windows 7, 64 bit, and add it to my new PC as second HD? This question was solved. View Solution.

  • Changing WLSE e-mail sender ID

    I can´t find how to change the WLSE e-mail sender ID, and it uses the default account. How can I change this parameter?

  • Generating report issues

    Sharepoint is not giving a user a particular option within a report on his computer when it does give him the option on another computer.  He has the permissions set correctly.

  • Stateless Session EJB hangs using URLConnection but WLS doesn't clean up

    Hi We have a stateless session EJB running under WLS 5.1 with service pack 10 on Solaris. The bean calls a remote HTTP server using the java.net.URLConnection class and forwards the response to the EJB client. The bean is largely working fine but som

  • SNC configuration in multiple application server environment

    Hello Experts, We are planning for SNC configuration between ECC 6  and NW04s Portal systems. ECC 6.0 is running with Central Instance and two application servers. NW04s EP is running with 4 server nodes. I am very much clear about setting up SNC bet