How to get checkbox checked when sum equals a certain number

I have created a spreadsheet with 25 rows that will have numerical entries. How do I put in a checkbox that becomes checked once the sum of the numbers Un that row equals a certain number?
Thanks in advance.

A hack would be to use CHAR. You have thousands of symbols to choose from. I scanned through some and found a check (there are many more which might better fit your needs).
So, if your numbers are listed in B1:B25 and 100 is your magic number, then:
=IF(SUM(B1:B25)=100, CHAR(10004), "")
or something like:
=IF(SUM(B1:B25)=100, CHAR(10004), CHAR(10063))

Similar Messages

  • How to Get checkbox value when List value changed in classic report

    hi ,
    i worked with apex 4.2 and i create normal classic report with one checkbox column and one column change it to select list(named loved) now i want when user change list
    take value of checkbox item and show it in message .
    SQL for report
    SELECT
    '<INPUT TYPE="checkbox" NAME="f01" VALUE="'
    ||SEQ
    ||'">' SEQ,
    ID,
    DEPT_NO,
    EMP_NAME} i change the column attributes of Dept_NO to Display as Select list of department name (named lov).
    now i want when user change name of department the value of SEQ SHOW IN ALERT MESSAGE
    i create JavaScript on the page
    function test(pThis) {
    var f01_value = $('select[name="f01"]').value;
    alert('#SEQ : '+ f01_value);
    </script>
    I call this javascript function when list change but the value undefined..
    My Question :
    How can get this value Or any value of item in reports
    regards
    Ahmed

    Hi Ahmed,
    >
    i worked with apex 4.2 and i create normal classic report with one checkbox column and one column change it to select list(named loved) now i want when user change list
    take value of checkbox item and show it in message .
    SQL for report
    SELECT
    '<INPUT TYPE="checkbox" NAME="f01" VALUE="'
    ||SEQ
    ||'">' SEQ,
    ID,
    DEPT_NO,
    EMP_NAME} i change the column attributes of Dept_NO to Display as Select list of department name (named lov).
    >
    You should not create checkboxes like this. Either use the APEX_ITEM.CHECKBOX2 API or change the Column Type to Simple Checkbox.
    >
    now i want when user change name of department the value of SEQ SHOW IN ALERT MESSAGE
    i create JavaScript on the page
    function test(pThis) {
    var f01_value = $('select[name="f01"]').value;
    alert('#SEQ : '+ f01_value);
    </script>
    >
    name="f01" returns an array, what you need is single element value.
    Try
    <script type="text/javascript>
    function test(pThis) {
      var f01_value = $v(pThis);
       alert('#SEQ : '+ f01_value);
    </script>
    {code}
    {quote}
    I call this javascript function when list change but the value undefined..
    My Question :
    How can get this value Or any value of item in reports
    {quote}
    Depends in how you are invoking/triggering the change event. Are you using DA or have you written an "onchange" event on the element?
    Cheers,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get dynamic check box value in NW Mobile 7.1

    Hi,
    i have 5 rows it contains dropdown and checkbox in a row.when i click update button i need the values of checkbox.How to get?
    Regards,
    Kanagaraj.

    Hi Vidyadhar,
    I have dropdown in first page.based ondropdown value selected navigating to next page.In that i am using row repeater it has label,checkbox and dropdown.here i need to  know whether the check box is checked or not while clicking update button.
    Drow down value also not able to get.
    How to get Checkbox and dropdown values?
    can u provide some sample codes??
    Regards,
    Kanagaraj.

  • How to get a check box on the selection screen

    Hi all
    can any body tell me how to get a check box on the selection screen

    parameter: pa_check   as checkbox.
    To define the input field of a parameter as a checkbox, you use the following syntax:
    PARAMETERS <p> ...... AS CHECKBOX ......
    Parameter <p> is created with type C and length 1. In this case, you may not use the additions TYPE and LIKE. Valid values for <p> are ' ' and 'X'. These values are assigned to the parameter when the user clicks the checkbox on the selection screen.
    If you use the TYPE addition to refer to a data type in the ABAP Dictionary of type CHAR and length 1 for which 'X' and ' ' are defined as valid values in the domain, the parameter automatically appears as a checkbox on the selection screen.
    REPORT DEMO.
    PARAMETERS: A AS CHECKBOX,
    B AS CHECKBOX DEFAULT 'X'.

  • Xml: how to get node value when pasing node name as a parameter

    Hi,
    I've got some xml:
    var xmlData:XML =
    <1stNode>
        <buttonID>first child node value</buttonID>
        <imageID>second child node value</imageID>
        <labelID>third child node value</labelID>
    </1stNode>
    Then I want to read specific node value based on a value passed to a function. .
    var buttonID = new Button;
    var imageID = new Image;
    var labelID = new Label;
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData.nodeName)                      //doesn't work
    var str:String = "xmlData." + nodeName;
    var xml:XMLList = str as XMLList             //doesn't work
    I'm don't know how to get the value when node name is dynamically changed.

    use:
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData[nodeName])                    

  • How to get the path when i select a directory or a file in a JTree

    How to get the path when i select a directory or a file in a JTree

    import java.lang.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.HeadlessException;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Iterator;
    * @author Frederic FOURGEOT
    * @version 1.0
    public class JTreeFolder extends JPanel {
    protected DefaultMutableTreeNode racine;
    JTree tree;
    protected JScrollPane scrollpane;
    final static int MAX_LEVEL = 1; // niveau max de descente "direct" dans l'arborescence
    * Sous-classe FSNode
    * @author Frederic FOURGEOT
    * @version 1.0
    private class FSNode extends DefaultMutableTreeNode {
    File file; // contient le fichier li� au noeud
    * Constructeur non visible
    private FSNode() {
    super();
    * Constructeur par initialisation
    * @param userObject Object
    FSNode(Object userObject) {
    super(userObject);
    * Constructeur par initialisation
    * @param userObject Object
    * @param newFile File
    FSNode(Object userObject, File newFile) {
    super(userObject);
    file = newFile;
    * Definit le fichier lie au noeud
    * @param newFile File
    public void setFile(File newFile) {
    file = newFile;
    * Renvoi le fichier lie au noeud
    * @return File
    public File getFile() {
    return file;
    public JTree getJTree(){
         return tree ;
    * Constructeur
    * @throws HeadlessException
    public JTreeFolder() throws HeadlessException {
    File[] drive;
    tree = new JTree();
    // cr�ation du noeud sup�rieur
    racine = new DefaultMutableTreeNode("Poste de travail");
    // cr�ation d'un noeud pour chaque lecteur
    drive = File.listRoots();
    for (int i = 0 ; i < drive.length ; i++) {
    FSNode node = new FSNode(drive, drive[i]);
    addFolder(drive[i], node); // on descend dans l'arborescence du lecteur jusqu'� MAX_LEVEL
    racine.add(node);
    // Gestion d'evenement sur JTree (on �coute les evenements TreeExpansion)
    tree.addTreeExpansionListener(new TreeExpansionListener() {
    public void treeExpanded(TreeExpansionEvent e) {
    // lorsqu'un noeud est ouvert
    // on descend dans l'arborescence du noeud jusqu'� MAX_LEVEL
    TreePath path = e.getPath();
    FSNode node = (FSNode)path.getLastPathComponent();
    addFolder(node);
    ((DefaultTreeModel)tree.getModel()).reload(node); // on recharche uniquement le noeud
    public void treeCollapsed(TreeExpansionEvent e) {
    // lorsqu'un noeud est referm�
    //RIEN
    // alimentation du JTree
    DefaultTreeModel model = new DefaultTreeModel(racine);
    tree.setModel(model);
         setLayout(null);
    // ajout du JTree au formulaire
    tree.setBounds(0, 0, 240, 290);
    scrollpane = new JScrollPane(tree);
         add(scrollpane);
         scrollpane.setBounds(0, 0, 240, 290);
    * Recuperation des sous-elements d'un repertoire
    * @param driveOrDir
    * @param node
    public void addFolder(File driveOrDir, DefaultMutableTreeNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    addFolder(driveOrDir, node, 0);
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Recuperation des sous-elements d'un repertoire
    * (avec niveau pour r�cursivit� et arr�t sur MAX_LEVEL)
    * @param driveOrDir File
    * @param node DefaultMutableTreeNode
    * @param level int
    private void addFolder(File driveOrDir, DefaultMutableTreeNode node, int level) {
    File[] fileList;
    fileList = driveOrDir.listFiles();
    if (fileList != null) {
    sortFiles(fileList); // on tri les elements
    // on ne cherche pas plus loin que le niveau maximal d�finit
    if (level > MAX_LEVEL - 1) {return;}
    // pour chaque �l�ment
    try {
    for (int i = 0; i < fileList.length; i++) {
    // en fonction du type d'�l�ment
    if (fileList[i].isDirectory()) {
    // si c'est un r�pertoire on cr�� un nouveau noeud
    FSNode dir = new FSNode(fileList[i].getName(), fileList[i]);
    node.add(dir);
    // on recherche les �l�ments (r�cursivit�)
    addFolder(fileList[i], dir, ++level);
    if (fileList[i].isFile()) {
    // si c'est un fichier on ajoute l'�l�ment au noeud
    node.add(new FSNode(fileList[i].getName(), fileList[i]));
    catch (NullPointerException e) {
    // rien
    * Recuperation des sous-elements d'un noeud
    * @param node
    public void addFolder(FSNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    for (int i = 0 ; i < node.getChildCount() ; i++) {
    addFolder(((FSNode)node.getChildAt(i)).getFile(), (FSNode)node.getChildAt(i));
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Tri une liste de fichier
    * @param listFile
    public void sortFiles(File[] listFile) {
    triRapide(listFile, 0, listFile.length - 1);
    * QuickSort : Partition
    * @param listFile
    * @param deb
    * @param fin
    * @return
    private int partition(File[] listFile, int deb, int fin) {
    int compt = deb;
    File pivot = listFile[deb];
    int i = deb - 1;
    int j = fin + 1;
    while (true) {
    do {
    j--;
    } while (listFile[j].getName().compareToIgnoreCase(pivot.getName()) > 0);
    do {
    i++;
    } while (listFile[i].getName().compareToIgnoreCase(pivot.getName()) < 0);
    if (i < j) {
    echanger(listFile, i, j);
    } else {
    return j;
    * Tri rapide : quick sort
    * @param listFile
    * @param deb
    * @param fin
    private void triRapide(File[] listFile, int deb, int fin) {
    if (deb < fin) {
    int positionPivot = partition(listFile, deb, fin);
    triRapide(listFile, deb, positionPivot);
    triRapide(listFile, positionPivot + 1, fin);
    * QuickSort : echanger
    * @param listFile
    * @param posa
    * @param posb
    private void echanger(File[] listFile, int posa, int posb) {
    File tmpFile = listFile[posa];
    listFile[posa] = listFile[posb];
    listFile[posb] = tmpFile;

  • I cannot see my Iphone 4 in my device window in the finder anymore.  It use to appear so I could copy the camera pictures off of it and transfer them to other folders.  Does anyone have and idea how to get it back when you plug it in initially.  Thanks

    I cannot see my Iphone 4 in my device window in the finder anymore.  It use to appear so I could copy the camera pictures off of it and transfer them to other folders.  Does anyone have and idea how to get it back when you plug it in initially.  Thanks

    You will want to open iPhoto, go to the iPhoto menu and select Preferences. Under the General tab, next to Connecting camera opens: select iPhoto. Close the preferences and quit iPhoto. Reconnect your iPhone 4. iPhoto should open automatically and offer to import your pictures. Import them and then do what you want with them.
    Best of luck.

  • How to get a confirmation when your email is delivered or read  ?

    With Mail app ,How to get a confirmation when your email is delivered or read?

    When I send mail with Mail app , there is flying letter pops up. But now I could not see anymore. Do you know how can I active that animation ?
    Thanks for your help

  • How to get the tab when is it pressed?

    I have the following situation:
    I have an array of JTextField inside a scroollpane. The size of my array is nine or ten depends on some rules. But my window show just four JTextField. So I would like to know how to get the event when I press "tab", just to show the others JTextField while I'm pressing "tab". Because I need this event to scrooll down or scrooll up.
    I tried the keylistener, but when I press "tab" any method(keypressed, keyreleased, keytyped) is called.
    I also tried the focuslistener. If this event I could scrooll down or scrooll up, but I couldn't do both!!
    Can somebody help me??
    Thanks anyway!!
    Gin

    JTextField implements Scrollable interface, which provides information to the enclosing container such as JScrollPane.
    Hence when the tab event is fired, you can compute the Rectangle area that should be visible and then call the 'scrollRectToVisible()' method in JTextField. This will inform the JScrollPane to scroll to the rectangle that you mention.
    HTH

  • HT5622 How can I get on ICloud when it say the maximum number of free accounts has been activated on this iPad?

    How can I get on iCloud when it say the maximum number of free accounts has been activated on this IPad?

    A maximum of three new iCloud accounts can be created on a single iOS device. If you have already created three iCloud accounts (why?) then log in using one of those to start using it.
    Otherwise, you'll have to find another device to create an iCloud account on.

  • HT201342 How do I spell check when composing an e-mail?

    How do I spell check when composing an e-mail

    Webmail sites typically have a link tool that appears on the formatting bar above the compose box. The specifics might vary but generally speaking, if you click the button for the link tool, paste the link, then OK that, a link should be inserted at the current cursor position.
    To see what I mean for Yahoo! mail, check out this thread: [https://support.mozilla.org/en-US/questions/938081 url is not highlighted when sending it on an email and cannot be directly accessed].
    Does that help?

  • How to get an email when data got inserted

    Hi All,
    Could you please let me know how to get an email when data got inserted into table by using sql/plsql
    Thanks in adavance

    Could you please let me know how to get an email when data got inserted into table by using sql/plsql
    Well that seems pretty straightforward - write some pl/sql to send you an email when that pl/sql inserts data into a table.
    See this Oracle-base article for an example of sending mail.
    http://www.oracle-base.com/articles/misc/email-from-oracle-plsql.php
    Post what you have tried so far. What part of what you have tried doesn't seem to be working?

  • How to get the Details when we checked with check box?

    Hi....
    I want to display all the records of perticular checked vendor_id's. n for this checking I want to display series of checkbox along with vendor_id's. could U please give me the code for this.

    actually I'm not getting the logic how to get the vendor_id's which are checked in checkbox...... infact I'm not familier with checkbox properties also.....
    i can able to display series of checkboxs along with vendor_ids . but when I clicked perticualar checkboxes which vendor_id's I wanted. how can display only these checked vendor_id's records. ???? Can U help me????

  • How to get Checkbox Value from Flex in PHP.

    Hi,
    I need to know how to get a checkbox value from flex in PHP-POST/GET because I don't know what is the value property of a checkbox in flex.
    Please Help.

    Hi,
    It is very simple. Follow the steps below to achieve the solution,
    1. Write a check-box change event to capture the value of the check box. Store this value in a variable(say bolChkSelected:Boolean).
    2. In step 1 you got the value of the check box. Now your aim is to send the value to php. Declare a httpService in your flex application(i think you are aware of using it).Ok..im writing it
    <mx:HTTPService id="sampleService" resultFormat='e4x' url='http://yourdomain/file.php' result='handleResult()' fault='handleFault()'>
    </mx:HTTPService>
    3. Now the actual solution... u need to send the shcStatus in to php..
    Declare an object to hold the data
    var objparameters:Object={};
    objparameters['CheckBoxdata'] = bolChkSelected;
    --in the above line... 'CheckBoxdata' is used as a parameter to php..you shud have the same variable name while accessing in php file also..
    in php file..
    checkboxstatus = $_POST[''CheckBoxdata''];
    echo checkboxstatus
    thats it..

  • How to get checkboxes in dynamic ALV list generation

    hi ,
    below is the code in which two lists we wll be displayed in one layout dynamically(i.e after entering the table name two lists wll be displayed in one layout) from two different clients(i.e. source and target).
    TYPE-POOLS *
    TYPE-POOLS: slis.
    *-- Tables Declaration
    TABLES:  dd02l, t000.
    *-- Constants Declaration
    CONSTANTS: lc_z   TYPE char1  VALUE 'Z',
               lc_y   TYPE char1  VALUE 'Y'.
    DATA: ok_code TYPE sy-ucomm.
    *--Internal table and Work Area Declaration
    DATA: lines LIKE sy-dbcnt VALUE 0.
    DATA: icursor TYPE cursor.
    *DATA: icursor1 TYPE cursor.
    DATA: lv_count TYPE i.
    DATA: lv_table_var1  TYPE char1.
    DATA: lv_ans TYPE char1.
    DATA : gd_tabname  TYPE tabname.
    *for check boxes
    DATA:l_pos TYPE i VALUE 1.
    *field catalog for source client
    DATA: c_cont1 TYPE REF TO cl_gui_custom_container,
    c_alv1 TYPE REF TO cl_gui_alv_grid,
    it_fieldcat1 TYPE lvc_t_fcat ,
    ty_fieldcat1 TYPE lvc_s_fcat ,
    struc_desc1   TYPE REF TO cl_abap_structdescr,
    ls_fieldcatalogue1 TYPE slis_fieldcat_alv,
    lt_fieldcatalogue1 TYPE slis_t_fieldcat_alv,
    l_structure1   TYPE REF TO data,
    l_table1    TYPE REF TO data.
    for check boxes for source client
    DATA: ls_edit TYPE lvc_s_styl,
    lt_edit TYPE lvc_t_styl.
    *field catalog for target client
    DATA: c_cont2 TYPE REF TO cl_gui_custom_container,
    c_alv2 TYPE REF TO cl_gui_alv_grid,
    it_fieldcat2 TYPE lvc_t_fcat ,
    ty_fieldcat2 TYPE lvc_s_fcat ,
    struc_desc2   TYPE REF TO cl_abap_structdescr,
    ls_fieldcatalogue2 TYPE slis_fieldcat_alv,
    lt_fieldcatalogue2 TYPE slis_t_fieldcat_alv,
    l_structure2   TYPE REF TO data,
    l_table2    TYPE REF TO data.
    *for source client
    TYPES: BEGIN OF itab,
            t_name TYPE tabname,
            t_ref TYPE REF TO data,
    *for checkboxes.
            check(1),
    style TYPE lvc_t_styl,
    END OF itab.
    *for target client
    TYPES: BEGIN OF itab1,
             t_name1 TYPE tabname,
             t_ref1 TYPE REF TO data,
    END OF itab1.
    *-- Field Symbol declaration for Dynamic Internal Table for source client
    FIELD-SYMBOLS: <tab> TYPE table.
    FIELD-SYMBOLS: <tab1> TYPE ANY.
    FIELD-SYMBOLS: <l_mandt>.
    FIELD-SYMBOLS: <str_comp1> TYPE abap_compdescr,
                   <dyn_str1> TYPE ANY.
    *--Field Symbol declaration for Dynamic Internal Table for target client
    FIELD-SYMBOLS <tab2> TYPE table.
    FIELD-SYMBOLS <tab3> TYPE ANY.
    FIELD-SYMBOLS: <l_mandt1>.
    FIELD-SYMBOLS: <str_comp2> TYPE abap_compdescr,
                   <dyn_str2> TYPE ANY.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p_table    LIKE dd02l-tabname,
                p_mdt_fm LIKE t000-mandt DEFAULT sy-mandt,
                p_mdt_to LIKE t000-mandt DEFAULT '910'.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON p_table.
      lv_table_var1  = p_table+0(1).
    *-- Validation for Standard tables
      IF ( lv_table_var1 NE lc_z ) AND ( lv_table_var1 NE lc_y ).
        MESSAGE e001(00)  WITH text-002.
      ENDIF.
    *-- Start of Selection
    START-OF-SELECTION.
    --for source client--
      DATA itab2 TYPE itab.
      DATA t_ref1 TYPE REF TO data.
      itab2-t_name = p_table.
    --for target client--
      DATA itab3 TYPE itab1.
      DATA t_ref2 TYPE REF TO data.
      itab3-t_name1 = p_table.
    *-- Create Dynamic Internal table for source client
      CREATE DATA itab2-t_ref TYPE TABLE OF (itab2-t_name) .
      ASSIGN itab2-t_ref->* TO <tab>.
      CREATE DATA t_ref1 LIKE LINE OF <tab>.
      ASSIGN t_ref1->* TO <tab1>.
    *-- Create Dynamic Internal table for target client
      CREATE DATA itab3-t_ref1 TYPE TABLE OF (itab3-t_name1) .
      ASSIGN itab3-t_ref1->* TO <tab2>.
      CREATE DATA t_ref2 LIKE LINE OF <tab2>.
      ASSIGN t_ref2->* TO <tab3>.
    *-- get the number of entries in table
      SELECT COUNT(*) FROM dd03l INTO lv_count
                                WHERE tabname   =  p_table
                                  AND fieldname = 'MANDT'.
    Check MANDT field the the table, if not exists through an error message
      IF lv_count = 0.
        MESSAGE i000(8i) WITH text-001 space space.
        EXIT.
      ELSE.
    *-- Delete the Table Entries in the target system
        DELETE FROM (p_table) CLIENT SPECIFIED
              WHERE mandt = p_mdt_to.
        COMMIT WORK.
    *-- Open cursor
        OPEN CURSOR WITH HOLD icursor FOR
          SELECT * FROM (p_table) CLIENT SPECIFIED
                  WHERE mandt = p_mdt_fm.
        IF sy-subrc <> 0.
          MESSAGE e000(8i) WITH text-001.
        ENDIF.
        DO.
          FETCH NEXT CURSOR icursor INTO TABLE <tab> PACKAGE SIZE 1000.
          IF sy-subrc <> 0.
            CLOSE CURSOR icursor.
            EXIT.
          ENDIF.
    *-- Modify Field 'MANDT' with the Target Client no.
          LOOP AT <tab> ASSIGNING <tab1>.
            ASSIGN COMPONENT: 'MANDT'  OF STRUCTURE <tab1> TO <l_mandt>.
            <l_mandt> = p_mdt_to.
            MODIFY <tab> FROM <tab1>.
            lines = lines + 1.
          ENDLOOP.
    *-- Insert records into target table
          INSERT (p_table) CLIENT SPECIFIED FROM TABLE <tab>.
    *-- Close the cursor
          CALL FUNCTION 'DB_COMMIT'.
        ENDDO.
    ENDIF.
    for target client
    *-- Open cursor
        OPEN CURSOR WITH HOLD icursor FOR
          SELECT * FROM (p_table) CLIENT SPECIFIED
                  WHERE mandt = p_mdt_to.
        IF sy-subrc <> 0.
          MESSAGE e000(8i) WITH text-001.
        ENDIF.
        DO.
          FETCH NEXT CURSOR icursor INTO TABLE <tab2> PACKAGE SIZE 1000.
          IF sy-subrc <> 0.
            CLOSE CURSOR icursor.
            EXIT.
          ENDIF.
    *-- Close the cursor
          CALL FUNCTION 'DB_COMMIT'.
        ENDDO.
      ENDIF.
      CALL SCREEN 3000.
    *&      Module  STATUS_3000  OUTPUT
          text
    MODULE status_3000 OUTPUT.
      SET PF-STATUS 'ZTESTMENU'.
    SET TITLEBAR 'xxx'.
    For Source client
      IF c_alv1 IS INITIAL.
        CREATE OBJECT c_cont1
          EXPORTING
            container_name = 'CONTAINER_SOURCE'.
        IF sy-subrc = 0.
          CREATE OBJECT c_alv1
            EXPORTING
              i_parent = c_cont1.
        ENDIF.
        IF sy-subrc EQ 0.
          PERFORM field_cat1.
        ENDIF.
        CALL METHOD c_alv1->set_table_for_first_display
         EXPORTING
    i_buffer_active               =
    i_bypassing_buffer            =
    i_consistency_check           =
    i_structure_name              =
    is_variant                    =
    i_save                        =
    i_default                     = 'x'
    is_layout                     =
    is_print                      =
    it_special_groups             =
    it_toolbar_excluding          =
    it_hyperlink                  =
    it_alv_graphics               =
    it_except_qinfo               =
    ir_salv_adapter               =
    CHANGING
    it_outtab           = <tab>
    it_fieldcatalog     = it_fieldcat1
    it_sort                       =
    it_filter                     =
    EXCEPTIONS
    valid_parameter_combination = 1
    program_error                 = 2
    too_many_lines                = 3
    others                        = 4
        IF sy-subrc <> 0.
                                  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                                             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    For Target client
      IF c_alv2 IS INITIAL.
        CREATE OBJECT c_cont2
          EXPORTING
            container_name              = 'CONTAINER_TARGET'.
        IF sy-subrc = 0.
          CREATE OBJECT c_alv2
            EXPORTING
              i_parent          = c_cont2.
        ENDIF.
        IF sy-subrc EQ 0.
          PERFORM field_cat2.
        ENDIF.
        CALL METHOD c_alv2->set_table_for_first_display
    EXPORTING
       i_buffer_active               =
       i_bypassing_buffer            =
       i_consistency_check           =
       i_structure_name              =
       is_variant                    =
       i_save                        =
       i_default                     = 'x'
       is_layout                     =
       is_print                      =
       it_special_groups             =
       it_toolbar_excluding          =
       it_hyperlink                  =
       it_alv_graphics               =
       it_except_qinfo               =
       ir_salv_adapter               =
          CHANGING
            it_outtab                     = <tab2>
            it_fieldcatalog               = it_fieldcat2
       it_sort                       =
       it_filter                     =
    EXCEPTIONS
       invalid_parameter_combination = 1
       program_error                 = 2
       too_many_lines                = 3
       others                        = 4
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " STATUS_3000  OUTPUT
    *&      Module  USER_COMMAND_3000  INPUT
          text
    MODULE user_command_3000 INPUT.
      CASE ok_code.
        WHEN 'BACK'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_3000  INPUT
    *&      Form  field_cat1
          text
    -->  p1        text
    <--  p2        text
    FORM field_cat1 .
    Dynamic creation of a structure
      CREATE DATA l_structure1 TYPE (p_table).
      ASSIGN l_structure1->* TO <dyn_str1>.
    Fields Structure
      struc_desc1 ?= cl_abap_typedescr=>describe_by_data( <dyn_str1> ).
      LOOP AT struc_desc1->components ASSIGNING <str_comp1>.
      Build Fieldcatalog
        ty_fieldcat1-fieldname = <str_comp1>-name.
        ty_fieldcat1-ref_table = p_table.
       CLEAR: l_pos.
    *l_pos = l_pos + 1.
    *ty_fieldcat1-seltext = 'CHECK'.
    *ty_fieldcat1-fieldname = 'CHECK'.
    *ty_fieldcat1-tabname = 'ITAB'.
    *ty_fieldcat1-col_pos = l_pos.
    *ty_fieldcat1-checkbox = 'X'.
    *ty_fieldcat1-edit = 'X'.
    *ty_fieldcat1-outputlen = '5'.
    APPEND ty_fieldcat1 TO it_fieldcat1.
      Build Fieldcatalog
        ls_fieldcatalogue1-fieldname = <str_comp1>-name.
        ls_fieldcatalogue1-ref_tabname = p_table.
        APPEND ls_fieldcatalogue1 TO lt_fieldcatalogue1.
      ENDLOOP.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
       i_style_table             =
          it_fieldcatalog           = it_fieldcat1
       i_length_in_byte          =
        IMPORTING
          ep_table                  = l_table1
       e_style_fname             =
    EXCEPTIONS
       generate_subpool_dir_full = 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.
      ASSIGN l_table1->* TO <tab>.
    Read data from the table selected.
      SELECT * FROM (p_table)
         CLIENT SPECIFIED
         INTO CORRESPONDING FIELDS OF TABLE <tab>
                   WHERE mandt = p_mdt_fm.
    ENDFORM.                    " field_cat1
    *&      Form  field_cat2
          text
    -->  p1        text
    <--  p2        text
    FORM field_cat2 .
      CREATE DATA l_structure2 TYPE (p_table).
      ASSIGN l_structure2->* TO <dyn_str2>.
    Fields Structure
      struc_desc2 ?= cl_abap_typedescr=>describe_by_data( <dyn_str2> ).
      LOOP AT struc_desc2->components ASSIGNING <str_comp2>.
      Build Fieldcatalog
        ty_fieldcat2-fieldname = <str_comp2>-name.
        ty_fieldcat2-ref_table = p_table.
        APPEND ty_fieldcat2 TO it_fieldcat2.
      Build Fieldcatalog
        ls_fieldcatalogue2-fieldname = <str_comp2>-name.
        ls_fieldcatalogue2-ref_tabname = p_table.
        APPEND ls_fieldcatalogue2 TO lt_fieldcatalogue2.
      ENDLOOP.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
       i_style_table             =
          it_fieldcatalog           = it_fieldcat2
       i_length_in_byte          =
        IMPORTING
          ep_table                  = l_table2
       e_style_fname             =
    EXCEPTIONS
       generate_subpool_dir_full = 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.
      ASSIGN l_table2->* TO <tab2>.
    Read data from the table selected.
      SELECT * FROM (p_table) CLIENT SPECIFIED
         INTO CORRESPONDING FIELDS OF TABLE <tab2>
                   WHERE mandt =  p_mdt_to.
    ENDFORM.                    " field_cat2
    *FOR THE ABOVE CODE I NEED CHECKBOXES IN THE FIRST LIST AND I HAVE TRIED MANY WAYS BUT I HAVENT GOT THE SOLUTION. SO, PLZ CAN U EXPLAIN BY MENTIONING THE PIECE OF CODE IN ABOVE CODE.
    PLZ DO THE NEED FUL.
    thanks in advance.

    hi ,
    below is the code in which two lists we wll be displayed in one layout dynamically(i.e after entering the table name two lists wll be displayed in one layout) from two different clients(i.e. source and target).
    TYPE-POOLS *
    TYPE-POOLS: slis.
    *-- Tables Declaration
    TABLES:  dd02l, t000.
    *-- Constants Declaration
    CONSTANTS: lc_z   TYPE char1  VALUE 'Z',
               lc_y   TYPE char1  VALUE 'Y'.
    DATA: ok_code TYPE sy-ucomm.
    *--Internal table and Work Area Declaration
    DATA: lines LIKE sy-dbcnt VALUE 0.
    DATA: icursor TYPE cursor.
    *DATA: icursor1 TYPE cursor.
    DATA: lv_count TYPE i.
    DATA: lv_table_var1  TYPE char1.
    DATA: lv_ans TYPE char1.
    DATA : gd_tabname  TYPE tabname.
    *for check boxes
    DATA:l_pos TYPE i VALUE 1.
    *field catalog for source client
    DATA: c_cont1 TYPE REF TO cl_gui_custom_container,
    c_alv1 TYPE REF TO cl_gui_alv_grid,
    it_fieldcat1 TYPE lvc_t_fcat ,
    ty_fieldcat1 TYPE lvc_s_fcat ,
    struc_desc1   TYPE REF TO cl_abap_structdescr,
    ls_fieldcatalogue1 TYPE slis_fieldcat_alv,
    lt_fieldcatalogue1 TYPE slis_t_fieldcat_alv,
    l_structure1   TYPE REF TO data,
    l_table1    TYPE REF TO data.
    for check boxes for source client
    DATA: ls_edit TYPE lvc_s_styl,
    lt_edit TYPE lvc_t_styl.
    *field catalog for target client
    DATA: c_cont2 TYPE REF TO cl_gui_custom_container,
    c_alv2 TYPE REF TO cl_gui_alv_grid,
    it_fieldcat2 TYPE lvc_t_fcat ,
    ty_fieldcat2 TYPE lvc_s_fcat ,
    struc_desc2   TYPE REF TO cl_abap_structdescr,
    ls_fieldcatalogue2 TYPE slis_fieldcat_alv,
    lt_fieldcatalogue2 TYPE slis_t_fieldcat_alv,
    l_structure2   TYPE REF TO data,
    l_table2    TYPE REF TO data.
    *for source client
    TYPES: BEGIN OF itab,
            t_name TYPE tabname,
            t_ref TYPE REF TO data,
    *for checkboxes.
            check(1),
    style TYPE lvc_t_styl,
    END OF itab.
    *for target client
    TYPES: BEGIN OF itab1,
             t_name1 TYPE tabname,
             t_ref1 TYPE REF TO data,
    END OF itab1.
    *-- Field Symbol declaration for Dynamic Internal Table for source client
    FIELD-SYMBOLS: <tab> TYPE table.
    FIELD-SYMBOLS: <tab1> TYPE ANY.
    FIELD-SYMBOLS: <l_mandt>.
    FIELD-SYMBOLS: <str_comp1> TYPE abap_compdescr,
                   <dyn_str1> TYPE ANY.
    *--Field Symbol declaration for Dynamic Internal Table for target client
    FIELD-SYMBOLS <tab2> TYPE table.
    FIELD-SYMBOLS <tab3> TYPE ANY.
    FIELD-SYMBOLS: <l_mandt1>.
    FIELD-SYMBOLS: <str_comp2> TYPE abap_compdescr,
                   <dyn_str2> TYPE ANY.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p_table    LIKE dd02l-tabname,
                p_mdt_fm LIKE t000-mandt DEFAULT sy-mandt,
                p_mdt_to LIKE t000-mandt DEFAULT '910'.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON p_table.
      lv_table_var1  = p_table+0(1).
    *-- Validation for Standard tables
      IF ( lv_table_var1 NE lc_z ) AND ( lv_table_var1 NE lc_y ).
        MESSAGE e001(00)  WITH text-002.
      ENDIF.
    *-- Start of Selection
    START-OF-SELECTION.
    --for source client--
      DATA itab2 TYPE itab.
      DATA t_ref1 TYPE REF TO data.
      itab2-t_name = p_table.
    --for target client--
      DATA itab3 TYPE itab1.
      DATA t_ref2 TYPE REF TO data.
      itab3-t_name1 = p_table.
    *-- Create Dynamic Internal table for source client
      CREATE DATA itab2-t_ref TYPE TABLE OF (itab2-t_name) .
      ASSIGN itab2-t_ref->* TO <tab>.
      CREATE DATA t_ref1 LIKE LINE OF <tab>.
      ASSIGN t_ref1->* TO <tab1>.
    *-- Create Dynamic Internal table for target client
      CREATE DATA itab3-t_ref1 TYPE TABLE OF (itab3-t_name1) .
      ASSIGN itab3-t_ref1->* TO <tab2>.
      CREATE DATA t_ref2 LIKE LINE OF <tab2>.
      ASSIGN t_ref2->* TO <tab3>.
    *-- get the number of entries in table
      SELECT COUNT(*) FROM dd03l INTO lv_count
                                WHERE tabname   =  p_table
                                  AND fieldname = 'MANDT'.
    Check MANDT field the the table, if not exists through an error message
      IF lv_count = 0.
        MESSAGE i000(8i) WITH text-001 space space.
        EXIT.
      ELSE.
    *-- Delete the Table Entries in the target system
        DELETE FROM (p_table) CLIENT SPECIFIED
              WHERE mandt = p_mdt_to.
        COMMIT WORK.
    *-- Open cursor
        OPEN CURSOR WITH HOLD icursor FOR
          SELECT * FROM (p_table) CLIENT SPECIFIED
                  WHERE mandt = p_mdt_fm.
        IF sy-subrc <> 0.
          MESSAGE e000(8i) WITH text-001.
        ENDIF.
        DO.
          FETCH NEXT CURSOR icursor INTO TABLE <tab> PACKAGE SIZE 1000.
          IF sy-subrc <> 0.
            CLOSE CURSOR icursor.
            EXIT.
          ENDIF.
    *-- Modify Field 'MANDT' with the Target Client no.
          LOOP AT <tab> ASSIGNING <tab1>.
            ASSIGN COMPONENT: 'MANDT'  OF STRUCTURE <tab1> TO <l_mandt>.
            <l_mandt> = p_mdt_to.
            MODIFY <tab> FROM <tab1>.
            lines = lines + 1.
          ENDLOOP.
    *-- Insert records into target table
          INSERT (p_table) CLIENT SPECIFIED FROM TABLE <tab>.
    *-- Close the cursor
          CALL FUNCTION 'DB_COMMIT'.
        ENDDO.
    ENDIF.
    for target client
    *-- Open cursor
        OPEN CURSOR WITH HOLD icursor FOR
          SELECT * FROM (p_table) CLIENT SPECIFIED
                  WHERE mandt = p_mdt_to.
        IF sy-subrc <> 0.
          MESSAGE e000(8i) WITH text-001.
        ENDIF.
        DO.
          FETCH NEXT CURSOR icursor INTO TABLE <tab2> PACKAGE SIZE 1000.
          IF sy-subrc <> 0.
            CLOSE CURSOR icursor.
            EXIT.
          ENDIF.
    *-- Close the cursor
          CALL FUNCTION 'DB_COMMIT'.
        ENDDO.
      ENDIF.
      CALL SCREEN 3000.
    *&      Module  STATUS_3000  OUTPUT
          text
    MODULE status_3000 OUTPUT.
      SET PF-STATUS 'ZTESTMENU'.
    SET TITLEBAR 'xxx'.
    For Source client
      IF c_alv1 IS INITIAL.
        CREATE OBJECT c_cont1
          EXPORTING
            container_name = 'CONTAINER_SOURCE'.
        IF sy-subrc = 0.
          CREATE OBJECT c_alv1
            EXPORTING
              i_parent = c_cont1.
        ENDIF.
        IF sy-subrc EQ 0.
          PERFORM field_cat1.
        ENDIF.
        CALL METHOD c_alv1->set_table_for_first_display
         EXPORTING
    i_buffer_active               =
    i_bypassing_buffer            =
    i_consistency_check           =
    i_structure_name              =
    is_variant                    =
    i_save                        =
    i_default                     = 'x'
    is_layout                     =
    is_print                      =
    it_special_groups             =
    it_toolbar_excluding          =
    it_hyperlink                  =
    it_alv_graphics               =
    it_except_qinfo               =
    ir_salv_adapter               =
    CHANGING
    it_outtab           = <tab>
    it_fieldcatalog     = it_fieldcat1
    it_sort                       =
    it_filter                     =
    EXCEPTIONS
    valid_parameter_combination = 1
    program_error                 = 2
    too_many_lines                = 3
    others                        = 4
        IF sy-subrc <> 0.
                                  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                                             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    For Target client
      IF c_alv2 IS INITIAL.
        CREATE OBJECT c_cont2
          EXPORTING
            container_name              = 'CONTAINER_TARGET'.
        IF sy-subrc = 0.
          CREATE OBJECT c_alv2
            EXPORTING
              i_parent          = c_cont2.
        ENDIF.
        IF sy-subrc EQ 0.
          PERFORM field_cat2.
        ENDIF.
        CALL METHOD c_alv2->set_table_for_first_display
    EXPORTING
       i_buffer_active               =
       i_bypassing_buffer            =
       i_consistency_check           =
       i_structure_name              =
       is_variant                    =
       i_save                        =
       i_default                     = 'x'
       is_layout                     =
       is_print                      =
       it_special_groups             =
       it_toolbar_excluding          =
       it_hyperlink                  =
       it_alv_graphics               =
       it_except_qinfo               =
       ir_salv_adapter               =
          CHANGING
            it_outtab                     = <tab2>
            it_fieldcatalog               = it_fieldcat2
       it_sort                       =
       it_filter                     =
    EXCEPTIONS
       invalid_parameter_combination = 1
       program_error                 = 2
       too_many_lines                = 3
       others                        = 4
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " STATUS_3000  OUTPUT
    *&      Module  USER_COMMAND_3000  INPUT
          text
    MODULE user_command_3000 INPUT.
      CASE ok_code.
        WHEN 'BACK'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_3000  INPUT
    *&      Form  field_cat1
          text
    -->  p1        text
    <--  p2        text
    FORM field_cat1 .
    Dynamic creation of a structure
      CREATE DATA l_structure1 TYPE (p_table).
      ASSIGN l_structure1->* TO <dyn_str1>.
    Fields Structure
      struc_desc1 ?= cl_abap_typedescr=>describe_by_data( <dyn_str1> ).
      LOOP AT struc_desc1->components ASSIGNING <str_comp1>.
      Build Fieldcatalog
        ty_fieldcat1-fieldname = <str_comp1>-name.
        ty_fieldcat1-ref_table = p_table.
       CLEAR: l_pos.
    *l_pos = l_pos + 1.
    *ty_fieldcat1-seltext = 'CHECK'.
    *ty_fieldcat1-fieldname = 'CHECK'.
    *ty_fieldcat1-tabname = 'ITAB'.
    *ty_fieldcat1-col_pos = l_pos.
    *ty_fieldcat1-checkbox = 'X'.
    *ty_fieldcat1-edit = 'X'.
    *ty_fieldcat1-outputlen = '5'.
    APPEND ty_fieldcat1 TO it_fieldcat1.
      Build Fieldcatalog
        ls_fieldcatalogue1-fieldname = <str_comp1>-name.
        ls_fieldcatalogue1-ref_tabname = p_table.
        APPEND ls_fieldcatalogue1 TO lt_fieldcatalogue1.
      ENDLOOP.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
       i_style_table             =
          it_fieldcatalog           = it_fieldcat1
       i_length_in_byte          =
        IMPORTING
          ep_table                  = l_table1
       e_style_fname             =
    EXCEPTIONS
       generate_subpool_dir_full = 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.
      ASSIGN l_table1->* TO <tab>.
    Read data from the table selected.
      SELECT * FROM (p_table)
         CLIENT SPECIFIED
         INTO CORRESPONDING FIELDS OF TABLE <tab>
                   WHERE mandt = p_mdt_fm.
    ENDFORM.                    " field_cat1
    *&      Form  field_cat2
          text
    -->  p1        text
    <--  p2        text
    FORM field_cat2 .
      CREATE DATA l_structure2 TYPE (p_table).
      ASSIGN l_structure2->* TO <dyn_str2>.
    Fields Structure
      struc_desc2 ?= cl_abap_typedescr=>describe_by_data( <dyn_str2> ).
      LOOP AT struc_desc2->components ASSIGNING <str_comp2>.
      Build Fieldcatalog
        ty_fieldcat2-fieldname = <str_comp2>-name.
        ty_fieldcat2-ref_table = p_table.
        APPEND ty_fieldcat2 TO it_fieldcat2.
      Build Fieldcatalog
        ls_fieldcatalogue2-fieldname = <str_comp2>-name.
        ls_fieldcatalogue2-ref_tabname = p_table.
        APPEND ls_fieldcatalogue2 TO lt_fieldcatalogue2.
      ENDLOOP.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
       i_style_table             =
          it_fieldcatalog           = it_fieldcat2
       i_length_in_byte          =
        IMPORTING
          ep_table                  = l_table2
       e_style_fname             =
    EXCEPTIONS
       generate_subpool_dir_full = 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.
      ASSIGN l_table2->* TO <tab2>.
    Read data from the table selected.
      SELECT * FROM (p_table) CLIENT SPECIFIED
         INTO CORRESPONDING FIELDS OF TABLE <tab2>
                   WHERE mandt =  p_mdt_to.
    ENDFORM.                    " field_cat2
    *FOR THE ABOVE CODE I NEED CHECKBOXES IN THE FIRST LIST AND I HAVE TRIED MANY WAYS BUT I HAVENT GOT THE SOLUTION. SO, PLZ CAN U EXPLAIN BY MENTIONING THE PIECE OF CODE IN ABOVE CODE.
    PLZ DO THE NEED FUL.
    thanks in advance.

Maybe you are looking for

  • Why can't I get some buttons to work on websites? Need to enable something?

    Recently, I am not able to use certain portions of 3 websites that I used to be able to use. I can get to the pages, and some buttons/links work within pages, but when I try to click on some buttons on some pages, nothing happens at all. The computer

  • Re ordering Sort in stacked view chart of Pivot table

    Hi, I have a requirement to order the stack in a certain way rather than alphabetical. In my criteria I have a case statement that assigns 1, 2 or 3 and orders that column. But what is the syntax for me to do an order by? Please help. Thank you.

  • Do we have different Print Programs for printing Cheques in Different Lang

    Hi Peers, I have requirement of  Cheque printing in SPANISH Language. We have been using Program RFFOUS_C (International Payment Medium - Check (with check management)) for printing Cheques in French & English. This same print program does not work w

  • Start Air app from shell (adb shell am start)?

    SDK: 2.6 Im trying to auto start my app when I push it to a device for testing. Im using the adb shell with the "am start" command. Example In Bash: $am start air.SampleProject Returns the error: Starting: Intent { act=android.intent.action.VIEW dat=

  • Multiple Images - is it supported  -  HELP SEEMS UNHELPFUL

    Hi, I've got a content item that's supposed to hold 5 properties that happen to be images MyNode Mycontent image1 something,gif image2 somethingelse.gif image5 lastone.gif How do I display these images ? showBinary will only display one of these imag