How to regenerate additional rows after user clicks enter?

Hi all,
          I am outputing the data through internal table(contains two fields 'Country' and 'Test')using ALV Classes.
My requirement is user can add another row.And
after appending another row user will enter country(say India) against the country
field and clicks enter.Then the program has to fetch all the tests(say 'test1' and 'test2'  are there
for India) described for India from the database table and refresh the screen
with this additonal 2 rows(India, Test1 and India,Test2).
Can anyone please let me know how to do it?Remember I am using ALV Classes.
Thanks,
Balaji.

Hello Balaji
I would use a simplified approach by storing the PBO output before displaying the editable ALV list. As soon as the user wants to save the data (enter 'SAVE' in command window) the report compares the PBO data with the current PAI data.
To see the effect simply add a single row as previously described (resulting in three new rows) and delete two other rows. Inserted and deleted rows will be displayed afterwards.
*& Report  ZUS_SDN_ALVGRID_EDITABLE_7
REPORT  zus_sdn_alvgrid_editable_7.
TYPE-POOLS: abap.
INCLUDE <icon>.  " NOTE: replace by TYPE-POOLS: icon. on >= 6.20
DATA:
  gd_repid         TYPE syrepid,
  gd_okcode        TYPE sy-ucomm,
  gs_layout        TYPE lvc_s_layo,
  gt_fcat          TYPE lvc_t_fcat,
  go_docking       TYPE REF TO cl_gui_docking_container,
  go_grid          TYPE REF TO cl_gui_alv_grid.
TYPES: BEGIN OF ty_s_outtab.
INCLUDE TYPE knb1.
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab    TYPE STANDARD TABLE OF ty_s_outtab
                      WITH DEFAULT KEY.
DATA:
  gt_outtab        TYPE ty_t_outtab,
  gt_outtab_pbo    TYPE ty_t_outtab.
*       CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS:
      handle_data_changed
        FOR EVENT data_changed OF cl_gui_alv_grid
        IMPORTING
          er_data_changed
          e_onf4
          e_onf4_before
          e_onf4_after
          e_ucomm
          sender,
      handle_data_changed_finished
        FOR EVENT data_changed_finished OF cl_gui_alv_grid
        IMPORTING
          e_modified
          et_good_cells,
      handle_user_command
        FOR EVENT user_command OF cl_gui_alv_grid
        IMPORTING
          e_ucomm,
      handle_toolbar
        FOR EVENT toolbar OF cl_gui_alv_grid
        IMPORTING
          e_object
          e_interactive.
ENDCLASS.                    "lcl_eventhandler DEFINITION
*       CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
  METHOD handle_data_changed.
*   define local data
**    cl_gui_cfw=>set_new_ok_code( 'REFRESH' ). " not possible on 4.6c
    CALL METHOD cl_gui_cfw=>set_new_ok_code
      EXPORTING
        new_code = 'REFRESH'
*      IMPORTING
*        RC       =
  ENDMETHOD.                    "handle_data_changed
  METHOD handle_data_changed_finished.
*   define local data
    DATA:
      ls_outtab      TYPE ty_s_outtab,
      ls_cell        TYPE lvc_s_modi.
  ENDMETHOD.                    "handle_data_changed_finished
  METHOD handle_user_command.
  ENDMETHOD.                    "handle_user_command
  METHOD handle_toolbar.
*   define local data
    DATA:
      ls_button    TYPE stb_button.
    ls_button-function  = 'DEFAULT'.
    ls_button-icon      = icon_mass_change.
    ls_button-quickinfo = 'Set default value for column'.
    APPEND ls_button TO e_object->mt_toolbar.
  ENDMETHOD.                    "handle_toolbar
ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
  SELECT * FROM knb1 INTO TABLE gt_outtab UP TO 20 ROWS
    WHERE bukrs = '1000'.
  gt_outtab_pbo = gt_outtab.  " store PBO data
* Create docking container
  CREATE OBJECT go_docking
    EXPORTING
      parent                      = cl_gui_container=>screen0
      ratio                       = 90
    EXCEPTIONS
      OTHERS                      = 6.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
* Create ALV grid
  CREATE OBJECT go_grid
    EXPORTING
      i_parent          = go_docking
    EXCEPTIONS
      OTHERS            = 5.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
