Class atributes

Hello all!!
Following the instructions in this Weblog for iterator implement /people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator (a lot of thanks)
I create my own bsp that works correctly.
Now I have a question with the class that implements the iterator interface.
I want to use p_edit_mode in method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START but i don't know how to set this parameter to x from the bsp (sorry but I'm newbie in this).
I want, too, to establish a new atribute in this class to say to the method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS wich columns i want depending from a parameter of the bsp, and i don't know how to make this.
Many thanks in advance and thank you too all persons of this forum beacuse it's a very good guidance to resolve problems (I read a lot of threads and with this I create my first bsp).
Thanks again!!!

you just create a constructor method for this class and pass the column definition from your application to this class while instantiating the same .
sample.
  CALL FUNCTION 'TR_NAMETAB_GET'
    EXPORTING
      iv_tabname                 = 'SFLIGHT'
      iv_get_lengths_in_charmode = ' '
      iv_get_texts               = 'X'
    IMPORTING
      et_dfies                   = lt_dfies
    EXCEPTIONS
      not_found                  = 1
      OTHERS                     = 2.
  IF sy-subrc <> 0.
*--- Do nothing in this particular case
  ENDIF.
  LOOP AT lt_dfies INTO ls_dfies.
    wa_pers_tab-field_name = ls_dfies-fieldname.
    wa_pers_tab-text       = ls_dfies-reptext.
    wa_pers_tab-colpos     = sy-tabix.
    wa_pers_tab-invisible  = ' ' .
    APPEND wa_pers_tab TO pers_tab.
  ENDLOOP.
ENDIF .
SORT pers_tab BY colpos .
CREATE OBJECT iterator TYPE ycl_tv_iterator
  EXPORTING
    col_def = pers_tab .
and in the column definition method you can use this to build the columns
LOOP AT m_col_def INTO wa_col_def  .
    APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
    <def>-columnname = wa_col_def-field_name.
    <def>-title      = wa_col_def-text .
  ENDLOOP .

