Using tableView in PCR

I'm developing a Personnel Change Request (PCR) and want to use a tableView to display search results from a search page.  Normally, in a JSPDYNPage program, the tableView doNavigate event processor is coded within the JSPDYNPage, however, within the PCR framework, no JSPDYNPage exists.  I have tried to code the doNavigate event as embedded Java within the PCR JSP page, however, the method cannot be resolved.  The code follows (the logic is incomplete, I just need the syntax):
<%! public TableNavigationEvent tne;    %>
<%! public void onResultNavigate(Event event) throws PageException { 
     tne = (TableNavigationEvent) event;
     }   %>  
     <br>
     <hbj:tableView id="kostltab"
          design="ALTERNATING"
                model="PCRBean.resultDataModel"
                onNavigate="onResultNavigate"
          headerVisible="true"
          headerText="Cost Centers"
          fillUpEmptyRows="false"
                electionMode = "SINGLESELECT"
          visibleRowCount="10"
          visibleFirstRow="<%=PCRBean.getResultRow() %>"
          width="500">
          </hbj:tableView>
I receive the following message when I attempt to page down:
Eventhandler- "onResultNavigate" not found!.
So, my question is: can a tableView onNavigate event handler be coded as a Java method within the JSP?  If so, is there any special syntax.
Thanks much.
Mark

I'm developing a Personnel Change Request (PCR) and want to use a tableView to display search results from a search page.  Normally, in a JSPDYNPage program, the tableView doNavigate event processor is coded within the JSPDYNPage, however, within the PCR framework, no JSPDYNPage exists.  I have tried to code the doNavigate event as embedded Java within the PCR JSP page, however, the method cannot be resolved.  The code follows (the logic is incomplete, I just need the syntax):
<%! public TableNavigationEvent tne;    %>
<%! public void onResultNavigate(Event event) throws PageException { 
     tne = (TableNavigationEvent) event;
     }   %>  
     <br>
     <hbj:tableView id="kostltab"
          design="ALTERNATING"
                model="PCRBean.resultDataModel"
                onNavigate="onResultNavigate"
          headerVisible="true"
          headerText="Cost Centers"
          fillUpEmptyRows="false"
                electionMode = "SINGLESELECT"
          visibleRowCount="10"
          visibleFirstRow="<%=PCRBean.getResultRow() %>"
          width="500">
          </hbj:tableView>
I receive the following message when I attempt to page down:
Eventhandler- "onResultNavigate" not found!.
So, my question is: can a tableView onNavigate event handler be coded as a Java method within the JSP?  If so, is there any special syntax.
Thanks much.
Mark