* Build fieldcatalog
  PERFORM build_fieldcatalog.
  PERFORM set_layout.
  SET HANDLER:
    lcl_eventhandler=>handle_toolbar               FOR go_grid,
    lcl_eventhandler=>handle_data_changed          FOR go_grid,
    lcl_eventhandler=>handle_data_changed_finished FOR go_grid.
* Display data
  CALL METHOD go_grid->set_table_for_first_display
    EXPORTING
      is_layout       = gs_layout
    CHANGING
      it_outtab       = gt_outtab
      it_fieldcatalog = gt_fcat
    EXCEPTIONS
      OTHERS          = 4.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  go_grid->set_toolbar_interactive( ).
  CALL METHOD go_grid->register_edit_event
    EXPORTING
      i_event_id = cl_gui_alv_grid=>mc_evt_enter
    EXCEPTIONS
      error      = 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.
* Link the docking container to the target dynpro
  gd_repid = syst-repid.
  CALL METHOD go_docking->link
    EXPORTING
      repid                       = gd_repid
      dynnr                       = '0100'
*      CONTAINER                   =
    EXCEPTIONS
      OTHERS                      = 4.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
* ok-code field = GD_OKCODE
  CALL SCREEN '0100'.
* Flow logic (no elements on screen):
*  PROCESS BEFORE OUTPUT.
*    MODULE STATUS_0100.
*  PROCESS AFTER INPUT.
*    MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*&      Module  STATUS_0100  OUTPUT
*       text
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'STATUS_0100'.
*  SET TITLEBAR 'xxx'.
  CALL METHOD go_grid->refresh_table_display
*      EXPORTING
*        IS_STABLE      =
*        I_SOFT_REFRESH =
    EXCEPTIONS
      finished       = 1
      OTHERS         = 2.
  IF sy-subrc <> 0.
*     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDMODULE.                 " STATUS_0100  OUTPUT
*&      Module  USER_COMMAND_0100  INPUT
*       text
MODULE user_command_0100 INPUT.
  TRANSLATE gd_okcode TO UPPER CASE.
* Fetch changes on ALV grid
  go_grid->check_changed_data( ).
  CASE gd_okcode.
    WHEN 'BACK' OR
         'END'  OR
         'CANC'.
      SET SCREEN 0. LEAVE SCREEN.
    WHEN 'REFRESH'.
      PERFORM refresh_outtab.
    WHEN 'SAVE'.
      PERFORM save_data.
    WHEN OTHERS.
  ENDCASE.
  CLEAR: gd_okcode.
ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&      Form  BUILD_FIELDCATALOG_KNB1
*       text
*  -->  p1        text
*  <--  p2        text
FORM build_fieldcatalog .
* define local data
  DATA:
    ls_fcat        TYPE lvc_s_fcat.
  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
*     I_BUFFER_ACTIVE              =
      i_structure_name             = 'KNB1'
*     I_CLIENT_NEVER_DISPLAY       = 'X'
*     I_BYPASSING_BUFFER           =
*     I_INTERNAL_TABNAME           =
    CHANGING
      ct_fieldcat                  = gt_fcat
    EXCEPTIONS
      inconsistent_interface       = 1
      program_error                = 2
      OTHERS                       = 3.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  " Set required fields editable
  LOOP AT gt_fcat INTO ls_fcat
                  WHERE ( fieldname = 'ZUAWA'  OR
                          fieldname = 'BUSAB' ).
    ls_fcat-edit    = abap_true.
    MODIFY gt_fcat FROM ls_fcat.
  ENDLOOP.
  DELETE gt_fcat WHERE ( fieldname = 'ZINRT' ).
ENDFORM.                    " BUILD_FIELDCATALOG
*&      Form  SET_LAYOUT
*       text
*  -->  p1        text
*  <--  p2        text
FORM set_layout .
  CLEAR: gs_layout.
  gs_layout-cwidth_opt = abap_true.
  gs_layout-zebra      = abap_true.