Similar Messages

  • BSP/MVC: Naming of Class Atributes

    Hi there
    developing BSP/MVC applications, I wonder which is a good naming standard for new class attributes of a controller or model class. saw in the examples that most attributes start with "M_" not only the inherited ones but also newly added.
    as far as I remember, attributes starting with "M_" have a special meaning, can't fracking remember which one, though
    So my questions:
    1. what kind of attributes start or shout start with "M_"
    2. what's a useful naming standard for attributes in classes
    thanks in advance
    Gerald

    you just create a constructor method for this class and pass the column definition from your application to this class while instantiating the same .
    sample.
      CALL FUNCTION 'TR_NAMETAB_GET'
        EXPORTING
          iv_tabname                 = 'SFLIGHT'
          iv_get_lengths_in_charmode = ' '
          iv_get_texts               = 'X'
        IMPORTING
          et_dfies                   = lt_dfies
        EXCEPTIONS
          not_found                  = 1
          OTHERS                     = 2.
      IF sy-subrc <> 0.
    *--- Do nothing in this particular case
      ENDIF.
      LOOP AT lt_dfies INTO ls_dfies.
        wa_pers_tab-field_name = ls_dfies-fieldname.
        wa_pers_tab-text       = ls_dfies-reptext.
        wa_pers_tab-colpos     = sy-tabix.
        wa_pers_tab-invisible  = ' ' .
        APPEND wa_pers_tab TO pers_tab.
      ENDLOOP.
    ENDIF .
    SORT pers_tab BY colpos .
    CREATE OBJECT iterator TYPE ycl_tv_iterator
      EXPORTING
        col_def = pers_tab .
    and in the column definition method you can use this to build the columns
    LOOP AT m_col_def INTO wa_col_def  .
        APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
        <def>-columnname = wa_col_def-field_name.
        <def>-title      = wa_col_def-text .
      ENDLOOP .

  • EJB begginer question

    Hello,
    I have been reading a little about EJB's and I have seen some EJB examples defining the class atributes inside and other examples using helper classes. I do not understand yet when it is better to use one or the other. Of course I see that an ejb uses more resources. Which is the best way of programming ejb's? Does anybody knows about a good book for learning step by step?
    Thanks in advance

    U can read this book
    " Enterprise JavaBeans 3rd Edition" by Richard Monson-Haefel
    Publication - O'Reilly.
    Its worth reading. It covers all the basic concepts of EJB and other stuff

  • How to keep the first row fixed in a JTable, with sorting, and bellow the headers ?

    I am trying to change the following code so then the fixed rows will stay on top(but below the headers!), but when I change getContentPane().add(fixedScroll, BorderLayout.SOUTH); to getContentPane().add(fixedScroll, BorderLayout.NORTH); it stays above the headers. How can I put the first rows on top, but below the headers ? Thanks.
    import java.awt.*; 
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    * @version 1.0 03/05/99
    public class FixedRowExample extends JFrame {
      Object[][] data;
      Object[] column;
      JTable fixedTable,table;
      private int FIXED_NUM = 2;
      public FixedRowExample() {
        super( "Fixed Row Example" );
        data =  new Object[][]{
            {      "a","","","","",""},
            {      "","b","","","",""},
            {      "","","c","","",""},
            {      "","","","d","",""},
            {      "","","","","e",""},
            {      "","","","","","f"},
            {"fixed1","","","","","","",""},
            {"fixed2","","","","","","",""}};
        column = new Object[]{"A","B","C","D","E","F"};
        AbstractTableModel    model = new AbstractTableModel() {
          public int getColumnCount() { return column.length; }
          public int getRowCount() { return data.length - FIXED_NUM; }
          public String getColumnName(int col) {
           return (String)column[col];
          public Object getValueAt(int row, int col) {
            return data[row][col];
          public void setValueAt(Object obj, int row, int col) {
            data[row][col] = obj;
          public boolean CellEditable(int row, int col) {
            return true;
        AbstractTableModel fixedModel = new AbstractTableModel() {     
          public int getColumnCount() { return column.length; }
          public int getRowCount() { return FIXED_NUM; }
          public Object getValueAt(int row, int col) {
            return data[row + (data.length - FIXED_NUM)][col];
        table = new JTable( model );
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        table.setAutoCreateRowSorter(true);
        fixedTable = new JTable( fixedModel );
        fixedTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        fixedTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        JScrollPane scroll      = new JScrollPane( table );
        scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        JScrollPane fixedScroll = new JScrollPane( fixedTable ) {
          public void setColumnHeaderView(Component view) {} // work around
                                                 // fixedScroll.setColumnHeader(null);
        fixedScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        JScrollBar bar = fixedScroll.getVerticalScrollBar();
        JScrollBar dummyBar = new JScrollBar() {
          public void paint(Graphics g) {}
        dummyBar.setPreferredSize(bar.getPreferredSize());
        fixedScroll.setVerticalScrollBar(dummyBar);
        final JScrollBar bar1 = scroll.getHorizontalScrollBar();
        JScrollBar bar2 = fixedScroll.getHorizontalScrollBar();
        bar2.addAdjustmentListener(new AdjustmentListener() {
          public void adjustmentValueChanged(AdjustmentEvent e) {
            bar1.setValue(e.getValue());
        scroll.setPreferredSize(new Dimension(400, 100));
        fixedScroll.setPreferredSize(new Dimension(400, 52));  // Hmm...
        getContentPane().add(     scroll, BorderLayout.CENTER);
        getContentPane().add(fixedScroll, BorderLayout.SOUTH);   
      public static void main(String[] args) {
        FixedRowExample frame = new FixedRowExample();
        frame.addWindowListener( new WindowAdapter() {
          public void windowClosing( WindowEvent e ) {
            System.exit(0);
        frame.pack();
        frame.setVisible(true);

    Sorry, this code missed a very important line:
    table.setAutoCreateRowSorter(true);
    So you meant:
    Object[][] header;//class atribute
    header=new Object[][]{//in the constructor
                { "h","i","j","k","l","m"},
                { "h","i","j","k","l","m"}
    public Object getValueAt(int row, int col) {//in the TableModel
            if (row==0){
                return header[row][col];
            else {
                return data[row][col];
    I tried, but when I sort, the first row get sorted with the rest.

  • Connect to weblogic Server's JVM

    Hello everybody,
    I´m trying connect to weblogic server´s JVM to execute a class inside the jar.
    It works fine, but my jar has a class with static atributes that I want change its values calling the following command line:
    %JAVA_HOME%\bin\java -Djavax.naming.Context.INITIAL_CONTEXT_FACTORY=weblogic.jndi.WLInitialContextFactory -Djavax.naming.Context.PROVIDER_URL=t3://localhost:7001 -jar %_APP_HOME%\WEB-INF\lib\AdminServer.jar -1
    Afer it the values of my class atribute has changed but my web application does not see this news values.
    I thinking... Am I connected to weblogic server´s JVM ?
    Could Anyone help me?

    You need to take a step back and think about what you're trying to achieve, Denilson.
    Using static attributes in classes has all sorts of side-effects because of how classloaders work in J2EE - if you're referencing a class used inside the web application and poking a static property, what is most likely happening is that your local application is loading the class in its own classloader, modifying the property, and then exiting. A separate copy of the class has been loaded by the web application.
    You can see more information on classloaders here: http://edocs.bea.com/wls/docs81/programming/classloading.html#1089798
    If you want to run an application to change some value on the server, there are a number of options available:
    - getting, changing and replacing an object in the JNDI tree (this is still an ugly solution)
    - using a servlet or stateless session bean to get the job done (this is a better solution - simple, but still not as good as you could potentially get)
    I'd suggest using a servlet to modify an attribute scoped at the web application level as a lightweight way to do what you're trying to. <i>(if I'm understanding what your goal is correctly)</i>. That way you could test making changes with your browser, not just a Java application.
    Does any of that help?
    <br>
    Kevin Powe
    http://www.integral-techsolutions.com

  • Which is worse: awkwardly long or vague/arbitrary variable names?

    I'm programming in C++, but that shouldn't matter.
    I'm working on a small chunk of code that is a module for a much, much larger project. Part of my code is to make several hundred histograms and then run some statistics over them.
    My dilemma is that there are so many, that naming them is becoming difficult. So, I opt for incredibly long, cumbersome names rather than short arbitrary names. Heck, even I wouldn't know what was going on if I just named them "histo1, histo2." Instead I name them things like "MomentumTimesDeltaPhiEta1" which MIGHT make sense to someone who is working on another part of the project.
    And actually, that wasn't a real example. Some of my names are longer than that. Is that normal? I have programmed in C++ for a year, but I'm still not good at programming etiquette, so my code looks clumsy.

    Local vars can be short, if you find the need to give further explanation, comment. Try to give meaningful names more for class atributes, interfaces, and where a variable name can help documenting the code itself. E.g. (Pseudo-code, as I don't remeber a lot of C++):
    Instead of:
    z = sqr(a^2 + b^2)
    This is better:
    // Pythagorean theorem
    z = sqr(a^2 + b^2)
    This is even better:
    hypotenuse = sqr(catheti_a^2 + catheti_b^2)
    If you find yourself using incredible long variable names, it's a signal that your program is too flat, and you need to start refactoring it into a function, class, or using a namespace.
    So, e.g:
    namespace Geometry {
    function Hypotenuse(float a, b) {
    return sqr(a^2 + b^2)
    The code expresses a lot more meaning, while staying concise.
    Edit: I forgot square root
    Last edited by freakcode (2008-08-06 19:49:58)

  • How to change a private atribute of class CL_GUI_ALV_GRID

    I would like to influence attribute"M_DISABLE_SAVE" in this class.
    Is it possible? If so, how can I do it.
    Thanks.

    If you don't want the user to be able to save a layout of the grid, then make sure to pass "SPACE" to the I_SAVE parameter of the SET_TABLE_FOR_FIRST_DISPLAY method of the class CL_GUI_ALV_GRID.
    CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
               I_SAVE                 = space    "<--- do not allow to save layout
          CHANGING
               IT_OUTTAB       = I_ALV[]
    Regards,
    Rich Heilman

  • Changing fields color in CL_GUI_ALV_GRID using class

    Hi,
    I've written a lot of posts but still I have problem with changing color for CL_GUI_ALV_GRID.
    I have class ZKSL_CL_4_17_ALV_GRID_OO with 3 methods : SELECT, HANDLE_DBL_CLICK AND DISPLAY_ALV
    I want to change fields color every time I double click on IT.
    METHOD SELECT.
       DATA:
             lt_sflight                TYPE TABLE OF           zkslt_sflight,
             ls_layout                 TYPE                    lvc_s_layo,
             lr_custom_container       TYPE REF TO             cl_gui_custom_container,
             lr_my_class               TYPE REF TO             zksl_cl_4_17_alv_grid_oo.
       SELECT *  FROM zkslt_sflight  INTO TABLE mt_sflight
          WHERE carrid    = iv_carrid AND
              ( fldate    IN it_date  OR
                price     IN it_price OR
                planetype IN it_type )
    CALL FUNCTION 'Z_KSL_SCREEN'.
    ENDMETHOD.
    from FM z_ksl_screen i call screen 400 and from status_400 output  I call method DISPLAY_ALV
    METHOD display_alv.
       DATA:
              lr_custom_container       TYPE REF TO             cl_gui_custom_container,
              lt_sflight                TYPE TABLE OF           zkslt_sflight,
              lt_catalog                TYPE STANDARD TABLE OF  lvc_s_fcat,
              ls_catalog                LIKE LINE OF            lt_catalog,
              ls_layout                 type                    slis_layout_alv,
              lr_my_class               TYPE REF TO             zksl_cl_4_17_alv_grid_oo.
       CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
         EXPORTING
           i_structure_name = 'ZKSLT_SFLIGHT'
         CHANGING
           ct_fieldcat      = lt_catalog[].
    ************BULID LAYOUT
       ls_layout-no_input = 'X'.
       ls_layout-colwidth_optimize = 'X'.
       ls_layout-totals_text       = 'Totals(201)'.
       ls_layout-info_fieldname    = 'LINE_COLOR'.
       IF mr_gui_alv_grid IS INITIAL.  "-----------------------------------if----------------------&
         CREATE OBJECT: lr_custom_container
           EXPORTING
             container_name = 'DISPLAY',
             lr_my_class.
         CREATE OBJECT mr_gui_alv_grid
           EXPORTING
             i_parent = lr_custom_container.
         SET HANDLER lr_my_class->handle_dbl_click FOR mr_gui_alv_grid.
         CALL METHOD mr_gui_alv_grid->set_table_for_first_display
           EXPORTING
             i_structure_name = 'ZKSLT_SFLIGHT'
            is_layout        =   ls_layout
             i_save           = 'A'
           CHANGING
             it_outtab        = Mt_sflight
             it_fieldcatalog  = lt_catalog.
       ELSE.     "-------------------------------------------------ELSE---------------------&
         mr_gui_alv_grid->refresh_table_display( ) .
       ENDIF.
    ENDMETHOD.
    In handler i am trying to change fields color and call method display sending new out_table
    CALL METHOD me->display_alv
         CHANGING
           ct_fieldcat = lt_fieldcat.
    Please give me some easy advice how to do that.
    thank you in advice.

    Thank you Klaus for your reply,
    The problem is that I need to make this using classes.
    I tried to make my structure data with LVC_T_SCOL as you wrote,
    a field of table type LVC_T_SCOL in the structure of your output table
    DATA BEGIN OF lt_data. 
           INCLUDE STRUCTURE sflight.
           DATA cellcolors  TYPE lvc_t_scol .
       DATA END OF lt_data.
    TYPES: BEGIN OF mtt_tab.
    *         INCLUDE STRUCTURE ZKLST_sflight.  " I get error that I cannot use ref to abap dic
               INCLUDE TYPE ZKSLT_SFLIGHT.
               TYPES: cellcolors  TYPE lvc_t_scol ,
                 END OF mtt_tab.
    After making type mtt_tab
    i declare data   lt_tab                    TYPE STANDARD TABLE OF  mtt_tab.
    and when I try to copy table mt_sflight (it is atribut of calss) like below
    LOOP AT mt_sflight INTO ls_mt .
    *   READ TABLE lt_tab INDEX sy-tabix ASSIGNING <ls_tab>.
    *   MOVE-CORRESPONDING <ls_mt> TO <ls_tab>.
    *    UPDATE lt_tab FROM TABLE mt_sflight.
         MOVE-CORRESPONDING ls_mt to lt_tab.
       ENDLOOP.
    I am getting error "lt_tab is not internal str or table with header"
    Can you help me with this? 

  • Purpose of adapter specific message atributes at sender,reciever file adapt

    hi.
    i want know birefly about adapter specific message atributes at sender ,reciever  adapters.
    and what would be the result if we enable this adpspecmessatb checkbox
    waiting for your response.
    bye.
    regards.
    seeta ram.

    hi santosh .
    thanks for yor your answer.
    but when i mapped constant  a to the udf and mapped to target and while iam testing i got the error like
    10:38:30 Start of test
    Compilation of MM_SapIsuTo3rdpartyAccountStatementExtraction successful Runtime exception during processing target field mapping /ns0:MT_SapisuTo3rdpartyAccountStatementExtraction/accstmtdetails/body/status. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MM_SapIsuTo3rdpartyAccountStatementExtraction_ method filename$[a, com.sap.aii.mappingtool.tf3.rt.Context@421badd8] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:MT_SapisuTo3rdpartyAccountStatementExtraction/accstmtdetails/body/status. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MM_SapIsuTo3rdpartyAccountStatementExtraction_ method filename$[a, com.sap.aii.mappingtool.tf3.rt.Context@421badd8] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:350) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:312) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:312) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:312) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MM_SapIsuTo3rdpartyAccountStatementExtraction_ method filename$[a, com.sap.aii.mappingtool.tf3.rt.Context@421badd8] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:56) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:282) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:312) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:312) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:312) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:47) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:282) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:312) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:312) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:312) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.NullPointerException at com.sap.xi.tf._MM_SapIsuTo3rdpartyAccountStatementExtraction_.filename$(_MM_SapIsuTo3rdpartyAccountStatementExtraction_.java:119) ... 26 more RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:MT_SapisuTo3rdpartyAccountStatementExtraction/accstmtdetails/body/status. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MM_SapIsuTo3rdpartyAccountStatementExtraction_ method filename$[a, com.sap.aii.mappingtool.tf3.rt.Context@421badd8]
    10:38:37 End of test
    what would be the reason for this.
    waiting for u r response.
    bye.
    regards.
    seeta ram.

  • Dynamic class & property

    Hi there!
    I would like to know, if it is possible to mimic the behavior of XML dynamic class:
    var xm:XML =
        <question idAttr="atribute xml">
        </question>;
    trace(xm.attributes());
    trace("Attributes: "+xm["attributes"]);
    xm["attributes"] = {a:"atr1", b:"atr2"}; (in my dynamic class with attributes function, I get ReferenceError: Error #1037)
    trace("Attributes: "+xm["attributes"]);
    trace(xm.attributes());
    So I can call:
         xm.attributes() method which gives me XML attributes
    and use
         xm["attributes"] = {a:"atr1", b:"atr2"};
    which writes to the "attributes" property and not references the XML class function.
    My question:
    How can I do the same in my custom dynamic class ?
    Gregory

    As you might noticed some syntaxes of XML class' properties and methods are not conventional to AS3. This, perhaps, hints to the fact that XML class is not an AS3 class in its purest sense. In other words it is probably written in a different language (C? C++?...).
    In AS3, unlike in other languages, you cannot name property and method the same. So, there is no way to have both "attributes" property and "attributes()" method.
    Nevertheless, if you want to emulate XML functionality to some extend and enumerate/return dynamically set properties, you can definitely do that. This is an excellent case for using accessors (setters and getters):
    package 
         public dynamic class DynamicClass
              public function DynamicClass()
              public function get attributes():Object {
                   var obj:Object = { };
                   for (var prop:String in this) {
                        obj[prop] = this[prop];
                   return obj;
              public function set attributes(obj:Object):void {
                   for (var prop:String in obj) {
                        this[prop] = obj[prop];
    Usage:
    var dc:DynamicClass = new DynamicClass();
    dc.prop2 = "BLAH";
    dc.attributes = { propA: "bbb", anotherProp: 456 };
    trace(dc["attributes"]);
    for (var prop:String in dc.attributes) {
         trace(prop, "=", dc.attributes[prop]);
    Message was edited by: Andrei1

  • Difference B/w CR/LF,Newline,Vertical tab in class CL_ABAP_CHAR_UTILITIES

    Can anybody tell me the difference b/w CR/LF,Verical Tab,Newline in Attributes of class CL_ABAP_CHAR_UTILITIES?
    i think CR/LF & Newline are one &the same.
    If it is correct,why there are 2 Attributes provided i this class?

    Hi Aruna,
    CL_ABAP_CHAR_UTILITIES attributes have been created to give you the right characters in your operating environment.
    In the past, you could specify HEX 13 for a line feed. Now you are in a unicode-compatible world where you do not care about how many bytes are used for what control character.
    The attributes will just have the values you need in the (byte) length expected by your operating system. And if you use the same program in different releases and/or operating systems with or without unicode it will still work.
    The names of the attributes are self-explaining. If you don't know what a speific atributes name stands for: Ask your milkman
    Regards,
    Clemens
    Regards,
    Clemens

  • Help with java (2 simple classes)

    would anyone be able to help me with some questions about two very short java classes?
    i have come up with some answers of my own, but yeah, i'm not sure how correct my answers are....
    the 4 questions are:
    1. The data attributes m, n and grid in the HeatGrid class are declared private, and methods
    such as gridHeight(), gridWidth() and copyGrid() are provided to extract their value. Why
    is the better class design than simply declaring those attributes as public?
    My answer: So other classes accessing them cannot modify those data atributes, i am not sure why this is better class design.
    2. Why must the (global) constants in HeatSim.java be declared static ?
    My Answer: because HeatSim is what you run first and so you don't create a HeatSim object, you just access its methods, thus the need to make them static.
    3. Assuming HeatGrid has been fully implemented, during the execution of the statement
    HeatGrid = new HeatGrid(inGridFile), how many objects of HeatGrid, double [][] and
    Scanner are created?
    My Answer: 1 HeatGrid object, 1 doulbe[][] object and 1 scanner object
    Which of these objects must still exist after the statement completes execution?
    4. For each of the classes HeatSim and HeatGrid, identify the client and supplier classes
    (including library classes).
    My Answer: So far this is what i have done. for the HeatSim class, i said that the supplier classea are:
    double
    int
    boolean
    String
    Math Class
    viewgrid class
    array
    and the clients for the HeatSim class are:
    HeatGrid class
    if anyone can help me i will but up the VERY short code to these two classes. I am really stuck and any help woould be greatly appriciated! :)
    Lots o love
    Sarah

    ok here is the code (i don't have my compelted copy on me but this will do for the moment).....
    import java.lang.Integer;
    import java.lang.Double;
    import java.text.DecimalFormat;
    public class HeatSim {
        final static boolean ENABLE_VIEW = true; // if true, create GUI to view grid
        final static double DEFAULT_THR = 1.0e-02;
        final static int DEFAULT_PAUSE = 100; // pause between each update of window in ms
        final static int DISPLAY_WIDTH = 7;   // width to print each grid value
        final static int MAX_MN_DISPLAY = 10; // maximum grid size to be displayed
        public static void main(String[] args) {
            // initialize program `parameters' according to the command line,
            // entering `default' values if none were given
            String inGridFile = (args.length < 1)? "": args[0];
            int nIter = (args.length < 2)? 1: Integer.parseInt(args[1]);
            double Thr = (args.length < 3)? DEFAULT_THR: Double.parseDouble(args[2]);
            String dumpFile = (args.length < 4)? "": args[3];
         DecimalFormat residFormat = new DecimalFormat("0.00E0");
            ViewGrid view = null;
            System.out.println("HeatFlow simulation program");
            if (inGridFile.equals("")) {
                System.out.println("Error: an empty grid file name was entered");
                return;
            // create HeatGrid object
            HeatGrid heatGrid = new HeatGrid(inGridFile);
            int m = heatGrid.gridHeight();
            int n = heatGrid.gridWidth();
            if (m <= MAX_MN_DISPLAY  && n <= MAX_MN_DISPLAY) {
                System.out.println("\nGrid at time 0:" );
                heatGrid.display(DISPLAY_WIDTH);
            if (ENABLE_VIEW) {
                // create a ViewGrid WINDOW object to view the grid
                view = new ViewGrid(m+2, n+2, DEFAULT_PAUSE);
                view.display(heatGrid.time(), 0.0, heatGrid.copyGrid());
            while (heatGrid.time() != nIter && heatGrid.residual() > Thr) {
                heatGrid.iterate();
                if (m <= MAX_MN_DISPLAY  && n <= MAX_MN_DISPLAY) {
                    System.out.println("Grid at time " + heatGrid.time() +
                                    " has residual " +
                         residFormat.format(heatGrid.residual()));
                    heatGrid.display(DISPLAY_WIDTH);
                if (ENABLE_VIEW) {
                     view.display(heatGrid.time(), heatGrid.residual(),
                                  heatGrid.copyGrid());
            } //while(...)
            if (ENABLE_VIEW) {
                view.finalize();
            if (!dumpFile.equals("")) {
             heatGrid.dumpGrid(dumpFile);
            System.out.println("\nHeat Flow simulation of (" + m + "+2)x(" + n +
                               "+2) grid ends at time " +  heatGrid.time() +
                               " with residual " +
                      residFormat.format(heatGrid.residual()));
        } //mainProgram()
    } //HeatSim
    import java.util.Scanner;
    import java.io.*;
    import java.text.DecimalFormat;
    public class HeatGrid {
        private int m, n;
        private double[][] grid;     // m+2 x n+2 array representing a grid
        private int t;               // the time the grid has been evolved
        private double resid;        // residual left from the last timestep
        // initializes m, n and grid according to the information in the grid file
        // of name gridFileN; sets t to 0, and resid to Double.MAX_VALUE
        public HeatGrid(String gridFileN) {
        } //HeatGrid()
        // returns the value of m
        public int gridHeight() {
            return 0;         // [ replace with an appropriate value ]
        } //gridHeight()
        // returns the value of n
        public int gridWidth() {
            return 0;         // [ replace with an appropriate value ] =
        } //gridWidth()
        // returns the value of t
        public int time() {
            return 0;         // [ replace with an appropriate value ]
        } //time()
        // returns the value of the residual from the previous timestep
        public double residual() {
            return 0;         // [ replace with an appropriate value ]
        } //residual()
        // returns a copy of the grid
        public double[][] copyGrid() {
            return null;         // [ replace with an appropriate value ]
        } //copyGrid
        // precondition: all elements of grid can be printed to 1 decimal place
        // using width characters.
        // prints the m+2 x n+2 grid by rows, rows in descending order.
        // All values are printed to 1 decimal place, and are right-justified
        // in a text field of width characters.
        // Note: this method is for debugging; hence right-justification is useful
        public void display(int width) {
        } //display()
        // advance the simulation a single timestep
        public void iterate() {
         } //iterate()
        // prints the m+2 x n+2 grid by rows, rows in ascending order.
        // All values are printed to 2 decimal places, with at least one space
        // between them.
        // Note: this method is intended for result checking by a computer program;
        // thus justification is not important.
        public void dumpGrid(String outGridFileN) {
        } //dumpGrid

  • Atribute of the pagedef, update viewable

    Hello all,
    I am Wanting set the propert viewable of the atribute of the pagedef, but i try with the values (true, false, yes, not) and none it decided my problem, all show error
    "java.lang.String ClassCastException".
    I am working for J2SE with adf.
    Tank very much........

    Hi,
    you can create a custom version of JUNavigationBar. If you press ctrl and -
    and type JUNavigationBar in teh dialog, you can have access to the source code. After that, extend the JUNavigationBar and override the extended class so you can add your pre and post insert actions
    Frank

  • Where can I download the api's of java classes ?

    I'd like to download all the api's of java classes. I only found a lot of pages, but i don't like to download one after other for a very long time.
    Where I can find a complete document of java classes api in a single document?
    When I say api of java classes I mean the name of all java classes , it's methods, atributes, what the class does, and so on...
    For the JAVA 1.5.0 of course...
    Thanks.

    Go to http://java.sun.com/j2se/1.5.0/download.jsp and click the Download link where it says J2SE 5.0 Documentation.

  • Creating a Button Class from MC

    I have a few simple questions for those who know about
    classes. I have been reading the tutorials on creating classes and
    specifically extending the MC class. I am pretty sure that an
    extended MC_Class might help me get what I need from my project.
    I essentially have a bunch of buttons, hundreds to be exact -
    and the exact number needs to be dynamic. Each one is currently a
    static MC with a bunch of variables assigned to each one via global
    variables. Its iis pulling in data taht assign the button values
    from XML files and - these XML files may change.
    Q1. If I extend the MC class so I can add attributes to MC's
    instance (Avoiding global variables) - will it mess with the rest
    of the movie clips in my scene? I mean if all I want to do is ad a
    a few dynamic string variables - it really shouldnt effect any of
    the other clips would it? MC.JumpURL = "newurl.com", MC.Thumnail
    ="/here/image.jpg" (This would help alot)
    Q2. What if I wanted to define actions of the new MC in the
    class? If the MC is an extension of the MC class. Would all of my
    MC's automatically take on the actions of the custom MC Class? For
    instance - I want the movieclip to animate onscreen and have
    rollover effects. I could do this easy if it were static - but I
    need this to become dynamic. Also - there are now unknown
    quantities to deal with
    Q3. How exactly would I call and assign the MC its atributes
    at the same time? And how do I specify this MC to use the functions
    defined in the class and not the other MC's I created elsewhere in
    the File.
    Example. Currently I have a grid of MCs' created when the
    User clicks a menu item (Another type of MC).
    Each new MC animates onstage - it calls a
    loadMovie(_root.thumb[0], this.Flipper) to assign and embedded MC
    an image defined in the XML that was loaded and assigned because I
    placed the instance on stage and wrote a MC script on each MC.
    Confused - check out what I am creating at
    www.vincesidwell.com/Fischer
    Click Fabrication or TurboSystems menus. Both menues will
    load a new set of Thumbnails at the bottom. They are loaded via an
    XML loaded by the menu and a function assigns the jpgs for the main
    gallery, Rollover image, and eventually a URL for a downloadable
    High Res Image.
    The client recently added more than 9 images per menu item. I
    will need to create a scrollable thumbnail gallery with dynamic
    quantities
    I can manually create the MC Scroller item for static number
    of buttons. But scripting an unknown for each ones links and images
    is insane. So I am looking at Classes. Assign a custom class for
    the flipping buttons and I should be able to assign tthem as the
    XML loads, and have it automatic. (pray please please please)
    Anyhelp?
    Thanks
    Vince Sidwell

    Hi there!
    I'll try and give some answers to your questions below...
    "vin-E" <[email protected]> wrote in message
    news:[email protected]...
    >I have a few simple questions for those who know about
    classes. I have
    >been
    > reading the tutorials on creating classes and
    specifically extending the
    > MC
    > class. I am pretty sure that an extended MC_Class might
    help me get what
    > I
    > need from my project.
    >
    > I essentially have a bunch of buttons, hundreds to be
    exact - and the
    > exact
    > number needs to be dynamic. Each one is currently a
    static MC with a
    > bunch of
    > variables assigned to each one via global variables. Its
    iis pulling
    > in
    > data taht assign the button values from XML files and -
    these XML files
    > may
    > change.
    >
    > Q1. If I extend the MC class so I can add attributes to
    MC's instance
    > (Avoiding global variables) - will it mess with the rest
    of the movie
    > clips in
    > my scene? I mean if all I want to do is ad a a few
    dynamic string
    > variables -
    > it really shouldnt effect any of the other clips would
    it? MC.JumpURL =
    > "newurl.com", MC.Thumnail ="/here/image.jpg" (This would
    help alot)
    You do not have to create a new MC class to assign local
    values or functions
    to it. A pseudo code example:
    Loop through total buttons you want to make (which can be
    number of entries
    in an XML file)
    Create a new movieclip and load the button graphic into
    this, give it a
    name like
    MyButtonX, where X is an increasing number based on which
    button this
    is. (Instead of creating
    and empty movielcip, you could also attach a movie (or
    button) from
    library.
    Assign the values and create the functions for this button
    that you
    would like (probably based
    on information in the XML file):
    MyButtonX.someVariable = node.attribues.someData;
    createOnRelease(MyButtonX, someOtherParamters)
    (where you have defined the function createOnRelease to do
    something
    like
    function createOnRelease(MC, someOtherParameteres) {
    MC.onRelease = function() {
    do what you want to do based on someOtherParameteres
    Position and resize MyButtonX
    In your example you have a 3x3 grid, which might extend to
    3xTOTAL,
    so you'd have to use some
    mathematical formula based on the value X, something like
    MyButtonX._x =
    (((X-1)%3)*(buttonWidths+hSpaceBetweenButtons)
    MyButtonY._y = Math.floor((X-1)/3)*(buttonHeights
    +vSpaceBetweenButtons
    end of loop.
    >
    > Q2. What if I wanted to define actions of the new MC in
    the class? If
    > the MC
    > is an extension of the MC class. Would all of my MC's
    automatically take
    > on
    > the actions of the custom MC Class? For instance - I
    want the movieclip
    > to
    > animate onscreen and have rollover effects. I could do
    this easy if it
    > were
    > static - but I need this to become dynamic. Also - there
    are now unknown
    > quantities to deal with
    If you actually create a new class, than all instances of
    that class will
    have the methods you define for it (just like all instances
    of a movieclip
    has those methods. At least, have them available. That
    doesn't mean they are
    always in use ... like for example the onRollOver. But again,
    you don't need
    to create a class to give all your dynamically created
    buttons a rollover
    effect. (Check code above).
    > Q3. How exactly would I call and assign the MC its
    atributes at the same
    > time? And how do I specify this MC to use the functions
    defined in the
    > class
    > and not the other MC's I created elsewhere in the File.
    You use the instance name of the MC to access that MC and its
    attributes/methods. For example button number 10 might look
    like this:
    trace(MyButton10._x);
    trace(MyButton10.someVariableYouHaveDefined);
    MyButton10.callSomeFunctionYouHaveDefined();
    For a movieclip to access a variable that has been defined
    for that instance
    of the movieclip, use "this" to point to that particular
    instance. So if we
    defined the function "callSomeFunctionYouHaveDefined" for
    button number 10
    and want to access "someVariableYouHaveDefined" for this
    particular
    instance, then
    MyButton10.callSomeFunctionYouHaveDefined = function() {
    trace(this.someVariableYouHaveDefined);
    > Example. Currently I have a grid of MCs' created when
    the User clicks a
    > menu
    > item (Another type of MC).
    > Each new MC animates onstage - it calls a
    loadMovie(_root.thumb[0],
    > this.Flipper) to assign and embedded MC an image defined
    in the XML that
    > was
    > loaded and assigned because I placed the instance on
    stage and wrote a MC
    > script on each MC.
    >
    > Confused - check out what I am creating at
    www.vincesidwell.com/Fischer
    >
    > Click Fabrication or TurboSystems menus. Both menues
    will load a new set
    > of
    > Thumbnails at the bottom. They are loaded via an XML
    loaded by the menu
    > and a
    > function assigns the jpgs for the main gallery, Rollover
    image, and
    > eventually
    > a URL for a downloadable High Res Image.
    >
    > The client recently added more than 9 images per menu
    item. I will need
    > to
    > create a scrollable thumbnail gallery with dynamic
    quantities
    >
    > I can manually create the MC Scroller item for static
    number of buttons.
    > But
    > scripting an unknown for each ones links and images is
    insane. So I am
    > looking
    > at Classes. Assign a custom class for the flipping
    buttons and I should
    > be
    > able to assign tthem as the XML loads, and have it
    automatic. (pray please
    > please please)
    Again, no need for a class for this. If you load the buttons
    into seperate
    MCs, and make sure to have all these MCs created inside a
    common parent MC
    for these buttons (which then _only_ contains these buttons).
    You can move
    this parent MC up and down on the stage based on the
    scrollbar. And you can
    read height off this MC to create your scrollbar.
    You might want to check out the following tutorials at
    http://www.gotoandlearn.com/:
    XML Video Playlist
    Creating Animated Buttons
    Introduction to OOP
    Now, I've said many times you don't need to make your own
    class to do what
    you want. That does not mean you can't make your own class. I
    just think
    that the main problem you are facing is the dynamic part,
    which you will be
    facing if you make your own class or not.
    /Jensen/
    >
    > Anyhelp?
    >
    > Thanks
    > Vince Sidwell
    >
    >
    >

Maybe you are looking for

  • Can anyone explain erratic power charging?

    I have a 13" 2009 MBP.  The charging is very erratic. When it is plugged in, it can say that it is charging even though the percentage is dropping.  It can be plugged in all night and not charge at all while the color on the LED light is orange.  It

  • My ipad wont open after update to 6.1.3 failed

    I updated my ipad mini (newly opened) to 6.1.3 from 6.1 last night, but when the download finished and the ipad rebooted to start the update, a prompt message pop out saying that update failed. Now I can't open my Ipad mini. Tried pressing the home b

  • Motor does not spin

    Here's the problem. I connected Umi 7764 and a Pacific Scientific P70360 drive, with the following wiring: umi 7764 screw terminal -> p70360 J4 command i/o 26 pin female connector inhin1 (bar above) ->  fault- (pin 8) inhout1 (bar above) -> enable- (

  • Application Sever - Enterprise Manager

    I have forgot the password for Enterprise. Is there any way login into the enterprise manager with some system default userid and password. Can you inform what is the default userid and password for enterprise manager.

  • Trnsfr data from G5 to MBP

    Just got a MBP (newest model) and transferred data from G5 dual to MBP using Setup Asst. BUT I have two hard drives on the G5 and, unfortunately, transferred from wrong HD. I also have Super Duper. I am wondering if I can connect the two computers wi