Set Rendered on a 'Add' button to False has caused HTTP 400 error

Hi,
I am trying to personalise in Manager SS a custom version of seeded 'Documents of Record' function HR_DOR_SS to make the Add Record button non-display on the Documents of Record table. I changed Rendered to False, got the 'Setting this item to false may hide this item and its children' message but went ahead and did it anyway.
Outcome is that I can see the records in the table but can no longer view, update or delete existing records. I get a http 400 bad request page. I changed the 'Add' button back to Rendered True, but problem persists. Get the error also when I try to create a new record using the now re-instated button. Imported the personalization from another environment where it's working fine, bounced apache, clear cache etc and still problem persists.
Also if no record exists for employee, Add button works fine and I can create a record but from that point on cannot do anything with it.
Any help v much appreciated.
Thx

Yes, I've seen similar links/posts about how to activate buttons in the header of a table, but those do it by adding listeners to the renderer. My buttons would be directly in the CellRendererPane that is the container for the table header. I would have thought that by putting the button directly in the Cell RendererPane that it would have nothing to do with the rest of the table header. CellRendererPane extends Container. Is it not possible to put a JButton in a Container? JFrame extends indirectly from Container and you can add buttons to that.
Edited by: Bob.B on Oct 28, 2009 10:57 PM

Similar Messages

  • Subform Instance Controls: Add Button

    Hello,
    I have a subform that i want to continue repeating when the user clicks on the add button. I would like the minimum to be 0 and when the user clicks on the button it will bring up the first occurrence. The problem is that it is not allowing me to have a minimum of 0, only 1. if i change it to 0 then the subform does not appear when clicking the add button.
    Also, i keep getting an error message when clicking the add button. it says "Date of birth: the birth date must be entered". the message appears about 5 times. I have made the date of birth field in the subform 'optional' as it was previously mandatory, and i have confirmed that there is no other script causing the problem, so im not sure why it isnt working.
    I would greatly appreciate any help that is offered.
    Thank you in advance!
    Nik

    Yes, you can have a subform with its occurrence set as 0 and then added when a user clicks an add button.
    In a simple form I have a button with the following script _Subform1.addInstance();
    There is a subform named SubForm1 that exists and has on the binding tab of the object Repeat Subform for Each Data Item "checked"
    The min, max and initial count are not selected.    This will have it that when the form is rendered there is no instance of 'Subform1' and that when the add button is pressed then 'Subform1' is added once.

  • How to personalize and set rendered property false to poplist

    HI,
    could u please tell me that How to personalize and set rendered property false to poplist
    when poplist was developed initially it's user personalization property set as FALSE, that is why when i tried to personalize and set rendered property as flase, i could not able to find the property as rendered for that perticular item.
    Please provide me step by step process.
    Thanks,
    Ram.

    Hi Ram,
    you can do set rendered false through personalization as well as co extension.
    if you go for persoalization set the profile option Personalize Self Service Definitions and clik on personaliztion link
    then search for item and set its rendered property to false.
    If you go for co extension capture the poplist bean and and setRendered(false) to that field.
    If you are feeling difficulty by personalizatoin better go for CO extension.
    Thanks
    Amit Jaitly

  • Add button to unused space in JTableHeader

    I have modified my JTable so that I can have multiple rows of column headers. I did this by extending BasicTableHeaderUI. In my particular instance, the first column of the table will never have more than one row in the header (unlike other implementations of multi-row headers I have seen, my column headers don't automatically fill upwards to take up all usable space in the header). So, I have "unused" space in the header above the first column.
    I would like to put some buttons there that are relevant to the table, but so far every effort to do so has failed.
    In the SSCCE below I have created a very stripped down version of my TableHeaderUI. It doesn't contain any of the code to create multiple row headers, it just pushes down the standard column headers to create some space. I try adding a button to the rendererPane, but it doesn't show up. There is a commented out line that paints the button which does work in terms of showing the button, but that's probably not the right way to do this (and the button doesn't work anyway).
    So, why isn't the button showing up? Am I doing this the right way (i.e. adding the button within the UI)? Thanks in advance for you help.
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Point;
    import java.awt.Rectangle;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Enumeration;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.plaf.basic.BasicTableHeaderUI;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableColumn;
    import javax.swing.table.TableColumnModel;
    public class HeaderButtonTable extends JPanel {
         public HeaderButtonTable() {
              String[] colNames = {"column 1", "column2", "column3"};
              Object[][] data = {{"a","b","c"},{"d","e","f"}};
              JTable table = new JTable(data, colNames);
              table.setPreferredScrollableViewportSize(new Dimension(400,100));
              table.setFillsViewportHeight(true);
              table.getTableHeader().setUI(new ButtonHeaderUI());
              JScrollPane scrollPane = new JScrollPane(table);
              add(scrollPane);
         public class ButtonHeaderUI extends BasicTableHeaderUI {
              public void paint(Graphics g, JComponent c) {
                   Rectangle clip = g.getClipBounds();
                   Point left = clip.getLocation();
                   Point right = new Point( clip.x + clip.width - 1, clip.y );
                   TableColumnModel cm = header.getColumnModel();
                   int cMin = header.columnAtPoint(left);
                   int cMax = header.columnAtPoint(right);
                   if (cMin == -1) cMin =  0;
                   if (cMax == -1) cMax = cm.getColumnCount()-1;
                   TableColumn draggedColumn = header.getDraggedColumn();
                   int columnWidth;
                   Rectangle cellRect = header.getHeaderRect(cMin);
                   TableColumn aColumn;
                   for(int column = cMin; column <= cMax ; column++) {
                        aColumn = cm.getColumn(column);
                        columnWidth = aColumn.getWidth();
                        cellRect.width = columnWidth;
                        if (aColumn != draggedColumn) {
                             paintCell(g, cellRect, column);
                        cellRect.x += columnWidth;
                  JButton test = new JButton("test");
                  test.addActionListener(new ActionListener(){
                        public void actionPerformed(ActionEvent e) {
                             System.out.println("pressed");
                  test.setBounds(2, 2, 60, 15);
                  rendererPane.add(test);  //why isn't this showing up?
                  //this line will display the button, but button doesn't work
    //          rendererPane.paintComponent(g, test, header, 2, 2, 60, 15);
              private Component getHeaderRenderer(int columnIndex) {
                   TableColumn aColumn = header.getColumnModel().getColumn(columnIndex);
                   TableCellRenderer renderer = aColumn.getHeaderRenderer();
                   if (renderer == null) renderer = header.getDefaultRenderer();
                   return renderer.getTableCellRendererComponent(header.getTable(),
                        aColumn.getHeaderValue(), false, false, -1, columnIndex);
              private void paintCell(Graphics g, Rectangle cellRect, int columnIndex) {
                   Component component = getHeaderRenderer(columnIndex);
                   rendererPane.paintComponent(g, component, header,
                        cellRect.x, cellRect.y + 30, cellRect.width,
                        cellRect.height - 30, true);
              public Dimension getPreferredSize(JComponent c) {
                   long width = 0;
                   Enumeration enumeration = header.getColumnModel().getColumns();
                   while (enumeration.hasMoreElements()) {
                        TableColumn aColumn = (TableColumn)enumeration.nextElement();
                        width = width + aColumn.getPreferredWidth();
                   return new Dimension((int)width, 60);
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.add(new HeaderButtonTable());
              frame.pack();
              frame.setVisible(true);
    }

    Yes, I've seen similar links/posts about how to activate buttons in the header of a table, but those do it by adding listeners to the renderer. My buttons would be directly in the CellRendererPane that is the container for the table header. I would have thought that by putting the button directly in the Cell RendererPane that it would have nothing to do with the rest of the table header. CellRendererPane extends Container. Is it not possible to put a JButton in a Container? JFrame extends indirectly from Container and you can add buttons to that.
    Edited by: Bob.B on Oct 28, 2009 10:57 PM

  • Urgent - How to add buttons to a Table

    How to add buttons to a Table and enable them for Mouse Listeners/ Action Listeners

    extends the defaultcellrenderer make it return a Jbutton as the component to draw.
    class OverCellRendererClass extends DefaultTableCellRenderer {
    public Component getTableCellRendererComponent(JTable table,
    Object value,
    boolean isSelected,
    boolean hasFocus,
    int row,
    int column) {
    //put your stuff here to make or get a button
    return myButton;
    Use something like this to set the renderer for the column :
    tb.getColumnModel().getColumn(4).setCellRenderer(new YourCellRendererClass());

  • How to disable the Add button of attachmentLink programatically in CO

    Hi All,
    Please let me know how to disable Add button created along with the view list link of attachmentLink item in OAF.
    I want to enable only the view list linkl and disable Add button.
    Thanks
    Pooja

    Hi Pooja,
    You can set the property insert allowed to false for the entity map related to attachment item in page definition.
    Now in your controller, you can set this to true if your condition is achieved.
    Dictionary[] entityMaps = attBean.getEntityMappings()
    entityMaps[0].remove("insertAllowed");
    entityMaps[0].put("insertAllowed", false);
    attBean.setEntityMappings(entityMaps);
    Hope it helps.
    Thanks,
    Deepak
    Edited by: Deepak Jain on Apr 6, 2010 11:01 PM
    Edited by: Deepak Jain on Apr 7, 2010 12:02 AM

  • Catch event when user add an Invoice (push the Add button)

    i have User Defined Table(@User_Table1)
    so i like too whenever user click the Add Button, beside add an invoice..it write to the @User_Table1..
    at the moment, i using Screen Painter to make the form not using the existing one like A/R Invoice for example
    thanks

    I dont know about possibility how to continue the process of adding in case, that there will be some user input like msgbox, inputbox or something else. The only way how to do it (in my oppinion) is to at the end of the code set bubbleevent to true (maybe the msgbox sets it to false).  You have 2 choices how to recevie invoice details:
    - in case of beforeaction = true receive it from active form
    - in case of beforaction = false receive number of invoice and through object get details of invoice
    Petr

  • Add data to the table in the database with the use of add button

    The name of my database is Socrates.
    The name of the table in the database is Employees
    I want to be able to add data to the database. i am presently working on the add button such that when i enter date into the textfield and press the add button it should automatically register in the table.
    The error upon compilation is with this line of code
    If (ae.getSource() == jbtnA)// it says that ";" is expected
    Below is the entire code
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Mainpage extends JFrame implements ActionListener
         JTextField jFirstName = new JTextField(15);
         JTextField jSurname = new JTextField(12);
         JTextField jCity = new JTextField(10);
         JTextField jCountry = new JTextField(12);
         JTextField jSSN = new JTextField(8);
         JLabel jFirstLab = new JLabel("First Name");
         JLabel jSurnameLab = new JLabel("Surname");
         JLabel jCityLab = new JLabel("City");
         JLabel jCountryLab = new JLabel("Country");
         JLabel jSSNLab = new JLabel("Social Security Number (SSN)");
         JButton jbtnA = new JButton ("Add");
         JButton jbtnPrv = new JButton ("Previous");
         JButton jbtnNt = new JButton ("Next");
         JButton jbtnDl= new JButton ("Delete");
         JButton jbtnSrch = new JButton ("Search");
         public Mainpage (String title)
              super (title);
              Container cont = getContentPane();
              JPanel pane1 = new JPanel();
              JPanel pane2 = new JPanel();
              JPanel pane3 = new JPanel();
              pane1.setLayout (new GridLayout (0,1));
              pane2.setLayout (new GridLayout(0,1));
              pane3.setLayout (new FlowLayout());
              pane1.add(jFirstLab);
              pane1.add(jSurnameLab);     
              pane1.add(jCityLab);
              pane1.add(jCountryLab);
              pane1.add(jSSNLab);
              pane2.add(jFirstName);
              pane2.add(jSurname);
              pane2.add(jCity);
              pane2.add(jCountry);
              pane2.add(jSSN);
              pane3.add(jbtnA);
              pane3.add(jbtnPrv);
              pane3.add(jbtnNt);
              pane3.add(jbtnDl);
              pane3.add(jbtnSrch);
              cont.add(pane1, BorderLayout.CENTER);
              cont.add(pane2, BorderLayout.LINE_END);
              cont.add(pane3, BorderLayout.SOUTH);
              jFirstName.addActionListener(this);
              jSurname.addActionListener(this);
              jCity.addActionListener(this);
              jCountry.addActionListener(this);
              jSSN.addActionListener(this);
              jbtnA.addActionListener(this);
              jbtnPrv.addActionListener(this);
              jbtnNt.addActionListener(this);
              jbtnDl.addActionListener(this);
              jbtnSrch.addActionListener(this);
              validate();
              setVisible(true);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              pack();
              setResizable(false);
         public void actionPerformed(ActionEvent ae)
                   If (ae.getSource() == jbtnA)
                                    fst = jFirstName.getText();
                        srn = jSurname.getText();
                        cty = jCity.getText();
                        cnty = jCountry.getText();
                        int sn =
    Interger.parseInt(jSSN.getText());
                                    String ad = "Insert into Employees
    (Firstname,Surname,City,Country,SSN)" +
    "values('"fst"','"srn"','"cty"','"cnty"','"sn"')";
                        Statement stmt = con.createStatment();
                        int rowcount = stmt.executeUpdate(ad);
                        JOptionPane.showMessageDialog("Your
    details have been registered");
                        Statement stmt = con.createStatment();
                        int rowcount = stmt.executeUpdate(ad);
    public static void main (String args[])
              Mainpage ObjFr = new Mainpage("Please fill this
    registration form");
              try
                   Class.forname("sun.jdbc.odbc.JdbcOdbcDriver");
                   String plato = "jdbc:odbc:socrates";
                   Connection con =
    DriverManager.getConnection(plato);
              catch(SQLException ce)
                   System.out.println(ce);
    }

    i have restructured the code, but the following line of code is giving error:
    String plato = jdbc:odbc:socrates;
    the entire code is below:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class Mainpage extends JFrame implements ActionListener
         JTextField jFirstName = new JTextField(15);
         JTextField jSurname = new JTextField(12);
         JTextField jCity = new JTextField(10);
         JTextField jCountry = new JTextField(12);
         JTextField jSSN = new JTextField(8);
         JLabel jFirstLab = new JLabel("First Name");
         JLabel jSurnameLab = new JLabel("Surname");
         JLabel jCityLab = new JLabel("City");
         JLabel jCountryLab = new JLabel("Country");
         JLabel jSSNLab = new JLabel("Social Security Number (SSN)");
         JButton jbtnA = new JButton ("Add");
         JButton jbtnPrv = new JButton ("Previous");
         JButton jbtnNt = new JButton ("Next");
         JButton jbtnDl= new JButton ("Delete");
         JButton jbtnSrch = new JButton ("Search");
         Statement stmt;
            String ad;
            public Mainpage (String title)
              super (title);
              Container cont = getContentPane();
              JPanel pane1 = new JPanel();
              JPanel pane2 = new JPanel();
              JPanel pane3 = new JPanel();
              pane1.setLayout (new GridLayout (0,1));
              pane2.setLayout (new GridLayout(0,1));
              pane3.setLayout (new FlowLayout());
              pane1.add(jFirstLab);
              pane1.add(jSurnameLab);     
              pane1.add(jCityLab);
              pane1.add(jCountryLab);
              pane1.add(jSSNLab);
              pane2.add(jFirstName);
              pane2.add(jSurname);
              pane2.add(jCity);
              pane2.add(jCountry);
              pane2.add(jSSN);
              pane3.add(jbtnA);
              pane3.add(jbtnPrv);
              pane3.add(jbtnNt);
              pane3.add(jbtnDl);
              pane3.add(jbtnSrch);
              cont.add(pane1, BorderLayout.CENTER);
              cont.add(pane2, BorderLayout.LINE_END);
              cont.add(pane3, BorderLayout.SOUTH);
              jFirstName.addActionListener(this);
              jSurname.addActionListener(this);
              jCity.addActionListener(this);
              jCountry.addActionListener(this);
              jSSN.addActionListener(this);
              jbtnA.addActionListener(this);
              jbtnPrv.addActionListener(this);
              jbtnNt.addActionListener(this);
              jbtnDl.addActionListener(this);
              jbtnSrch.addActionListener(this);
              validate();
              setVisible(true);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              pack();
              setResizable(false);
              try
                   Class.forname(sun.jdbc.odbc.JdbcOdbcDriver);
                   String plato = jdbc:odbc:socrates;
                   Connection con = DriverManager.getConnection(plato);
                   stmt = con.createStatment();
              catch(SQLException ce)
                   System.out.println(ce);
              catch(ClassNotFoundException ce)
                   System.out.println(ce);
         public void actionPerformed(ActionEvent ae)
                   try
                        if(ae.getSource().equals(jbtnA))
                                         fst = jFirstName.getText();
                             srn = jSurname.getText();
                             cty = jCity.getText();
                             cnty = jCountry.getText();
                             int sn = Interger.parseInt(jSSN.getText());
                                         ad = "Insert into Employees
    values('"+fst+"',"+srn+"','"+cty+"','"+cnty+"','"+sn+"')";
                             stmt.executeUpdate(ad);
                             JOptionPane.showMessageDialog(this, "Your details have been
    registered");
                   catch(SQLException ce)
                        System.out.println(ce);
    public static void main(String args[])
              Mainpage ObjFr = new Mainpage("Please fill this registration form");
    }

  • How can I add buttons that do different things to each row of an rpt result

    Hi there,
    I'm trying to figure out how to add buttons to each row of a report. Here is the scenario:
    report query returns a set of data that needs to be "approved". The options are "Append", "Replace", or "Reject" (I want to make the results look like so:)
    Person1 today blah, blah blah... Append button Replace button Reject button
    Person2 today blah, blah, blah... Append button Replace button Reject button
    PersonA today something, blah... Append button Replace button Reject button
    and so on.
    I'd like to set up the page so that there is an append, replace, reject button for each row returned by the report. So when the "Approver" clicks on the append button, something happens for that row, etc. How does one do this? So far I can only get the buttons to show up in the region. I also thought it might be possible to somehow turn the append, replace, reject text into links that called a plsql proceedure that would handle the action, but I'm not having any success with that idea either.
    Edited by: user10361829 on Sep 29, 2009 12:10 PM

    What I've done is make my report query as follows:
    select field_a, field_b, field_c, 'Append', 'Replace', 'Reject'
    from table_x
    where field y = :PX_ID
    That gives me the words (append, replace, reject) in the report. Then I go to the report attributes section and make a link out of the columns (append, replace, reject) so far, so good.
    Next question is how to make clicking on those links activate an update action on tableN. In the column_link section there is a box marked "Request" that looks like it might be relevant because Request is a term connected to buttons, but I've no idea how to use it. Or, can one use the tabluar form element section of the report attributes page to connect the Append (pseudo column) to an action? I've looked at your example (Sam) with the delete button, but what I really need to see is the Apex menu that sets it up because there are so many levels in the interface it is not intuitive (at least for me). I know exactly what I want it to look like but I'm missing the crucial step to get there... Thanks for your help so far.
    Column link section is described below :
    Column Link     Top
    Link Text      flashlight          
         [*Append*][Icon 1][Icon 2][Icon 3][Icon 4][Icon 5]
    Link Attributes      
    Target: *"Page in this application"*     Page: *10*     
    Reset Pagination
    Request Clear Cache      
    Name     Value
    Item 1      Px_page_item flashlight *#????#*          flashlight
    Item 2      flashlight          flashlight
    Item 3      flashlight          flashlight
    URL      
    Page Checksum

  • Memo doesn't display the "add" button on i Phone4 running iOs5th

    My Memo app called "Promemoria" in Italia, vannot display the "add" button, so .... I cannot add memo.
    Instead of that button there i the "Today" one.
    What's the problem?
    How can I solve it?

    Hi,
    That will be the Bonjour Buddy List.
    The Buddies are added to this one automatically.
    It picks up the other people using Macs and with iChat ON  (or Messages) with the Bonjour account enabled.
    You see their Name as it is in their Address Book > My Card.
    They see your Name as per your My Card in the Address Book (Contacts app on Mountain Lion)
    You will need to set up iChat with either an AIM name or a Jabber based one.
    8:09 PM      Tuesday; April 16, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • How to add button in reuse_alv not in gui status

    hi guys,
    my question how can i add button to reuse_alv not in gui_status or pf_status ? and also i have an internal table which contains a checkbox field when user select one or more check box and push button , new table will be sended to batch input program.how can i do add button part, the rest of it is done.?

    Hi,The following sample report ZUS_SDN_ALV_BUTTON_CLICK_LTXT shows a possible way how to handle the BUTTON_CLICK event in order to retrieve a longtext for a ALV entry. Please note that for the sake of simplicity I have choosen an obsolete function module for text editing (only enter numerical values otherwise the function module crashes).
    *& Report ZUS_SDN_ALV_BUTTON_CLICK_LTXT
    *& Screen '0100' contains no elements.
    *& ok_code -> assigned to GD_OKCODE
    *& Flow logic:
        * PROCESS BEFORE OUTPUT.
        * MODULE STATUS_0100.
        * PROCESS AFTER INPUT.
        * MODULE USER_COMMAND_0100.
    *& PURPOSE: Demonstrate event BUTTON_CLICK for entering long text
    REPORT zus_sdn_alv_button_click_ltxt.
    TYPE-POOLS: icon.
    TYPES: BEGIN OF ty_s_outtab.
    INCLUDE TYPE knb1.
    TYPES: button TYPE iconname.
    TYPES: line TYPE bapi_line.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
    WITH DEFAULT KEY.
    DATA:
    gd_okcode TYPE ui_func,
    gd_repid TYPE syst-repid,
    go_docking TYPE REF TO cl_gui_docking_container,
    go_grid TYPE REF TO cl_gui_alv_grid,
    gt_fcat TYPE lvc_t_fcat,
    gt_variant TYPE disvariant,
    gs_layout TYPE lvc_s_layo.
    DATA:
    gs_outtab TYPE ty_s_outtab,
    gt_outtab TYPE ty_t_outtab.
        * CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
    PUBLIC SECTION.
    CLASS-METHODS:
    handle_button_click FOR EVENT button_click OF cl_gui_alv_grid
    IMPORTING
    es_col_id
    es_row_no
    sender.
    ENDCLASS. "lcl_eventhandler DEFINITION
        * CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
    METHOD handle_button_click.
        * define local data
    DATA:
    ld_answer(1) TYPE c,
    ls_outtab TYPE ty_s_outtab.
    CHECK ( sender = go_grid ).
    READ TABLE gt_outtab INTO ls_outtab INDEX es_row_no-row_id.
    " Note: This function module is obsolete and crashes if
    " non-numerical values are entered. Choose a more
    " appropriate way of entering the longtext.
    CALL FUNCTION 'POPUP_TO_GET_VALUE'
    EXPORTING
    fieldname = 'LINE'
    tabname = 'BAPITGB'
    titel = 'Enter Longtext'
    valuein = ls_outtab-line
    IMPORTING
    answer = ld_answer
    valueout = ls_outtab-line
    EXCEPTIONS
    fieldname_not_found = 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.
    IF ( ld_answer NE 'C' ). " 'C' = cancel
    MODIFY gt_outtab FROM ls_outtab INDEX es_row_no-row_id
    TRANSPORTING line.
    ENDIF.
        * Triggers PAI of the dynpro with the specified ok-code
    CALL METHOD cl_gui_cfw=>set_new_ok_code( 'REFRESH' ).
    ENDMETHOD. "handle_button_click
    ENDCLASS. "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
    SELECT * FROM knb1
    INTO CORRESPONDING FIELDS OF TABLE gt_outtab
    WHERE bukrs = '1000'.
    CLEAR: gs_outtab.
    gs_outtab-button = icon_change_text.
    MODIFY gt_outtab FROM gs_outtab
    TRANSPORTING button LINE
    where ( bukrs NE space ). " modify all lines
    PERFORM build_fieldcatalog.
        * Create docking container
    CREATE OBJECT go_docking
    EXPORTING
    parent = cl_gui_container=>screen0
    ratio = 90
    EXCEPTIONS
    OTHERS = 6.
    IF sy-subrc 0.
        * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
        * Create ALV grids
    CREATE OBJECT go_grid
    EXPORTING
    i_parent = go_docking
    EXCEPTIONS
    OTHERS = 5.
    IF sy-subrc 0.
        * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
        * Set event handler
    SET HANDLER: lcl_eventhandler=>handle_button_click FOR go_grid.
        * Display data
    gs_layout-grid_title = 'Customers'.
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING
    is_layout = gs_layout
    CHANGING
    it_outtab = gt_outtab
    it_fieldcatalog = gt_fcat
    EXCEPTIONS
    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.
        * Link the docking container to the target dynpro
    gd_repid = syst-repid.
    CALL METHOD go_docking->link
    EXPORTING
    repid = gd_repid
    dynnr = '0100'
        * CONTAINER =
    EXCEPTIONS
    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.
        * NOTE: dynpro does not contain any elements
    CALL SCREEN '0100'.
        * Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
        * MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
        * MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *& Module STATUS_0100 OUTPUT
        * text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'STATUS_0100'. " contains push button "DETAIL"
        * SET TITLEBAR 'xxx'.
    CALL METHOD go_grid->refresh_table_display
        * EXPORTING
        * IS_STABLE =
        * I_SOFT_REFRESH =
        * EXCEPTIONS
        * FINISHED = 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.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
        * text
    MODULE user_command_0100 INPUT.
    CASE gd_okcode.
    WHEN 'BACK' OR
    'END' OR
    'CANC'.
    SET SCREEN 0. LEAVE SCREEN.
        * Refresh -> pass PAI and PBO where flushing occurs
    WHEN 'REFRESH'.
    WHEN OTHERS.
    ENDCASE.
    CLEAR: gd_okcode.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form BUILD_FIELDCATALOG
        * text
        * --> p1 text
        * <-- p2 text
    FORM build_fieldcatalog .
        * define local data
    DATA:
    ls_fcat TYPE lvc_s_fcat,
    lt_fcat TYPE lvc_t_fcat.
    REFRESH: gt_fcat.
    CLEAR: lt_fcat.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    i_structure_name = 'KNB1'
    CHANGING
    ct_fieldcat = lt_fcat
    EXCEPTIONS
    OTHERS = 99.
    IF sy-subrc 0.
        * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    APPEND LINES OF lt_fcat TO gt_fcat.
    CLEAR: lt_fcat.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    i_structure_name = 'BAPITGB'
    CHANGING
    ct_fieldcat = lt_fcat
    EXCEPTIONS
    OTHERS = 99.
    IF sy-subrc 0.
        * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE lt_fcat INTO ls_fcat
    WITH KEY fieldname = 'LINE'.
    IF ( syst-subrc = 0 ).
    INSERT ls_fcat INTO gt_fcat INDEX 4.
    ENDIF.
    CLEAR: lt_fcat.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    i_structure_name = 'ICON'
    CHANGING
    ct_fieldcat = lt_fcat
    EXCEPTIONS
    OTHERS = 99.
    IF sy-subrc 0.
        * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE lt_fcat INTO ls_fcat
    WITH KEY fieldname = 'NAME'.
    IF ( syst-subrc = 0 ).
    ls_fcat-fieldname = 'BUTTON'.
    ls_fcat-style = cl_gui_alv_grid=>mc_style_button.
    INSERT ls_fcat INTO gt_fcat INDEX 4.
    ENDIF.
    LOOP AT gt_fcat INTO ls_fcat.
    ls_fcat-col_pos = syst-tabix.
    MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
    ENDLOOP.
    ENDFORM. " BUILD_FIELDCATALOG[/code]
    Reward If Found Useful.

  • Document Add button - change a UDF so B1 writes value to  tables

    When the user presses the add button on a document, like an invoice, I want to loop through the items matrix and update a UDF on each row, so that Business one will write my values in the UDFs to the line item table (INV1), but I can't figure out how.
    2 problems: The first is all the message boxes that B1 sometimes displays (like document total is zero, or error messages like 'no tax code entered'.  I need to do my work AFTER these all occur, but just BEFORE the document is created.  WHEN do I do this?
    The other problem is that it seems like when I've tried something like this before, My changes to anything on the screen cause B1 to re-fire the events and then cancel the Add.
    I don't want users to change these fields after I've loaded them, and I'd rather not retrieve the document after it's added and then change the values.  I've found similar problems in the forum but none of them speaks exactly to this
    Any ideas?
    Thanks/Gracias/Dankeschoen/Merci/Danyavad/Toa chie

    Hi John,
    Hope you're doing well.
    I suggest the formdataevent.
    There is a example in the sdk.
    This is what I use:
    Public Sub FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles UIAPP.FormDataEvent
                'Occurs when the application performs the following actions on forms connected to business objects:
                '            Add()
                '            Update()
                '            Delete()
                'Load form data via browse, link button, or find
                'The event provides the unique ID (BusinessObjectInfo.ObjectKey) of the modified business object.
                'You can use the value of this property as an input parameter in the DI API DataBrowser.GetByKeys method to get a DI object.
                Dim form As SAPbouiCOM.Form = UIAPP.Forms.Item(BusinessObjectInfo.FormUID)
                Dim bisObj As SAPbouiCOM.BusinessObject = form.BusinessObject
                Dim uid As String = bisObj.Key
                FormDataEventCommon.FormDataEventLogic(BusinessObjectInfo, BubbleEvent, bisObj, form)
                System.Runtime.InteropServices.Marshal.ReleaseComObject(form)
                System.Runtime.InteropServices.Marshal.ReleaseComObject(bisObj)
                form = Nothing
                bisObj = Nothing
                GC.Collect()
            End Sub
    calls this function.
    Public Function FormDataEventLogic(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean, ByRef bisobj As SAPbouiCOM.BusinessObject, ByRef form As SAPbouiCOM.Form) As Boolean
                Dim Test As Integer = form.Mode
                Dim mat As String = ""
                Dim Fld As String = ""
                Dim rep As String = ""
                Dim ColFlag As Boolean = False
                If BusinessObjectInfo.BeforeAction Then
                    Select Case BusinessObjectInfo.EventType
                        Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD
                            Select Case BusinessObjectInfo.Type
                                Case "COMMISSION OBJ UDO"
                                    Dim CommTblClass As New CommAdj_Class(form.UniqueID)
                                    Dim StrLN As String = CommTblClass.GetFieldValue(form.UniqueID, "EMONLN")
                                    If StrLN = "" Then
                                        CommTblClass.Displayerror("Please enter a load number")
                                        BubbleEvent = False
                                    End If
                                    CommTblClass.release()
                            End Select
                    End Select
                Else
                    Select Case BusinessObjectInfo.EventType
                        Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD
                            ' Addnew information for a new document
                            Select Case BusinessObjectInfo.Type
                                Case SAPbobsCOM.BoObjectTypes.oDeliveryNotes
                                Case SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes
                                Case SAPbobsCOM.BoObjectTypes.oOrders
                                Case SAPbobsCOM.BoObjectTypes.oInvoices
                                Case SAPbobsCOM.BoObjectTypes.oCreditNotes
                                Case SAPbobsCOM.BoObjectTypes.oReturns
                                Case SAPbobsCOM.BoObjectTypes.oQuotations
                                Case SAPbobsCOM.BoObjectTypes.oPurchaseInvoices
                                Case SAPbobsCOM.BoObjectTypes.oInventoryGenEntry
                                Case "COMMISSION OBJ UDO"
                            End Select
                        Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE
                            ' Update exisitng Document
                            Select Case BusinessObjectInfo.Type
                                Case SAPbobsCOM.BoObjectTypes.oDeliveryNotes
                                Case SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes
                                Case SAPbobsCOM.BoObjectTypes.oInvoices
                                Case SAPbobsCOM.BoObjectTypes.oCreditNotes
                                Case SAPbobsCOM.BoObjectTypes.oReturns
                                Case SAPbobsCOM.BoObjectTypes.oOrders
                                Case SAPbobsCOM.BoObjectTypes.oQuotations
                                Case SAPbobsCOM.BoObjectTypes.oInventoryGenEntry
                                Case "COMMISSION OBJ UDO"
                            End Select
                        Case BoEventTypes.et_FORM_DATA_LOAD
                            Select Case BusinessObjectInfo.Type
                                Case SAPbobsCOM.BoObjectTypes.oDeliveryNotes
                                Case SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes
                                Case SAPbobsCOM.BoObjectTypes.oInvoices
                                Case SAPbobsCOM.BoObjectTypes.oCreditNotes
                                Case SAPbobsCOM.BoObjectTypes.oReturns
                                Case SAPbobsCOM.BoObjectTypes.oOrders
                                Case SAPbobsCOM.BoObjectTypes.oQuotations
                            End Select
                    End Select
                End If
                Return True
            End Function

  • In which function i should set rendered  property of components

    Hi
    Thank you for reading my psot.
    it is really making me mad.
    can some one tell me which function of a backing bean i should use to set rendered property of some components ?
    i tried all of them and none of them seems to apply the rendereing propretiy.

    It is easy to find out
    Add a message group to the Page. Then in each method add
    info("At method <method name>");
    Run the application and see the results.
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • Missing the "ADD" button for custom print sizes

    I can follow an instruction like:
    - Open the Printers or Printer And Faxes window from the Start menu. Right-click the Adobe PDF printer, and choose Printing Preferences.
    or i can get to that same place in Word/Print/etc.
    But when i get to the tab "Adobe PDF Settings" and look next to the drop-down for "Adobe PDF Page Size", the "ADD" button is missing.
    You can see what I mean with a screen print I pasted at http://www.miloshapiro.com/temp/temp.htm .
    I know I'm looking in the right place because I remember seeing the button there before.
    What might i possibly have messed up to have this button go away...and more importantly how can I get it back?
    I'm on Acrobat 6 on WinXP, if that matters.
    Will try to paste image below as well.

    Did you check for a custom setting under the Page Size list?

  • Qurery on Add Button of Sales A/R Invoice form

    Hello sir
    I want to  do the Update query on add button of Sales A/R From, to update the satus of my user form
    plz  suggest

    If pVal.ItemUID = "1" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.FormMode = SAPbouiCOM.BoFormMode.fm_ADD_MODE And pVal.BeforeAction = False Then
                        Dim oForm As SAPbouiCOM.Form
                        oForm = SBO_Application.Forms.Item(FormUID)
                        If oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
                            If pVal.ActionSuccess = True Then
                                Try
                                    ' setVisibilityForControlPQ()
                                    SetInitialDataPQ()
                                Catch ex As Exception
                                    ShowErrMsg("Event Error et_ITEM_PRESSED: " & ex.Message)
                                Finally
                                End Try
                            End If ' action close
                        End If 'mode close
                    End If 'else if

Maybe you are looking for

  • Passing select-option to FM

    Hi I have to create a FM where I have to code Select-options to FM . how could I create FM (input/table ) parameter in FM for LIFNR field. Regards, Vinesh.

  • Getting error -36 while copying from mac HD to usb HFS+ drive

    Hi first off, id did google this stuff.. but couldn't find a solution. i tried all the dot_clean stuff without result. i'm running the latest update of snow leopard 10.6.7 so here's the situation: i've got this 1TB FAT32 usb-drive filled with backups

  • Project VBA Documentation/Reference

    Similar to docs.oracle.com for Java, is there documentation for VBA 2010? I need to look up a few methods for Project 2010 VBA.

  • Activating 2 iPhone 5 Two Days Apart

    I bought 2 iPhone 5 phones and I am switching from AT&T to Verizon. My wife is going to be out of town until Sunday. Can I activate my phone on Verizon's network and will her phone on AT&T remain active? Or will they both port over once one phone is

  • J2eetutorial14  example help..

    Hi, I am new to Java technology & trying for servlet... while working with tutorial trying >asant build results in to an error c:\lib not found (!!!!) CLASSPATH is set in my env variable... I copied another example (java file) from ibm site and succe