**  gs_layout-stylefname = 'CELLTAB'.
ENDFORM.                    " SET_LAYOUT
*&      Form  REFRESH_OUTTAB
*       text
*  -->  p1        text
*  <--  p2        text
FORM refresh_outtab .
* define local data
  DATA:
    ld_idx       TYPE i,
    ls_outtab    TYPE ty_s_outtab,
    ls_tmp       TYPE ty_s_outtab,
    lt_tmp       TYPE ty_t_outtab.
  " Simulate selection of data depending on value of ZUAWA
  ls_tmp-zuawa = '003'.
  ls_tmp-busab = 'K1'.  APPEND ls_tmp TO lt_tmp.
  ls_tmp-busab = 'K2'.  APPEND ls_tmp TO lt_tmp.
  ls_tmp-busab = 'K3'.  APPEND ls_tmp TO lt_tmp.
  LOOP AT gt_outtab INTO ls_outtab
                    WHERE ( zuawa = '003'
                    AND     busab IS INITIAL ).
    ld_idx = syst-tabix.
    LOOP AT lt_tmp INTO ls_tmp.
      ls_outtab-busab = ls_tmp-busab.
      IF ( syst-tabix = 1 ).
        MODIFY gt_outtab FROM ls_outtab INDEX ld_idx.
      ELSE.
        APPEND ls_outtab TO gt_outtab.
      ENDIF.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    " REFRESH_OUTTAB
*&      Form  SAVE_DATA
*       text
*  -->  p1        text
*  <--  p2        text
FORM save_data .
* define local data
  DATA:
    ls_outtab    TYPE ty_s_outtab,
    ls_pbo       TYPE ty_s_outtab,
    lt_insert    TYPE ty_t_outtab,
    lt_delete    TYPE ty_t_outtab.
" Compare PBO with PAI -> find deleted records
  LOOP AT gt_outtab_pbo INTO ls_pbo.
    READ TABLE gt_outtab INTO ls_outtab
         WITH KEY table_line = ls_pbo.
    IF ( syst-subrc NE 0 ).
      APPEND ls_outtab TO lt_delete.
    ENDIF.
  ENDLOOP.
" Compare PAI with PBO data -> find new records
  LOOP AT gt_outtab INTO ls_outtab.
    READ TABLE gt_outtab_pbo INTO ls_pbo
         WITH KEY table_line = ls_outtab.
    IF ( syst-subrc NE 0 ).
      APPEND ls_outtab TO lt_insert.
    ENDIF.
  ENDLOOP.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
      i_structure_name = 'KNB1'
      i_grid_title     = 'New Records'
    TABLES
      t_outtab         = lt_insert
    EXCEPTIONS
      program_error    = 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.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
      i_structure_name = 'KNB1'
      i_grid_title     = 'Deleted Records'
    TABLES
      t_outtab         = lt_delete
    EXCEPTIONS
      program_error    = 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.
  gt_outtab_pbo = gt_outtab.  " do not forget !!!
ENDFORM.                    " SAVE_DATA
Regards
  Uwe

