Wd_this and if_componentcontroller ?

hi friends...
I am new to WDA, can you explain me the followings...
l_node = wd_context->get_child_node( wd_this->wdctx_node_1 ).
and
l_node = wd_context->get_child_node( name = if_componentcontroller =>wdctx_node_1 ).
i hope both statements are same purpose to get the child node within the root node...
and wdctx_node_1 is the constant which holding the node name.
in the first statement,  wd_this->wdctx_node_1 what this mean ? here wd_this means what ?
in the second statement,  if_componentcontroller =>wdctx_node_1 what this mean ? here if_componentcontroller means what ?
and why we are using -> symbol in 1st statement and => symbol in 2nd statement ?
what is the difference between both...?
kindly explain me in detail...
By
Deva

Hi ,
Here the wd_this refers that it is pointing or refreing to the present controller reference .
eg: when you find the code using the wd_this which means it is pointing or refering to that particular view or to that context or so on....  which means this or self refrence concept in classes.
Next coming to the concept of  if_componentcontroller which means that it is the refrence of the component controller  but both the peice of code serves the same purpose .
here -> symbol refers that it is an instance method of this controller.
and => refers that it is the static method of that controller or context .
in your webdynrpo component open the method where u have written the code and in the application tool bar you can find the button called Display controller interface there you can find the code and find the difference of these two kinds .
GoodDay .
Regards,
Sana.