Similar Messages

  • Checkbox  in a table loop - without using Tableview or Iterator.

    My client doesnt want to use tableview or iterator. We are using basic html to create the page. I know I can accomplish much easily using tableviews...but I am not allowed to use it.
    My requirement is simple. In my layout I loop at my internal table and display the contents. The last field is displayed as a checkbox.
    Ex:
    Name  status flag
    Tom  10         [ ]
    Ted    20        [X]
    Rob    10       [X]
    My loop in the Layout is as below:
    <%
      loop at t_rqdt into l_rqdt.
      if l_rqdt-flag = 'X'.
         l_chk = 'checked'.
      endif.
    %>
    <tr bgcolor="#EFEFEF">
    <td></td>
    <td <%= l_rqdt-name %> </td>
    <td <%= l_rqdt-status %></td>
    <td class=tdstatus width=40% >
    <input type=checkbox name="flag" value="flag" <%= l_chk %> > </td>
      </tr>
    <%
      endloop.
    %>
    When I select couple of rows and mark the flag field checkbox, and SUBMIT at the end, and when I see my internal table t_rqdt field r_rqdt-flag.. I dont see them having value X for the rows I marked the check boxes.
    Can anyone please help me how can I trap the checkboxes marked inside a table loop in my on input processing?
    Thanks
    PK

    Much Thanks Raja! It worked!!
    I declared as below for the form fields and was able to get values.
        DATA:  t_form_fields TYPE tihttpnvp.
        DATA:  l_form_fields TYPE LINE OF tihttpnvp.
        CALL METHOD request->get_form_fields
          CHANGING
            fields = t_form_fields.
    One more before my client asks me to do..
    if I place a button CheckALL and Uncheck All on the layout, how can we check/uncheck all the checkboxes on the client side. Any simple Javascript method available? I know I can pass the itab to on input processing and get the flags set, but if it can be achieved on the client side using a script that would help.
    Please let me know.
    Thanks.

  • Using TableView in DefaultStyledDocument

    I have added tables to a DefaultStyledDocument using TableView, TableRow and ParagraphView for cells. I add text to the document using insertText(position, string, style) and tables using insert(position, elementSpec[]). The element spec array for a table might be:
    tableStart
      rowStart
        cellStart
          content
        cellEnd
      rowEnd
    tableEndThis all works OK but in my tests, the table won't resize along the Y axis when it is not the first thing in the document. If it is the first (or only) thing everything is fine. The cells contain text and strangely, this wraps as expected as the window is shrunk but intercepting setSize at the table, row and cell levels shows that the Y axis never grows as the lines in the cells are broken. I'm drawing a border so, of course, the text appears 'outside' and if scrolling is required then anything below the preceived table size cannot be brought into view.
    Using Java 1.4.1 on WinNT - Ideas welcome.

    The key to using TableView is to realise that it does the row/column span stuff but doesn't enforce the type of children you might want to put in it. It is declared abstract so you must extend it to use it, and if you want to use the TableRow inner class you must create the rows in the context of a TableView instance. That said, here is my code again. I explain the important points below:
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.geom.Rectangle2D;
    import java.awt.Shape;
    import java.awt.BasicStroke;
    import javax.swing.SizeRequirements;
    import javax.swing.event.DocumentEvent;
    import javax.swing.text.View;
    import javax.swing.text.BoxView;
    import javax.swing.text.Document;
    import javax.swing.text.ViewFactory;
    import javax.swing.text.Element;
    import javax.swing.text.AttributeSet;
    import javax.swing.text.ParagraphView;
    import java.util.HashSet;
    * @author $Author: Sanderst $
    * @version $Revision: 1 $
    public class StyledEditorKit extends javax.swing.text.StyledEditorKit
      private static HashSet elementTypes__;
      public static String TABLE = "table";
      public static String ROW   = "row";
      public static String CELL  = "cell";
      private ViewFactory viewFactory_ = new ExtendedViewFactory();
      private ViewFactory origVf_;
      static
        elementTypes__ = new HashSet();
        elementTypes__.add(TABLE);
        elementTypes__.add(ROW);
        elementTypes__.add(CELL);
      public StyledEditorKit(ViewFactory vf)
        origVf_ = vf;
      public Document createDefaultDocument()
        return new StyledDocument();
      public ViewFactory getViewFactory()
        return viewFactory_;
      private class ExtendedViewFactory implements ViewFactory
        public View create(Element elem)
             String kind = elem.getName();
          System.out.println("ExtendedViewFactory.create " + kind);
             if (elementTypes__.contains(kind))
            if (kind.equals(TABLE))
              //System.out.println("ExtendedViewFactory.create TABLE!");
              return new TableView(elem);
            else if (kind.equals(ROW))
              // If this gets called its a problem because TableRow is a
              // member-inner class of TableView and we don't have the
              // TableView to create it with.  loadChildren is called instead
              //System.out.println("ExtendedViewFactory.create ROW!");
              return null;
            else if (kind.equals(CELL))
              //System.out.println("ExtendedViewFactory.create CELL!");
              //return new ParagraphView(elem);
              TableCell tc = new TableCell(elem);
              tc.setBorderWidth((short)1);
              tc.setCellPadding((short)3);
              return tc;
            else
              return origVf_.create(elem); // Defer to swing's ViewFactory
             else
            // Defer to swing's ViewFactory
            return origVf_.create(elem);
      static private class TableView extends javax.swing.text.TableView
        private View parent_;
        final static private BasicStroke stroke_ = new BasicStroke(1.0f);
        TableView (Element elem)
          super(elem);
          //System.out.println("TableView()");
        // Override to protect our children from having their
        // parent view set to null as well.  See View.setParent()
        public void setParent(View parent)
          if (parent != null)
            super.setParent(parent);
          parent_ = parent;
        public View getParent()
          return parent_;
        public void paint(Graphics g,
                          Shape    allocation)
          //layoutChanged(View.Y_AXIS);
          super.paint(g, allocation);
          //System.out.println("TableView.paint");
        public void setSize(float width, float height)
          super.setSize(width, height);
          //System.out.println("TableView.setSize          " + hashCode() + " " + width + " " + height);
        public float getPreferredSpan(int axis)
          float f = super.getPreferredSpan(axis);
          //if (axis == View.Y_AXIS)
            //System.out.println("TableView.getPreferredSpan " + hashCode() + " " + axis + " " + f);
          return f;
        public float getMinimumSpan(int axis)
          float f = super.getMinimumSpan(axis);
          //if (axis == View.Y_AXIS)
            //System.out.println("TableView.getMinimumSpan   " + hashCode() + " " + axis + " " + f);
          return f;
        public float getMaximumSpan(int axis)
          //float f = super.getMaximumSpan(axis);
          float f ;
          if (axis == View.X_AXIS)
            f = super.getPreferredSpan(axis);  // No stretch.  Could make configurable...
          else
            f = super.getMaximumSpan(axis);
          //if (axis == View.Y_AXIS)
            //System.out.println("TableView.getMaximumSpan   " + hashCode() + " " + axis + " " + f);
          return f;
        protected void loadChildren(ViewFactory f)
          if (f == null)
            // No factory. This most likely indicates the parent view
            // has changed out from under us, bail!
            System.out.println("No factory!!");
            return;
          //System.out.println("TableView.loadChildren()");
          Element e = getElement();
          int n = e.getElementCount();
          if (n > 0)
            View[] added = new View[n];
            for (int i = 0; i < n; i++)
              added[i] = new TableRow(e.getElement(i));
            replace(0, getViewCount(), added);
        public class TableRow extends javax.swing.text.TableView.TableRow
          TableRow(Element elem)
            super(elem);
          public void paint(Graphics g,
                            Shape    allocation)
            super.paint(g, allocation);
            drawCellBorder(g, allocation);
            //System.out.println("TableRow.paint");
          public void setSize(float width, float height)
            super.setSize(width, height);
            //System.out.println("TableRow.setSize           " + hashCode() + " " + width + " " + height);
          public float getPreferredSpan(int axis)
            float f = super.getPreferredSpan(axis);
            //if (axis == View.Y_AXIS)
              //System.out.println("TableRow.getPreferredSpan  " + hashCode() + " " + axis + " " + f);
            return f;
          public float getMinimumSpan(int axis)
            float f = super.getMinimumSpan(axis);
            //if (axis == View.Y_AXIS)
              //System.out.println("TableRow.getMinimumSpan    " + hashCode() + " " + axis + " " + f);
            return f;
          public float getMaximumSpan(int axis)
            float f = super.getMaximumSpan(axis);
            //if (axis == View.Y_AXIS)
              //System.out.println("TableRow.getMaximumSpan    " + hashCode() + " " + axis + " " + f);
            return f;
          protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r)
            int min   = 0;
            long pref = 0;
            int max   = 0; //Integer.MAX_VALUE;
            int n = getViewCount();
            for (int i = 0; i < n; i++)
              View v = getView(i);
              min = Math.max((int) v.getMinimumSpan(axis), min);
              pref = Math.max((int) v.getPreferredSpan(axis), pref);
              max = Math.max((int) v.getMaximumSpan(axis), max);
            if (r == null)
              r = new SizeRequirements();
              r.alignment = 0.5f;
            r.preferred = (int) pref;
            r.minimum = min;
            r.maximum = max;
            return r;
          protected void drawCellBorder(Graphics g,
                                        Shape    allocation)
            // Get the overall bounding rectangle of the row
            Rectangle2D r = allocation.getBounds2D();
            // Set up the drawing
            Graphics2D g2 = (Graphics2D)g;
            g2.setStroke(stroke_);
            g2.setColor(Color.BLACK);
            int children = getViewCount();
            // draw each cell border
            for (int i = 0; i < children; i++)
              int width = getSpan(View.X_AXIS, i);
              r.setRect(r.getX(), r.getY(), width, r.getHeight());
              //System.out.println("draw " + r);
              g2.draw(r);
              // Move the rectangle origin on to the next cell starting point
              r.setRect(r.getX() + width, r.getY(), width, r.getHeight());
      static private class TableCell extends ParagraphView
        private short borderWidth_  = 0;
        private short cellPadding_  = 0;
        public TableCell(Element elem)
          super(elem);
        public void setBorderWidth(short width)
          if (width < 0)
            return;
          short oldBw  = borderWidth_;
          borderWidth_ = width;
          setInsets((short)(getTopInset()    - oldBw - cellPadding_),
                    (short)(getLeftInset()   - oldBw - cellPadding_),
                    (short)(getBottomInset() - oldBw - cellPadding_),
                    (short)(getRightInset()  - oldBw - cellPadding_));
        public void setCellPadding(short padding)
          if (padding < 0)
            return;
          short oldCp  = cellPadding_;
          cellPadding_ = padding;
          setInsets((short)(getTopInset()    - oldCp - borderWidth_),
                    (short)(getLeftInset()   - oldCp - borderWidth_),
                    (short)(getBottomInset() - oldCp - borderWidth_),
                    (short)(getRightInset()  - oldCp - borderWidth_));
        public void paint(Graphics g,
                          Shape    allocation)
          super.paint(g, allocation);
          //System.out.println("TableCell.paint @" + Integer.toHexString(hashCode()) + " parent: " + getParent());
        public void setSize(float width, float height)
          super.setSize(width, height);
          //System.out.println("TableCell.setSize          " + hashCode() + " " + width + " " + height);
        public float getPreferredSpan(int axis)
          float f = super.getPreferredSpan(axis) + 2 * borderWidth_ + 2 * cellPadding_;
          //if (axis == View.Y_AXIS)
            //System.out.println("TableCell.getPreferredSpan " + hashCode() + " " + axis + " " + f);
            //if (height_ != f)
             // height_ = f;
              //getParent().preferenceChanged(this, false, true);
          return f;
        public float getMinimumSpan(int axis)
          float f = super.getMinimumSpan(axis) + 2 * borderWidth_ + 2 * cellPadding_;
          //if (axis == View.Y_AXIS)
            //System.out.println("TableCell.getMinimumSpan   " + hashCode() + " " + axis + " " + f);
          return f;
        public float getMaximumSpan(int axis)
          //float f = getPreferredSpan(axis);
          float f = super.getMaximumSpan(axis) + 2 * borderWidth_ + 2 * cellPadding_;
          //if (axis == View.Y_AXIS)
            //System.out.println("TableCell.getMaximumSpan   " + hashCode() + " " + axis + " " + f);
          return f;
        protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r)
          SizeRequirements s = super.calculateMajorAxisRequirements(axis, r);
          //System.out.println("TableCell.calculateMajorAxisRequirements   " + hashCode() + axis + " " + " " + s);
          return s;
        protected void setInsets(short top,
                                 short left,
                                 short bottom,
                                 short right)
          short ntop    = (short)(top    + borderWidth_ + cellPadding_);
          short nleft   = (short)(left   + borderWidth_ + cellPadding_);
          short nbottom = (short)(bottom + borderWidth_ + cellPadding_);
          short nright  = (short)(right  + borderWidth_ + cellPadding_);
          super.setInsets(ntop,
                          nleft,
                          nbottom,
                          nright);
        protected void setParagraphInsets(AttributeSet attr)
          super.setParagraphInsets(attr);
          setInsets(getTopInset(),
                    getLeftInset(),
                    getBottomInset(),
                    getRightInset());
    }From the top:
    1)
    To make swing understand the new element types for creating tables you need your own EditorKit and ViewFactory. I personally like to delegate to, rather than extend the default ViewFactory so I check if the element type (that is the attribute name) is one that my ViewFactory implementation understands and if not fall back to the Swing one.
    2)
    My TableView extension only tweaks the geometry methods so that the table doesn't stretch to the full width of the space available. This is hard-coded but, like other things, will be set from the element's attributes when I use it in anger. It does its own parent handling - see above. Apart from that all methods are just intercepts to aid my debugging (I mean understanding) of javax.swing.text :-)
    TableView.loadChildren creates the rows, thus satisfying the inner class nature of TableView.TableRow.
    3)
    TableRow just tweaks the geometry to stop rows growing to the full height of the available space, and I added border drawing (see below)
    4) TableCell is an extension of ParagraphView. Again, borders and padding should be read from attributes, tbd.
    Now you need to install the editor kit in any text pane you create - here's my extension of JTextPane to do that:
    public class JTextPane extends javax.swing.JTextPane
      public JTextPane()
      protected EditorKit createDefaultEditorKit()
        EditorKit ek = super.createDefaultEditorKit();
        ViewFactory vf = ek.getViewFactory();
        return new StyledEditorKit(vf);
    }Finally I extended DefaultStyledDocument but only to expose some useful protected methods:
    public class StyledDocument extends DefaultStyledDocument
       * Expose protected method.
      public void create(DefaultStyledDocument.ElementSpec[] data)
        super.create(data);
      public void insert(int offset,
                            DefaultStyledDocument.ElementSpec[] data) throws BadLocationException
        super.insert(offset, data);
    }Then to add tables you can use these methods like:
          SimpleAttributeSet section = new SimpleAttributeSet();
          section.addAttribute(AbstractDocument.ElementNameAttribute, "section");
          SimpleAttributeSet table = new SimpleAttributeSet();
          table.addAttribute(AbstractDocument.ElementNameAttribute, "table");
          SimpleAttributeSet row = new SimpleAttributeSet();
          row.addAttribute(AbstractDocument.ElementNameAttribute, "row");
          SimpleAttributeSet cell = new SimpleAttributeSet();
          cell.addAttribute(AbstractDocument.ElementNameAttribute, "cell");
          SimpleAttributeSet redStyle = new SimpleAttributeSet();
          redStyle.addAttribute(StyleConstants.Foreground, Color.RED);
          SimpleAttributeSet greenStyle = new SimpleAttributeSet();
          greenStyle.addAttribute(StyleConstants.Foreground, Color.GREEN);
          DefaultStyledDocument.ElementSpec esSectionStart = new DefaultStyledDocument.ElementSpec(section, DefaultStyledDocument.ElementSpec.StartTagType);
          DefaultStyledDocument.ElementSpec esSectionEnd   = new DefaultStyledDocument.ElementSpec(section, DefaultStyledDocument.ElementSpec.EndTagType);
          DefaultStyledDocument.ElementSpec esTableStart = new DefaultStyledDocument.ElementSpec(table, DefaultStyledDocument.ElementSpec.StartTagType);
          DefaultStyledDocument.ElementSpec esRowStart   = new DefaultStyledDocument.ElementSpec(row,   DefaultStyledDocument.ElementSpec.StartTagType);
          DefaultStyledDocument.ElementSpec esCellStart  = new DefaultStyledDocument.ElementSpec(cell,  DefaultStyledDocument.ElementSpec.StartTagType);
          DefaultStyledDocument.ElementSpec esTableEnd   = new DefaultStyledDocument.ElementSpec(table, DefaultStyledDocument.ElementSpec.EndTagType);
          DefaultStyledDocument.ElementSpec esRowEnd     = new DefaultStyledDocument.ElementSpec(row,   DefaultStyledDocument.ElementSpec.EndTagType);
          DefaultStyledDocument.ElementSpec esCellEnd    = new DefaultStyledDocument.ElementSpec(cell,  DefaultStyledDocument.ElementSpec.EndTagType);
          DefaultStyledDocument.ElementSpec esCell1 = new DefaultStyledDocument.ElementSpec(redStyle,   DefaultStyledDocument.ElementSpec.ContentType, "AFAIK".toCharArray(), 0, 5);
          DefaultStyledDocument.ElementSpec esCell2 = new DefaultStyledDocument.ElementSpec(greenStyle, DefaultStyledDocument.ElementSpec.ContentType, "As far as I know".toCharArray(), 0, 16);
          DefaultStyledDocument.ElementSpec esCell3 = new DefaultStyledDocument.ElementSpec(redStyle,   DefaultStyledDocument.ElementSpec.ContentType, "Not to put too fine a point on it".toCharArray(), 0, 33);
          DefaultStyledDocument.ElementSpec esCell4 = new DefaultStyledDocument.ElementSpec(greenStyle, DefaultStyledDocument.ElementSpec.ContentType, "NTPTFPOI".toCharArray(), 0, 8);
          DefaultStyledDocument.ElementSpec ico = new DefaultStyledDocument.ElementSpec(icon, DefaultStyledDocument.ElementSpec.ContentType, " ".toCharArray(), 0, 1);
          DefaultStyledDocument.ElementSpec[] esArray = {
          esSectionStart,
            esTableStart,
              esRowStart,
                esCellStart,
                  esCell1,
                esCellEnd,
                esCellStart,
                  esCell2,
                esCellEnd,
              esRowEnd,
              esRowStart,
                esCellStart,
                  esCell3,
                esCellEnd,
                esCellStart,
                  esCell4,
                esCellEnd,
              esRowEnd,
            esTableEnd,
          esSectionEnd };
          com.inqwell.any.client.swing.StyledDocument doc = (com.inqwell.any.client.swing.StyledDocument)textPane.getDocument();
          try
            doc.insert(0, esArray);
          catch(Exception e) {e.printStackTrace();}Hope that helps!

  • Using TableView and MVC

    I have a problem with TableView. I use TableView to display a table which is an attribute of my model class.
    Code in the view looks like this:
      <htmlb:tableView
           id            = "TEST_ID"
           table         = "//model/t_selected_employees"
           selectionMode = "MULTISELECT" />.
    I also have a few buttons on this view, when the button is pressed in DO_HANDLE_EVENT method I append a line to table but when the next DO_HANDLE_DATA method occurs table flushes. All other parameters stay filled.
    Thank you for future help.

    your code in do_handle_event should luk like this now :
    ************Code .
    DATA:
    lt_string_table TYPE string_table.
    CHECK NOT event IS INITIAL.
    IF htmlb_event_ex->event_name = xhtmlb_events=>buttongroup AND
    htmlb_event_ex->event_type = xhtmlb_events=>buttongroup_click.
    DATA: ls LIKE LINE OF model->t_selected_employees.
    CASE htmlb_event_ex->event_defined.
    WHEN 'TEST'.
    call model->insert_line.
    ENDCASE.
    ENDIF.
    Code ends.
    in Model class create the insert_line methos and put your append code there as  :
    mothod insert_line.
    ls-num = 55. ls-pernr = '00001280'. ls-fio = 'TEST'.
    APPEND ls t_selected_employees.
    endmethod.

  • Error when updating back to ODS using tableview iterator.

    I get this error when I try to execute my bsp page. The page collects a cell value that was edited on the previous page and updates it to the ods.
    The error is "Function not possible in a captured session"
    The termination type was: TH_RES_FREE
    When I debug, every thing looks fine. ITab3 returns values it's supposed to. So I am not sure what's causing it to fail. Any ideas? Thanks.
    Here is my code:
    CLASS cl_htmlb_manager DEFINITION LOAD.
    DATA: event TYPE REF TO cl_htmlb_event.
    event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    if event->id = 'Update' and event->event_type = 'click'.
      DATA: tv TYPE REF TO cl_htmlb_tableview.
    FIELD-SYMBOLS <i> LIKE LINE OF selectedrowindextable.
    tv ?= cl_htmlb_manager=>get_data( request = runtime->server->request
                                     name = 'tableView'
                                     id = 'tv1' ).
    IF tv IS NOT INITIAL.
    DATA: tv_data TYPE REF TO cl_htmlb_event_tableview.
      tv_data = tv->data.
      refresh itab2.
      refresh itab3.
      call method tv_data->GET_ROWS_SELECTED
      receiving selected_rows = itab2.
      endif.
      data : ind type SELECTEDROW,
              row_s type row.
      if itab2 is not initial.
        data: rw LIKE LINE OF itab.
        loop at itab2 into ind.
        READ TABLE itab INDEX ind-index into
        rw.
        if rw is not initial.
        row_s = rw.
        append row_s to itab3.
        clear row_s.
        endif.
        endloop.
            MODIFY /bic/aNCN_O01300 FROM table itab3.
          ENDIF.
          endif.

    hi Uday,
    This is simple....
    Use the function module
    <b>1) For adding leading zero's or spaces...!</b>
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT   = lw_variable
    IMPORTING
       OUTPUT   = lw_variable.
    <b>2) and for removing leading zero's or spaces.....</b>
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        INPUT   = lw_variable
    IMPORTING
       OUTPUT   = lw_variable.
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • Using JSP based PCR forms in ERP2005 rather than Adobe interactive forms

    We are currently upgrading from EP5.0 business package 50 to EP7.0 with ERP2005 (ECC 6.0) and are trying to configure our existing custom personal change request forms with our scenarios.
    Originally our custom PCR scenarios where JSP iView and we are hoping to use these again as part of ERP2005. The customisation seems to support this – transaction QISESCENARIO for each scenario you have the option ‘Entry Type in Web’ and you can set it to ‘Entry Using JSP iView’. We can configure the internet link and the portal component also for our JSP view.
    When we try to run this however we get the exception ‘No Adobe Form Is Assigned to the Scenario’. After a quick debug it seems that you always need the Adobe form to be configured.
    None of the documentation for ERP2005 suggests that you can use anything other than Adobe forms, which contradicts the configuration in QISESCENARIO.
    The ISR cookbook (written July 2004) details the creation and configuration of JSP request forms but not what versions they are compatible with.
    Developing you own PCRs for ERP2004 (Can’t find an ERP 2005 version) does not mention JSP iViews at all.
    The release notes for ERP2005 don’t give this a specific mention.
    So, my question is are the use of JSP based request forms permitted with ERP2005 ?

    Hi Phil,
       Interesting - I have a similar issue.  We want to use the Request for Transfer scenario in ERP 2005, but it has not been developed in Adobe forms by SAP yet (it isn't available in 2004 either)!  So, we have decided to use the old JSP PCRs instead.
    Your issue is probably because you're using the same 2005 iviews to create your PCRs.  The 2005 PCR iviews are written in WebDynpro, and appear to assume that each one will be an Adobe form!  If you assign the old PCR iviews to your manager (give them the old MSS role under Migrated Content->EP5.0... in the pcd if you have it installed), you will be able to create a PCR with the JSP forms (regardless of the "Entry in Web" setting in QISRSCENARIO).
    The next issue is the approval.  In 2005, transaction SWFVISU has task TS50000075 configured as Java Webdynpro.  You'll need to change that to iView, and specify ID = com.sap.pct.hcm.isrdispatcher.default.  I'm following the UWL item type guide for this at:
    http://help.sap.com/saphelp_nw04s/helpdata/en/b1/cc1357eead454bb144face4a66be7d/content.htm
    Having said this, my approval is not working!  The item type has clearly changed, because the workitem name is no longer a hyperlink (rather annoying), but when I hit the "Launch Task Page" button (default name I think) I get the error:
    "Unable to perform action because the system returned an invalid URL"
    I can't see this "invalid url" anywhere in the logs, so I can't see where it is getting it from, or what path, etc I'm meant to put!  In your old system, what did you have as the "Server for ISR call" under "Additional Data for Scenario" in QISRSCENARIO?  Also, what did you have in the "URL" box that appears under the Additional Data for Scenario button when you change the Entry Type to JSP?
    Many thanks,
    Russell.

  • Problems!:  calculated fields in Adobe Forms using the ISR/PCR framework.

    Hi there,
    I have made an Adobe form in the ISR framework. Everybody who is familiar with these forms in the framework knows that the adobe form is embedded in a standard webdynpro which consist of a roadmap with three steps.
    Step 1: Fill out the form
    Step 2: Check and fill the form
    Step 3: Submit the form. After submit the form can be send to a manager or can be directly processed in SAP HR.
    Problem 1:
    When I test the adobe form and fill in a number in a field and click on next everything goes fine. But when I click on previous step the value which I filled in before is gone and put to 0,00.
    Problem 2:
    Also another problem is that calculated fields, do not show directly when clicking on next step. When you click on next step and then previous step, then you see the value of the calculated field.
    Problem 3:
    Also another problem is with the calendar function. When I fill in a date by hand and click on next the BADI behind the form sees 00-00-0000. When I use the calendar function everything goes well.
    Who can help me with these 3 problems.
    Greetings.
    Message was edited by: Sandhya Banwarie

    Hi Phil,
       Interesting - I have a similar issue.  We want to use the Request for Transfer scenario in ERP 2005, but it has not been developed in Adobe forms by SAP yet (it isn't available in 2004 either)!  So, we have decided to use the old JSP PCRs instead.
    Your issue is probably because you're using the same 2005 iviews to create your PCRs.  The 2005 PCR iviews are written in WebDynpro, and appear to assume that each one will be an Adobe form!  If you assign the old PCR iviews to your manager (give them the old MSS role under Migrated Content->EP5.0... in the pcd if you have it installed), you will be able to create a PCR with the JSP forms (regardless of the "Entry in Web" setting in QISRSCENARIO).
    The next issue is the approval.  In 2005, transaction SWFVISU has task TS50000075 configured as Java Webdynpro.  You'll need to change that to iView, and specify ID = com.sap.pct.hcm.isrdispatcher.default.  I'm following the UWL item type guide for this at:
    http://help.sap.com/saphelp_nw04s/helpdata/en/b1/cc1357eead454bb144face4a66be7d/content.htm
    Having said this, my approval is not working!  The item type has clearly changed, because the workitem name is no longer a hyperlink (rather annoying), but when I hit the "Launch Task Page" button (default name I think) I get the error:
    "Unable to perform action because the system returned an invalid URL"
    I can't see this "invalid url" anywhere in the logs, so I can't see where it is getting it from, or what path, etc I'm meant to put!  In your old system, what did you have as the "Server for ISR call" under "Additional Data for Scenario" in QISRSCENARIO?  Also, what did you have in the "URL" box that appears under the Additional Data for Scenario button when you change the Entry Type to JSP?
    Many thanks,
    Russell.

  • No Margin if I use TableView Iterator

    I am using a htmlb:TableView with Iterator.
    I noticed that the cell-margin disappears if I a htmlb:textView in the iterator.
    For example, if I have two columns, and in only the second column I show a textview as a replacement bee, the second column will have no cell-margin while the first one has.
    METHOD if_htmlb_tableview_iterator~render_cell_start .
      DATA lr_text  TYPE REF TO cl_htmlb_textview.
      FIELD-SYMBOLS <fs_row>  LIKE LINE OF ##mytable##.
        CASE p_column_key.
          WHEN 'MYCOLUMN2'.
            CREATE OBJECT lr_text.
            lr_text->id       = p_cell_id.
            lr_text->wrapping = cl_bdv_co=>c_true.
            lr_text->text     = <fs_row>-mycolumn2.
            p_replacement_bee = lr_text.
        ENDCASE.
    ENDMETHOD.
    Is there anything I can do about it?

    p_class is depreciated as on design 2003. check this thread for more on this.
    Note 816352: Rendering Differences between DESIGN 2002 and 2003.
    instead what you an do is place a raw html table with cellpadding and one cell containing your text into this cell.
    DATA: rad_gp TYPE REF TO cl_bsp_bee_table.
          CREATE OBJECT rad_gp.
          rad_gp->add_html( html = '<table cellpadding="2" ...' ).
          p_replacement_bee = rad_gp.
    Regards
    Raja

  • Using an Edirol PCR-300 as a keyboard and MIDI control surface. Any luck

    In the manual for the Edirol it lists 8 or 10 templates for Logic and then doesn't go on to say exactly what they do. I tried adding the PCR from the list of supported surfaces but it's not there.
    There is some instruction in the PCR manual to open the Audi0o Midi data manager and create nodes with connections, but I'n not sure exactly what the point of that is supposed to be.
    After doing some digging I found something that that the Edirol had to be supported in Mackie emulation mode. I recently did some major problematic upgrades and lots of this appear to be lost. I don't know which Mackie mode it supports. My guess it would be HUI, because unlike the MCU the Edirol isn't really bidirection is this correct?
    I think I had it working before the upgrade, but now I've got the old problem back. I can get the control surface to sort of work and then when I touch a regular key the whole screen goes crazy with windows popping up and down then disappearing.
    I think for some reason the Edirol is sending out messages that are telling Logic to frequently cycle through screen sets. I did think I had figured out this problem once before after diligent searching, but I forgot how I did it.
    Any ideas on how to get the Edirol PCR-300 to play well with Logic?

    Yes I have installed the drivers as the PCR 300 works with Logic 8.

  • How to use Structure In TableView

    Helo BSP Gurus,
    In BAPI_PO_GETDETAIL, upon giving the PO number it outputs the Header and Item Data. Item data is a Table so I can display n BSP using tableview. But header falls under import parameter and being a Structure, How shld I display n BSP using tableview.
    Regards
    Leo

    Hi...
      I think you are mentioning about PO_HEADER.
    You can't use the Structure in Tableview.
    You need to create an internal table or Table type with BAPIEKKOL and use itab in tableview.
    Also you may not want to display all the fields..So use Iterator.
    Raja T
    Kindly close & reward the thread if your issue is resolved..
    Re: Can I use a Model Internal Table Parameter in <html:inputfield>
    Message was edited by:
            Raja Thangamani

  • Error in PCR approval using JSP scenarios in ERP 2005

    Hi All,
       Due to the missing Adobe PCR scenarios for Request for Transfer, we are having to use the JSP PCRs.  I can create one, and route it to the senior manager for approval, but when they try to launch the form from the workitem, I get the following error:
    "Unable to perform action because the system returned an invalid URL"
    We've debugged the FM that provides the items for the UWL, and looked in lots of portal logs, but can't find what this invalid URL actually is!  Therefore, it's proving virtually impossible to find out what I need to change to correct it!
    In order to change to the JSP PCRs, I've changed the scenario config in QISRSCENARIO to specify "Entry Using JSP iView", I've specified an "Internet Link" (below the Additional Data button) of:
    http://<server>:<port>/irj/servlet/prt/portal/prtroot
    In the additional data, the Portal Component comes through as:
    com.sap.pct.hcm.pcr_specialpayment.default
    and I've defined a "Server" entry for Entry Using JSP iView of:
    http://<server>:<port>/irj/servlet/prt/portal/prtroot
    I've looked at SAP note number 646601.  I've configured SWFVISU to change task TS50...075 from Java WebDynpro to "iView", and specified:
    ID = com.sap.pct.hcm.isrdispatcher.default
    When registering the item types in the portal UWL config, this appears to pull through values as per the xml config file attached to 646601.
    Any ideas?
    I'd very much appreciate any help you can give!
    Many thanks,
    Russell.

    Hi Lewis,
       Yes, I did!  The problem is that the UWL iview launcher requires a fully qualified iview path (ROLES://portal_content/...).
    However, the isrdispatcher iview is a "master iview" from the EP5 days.  This means that it doesn't exist in the PCD as an iview that you can fully qualify!
    It does have a par file, however, so the solution is to create your own isrdispatcher iview, based on this par file.  Then you can enter the fully qualified location of your iview in the ID attribute in SWFVISU:
    ROLES://portal_content/.../my_isr_dispatcher
    Hope this helps!
    R

  • Single column in Tableview

    Hi all,
            I want to know how can we display single column of a table using tableview. In the syntax we have  <htmlb:tableView table =......>
    My actual requirement is to display a single column on pressing F4 help and that needs to be done using tableview, but i want to display only one required column instead of all the columns. Plz suggest.
    Regards,
    Rohit Khetarpal

    Hi,
    this code sample can help you..
      <htmlb:tableView id              = "tab01"
                                   table           = "<%= itab2 %>"
                                   headerText      = "Channel and Account Details"
                                   headerVisible   = "TRUE"
                                   width           = "100%"
                                   filter          = "server"
                                   footerVisible   = "true"
                                   visibleRowCount = "10"
                                   onRowSelection  = "myEvent"
                                   selectionMode   = "LINEEDIT" >
                    <htmlb:tableViewColumns>
                      <htmlb:tableViewColumn title      = "Division "
                                             columnName = "DIVISION"
                                             wrapping   = "True" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Distribution Channel"
                                             columnName = "DISTR_CHAN" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Sales Org"
                                             columnName = "SALESORG" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Channel"
                                             columnName = "CHANNEL"
                                             edit       = "TRUE" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Account"
                                             columnName = "ACCOUNT"
                                             edit       = "TRUE" >
                      </htmlb:tableViewColumn>
                    </htmlb:tableViewColumns>
                  </htmlb:tableView>
    Regards,
    Ravikiran.

  • Dynamic rows in TableView Iterator

    Hello All,
    I am developing an application in which there would be a TableView with last column as a button. OnClick event on the button should add the row below the current row (the facility should be like an Excel spreadsheet where we can insert the rows below). Can it be acheived by re-populating the internal table which his attached with TableView Control.
    Is it Ok to use TableView in such a condition or we have to go with pure HTML tables or some kind of ActiveX controls?
    Thanks in advance.
    Thanks And Regards
    Rajeev Patkie

    Hallo Rajeev,
    > Is it Ok to use TableView in such a condition...
    It is OK to use the tableView as long as it works for you! Once we run into problems, then of course one has to see if the functionality is "working as designed" and whether it was designed to handle your specific request.
    However, what you want to achieve sounds relatively harmless. Just use onclick on the button to trigger a server round trip. (Nice idea: write the row index directly into the onclick string!). Then add a new empty row into your at the correct index (see ABAP documentation), and just render table new.
    All of this should be relatively easy. Why don't you try, and let us see what you achieve.

  • Error in displaying hierachry report with TableView and Tableiterator

    Hello,
    I tried to create a BSP as shown in this tutorial:
    /people/vijaybabu.dudla/blog/2008/08/04/display-hierarchy-report-in-bsp-using-tableview-and-tableview-iterator
    When starting the BSP I get an error that a field symbol is not assigned in the method get_column_name.
    When debugging the method get_column_name I can see that row_ref is initial. So the field symbols <row> and <col> are not assigned to any values, which causes the error some lines below.
    METHOD get_column_value .
    *-To get the Column values which is used in the Interator
      FIELD-SYMBOLS: <row> TYPE ANY, <col> TYPE ANY, <cur> TYPE ANY.
      ASSIGN row_ref->* TO <row>.
      ASSIGN COMPONENT column_name OF STRUCTURE <row> TO <col>.
      DATA tempchar(240) TYPE c.
      IF currency IS NOT INITIAL.
        ASSIGN COMPONENT currency OF STRUCTURE <row> TO <cur>.
        WRITE <col> CURRENCY <cur> TO tempchar.
        MOVE tempchar TO column_value.
        CONCATENATE column_value ` ` <cur> INTO column_value.
      ELSE.
        WRITE <col> TO tempchar.
        MOVE tempchar TO column_value.
      ENDIF.
      CONDENSE column_value.
    ENDMETHOD.
    Any help?
    Thank you

    Hi Patrick,
    Thank you for the answer.
    Unfortunately there is still the error with the unassigned field symbol after implementing the render_row_start method.
    Any help?
    Edit: It works now. There was an error with a wrong variable name (stupig mistake.)
    Thanks for the help!
    Edited by: Robert Karlovic on Mar 5, 2009 10:29 AM

  • Problem with tableview iterator

    Dear friends.
    I try to adopt tableview iterator in my customer's BSP pages. So, I programmed test page.
    METHOD if_htmlb_tableview_iterator~render_row_start .
      m_row_ref ?= p_row_data_ref.
    ENDMETHOD.
    M_ROW_REF is "Static Attribute" and "Public" and "Type Ref To Z3TYDISP"
    z3tydisp has structure as below
    REQNO          NUMC     12
    VGUBUN          CHAR     1
    DSCOFVGUBUN     STRING     0
    REQDT          DATS     8
    RNAME          CHAR     10
    VCOMP          CHAR     30
    VNAME          CHAR     10
    VPLACE          CHAR     5
    VPLACEDSC     CHAR     20
    APPROVAL     CHAR     1
    DSCOFAPPROVAL     STRING     0
    AND... p_row_data_ref has structure below
    REQNO     N     12
    VGUBUN     C     1
    DSCOFVGUBUN     g     0
    REQDT     D     8
    RNAME     C     10
    VCOMP     C     30
    VNAME     C     10
    VPLACE     C     5
    VPLACEDSC     C     20
    APPROVAL     C     1
    DSCOFAPPROVAL     g     0
    In my option, p_row_data_ref has same structure compared with z3tydisp. But there is "CX_SY_MOVE_CAST_ERROR". How I have to define "z3tydisp"????

    >><b>M_ROW_REF is "Static Attribute" and "Public" and "Type Ref To Z3TYDISP"</b>
    instead of this make your M_ROW_REF a instantaneous attribute. since static attribute are intantiated only once when object created and are shared by all other intances. m_row_ref contains data about the table you are going to render using tableview. so it should be public, so that get different data for different iterator objects.
    your p_row_data_ref must be of type ref to data which is superior class of data types.
    and if you have defined iterator "IF_HTMLB_TABLEVIEW_ITERATOR" in your interfaces. then you need not to define structure for p_row_data_ref, its already there in interface.
    hope this will solve your problem,
    regards,
    hemendra

Maybe you are looking for

  • ADF run-time error in 10.1.2 - worked fine in 9.5.1, and 9.5.2

    We recently upgraded to JDev 10.1.2 from 9.5.2. We had a web application (Struts/ADF BC) that we had developed with 9.5.1 and has been in production for 5 months now. We want to upgrade the ADF run-time libraries on our production server to the 10.1.

  • It says video is too large on iPhone to be send to iCloud

    When I tried to send a video clip taken on iPhone (duration - 13 min) to iCloud a notification appeared  that the video was too large and I need to crop it. I clicked OK and then an upper line got out showing all the length frame by frame with a yell

  • Files created in ADUMP

    Hi I am using oracle DB 10.2.0.3 in AIX. I keep disable all parameters of AUDIT. Despite this I am noticing many audit files are created in AUDIT folder. Please let me know its reason. and how I could stop creation of audit files if I want. some file

  • 2FA for Windows login using Mobile app

    Hi All, We are planning to implement additional login security for our domain. Present : Windows Server 2012 R2 Active Directory 800+ users Requirement : need to enable additional security (means 2FA) for all users to login to AD and other applicatio

  • Cannot install snort, install script does not exist?

    Hi! I'm trying to install snort on a newly installed arch system. It didn't go well.. Targets (1): snort-2.8.2.1-8 Total Download Size: 0.00 MB Total Installed Size: 8.78 MB Proceed with installation? [Y/n] y checking package integrity... (1/1) check