Similar Messages

  • How to cancelling email submission after user clicks "yes/no" button of message box?

    could some one tell me, how can i cancelling the submission event after one user clicks "yes/no" button of message box? The scenario is the following:
    After data input in a dynamic form clicks the user send mail button. Before the email submit, the user has to decide going back to the form and validate the input or continuing to submit email.
    In case of going back to validate input the submission event must not solve. So, how can i implemente it in java and/or form calc script?
    Thanks so much for your help in advance and i am very glad to hearing from you soon!
    Djinges

    Hello,
    The most easy way to solve your problem is to add two buttons, the first should be regular button and the second is submit by e-mail one. Set the
    'presence' property of the second to 'hidden' and add to it your email address. To the first button on 'click' event add the script like this
    form1.#subform[0].Button1::click - (JavaScript, client)
    var answer = xfa.host.messageBox("Send e-mail?","e-mail",2,1);
    if(answer==1){
    EmailSubmitButton1.execEvent('click');
    Hope this helps.

  • What's the best way to determine which row a user clicked on via a link?

    Hello. Probably simple question, but my googleing is failing me. I have a table, with a column that is a command link. How can I determine which row the user clicked on? I need to take that value, and pass it to a different page to bind it for a different query. I was thinking of setting the result in a session bean? Or is there a better way?
    Thanks!

    Hi,
    You have two options:
    1. (Complex) Have your ActionListener evaluate the event to get the source, then climb the component tree up to the table and get the current row data;
    2. (Simple) Add a setPropertyActionListener to the link with value="#{var}" target="#{destination}" where var is the table's var attribute value and destination is your managed bean that required the clicked row.
    Regards,
    ~ Simon

  • ALV - Adding an additional row after subtotal

    Hi Friends,
      I want to develop an ALV report wherein I want to have an additional row after the subtotal in ALV to show some calculation.
    Please refer the below link for the report layout. In the ALV output after subtotaling the total operating revenue and total other income i would like to have an additional row to show the Total revenue(total operating revenue + total other income). Similarly after subtotaling the cost of sales, I would like to show the gross profit(total operating revenue - cost of sales) in an additional row. Please let me know whether this is possible in ALV Grid or List.
    http://www.imagebanana.com/view/gpl4ynnk/report_layout.jpg
    Regards
    SAPient

    Hi ,
    Please go through the below link it may help you .
    LInk : [Sub total text |http://wiki.sdn.sap.com/wiki/display/Snippets/DisplaysubtotaltextinALV+grid]
    Regards,
    Maruthi

  • Image resizing after user clicking on it

    Hej,
    Im new to flash. Id like to create image resizing feature.
    After user clicking or pointing on it the image should become
    bigger. I was looking for some tutorial but couldnt find any.
    Can anyone help?Any tip, tutorial, actionscript?
    Regards,
    Nina

    Hi,
    Do other users still work well?
    Locate to Services, find Print Spooler service and check if its startup type is set as Automatic.
    Have you cleared and reset your print spooler?
    Open Services, and stop the Print Spooler service.
    Navigate to the folder below, and open the PRINTERS.
    C:\Windows\system32\spool\PRINTERS
    Delete all files in the PRINTERS folder until it is empty,
    Re-start the Print Spooler service
    Andy Altmann
    TechNet Community Support

  • How to initiate some action when user clicks a field in CRViewer?

    <p><span style="font-family: Courier"><font size="1">ReportObjects doesn't expose click event despite the fact that a field can get focus frame, you can even tab from field to field. </font></span><span style="font-family: Courier"><font size="1">Drill() event works only on group names.</font></span><span style="font-family: Courier"><font size="1">So, how to initiate some action (based on a clicked field value) when user clicks a field in CRViewer?</font></span><span style="font-family: Courier"><font size="1">After doing some googling, have found that something similar exists but it's FoxPro API</font></span></p><p><strong><span style="font-size: 12pt; font-family: Courier"><font size="1">From some PDF: </font></span></strong><strong><span style="font-size: 12pt; font-family: Courier"><font size="1"> </font></span></strong></p><p><strong><span style="font-size: 12pt; font-family: Courier"><font size="1">> Report objects events</font></span></strong> </p><p style="margin: 0cm 0cm 0pt; line-height: normal" class="MsoNormal"><span style="font-size: 10pt; font-family: Courier"><font size="1"><span style="font-size: 12pt; font-family: Courier"><font size="1"><strong>> </strong></font></span>Report object events occur when you click or double-click a field, </font></span></p><span style="font-size: 10pt; font-family: Courier"><font size="1"><span style="font-size: 12pt; font-family: Courier"><font size="1"><strong>> </strong></font></span>heading, or label in a report.</font></span> <p style="margin: 0cm 0cm 0pt; line-height: normal" class="MsoNormal"><span style="font-size: 10pt; font-family: Courier"><font size="1"><span style="font-size: 12pt; font-family: Courier"><font size="1"><strong>> </strong></font></span>Doing this creates the EventInfo object. This object contains </font></span></p><span style="font-size: 10pt; font-family: Courier"><font size="1"><span style="font-size: 12pt; font-family: Courier"><font size="1"><strong>> </strong></font></span>information about the event and</font></span> <p style="margin: 0cm 0cm 0pt; line-height: normal" class="MsoNormal"><font size="1"><span style="font-size: 10pt; font-family: Courier"><span style="font-size: 12pt; font-family: Courier"><font size="1"><strong>> </strong></font></span>passes as a parameter to the event method. </span><strong><span style="font-size: 10pt; font-family: Courier">Table 3 </span></strong><span style="font-size: 10pt; font-family: Courier">lists the</span></font></p><p style="margin: 0cm 0cm 0pt; line-height: normal" class="MsoNormal"><font size="1"><span style="font-size: 10pt; font-family: Courier"><strong><span style="font-size: 12pt; font-family: Courier"><font size="1">> </font></span></strong>EventInfo object properties.......</span></font></p>

    The article you found refers to the ActiveX viewer which is used with the COM-based tool called Report Designer Component. Since you have posted to the .NET forum, I'm assuming you're not using the RDC and therefore this article will not apply.
    Recently, Click events were added to the Windows Form Viewer to get similar functionality as the ActiveX viewer. Take a look at the following link for more information....
    [http://diamond.businessobjects.com/node/2109 | /node/2109]
    However, if you are using the CR Web Forms Viewer in an ASP.NET app, then this functionality is not available.

  • Need to retain the screen input after user clicks BACK

    Hi,
    I have a report program in HR, using LDB "PNP" and Report category : PSSPCDOC.
    After the program is executed and the report is displayed on screen, if the user clicks the BACK button (F3), the selection screen is displayed with initial values. The input values provided by the user previously get lost.
    I debugged and it seems that the memory gets cleared everytime the BACK button is clicked.
    But i want to retain the user inputs on the selection screen if the user clicks the BACK button because the user wants to change some selection inputs not all.
    I am new to HR module, please let me know how to solve this issue.

    Hi,
    In your screen in the application bar,the right most button  is a coloured monitor kind of icon, next to the Help icon (which is a white question mark in a yellow circle) ,click on this monitor icon ,then under the  Local Data tab there is a History Block, select radio button History ON.
    I hope it helps.
    Regards,
    Shraddha

  • Interactive Gantt chart - how to receive updated XML after user changes

    Hello,
    I failed to receive changed XML after user updates.
    I've constructed following example:
    Created context attribute of type XSTRING, binded it to the "dataSource" property of the Gantt chart control.
    I pass following XML to the control:
    <?xml version="1.0" encoding="iso-8859-5" ?>
    <SAPJNetData version="1.0">
    <Application type="GANTT" version="1.0" />
    <TypeRepository version="1.0" href="/SAP/BC/WebDynpro/SAP/ZT_INV_WDR_TEST_GANTT/gantPR02P00086_3_tr.xml" />
    <UserInterface version="1.0" href="/SAP/BC/WebDynpro/SAP/ZT_INV_WDR_TEST_GANTT/gantPR02P00086_3_ui.xml" />
    <Graph type="Gantt.Graph" version="1.0">
    <rows>
      <row id="001" />
      <row id="002" />
      <row id="003" />
      </rows>
    <dates timeZone="GEurope/Berlin" locale="de_DE" format="dd.MM.yyyy" dateEnd="20.01.2010">
      <section date="01.01.2010" unit="DAY" unitSize="20" />
    <calendarItem id="Cal.1stDayInMonth">
      <repetition unit="MONTH" />
      </calendarItem>
    <calendarItem id="Cal.1stDayInWeek">
      <repetition unit="WEEK" />
      </calendarItem>
      </dates>
    <view>
      <viewpos date="01.01.2010" />
      </view>
    <chart id="Dummy">
    <timeScale>
    <section index="0">
      <ribbon type="Gantt.CProjects.Ribbon.Month" />
      <ribbon type="Gantt.CProjects.Ribbon.3Days" />
      </section>
      </timeScale>
      <grid type="Grid.CProjects.Gantt.TimeLine" calendarIDs="Cal.1stDayInWeek" />
    <table type="Gantt.Table" id="CProj-Table">
      <defaults typeCell="L.Table" typeHeader="L.Table" />
      <tree showRootIcons="TRUE" />
    <cols showInitially="4">
      <ids>TREE,ID2,ID3</ids>
      </cols>
    <header>
      <header width="30" />
      <label colid="TREE" width="250">Этап</label>
      <label colid="ID2">Дата с</label>
      <label colid="ID3">Дата по</label>
      </header>
    <rows>
      <ids>001,002,003</ids>
      </rows>
    <row>
      <header>1</header>
      <tree>Top Item</tree>
      <label>01.01.2010</label>
      <label>20.01.2010</label>
      </row>
    <row>
      <header>2</header>
      <tree parentRow="001">Subitem 1</tree>
      <label>01.01.2010</label>
      <label>10.01.2010</label>
      </row>
    <row>
      <header>3</header>
      <tree parentRow="001">Subitem 2</tree>
      <label>11.01.2010</label>
      <label>20.01.2010</label>
      </row>
      </table>
    <graph>
    <view>
      <backColor type="White" />
      </view>
    <node id="001" type="Gantt.CProjects.SummaryNode" rowID="001">
    <dates>
      <date>01.01.2010</date>
      <date>20.01.2010</date>
      </dates>
      </node>
    <node id="002" type="Gantt.CProjects.Node" rowID="002">
    <dates>
      <date>01.01.2010</date>
      <date>10.01.2010</date>
      </dates>
      </node>
    <node id="003" type="Gantt.CProjects.Node" rowID="003">
    <dates>
      <date>11.01.2010</date>
      <date>20.01.2010</date>
      </dates>
      </node>
      </graph>
      </chart>
      </Graph>
      </SAPJNetData>
    Then I run my example application, press standard "Save" button in Gantt chart control.
    After that my XML in context changes, but it's incorrect. There is no <graph> tag at all - this tag should contain all significant parameters of the chart.
    The resulting XML below:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <SAPJNetData build="9295" date="04-Aug-2010 10:19:13" host="localhost" version="1.1247">
    <Application type="GANTT" version="1.0"/>
    <TypeRepository href="/SAP/BC/WebDynpro/SAP/ZT_INV_WDR_TEST_GANTT/gantPR02P00086_3_tr.xml" version="1.0"/>
    <UserInterface href="/SAP/BC/WebDynpro/SAP/ZT_INV_WDR_TEST_GANTT/gantPR02P00086_3_ui.xml" version="1.0"/>
    <GraphGantt version="1.1247"/>
    </SAPJNetData>
    All the chart in fact has completely disappeared. There is nothing left but file header.
    The question: How to get XML with all user changes back from the Gantt chart control?

    Long time, hah..
    Anyways thanks to behave like a responsible person on SCN and taking care of your threads..
    Liked.

  • How to select the row on right click.

    Hi,
    I want row selection when user right click on the table.
    Right now when user right click on table a pop up menu comes but no row selected at this time.
    Can any body tell how select the row when right click over the table.

    Hi,
    look at this thread:
    http://forum.java.sun.com/thread.jspa?threadID=501957&messageID=2374481
    L.P.

  • How to find out date when user clicks on a date of Date Navigator

    Hi Experts,
    I have created WD application. It contains DateNavigator. User clicks on a particular date. We want to display the clicked date. How we can do so? I have done following coding. What I should type after "hi" + ????? to display the selected date.
    public void onActionSelectDate(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSelectDate(ServerEvent)
        wdComponentAPI.getMessageManager().reportSuccess("hi ");
        //@@end
    Regards,
    Gary

    HI Gary,
    You can do this by binding the context attribute of type date to the firstSelectedDate property of the datenavigator Ui element.
    then suppose context attribute to which you have bound the UI element has the name date then create an action for the event onDaySelect. then write the following code in the event handler
    public void onActionselectdate(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionselectdate(ServerEvent)
        String str = wdContext.currentContextElement().getDate().toString();
        wdComponentAPI.getMessageManager().reportSuccess("HI" + str);
        //@@end
    It will solve your issue.
    But the date format here will be YYYY-MM-DD if you want to change it then either you have to use one simple type or modify it in the code itself by using some string operation.
    Regards,
    Sarbjeet

  • How to close browser window after user log out

    Hi,
    Does anyone know how I can close browser window after user logs out. The scenario is when user clicks a log out button I will invalidate user session and close the browser right away in the backing bean.
    Your help would be appreciated.

    Try run this and you'll see that it runs fine with no exceptions:
    <%
         String someText = "bla bla bla";
         response.setContentType("text/plain");
         response.setHeader("Content-Disposition", "attachment;filename=message.txt");
         try {
              ServletOutputStream os = response.getOutputStream();
              os.write(someText.getBytes());
              os.flush();
              os.close();
         } catch (Exception e) {
              out.println("ERROR: " + e);
    %>It looks like that after I've closed the outputStream I can't do any more processing in the JSP. Even if I remove the setContentType and setHeader methods it still behaves this way.
    I'm starting to think that there's no way around this...??

  • Go to transaction after user clicks on report.

    Hello experts,
    Our users want that when they click on the report output, they want to go to a particular
    transaction in this case transaction AW01N(Asset Explorer) to see the values of that asset.
    So what I want to do is that I would make the assets displayed in the report to be a hotspot
    and when the users click on them it would call the AW01N and fill in the company code and asset. How do I do this guys?
    Thanks a lot!

    while displaying your internal table use HIDE to store the value of the field which user selects.
    LOOP AT ITAB.
      write :/ itab1-f1,itab-f2...
      hide itab-f1.
    endloop.
    when ever user selects that value will come into ITAB-F1 field.
    then use
    AT LINE SELECTION EVENT,
    to trigger that transaction
    for that first you have to populate Company code & asset no of that transaction initial screen with the user selected values. for that what you have to do is send these values to memory using
    SET PARAMETER ID 'BUK' FIELD itab-bukrs
    SET PARAMETER ID 'AN1' FIELD itab-ASSETNO
    then
    use CALL TRANSACTION 'code'....
    Regards
    Srikanth
    Message was edited by: Srikanth Kidambi

  • How to find out row that was clicked in DataTable?

    Hi there,
    i have a dataTable component which renders a list from database. In the last column of this table you can click a link for further processing for this row.
    How to identify which row was clicked?
    <f:view>
         <h3>Subtitel</h3>
         <h:form>
           <h:dataTable      headerClass="tableheader"
                             var="list"
                             value="#{Uebersicht.uebersichtsliste}">
              <h:column>
                   <f:facet name="header">
                        <f:verbatim>KW</f:verbatim>
                            </f:facet>
                           <h:outputText value="#{list.cal.kw}" />
              </h:column>
              <h:column >
                   <f:facet name="header">
                        <f:verbatim>Bemerkung</f:verbatim>
                            </f:facet>
                   <h:outputText value="#{list.cal.feiertagNat}" />
              </h:column>
              <h:column >
                   <f:facet name="header">
                        <f:verbatim>Start</f:verbatim>
                            </f:facet>
                   <h:commandLink action="#{Uebersicht.start}" value="setzen"/>
              </h:column>
            </h:dataTable>
         </h:form>
    </f:view>How to identify the row to process in action methed "uebersicht.start"?
    Regards,
    ak

    the easiest way is you can send the parameters for the command link and the
    output link.this parameters will be the unique id of the rows ur r populating .
    get those parameters by:
    request.getParameter(keep the id u kept in the parameters list);
    I worked it out before ,its perfect.
    regards,
    raju reddy

  • How to close a session when user clicks Logout

    In my jsp page i create a session for every user's name.
    when particular user clicks logut without closing his personal page,
    the others can access his page.
    so, how to close a session when clicks logout link.?
    similarly when user gets signin one system,he will not be sigin in other system.but how can we achieve this?
    Thanks in Advance

    What is the name of the session variable that you are creating on login? When he clicks logout, set that session variable to null. Like session.setAttribute("userName",null); and check for non-null condition before proceeding with any functionality in your jsp's.
    What is the second question? You want to prevent duplicate logins from different systems? You would have to maintain a static datastructure like a HashMap for instance. Everytime a user logs in, put an entry into the HashMap...like userMap.put("userName","userName"); If an entry already exists, throw a message saying that user already logged in from another machine...

  • BDC - How to ignore skipped screens when user click on back button

    Hello all,
    I am working on a module pool program. From this custom transaction I am calling a standard SAP screen using BAC call transaction. I am calling this screen by skipping 2-3 screens and user can directly see the 3 screen on an event on my custom transaction.
    Now my issue is whenever the user want to back, he clicks on back button then user have to back from all the screens that I skipped.
    Is this any way by which if user click on back then he can directly go to my custom transaction.
    Please suggest.
    FYI..
    I am calling IA06 - Inspection characterstics screen from my custom screen using BDC.
    Thanks,
    Sanket Sethi

    Hi Jovito,
    I also think the same that it's not possible. Now my issue is how to get my requirement.
    FYI..
    To open Classification screen directly we have a function module CLFM_OBJECT_CLASSIFICATION. But if I want to open IA06
    Inspection characterstics screen we don't have any FM or API to do the same.
    So how will I get my requirement done. That why I use the BDC call transaction to open IA06 Insp. characterstics screen but here I am facing this Back issue.
    Please advice if there is any suggestion.

Maybe you are looking for