Similar Messages

  • Ho to get the structure for a subnode

    Hi Experts,
    I am an beginner in webdynpro abap - sorry for this simple question, but I have not found an answer.
    I have a context node generated from a interactive form. Let's call this node 'node1'.
    Within this node I have a subnode 'subnode1' containing the elements for an internal table.
    My simple question is: Ho can I get the structure of the subnote element?
    I mean, this is clear for me:
    DATA:
                ls_node1        TYPE wd_this->element_node1.
    But how about:
    ls_subnode1 type ?????????????????
    I guess the answer is quite simple... Thanks for your help.
    Andreas

    Hi,
    This will be of the same type that you declared while creating the context node element node1. You may go to the context node tab to see the dictionary structure. Alternatively you double click on wd_this which would display the inferface for wd_this and search for element_node1 there.
    Let me know if this helps.
    Regards
    Prasenjit

  • Wd_this, wd_contex

    Dear Folks,
    I am very new to wd abap, ple give the difference of
    WD_THIS
    WD_CONTEXT
    WD_COMP_CONTROLLER attributes.
    Thanks & Regards,
    sri

    Reference Variable WD_CONTEXT
    WD_CONTEXT
    Attribute WD_CONTEXT is a reference to the controller context. Regardless of the edited
    controller, it is always a reference variable of the type IF_WD_CONTEXT_NODE [page 859].
    You can use WD_CONTEXT and the interface methods to edit the content of a context node
    in your controller method.
    Example:
    The controller context contains the node MY_TABLE_NODE. You can use the method
    INVALIDATE_TABLE_NODE to invalidate the values of the node elements.
    method INVALIDATE_TABLE_NODE .
    data: TABLE_NODE type ref to IF_WD_CONTEXT_NODE.
    TABLE_NODE = WD_CONTEXT->GET_CHILD_NODE( 'MY_TABLE_NODE' ).
    TABLE_NODE->INVALIDATE( ).
    endmethod.
    Each controller contains a local interface which can be accessed in the controller.
    The controller attribute WD_THIS is a reference to this local interface. Depending on the
    controller, a reference variable is of the following type:
    ● IF_COMPONENTCONTROLLER
    &#9679; IF_<MY_CUSTOM_CONTROLLER>
    &#9679; IF_<MY_VIEW>
    &#9679; IF_<MY_WINDOW>
    Attribute WD_COMP_CONTROLLER of the View Controller
    In most cases, it is useful to declare the usage of the component controller for a view
    controller. The development environment has therefore predefined this step. In addition, each
    view controller already contains the attribute WD_COMP_CONTROLLER, which is a
    reference variable of the type IG_COMPONENTCONTROLLER. In each view controller, you
    can use the attribute WD_COMP_CONTROLLER to access all publicly accessible methods of
    the component-global generated interface of the corresponding component controller.

  • I am trying to save a DMS File through File upload UI element to CV01n Transactions....It works fine for .TXT file but other files it is not downloading coorectly and file is getting damaged

    Hi, I am downloading DMS file using following code and the file contents are getting damaged and cannot be retieved back. I am also getting hard time to open a DMS file in seperate browser.
    Can anybody please help me.
      TYPES : BEGIN OF ty_ts_raw_line,
    *                 line TYPE sdokcntbin ,
                line(2550) TYPE x,
               END OF ty_ts_raw_line.
      DATA: ls_documentdata TYPE bapi_doc_draw2,
            lv_doctype TYPE   bapi_doc_aux-doctype,
            lv_docnumber TYPE bapi_doc_aux-docnumber,
            lv_documentpart TYPE bapi_doc_aux-docpart,
            lv_documentversion TYPE bapi_doc_aux-docversion,
            ls_return TYPE bapiret2,
            gt_bapi_doc_files2 TYPE TABLE OF bapi_doc_files2,
            gs_bapi_doc_files2 LIKE LINE OF gt_bapi_doc_files2,
            lo_nd_nd_cost_rate TYPE REF TO if_wd_context_node,
            lt_nd_cost_rate TYPE wd_this->elements_nd_cost_rate,
            ls_nd_cost_rate TYPE wd_this->element_nd_cost_rate,
            lv_string TYPE string,
            lv_temp TYPE string,
            lv_input_file_name TYPE string,
            lv_size TYPE i ,
            lt_bindata TYPE STANDARD TABLE OF ty_ts_raw_line,"  STANDARD TABLE  OF zst_ts_raw_line,
            ls_bindata TYPE  sdokcntbin,
            ls_drao TYPE drao,
            lt_drao TYPE TABLE OF drao,
            lt_files TYPE cvapi_tbl_doc_files,
            ls_files TYPE cvapi_doc_file,
            ls_api_ctrl TYPE cvapi_api_control,
            ls_message TYPE messages,
            lv_dappl TYPE draw-dappl,
            lv_filename TYPE char200,
            lv_filename_draw_filep TYPE draw-filep,
            lv_doc_succ TYPE c,
            lv_tabix TYPE sy-tabix,
            lv_char_tabix(5) TYPE c,
    * get message manager
            lo_api_controller     TYPE REF TO if_wd_controller,
            lo_message_manager    TYPE REF TO if_wd_message_manager,
            lv_text TYPE string,
            lt_tabix TYPE STANDARD TABLE OF sytabix,
            lv_api_ctrl TYPE cvapi_api_control VALUE 'CV01N',
            lv_documentnumber TYPE draw-doknr,
            lt_drat TYPE TABLE OF dms_db_drat,
            ls_drat TYPE dms_db_drat.
      CONSTANTS: lc_cst(3) TYPE c VALUE 'CST',
                 lc_000(3) TYPE c VALUE '000',
                 lc_00(2) TYPE c VALUE '00',
                 lc_zng_test(8) TYPE c VALUE  'ZNG-TEST',
                 lc_desc(11)  TYPE c VALUE 'Cost Rate',
                 lc_test(4)  TYPE c VALUE 'Test',
    *             lc_file_path(31) TYPE c VALUE 'C:\FAKEPATH\COST_RATE_TABLE.TXT',
                 lc_x TYPE c VALUE 'X',
                 lc_blank TYPE c VALUE '',
                 lc_nd(2) TYPE c VALUE '&1'.
      FIELD-SYMBOLS <ls_wd_assist_mt_input> LIKE LINE OF wd_assist->mt_input.
      lo_api_controller ?= wd_this->wd_get_api( ).
      CALL METHOD lo_api_controller->get_message_manager
        RECEIVING
          message_manager = lo_message_manager.
    * navigate from <CONTEXT> to <ND_COST_RATE> via lead selection
      lo_nd_nd_cost_rate = wd_context->get_child_node( name = wd_this->wdctx_nd_cost_rate ).
    * @TODO handle non existant child
      IF lo_nd_nd_cost_rate IS NOT INITIAL.
        lo_nd_nd_cost_rate->get_static_attributes_table( IMPORTING table = lt_nd_cost_rate ).
      ENDIF.
      ls_documentdata-documenttype = lc_cst.
      ls_documentdata-documentnumber = lc_cst.
      ls_documentdata-documentversion = lc_00.
      ls_documentdata-documentpart  = lc_000.
      ls_documentdata-description  = lc_desc.
    *  ls_documentdata-
    *  ls_drat-dktxt = lc_desc.
    *  append ls_drat to lt_drat.
    *  clear ls_drat.
    *  lv_api_ctrl = 'CV01N'.
      LOOP AT lt_nd_cost_rate INTO ls_nd_cost_rate WHERE row_index IS NOT INITIAL.
        lv_tabix = sy-tabix.
    *           CALL FUNCTION 'CVAPI_DOC_CREATE'
    *         EXPORTING
    *           ps_draw              = ls_documentdata " wa_documentfiles
    *           ps_api_control       = lv_api_ctrl
    *         IMPORTING
    *           psx_message          = ls_message
    *           pfx_doknr            = lv_documentnumber.
    **         TABLES
    **           pt_drat_x            = it_drat.
        CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
          EXPORTING
            documentdata    = ls_documentdata
            defaultclass    = 'X'
          IMPORTING
            documenttype    = lv_doctype
            documentnumber  = lv_docnumber
            documentpart    = lv_documentpart
            documentversion = lv_documentversion
            return          = ls_return.
        IF ls_return-type CA 'EA'.
          ROLLBACK WORK.
        ELSE.
          COMMIT WORK.
        ENDIF.
        LOOP AT wd_assist->mt_input ASSIGNING <ls_wd_assist_mt_input> WHERE row_index = ls_nd_cost_rate-row_index.
          CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
            EXPORTING
              buffer        = <ls_wd_assist_mt_input>-file_data
            IMPORTING
              output_length = lv_size
            TABLES
              binary_tab    = lt_bindata.
          lv_filename_draw_filep = <ls_wd_assist_mt_input>-filename.
          WHILE lv_filename_draw_filep CA '\'.
            SPLIT lv_filename_draw_filep AT '\'
            INTO lv_temp lv_filename_draw_filep.
          ENDWHILE.
          LOOP AT lt_bindata INTO ls_bindata.
            CLEAR ls_drao.
            ls_drao-orblk = ls_bindata-line.
            ls_drao-orln = lv_size.
            ls_drao-dokar = lv_doctype.
            ls_drao-doknr = lv_docnumber.
            ls_drao-dokvr = lv_documentversion.
            ls_drao-doktl = lv_documentpart.
            ls_drao-appnr = '1'.
            APPEND ls_drao TO lt_drao.
            CLEAR ls_drao.
          ENDLOOP.
          CONDENSE lv_input_file_name.
    *      lv_input_file_name = 'Test.txt'.
          CALL FUNCTION 'CV120_DOC_GET_APPL'
            EXPORTING
              pf_file   = lv_filename_draw_filep
            IMPORTING
              pfx_dappl = lv_dappl.
          ls_files-appnr = '1'.
          ls_files-dappl = lv_dappl.
          ls_files-filename = lv_filename_draw_filep.
          ls_files-updateflag = 'I'.
          ls_files-langu = sy-langu.
          ls_files-storage_cat = 'SAP-SYSTEM'.
          ls_files-description = lv_filename_draw_filep..
          APPEND ls_files TO lt_files.
          CLEAR ls_files.
          ls_api_ctrl-tcode = 'CV01N'.
          CALL FUNCTION 'CVAPI_DOC_CHECKIN'
            EXPORTING
              pf_dokar           = lv_doctype
              pf_doknr           = lv_docnumber
              pf_dokvr           = lv_documentversion
              pf_doktl           = lv_documentpart
              ps_api_control     = ls_api_ctrl
              pf_content_provide = 'TBL'
              pf_http_dest       = 'SAPHTTPA'
              pf_ftp_dest        = 'SAPFTPA'
            IMPORTING
              psx_message        = ls_message
            TABLES
              pt_files_x         = lt_files
              pt_content         = lt_drao.
          IF ls_message-msg_type CA 'EA'.
            lv_doc_succ = lc_blank.
          ELSE.
            COMMIT WORK.
            lv_doc_succ = lc_x.
            CLEAR lv_text .
            lv_text = <ls_wd_assist_mt_input>-comments.
          ENDIF.
          CLEAR: ls_api_ctrl,ls_message,lt_files[],lt_drao[].
        ENDLOOP.
        IF lv_doc_succ = lc_x.
          ls_nd_cost_rate-dokar = lv_doctype.
          ls_nd_cost_rate-doknr = lv_docnumber.
          ls_nd_cost_rate-doktl = lv_documentpart.
          ls_nd_cost_rate-dokvr = lv_documentversion.
          ls_nd_cost_rate-comments = lv_text.
          MODIFY lt_nd_cost_rate FROM ls_nd_cost_rate INDEX lv_tabix TRANSPORTING dokar doknr doktl dokvr comments.
        ELSE.
          APPEND lv_tabix TO lt_tabix.
        ENDIF.
        CLEAR ls_nd_cost_rate.
      ENDLOOP.
    I am also having hardtime to show DMS file on browser.

    Hi I've done DMS Creation like below code. Just check it .
          LS_DOC-DOCUMENTTYPE    = LW_DMS_APP-DOCUMENTTYPE.
          LS_DOC-DOCUMENTVERSION = LW_DMS_APP-DOCUMENTVERSION.
          LS_DOC-DOCUMENTPART    = LW_DMS_APP-DOCUMENTPART.
          LS_DOC-STATUSEXTERN    = LW_DMS_APP-STATUSEXTERN.
          LS_DOC-LABORATORY      = '  '.
    CONCATENATE WD_THIS->LW_REQ-BUKRS LS_DMS-REQ_NO LS_DMS-CR_YR INTO LW_OBJKEY SEPARATED BY '\'.
          LW_DRAD-OBJECTKEY = LW_OBJKEY.
          LW_DRAD-OBJECTTYPE = 'ZAPR_REQ'.
          APPEND LW_DRAD TO LT_DRAD.
          LW_DRAT-LANGUAGE = SY-LANGU.
          LW_DRAT-DESCRIPTION = LS_STRIPPEDNAME.
          APPEND LW_DRAT TO LT_DRAT.
          CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
            EXPORTING
              DOCUMENTDATA         = LS_DOC
            IMPORTING
              DOCUMENTTYPE         = LF_DOCTYPE
              DOCUMENTNUMBER       = LF_DOCNUMBER
              DOCUMENTPART         = LF_DOCPART
              DOCUMENTVERSION      = LF_DOCVERSION
              RETURN               = LS_RETURN
            TABLES
              DOCUMENTDESCRIPTIONS = LT_DRAT
              OBJECTLINKS          = LT_DRAD.
    *--------Creating DMS Document Using BAPI-----------------*
          IF LS_RETURN-TYPE NA 'EA'.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
              EXPORTING
                WAIT = 'X'.
          LS_DRAW-DOKAR = LW_DMS_APP-DOCUMENTTYPE.
          LS_DRAW-DOKVR = LW_DMS_APP-DOCUMENTVERSION.
          LS_DRAW-DOKTL = LW_DMS_APP-DOCUMENTPART.
          LS_DRAW-DWNAM = SY-UNAME.
          LS_DRAW-DOKST = LW_DMS_APP-STATUSEXTERN.
          LV_STORAGE_CAT = LW_DMS_APP-STORAGECATEGORY.
          LS_API_CONTROL-TCODE = 'CV01N'.
          IF LF_DOCNUMBER IS NOT INITIAL.
            CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
              EXPORTING
                BUFFER        = LS_DMS_FILE-FILE_CTGRY
              IMPORTING
                OUTPUT_LENGTH = LV_SIZE
              TABLES
                BINARY_TAB    = LT_BINDATA.
            LOOP AT LT_BINDATA INTO LS_BINDATA.
              CLEAR LS_DRAO.
              LS_DRAO-ORBLK = LS_BINDATA-LINE.
              LS_DRAO-ORLN  = LV_SIZE.
              LS_DRAO-DOKAR = LS_DRAW-DOKAR.
              LS_DRAO-DOKNR = LF_DOCNUMBER.
              LS_DRAO-DOKVR = LS_DRAW-DOKVR.
              LS_DRAO-DOKTL = LS_DRAW-DOKTL.
              LS_DRAO-APPNR = '1'.
              APPEND LS_DRAO TO LT_DRAO.
            ENDLOOP.
            CALL FUNCTION 'CV120_DOC_GET_APPL'
              EXPORTING
                PF_FILE   = LS_STRIPPEDNAME
              IMPORTING
                PFX_DAPPL = LS_FILES-DAPPL.
            LS_DRAW-FILEP = LS_STRIPPEDNAME.
            LS_DRAW-DAPPL = LS_FILES-DAPPL.
            LS_FILES-APPNR = '1'.
            LS_FILES-FILENAME = LS_STRIPPEDNAME.
            LS_FILES-UPDATEFLAG = 'I'.
            LS_FILES-LANGU = SY-LANGU.
            LS_FILES-STORAGE_CAT = LW_DMS_APP-STORAGECATEGORY. "'ZDMS_DI'.
            LS_FILES-DESCRIPTION = LS_STRIPPEDNAME.
            APPEND LS_FILES TO LT_FILES.
            CALL FUNCTION 'CVAPI_DOC_CHECKIN'
              EXPORTING
                PF_DOKAR           = LS_DRAW-DOKAR
                PF_DOKNR           = LF_DOCNUMBER
                PF_DOKVR           = LS_DRAW-DOKVR
                PF_DOKTL           = LS_DRAW-DOKTL
                PS_API_CONTROL     = LS_API_CONTROL
                PF_CONTENT_PROVIDE = 'TBL'
              IMPORTING
                PSX_MESSAGE        = LS_MESSAGE
              TABLES
                PT_FILES_X         = LT_FILES
                PT_CONTENT         = LT_DRAO.
            IF NOT LS_MESSAGE-MSG_TYPE CA 'EA' AND
                   LF_DOCNUMBER IS NOT INITIAL.
              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
           ENDIF.
    Regards,
    Jack.  

  • Reg : object creation for controller and view ?

    hi friends....
    i am new to WDA and objects...
    please explain me..
    when i create the web dynpro component one interface is automatically created as IF_COMPONENTCONTROLLER for component
    IF_MAINVIEW for view
    IF_WINDOW for window
    correct me if i am wrong
    suppose if i want to reuse class, i want to create object... like wise
    if i want to reuse interfaces, i want to create object.
    but in this case..for eg (IF_COMPONENTCONTROLLER, IF_MAINVIEW ) where we are creating object...?
    no need to create object ?
    regards
    deva

    >but in this case..for eg (IF_COMPONENTCONTROLLER, IF_MAINVIEW ) where we are creating object...?
    no need to create object ?
    No you don't have instantiate any of the objects.  Think of Web Dynpro as a modeling layer implemented in ABAP Objects, but sitting on top of the Object Oriented constructs.  You still have some of the benfiits of OO - like event registration, inheritance, methods, etc - but a lot of the OO setup is done and maintained by the framework for you.  So although each section of Web Dynpro - the component, the controllers, contexts, views, etc - are all technically ABAP Object instances, you don't have to manage the objects directly.

  • Display some constant in the input field and allow the user to change it.

    Dear All,
    I have a requirement in WDA to display inputfield with some constant initially and allow
    the user to change that value according to his wish.Currently I am using UI Element
    InputField for this,but I am not able to show the constant initially.
    How can I achieve this pls suggest.
    Thanks,
    Reddy.

    Hi sudhir,
    To display with default values, you need to write your code in wddointi method.
    Check this code..
    * navigate from <CONTEXT> to <INPUT> via lead selection
      lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
    * get element via lead selection
      lo_el_input = lo_nd_input->get_element( ).
      lv_ship_point = '1001'.
    * set single attribute
      lo_el_input->set_attribute(
        name  =  `SHIP_POINT`
        value = lv_ship_point ).  // Now ship_point have initial value 1001.
    Cheers,
    Kris.

  • How to auto close finder window after drag and drop?

    In Tiger, I would file away items on my desktop my dragging them to the hard drive and then digging down to the appropriate folder. The finder window would then close automatically after dropping the file. Is there a setting in Snow Leopard that will enable similar functionality? Whenever I complete a drag and drop now the finder window just stays open, which isn't a huge issue, but I'd still like to change it. Thanks!

    Here is the test code:
         lo_nd_table_data_source = wd_context->get_child_node( name = wd_this->wdctx_table_data_source ).
          lo_nd_table_data_source->get_static_attributes_table( IMPORTING table = lt_table_data_source ).
          "Read Dummy Table
          lo_nd_table_data_source->get_static_attributes_table( IMPORTING table = it_table_data_source ).
        CONCATENATE ls_airline_info-carrid ls_airline_info-connid ls_airline_info-fldate INTO ls_table_data_source-row_key.
          ls_table_data_source-parent_row_key = ls_airline_info-carrid.
          ls_table_data_source-is_leaf   = abap_false.
          ls_table_data_source-expanded  = abap_true.
            SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE it_table_data_source.
         LOOP AT it_table_data_source INTO wa_table_data_source WHERE carrid = ls_airline_info-carrid
                                                                and   connid = ls_airline_info-connid
                                                                and   fldate = ls_airline_info-fldate.
          ls_table_data_source-connid    = ls_airline_info-connid.
          ls_table_data_source-fldate    = ls_airline_info-fldate.
          ls_table_data_source-PRICE     = wa_table_data_source-PRICE.
          ls_table_data_source-CURRENCY  = wa_table_data_source-CURRENCY.
          "Select all data to the new dummy table structure.
          "Move one row of the table to ls_table_data_cource correspondingle.
          APPEND ls_table_data_source TO lt_table_data_source.
          DELETE ADJACENT DUPLICATES FROM lt_table_data_source.
       ENDLOOP.
          lo_nd_table_data_source->invalidate( ). "Clear the table data
          lo_nd_table_data_source->bind_table( lt_table_data_source ). "Refresh new data
    Thanks,
    Kiran

  • Wdr:select_options and highlight Error Message with a Link to Inputfield

    Hi,
    I have created a InputField on a View using WDR_SELECT_OPTIONS. I want to validate this Input Field and give
    Error Message, when User fill it with wrong Values. How can we achieve this and important is to mark it on Screen WITH a RED STAR. ( e.g. highlighted )
    Thanks!
    Best Regards
    Beserithan Malabakan

    I've not tried it with select options before, but you might wan to have a look at setting the REPORT_ATTRIBUTE_ERROR_MESSAGE method of the message object.  This way the message gets attached to any UI element bound to the context attribute you issue the message for. But as I type this and think about it some more; I see where the problem lies.  The Select Options component doesn't follow an approach of cross component context binding.  It dynamically generates its own context.
    If I had a little more time I would test this out; but it might be worth your while to research.  When you initialize the Select-Options, you normally get access to the interface controller:
    data: l_ref_cmp_usage type ref to if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_select_options( ).
      if l_ref_cmp_usage->has_active_component( ) is initial.
        l_ref_cmp_usage->create_component( ).
      endif.
    * get a pointer to the interface controller of the select options
    *component
      wd_this->lv_wd_select_options =
           wd_this->wd_cpifc_select_options( ).
    * init the select screen
      wd_this->lv_sel_handler =
           wd_this->lv_wd_select_options->init_selection_screen( ).
    This interface controller (LV_WD_SELECT_OPTIONS in my case). Has a GET_API method that returns the component controller.  In turn you might be able to access the context of the Select-Options directly. Its a crazy idea, but worth a try.

  • Error in MSS HCM Processes and Forms Overview

    Hi all,
    Currently we are working on ESS/MSS from NW 7.3 portal.
    When i open HCM Processes and Forms Overview from MSS, it prompt me to change the password again and again.
    And on some user HCM Processes and Forms Overview not shown properly.
    Error while processing your query
    What has happened?
    The URL call http://<host name>:1080/sap/bc/webdynpro/sap/asr_pa_pd_processes_display was terminated because of an error.
    Note
    The following error occurred in system BEQ : Parameter has invalid value: Parameter TSTMP1 has invalid value 0 .
    The error occurred on application server MUMSAP02_BEQ_00 and in work process 8 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: SUBTRACT of program CL_ABAP_TSTMP=================CP
    Method: SUBTRACT_TIMESTAMPS of program CL_HRASR00_PROCESS_UTILITIES==CP
    Method: GET_CURRENT_TIME_DATA of program CL_HRASR00_PROCESS_UTILITIES==CP
    Method: START_TRACKING of program /1BCWDY/LA89BHH7CSECCUXGQD7Z==CP
    Method: IF_COMPONENTCONTROLLER~START_TRACKING of program /1BCWDY/LA89BHH7CSECCUXGQD7Z==CP
    Method: HANDLEDEFAULT of program /1BCWDY/LA89BHH7CSECCUXGQD7Z==CP
    Method: HANDLEDEFAULT of program /1BCWDY/LA89BHH7CSECCUXGQD7Z==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/LA89BHH7CSECCUXGQD7Z==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_IF_VIEW=====CP
    Method: DISPLAY_TOPLEVEL_COMPONENT of program CL_WDR_CLIENT_COMPONENT=======CP
    What can I do?
    If the termination type is RABAX_STATE, you will find more information on the cause of termination in system BEQ in transaction ST22.
    If the termination type is ABORT_MESSAGE_STATE, you will find more information on the cause of termination on the application server MUMSAP02_BEQ_00 in transaction SM21.
    If the termination type is ERROR_MESSAGE_STATE, you can search for further information in the trace file for the work process 8 in transaction ST11 on the application server. MUMSAP02_BEQ_00 . You may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system adminmistrator.
    Error Code: ICF-IE-http -c: 350 -u: ISHAJI -l: E -s: BEQ -i: MUMSAP02_BEQ_00 -w: 8 -d: 20130514 -t: 133514 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION -X: D4AE5218F8121ED2AF8DA00F61FBEAC0_D4AE5218F8121ED2AF8DA00F5D19EAC0_1 -x: 006DBCE20F7BF1E58AC0D4AE5218F812
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    Please suggest me the solution.
    Regards,
    Devendra

    Dear Andrea,
    I reset the password of backend user and gave sap_all and sap_new role.
    Last time it prompt the screen in mss as to change the password. (See above screen shot).
    But after reset the password...error showing instead of login screen in mss as below:
    Error while processing your query
    What has happened?
    The URL call http://<host name>:1080/sap/bc/webdynpro/sap/asr_pa_pd_processes_display was terminated because of an error.
    Note
    The following error occurred in system BEQ : Parameter has invalid value: Parameter TSTMP1 has invalid value 0 .  
    The error occurred on application server MUMSAP02_BEQ_00 and in work process 7 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: SUBTRACT of program CL_ABAP_TSTMP=================CP
    Method: SUBTRACT_TIMESTAMPS of program CL_HRASR00_PROCESS_UTILITIES==CP
    Method: GET_CURRENT_TIME_DATA of program CL_HRASR00_PROCESS_UTILITIES==CP
    Method: START_TRACKING of program /1BCWDY/LA89BHH7CSECCUXGQD7Z==CP
    Method: IF_COMPONENTCONTROLLER~START_TRACKING of program /1BCWDY/LA89BHH7CSECCUXGQD7Z==CP
    Method: HANDLEDEFAULT of program /1BCWDY/LA89BHH7CSECCUXGQD7Z==CP
    Method: HANDLEDEFAULT of program /1BCWDY/LA89BHH7CSECCUXGQD7Z==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/LA89BHH7CSECCUXGQD7Z==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_IF_VIEW=====CP
    Method: DISPLAY_TOPLEVEL_COMPONENT of program CL_WDR_CLIENT_COMPONENT=======CP
       What can I do?
    If the termination type is RABAX_STATE, you will find more information on the cause of termination in system BEQ in transaction ST22.
    If the termination type is ABORT_MESSAGE_STATE, you will find more information on the cause of termination on the application server MUMSAP02_BEQ_00 in transaction SM21.
    If the termination type is ERROR_MESSAGE_STATE, you can search for further information in the trace file for the work process 7 in transaction ST11 on the application server. MUMSAP02_BEQ_00 . You may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system adminmistrator.
    Error Code: ICF-IE-http -c: 350 -u: IKHASU -l: E -s: BEQ -i: MUMSAP02_BEQ_00 -w: 7 -d: 20130514 -t: 175940 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION -X: D4AE5218F8121ED2AF923E065A39EAC0_D4AE5218F8121ED2AF923E394271EAC0_1 -x: F091BCE2D132F1D58AC0D4AE5218F812
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    I checked log in ST22 as below
    What happened?
        The exception 'CX_PARAMETER_INVALID_RANGE' was raised, but it was not caught
         anywhere along
        the call hierarchy.
        Since exceptions represent error situations and this error was not
        adequately responded to, the running ABAP program
         'CL_ABAP_TSTMP=================CP' has to be
        terminated.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_PARAMETER_INVALID_RANGE', was not
         caught in
        procedure "SUBTRACT_TIMESTAMPS" "(METHOD)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        Parameter has invalid value: Parameter TSTMP1 has invalid value 0.
    Regards,
    Devendra

  • Usage of update-bapi and getdetail-bapi within one view

    Hello,
    i'm a student and i'm new to webdynpro and abap. Im trying to get data through a bapi into some screens and want to update some of these inputfields back through an update-bapi.
    I get all the needed data by a getdetails-bapi  and can show the data within binded inputfields, but how could i get the infos about which field was changed and how could i implement an update through the update-bapi?
    It is possible, that a view with two inputfileds gets the data through the getdetails-bapi and after a change in this fields there will be an update through a update-bapi, after pushing a button?
    Could you give me an example code, or could you explane me a way for implementing these?
    Thanks for your help!
    John

    Hi John,
    changes made at Contexts are stored in a table WDR_CONTEXT_CHANGE_LIST. So you can retrieve the old and new values from the table.
    Please follow the below steps :
    1. Create a context node (Ex:Changes) with dict.str wdr_context_change.
    2. Then create one subnode under Changes ex(details) with two attributes old_value and new_value with the type of string.
    3. Then write the below code at any button action.
    DATA: l_ref_componentcontroller TYPE REF TO ig_componentcontroller .
        DATA: l_changes                 TYPE        wdr_context_change_list,
              l_subnode                 type ref to if_wd_context_node,
              l_subnodedata             type if_USERLOG=>element_details.
        field-symbols: <change> type wdr_context_change,
                       <new>    type data,
                       <old>    type data.
        l_ref_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
        l_changes = l_ref_componentcontroller->get_changes( ).
        data: l_node type ref to if_wd_context_node.
        l_node = wd_context->get_child_node( 'CHANGES' ).
        l_node->bind_table( l_changes ).
        loop at l_changes assigning <change>.
          if <change>-old_value is not initial and <change>-new_value is not initial.
            l_subnode = l_node->get_child_node( index = sy-tabix name = 'DETAILS' ).
            assign <change>-new_value->* to <new>.
            assign <change>-old_value->* to <old>.
    *        l_subnodedata-new_value_string = cl_wdr_conversion_utils=>to_string( value = <new> ).
    *        l_subnodedata-old_value_string = cl_wdr_conversion_utils=>to_string( value = <old> ).
             l_subnodedata-new_value_string = <new>.
            l_subnodedata-old_value_string = <old>.
    *        l_subnodedata-new_value_string = 'AC'.
    *        l_subnodedata-old_value_string = 'CD'.
            l_subnode->bind_structure( l_subnodedata ).
           endif.
          endloop.
    So now your context has the changed records.
    Thanks.

  • Declaring and accessing custom global attributes of component controller

    Hi,
    I want to declare some global attributes for Component Controller and initialize them in WdDoInit() method.
    I have declared them under Component Controller --> Attributes tab --> after wd_context and wd_this (say G_MESSAGE).
    However,  when I am trying to set them in wdDoInit() method, I get compilation error saying G_MYMESSAGE is unknown and its not defined using data statement.
    How do I access these attributes?
    Thanks and regards,
    Amey

    Hello Amey,
    You need to access the variable by "wd_this->g_mymessage"
    Since wd_this attribute in each controller refers to interface of local controller. you could read the description of that attribute in attribute tab.
    Regards
    Anurag Chopra

  • Dynamic creation of context nodes and ui elements

    Hi,
    I have created context nodes dynamically. And i also want to create UI elements dynamically wherein i want to bind the attribute from the context node to it. For example i want to create a drop down by index and bind one of the attributes in the context nodes that i have earlier created dynamically to it.  I do not know how to get the path to the attribute as i get IF_WD_CONTEXTNODE_INFO when i say get_child_node(). And the IF_WD_CONTEXTNODE_INFO does not have any method where in i can get IF_WD_CONTEXT_NODE from where i can get the path by get_meta_path( )
    Here is the code. The problem is to get the path which is the i/p to cl_wd_dropdown_by_idx=>new_dropdown_by_idx( ) method.
    DATA:
            lo_root_ui_elmnt              TYPE REF TO cl_wd_uielement_container,
            lo_drpdwn_by_idx              TYPE REF TO cl_wd_dropdown_by_idx,
            lo_txt_vw                     TYPE REF TO cl_wd_text_view,
            lo_qstn_node                  TYPE REF TO if_wd_context_node,
            lo_optn_node_info             TYPE REF TO if_wd_context_node_info,
            lv_optn_data_source_name      TYPE string,
            lt_child_nodes                TYPE wdr_context_child_map,
            lo_qstn_el                    TYPE REF TO if_wd_context_element,
            lo_optn_el                    TYPE REF TO if_wd_context_element,
            lv_text                       TYPE string,
            lo_qstn_node_info             TYPE REF TO if_wd_context_node_info.
      FIELD-SYMBOLS:
    *                 <ls_qstn>    LIKE LINE OF wd_this->mt_questions.
                    <ls_child_node>         LIKE LINE OF lt_child_nodes.
      lo_root_ui_elmnt ?= io_view->get_root_element( ).
      lt_child_nodes = wd_context->get_child_nodes( ).
    LOOP AT lt_child_nodes ASSIGNING <ls_child_node>.
       lo_qstn_node = <ls_child_node>-node.
        lo_qstn_el = lo_qstn_node->get_element( index = 1 ).
        lo_qstn_el->get_attribute(
              EXPORTING
                name = 'QUESTION_TEXT'
               IMPORTING
                 value = lv_text ).
        lo_txt_vw =   cl_wd_text_view=>new_text_view( view = io_view ).
        lo_txt_vw->set_text( value = lv_text  ).
        lo_qstn_node_info = lo_qstn_node->get_node_info( ).
        lo_optn_node_info = lo_qstn_node_info->get_child_node( 'OPTIONS' ).
    *    lv_optn_data_source_name = lo_optn_node_info->get_meta_path( withoutcontroller = abap_true ).
    *    CONCATENATE lv_optn_data_source_name '.' 'OPTION_TEXT' INTO lv_optn_data_source_name.
        lo_drpdwn_by_idx = cl_wd_dropdown_by_idx=>new_dropdown_by_idx(
                              bind_texts = lv_optn_data_source_name
                              view       = io_view ).
        lo_root_ui_elmnt->add_child( lo_txt_vw ).
        lo_root_ui_elmnt->add_child( lo_drpdwn_by_idx ).
      ENDLOOP.
    Regards,
    Madhura Lobo
    Edited by: Suhas Saha on Aug 2, 2011 11:04 AM

    Hi Madhura,
    Please check this thread and find Baskaran answer...
    create new child-node in supply-function
    Re: Creating Dynamic Node and Table
    Cheers,
    Kris.

  • How to create and use a node globally  as well as internal table

    HI,
    Kindly let me know how can I create a node & internal table globally and which I can use them in various methods in view and controller as well, if u can provide an example it could be very help full.
    my requirment is uploading a multiple files in wdp ABAP for this I just followd the link below
    http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
    which for single upload and for making this for multiple upload I need a node could be usefull globally or a IT please check my code below
    DATA lo_nd_n_upload TYPE REF TO if_wd_context_node.
        DATA lo_el_n_upload TYPE REF TO if_wd_context_element.
        DATA ls_n_upload TYPE wd_this->element_n_upload.
        DATA lo_nd_n_file_download TYPE REF TO if_wd_context_node.
        DATA lt_n_file_download TYPE wd_this->elements_n_file_download.
        data ls_file_upload TYPE ZFILE_UPLOAD1.
       ZFILE_UPLOAD_1 = wd_componentcontroller->Elements_ZFILE_UPLOAD_1.
         t_file_upload = ig_componentcontroller->ITAB1.
       t_file_upload = wd_this->zfile_upload1.
       navigate from <CONTEXT> to <N_FILE_DOWNLOAD> via lead selection
         lo_nd_n_file_download = wd_context->get_child_node( name = wd_this->wdctx_n_file_download ).
      navigate from <CONTEXT> to <N_UPLOAD> via lead selection
        lo_nd_n_upload = wd_context->get_child_node( name = wd_this->wdctx_n_upload ).
      get element via lead selection
        lo_el_n_upload = lo_nd_n_upload->get_element( ).
      @TODO handle not set lead selection
        IF lo_el_n_upload IS not INITIAL.
      get all declared attributes
        lo_el_n_upload->get_static_attributes(
          IMPORTING
            static_attributes = ls_n_upload ).
    ls_n_upload will contain the File name file type and file contents *
       ls_n_upload-file_size = xstrlen( ls_n_upload-file_content ).
       ls_file_upload-FILE_NAME = ls_n_upload-FILE_NAME.
       ls_file_upload-FILE_TYPE = ls_n_upload-FILE_TYPE.
       ls_file_upload-FILE_SIZE = ls_n_upload-FILE_SIZE.
       ls_file_upload-FILE_CONTENTS = ls_n_upload-FILE_CONTENT.
       append ls_file_upload to t_file_upload.
       clear ls_file_upload.
    lo_nd_n_file_download->bind_table( new_items = t_file_upload set_initial_elements = abap_true ). 
    ENDIF.
    so here I would like use t_file_upload(node or IT ) to use globaly which can keep the previous data and I can add the existing data and in another method I would like to submit the data in t_file_upload to table
    Regards
    raj

    Hi Chandra,
    Resloved, I createa table type in SE11 by giving my table name as a line type and I used that as a Global IT in view "attributes" tab and I made the my code as follows its working now
        DATA lo_nd_n_upload TYPE REF TO if_wd_context_node.
        DATA lo_el_n_upload TYPE REF TO if_wd_context_element.
        DATA ls_n_upload TYPE wd_this->element_n_upload.
        DATA lo_nd_n_file_download TYPE REF TO if_wd_context_node.
        DATA lt_n_file_download TYPE wd_this->elements_n_file_download.
        data ls_file_upload TYPE ZFILE_UPLOAD1.
        data t_file_upload TYPE standard table of ZFILE_UPLOAD1.
       navigate from <CONTEXT> to <N_FILE_DOWNLOAD> via lead selection
         lo_nd_n_file_download = wd_context->get_child_node( name = wd_this->wdctx_n_file_download ).
      navigate from <CONTEXT> to <N_UPLOAD> via lead selection
        lo_nd_n_upload = wd_context->get_child_node( name = wd_this->wdctx_n_upload ).
      get element via lead selection
        lo_el_n_upload = lo_nd_n_upload->get_element( ).
      @TODO handle not set lead selection
        IF lo_el_n_upload IS not INITIAL.
      get all declared attributes
        lo_el_n_upload->get_static_attributes(
          IMPORTING
            static_attributes = ls_n_upload ).
    ls_n_upload will contain the File name file type and file contents *
       ls_n_upload-file_size = xstrlen( ls_n_upload-file_content ).
       ls_file_upload-FILE_NAME = ls_n_upload-FILE_NAME.
       ls_file_upload-FILE_TYPE = ls_n_upload-FILE_TYPE.
       ls_file_upload-FILE_SIZE = ls_n_upload-FILE_SIZE.
       ls_file_upload-FILE_CONTENTS = ls_n_upload-FILE_CONTENT.
       append ls_file_upload to ME->wd_this->gt_file_upload .
       clear ls_file_upload.
    lo_nd_n_file_download->bind_table( ME->wd_this->gt_file_upload ).
       endif.
    thanks for the support.
    Regards
    Raj

  • Upload and display Word Document in WD application

    Hello,
    I have a WD ABAP appl. where the user wants to upload an Word / Excel file (from its own local drive).
    The document shall be saved in SAP and it shall also be possible to display the document later in the WD application.
    I implemented the UI element upload in the view, to determine the path of the document.
    For the display implemented the UI element Office control.
    1. When i browse the document, the properties data, filename and mime type are filled into the bound context elements of the upload UI.
    2. The property datasource of the UI office control I bound to the same context element, that is also bound to the property data of the upload UI.
    The office control opens a word document, but the document is empty.
    Is it possible that the document is not uploaded correct?
    In another application I did an upload for a PDF doc.. There I implemented the following coding as action of the button 'Upload'.
    data lo_nd_pdf type ref to if_wd_context_node.
    data lo_el_pdf type ref to if_wd_context_element.
    data ls_pdf type wd_this->element_pdf.
    data lv_pdf like ls_pdf-pdf.
    navigate from <CONTEXT> to <PDF> via lead selection
    lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
    get element via lead selection
    lo_el_pdf = lo_nd_pdf->get_element( ).
    get single attribute
    lo_el_pdf->get_attribute(
    exporting
    name = `PDF`
    importing
    value = lv_pdf ).
    Get a reference to the from processing class.
    data: l_fp type ref to if_fp.
    l_fp = cl_fp=>get_reference( ).
    Get a reference to the PDF Object class.
    data: l_pdfobj type ref to if_fp_pdf_object.
    l_pdfobj = l_fp->create_pdf_object( ).
    set the pdf in the PDF Object
    l_pdfobj->set_document( pdfdata = lv_pdf ).
    set the PDF Object to extract data the Form data.
    l_pdfobj->set_extractdata( ).
    execute call to ADS
    l_pdfobj->execute( ).
    get the PDF Form data
    data: pdf_form_data type xstring.
    l_pdfobj->get_data(
    importing
    formdata = pdf_form_data ).
    convert the xstring from data to string so it can be processed using the iXML classes
    data: converter type ref to cl_abap_conv_in_ce,
    formxml type string.
    converter = cl_abap_conv_in_ce=>create( input = pdf_form_data ).
    converter->read(
    importing
    data = formxml ).
    pull in the iXML type group.
    type-pools: ixml.
    get a reference to iXML object
    data:l_ixml type ref to if_ixml.
    l_ixml = cl_ixml=>create( ).
    get iStream object from StreamFactory
    data: streamfactory type ref to if_ixml_stream_factory,
    istream type ref to if_ixml_istream.
    streamfactory = l_ixml->create_stream_factory( ).
    istream = streamfactory->create_istream_string( formxml ).
    create an XML document class that will be used to process the XML
    data: document type ref to if_ixml_document.
    document = l_ixml->create_document( ).
    create the parser class
    data: parser type ref to if_ixml_parser.
    parser = l_ixml->create_parser( stream_factory = streamfactory
    istream = istream
    document = document ).
    parse the XML
    parser->parse( ).
    define XML Node type object
    data: node type ref to if_ixml_node,
    attributes type ref to if_ixml_named_node_map.
    get the psi sales data Node and value.
    data ls_psi_sales type wd_this->element_psi_sales.
    data: lt_dfies type table of dfies,
    ls_defies type dfies.
    call function 'DDIF_NAMETAB_GET'
    exporting
    tabname = 'ZCM_PSI_SALES'
    ALL_TYPES = ' '
    LFIELDNAME = ' '
    GROUP_NAMES = ' '
    UCLEN =
    IMPORTING
    X030L_WA =
    DTELINFO_WA =
    TTYPINFO_WA =
    DDOBJTYPE =
    DFIES_WA =
    LINES_DESCR =
    tables
    X031L_TAB =
    dfies_tab = lt_dfies
    exceptions
    not_found = 1
    others = 2
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    data: lv_fieldname type string.
    field-symbols <fs_field> type any.
    loop at lt_dfies into ls_defies.
    lv_fieldname = ls_defies-fieldname.
    node = document->find_from_name( name = lv_fieldname ).
    assign component lv_fieldname
    of structure ls_psi_sales
    to <fs_field>.
    if <fs_field> is assigned.
    <fs_field> = node->get_value( ).
    endif.
    endloop.
    WRITE DATA INTO CONTEXT
    data lo_nd_psi_sales type ref to if_wd_context_node.
    data lo_el_psi_sales type ref to if_wd_context_element.
    navigate from <CONTEXT> to <PSI_SALES> via lead selection
    lo_nd_psi_sales = wd_context->get_child_node( name = wd_this->wdctx_psi_sales ).
    get element via lead selection
    lo_el_psi_sales = lo_nd_psi_sales->get_element( ).
    set all declared attributes
    lo_el_psi_sales->set_static_attributes(
    exporting
    static_attributes = ls_psi_sales ).
    Do I need such a code also to upload a word doc?
    Which interface / class exists for word documents? (for PDF upload there is the interface IF_FP)
    How can I save a document in SAP? (as MIME Object?  with which method?)
    I hope someone can help me!?
    BR

    You can use the fileupload and filedownload uielements.
    Check these links:
    [File Upload|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm]
    [File Download|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/09/a5884121a41c09e10000000a155106/content.htm]
    When you upload a file and save in SAP, are you saving it as xstring.
    If yes follow these steps for filedownload.
    Follow these steps for file download:
    1 Create FileDownload uielement in your View
    2.Create an Attribute of type xstring.
    3.Bind this attribute to the data property of your Filedownload uielement.
    4. during fileuplaod as you are saving the document in xstring format, fetch the same from your database table and pass the value to filedownload i.e set the attribute bound to data property of filedownload uielement with the xstring content.

  • At new and At last Concept

    Hi All,
    Is their any Possibilities to use AT LAST and AT NEW Concepts in WebDynpro ABAP.
    Plz Give me the solution with an Example
    Regards,
    Vimalraj

    Hi  Vimalraj,
    yes you can use at new and at last as you would use in normal abap....
    lets say i have a context node called: TABLE_NODE
    and this node has two attributes, name: field1 and field2.... field1 is of type char and field2 is of type p.
    table_node
    >field1
    >field2
    and a context node called : TOTAL with an attribute "VALUE".  value is of type p.
    total
    >value
    now i am interested in doing the sum for field2 and display that sum on my view....the ui element which is bound to my node "total"  attribute "value".  And also i am only interested in the sum of field value "A"...pls see code below.
    so here is the code:
    DATA lo_nd_table_node TYPE REF TO if_wd_context_node.
      DATA lo_el_table_node TYPE REF TO if_wd_context_element.
      DATA ls_table_node TYPE wd_this->element_table_node.
      DATA lt_table_node TYPE wd_this->elements_table_node.
    navigate from <CONTEXT> to <TABLE_NODE> via lead selection
      lo_nd_table_node = wd_context->get_child_node( name = wd_this->wdctx_table_node ).
      lo_nd_table_node->get_static_attributes_table(
      IMPORTING
      table = lt_table_node ).
      ls_table_node-field1 = 'A'.
      ls_table_node-field2 = '1.0'.
      APPEND ls_table_node TO lt_table_node.
      ls_table_node-field1 = 'A'.
      ls_table_node-field2 = '2.0'.
      APPEND ls_table_node TO lt_table_node.
      ls_table_node-field1 = 'B'.
      ls_table_node-field2 = '5.0'.
      APPEND ls_table_node TO lt_table_node.
      ls_table_node-field1 = 'B'.
      ls_table_node-field2 = '2.0'.
      APPEND ls_table_node TO lt_table_node.
      DATA lo_nd_total TYPE REF TO if_wd_context_node.
      DATA lo_el_total TYPE REF TO if_wd_context_element.
      DATA ls_total TYPE wd_this->element_total.
      DATA lv_value LIKE ls_total-value.
    navigate from <CONTEXT> to <TOTAL> via lead selection
      lo_nd_total = wd_context->get_child_node( name = wd_this->wdctx_total ).
    get element via lead selection
      lo_el_total = lo_nd_total->get_element(  ).
    get single attribute
      lo_el_total->get_attribute(
        EXPORTING
          name =  `VALUE`
        IMPORTING
          value = lv_value ).
      LOOP AT lt_table_node INTO ls_table_node.
        AT NEW field1.
          SUM.
          IF ls_table_node-field1 = 'A'.
            lv_value = ls_table_node-field2.   "at this point lv_value will be 3...
          ENDIF.
        ENDAT.
        lo_nd_table_node->bind_table( lt_table_node ).
      ENDLOOP.
    get single attribute
      lo_el_total->set_attribute(
        EXPORTING
          name =  `VALUE`
          value = lv_value ).
    that is all....similarly we can use at last.....
    hope this helps...
    J.
    Edited by: J Are on Feb 22, 2009 6:49 PM

Maybe you are looking for