How to refresh screen ?

im doing a stop watch application
and i want the numbers on the form to change

sorry :-)here is the code
mport javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class stopWatchMIDlet extends javax.microedition.midlet.MIDlet implements CommandListener {
private Display display;
private Form watch;
private Form stopF;
private Form rrF;
private Form resumeF;
private Form resetF;
private Command exitCommand;
private Command start;
private Command stop;
private Command reset;
private Command resume;
private Ticker ticker = new Ticker("My stopwatch");
int hrs=0;
int min=0;
int sec=0;
boolean running=true;
StringItem time;
StringItem timeRR;
StringItem timeRe;
StringItem timeS;
StringItem timeRm;
Thread begin;
int count=0;
public stopWatchMIDlet(){
display=Display.getDisplay(this);
exitCommand=new Command("Exit",Command.EXIT,1);
start=new Command("start",Command.OK,1);
stop=new Command("stop",Command.OK,1);
reset=new Command("reset",Command.BACK,1);
resume=new Command("resume",Command.BACK,1);
watch=new Form("");
stopF=new Form("");
rrF=new Form("");
resetF=new Form("");
resumeF=new Form("");
watch.setTicker(ticker);
stopF.setTicker(ticker);
rrF.setTicker(ticker);
resetF.setTicker(ticker);
resumeF.setTicker(ticker);
time=new StringItem(""," "+hrs+":"+min+":"+sec);
timeRm=new StringItem(""," "+hrs+":"+min+":"+sec);
timeRR=new StringItem(""," "+hrs+":"+min+":"+sec);
timeS=new StringItem(""," "+hrs+":"+min+":"+sec);
timeRe=new StringItem(""," "+hrs+":"+min+":"+sec);
watch.append("\n");
watch.append("\n");
watch.append("\n");
watch.append(time);
watch.addCommand(start);
watch.setCommandListener(this);
stopF.append("\n");
stopF.append("\n");
stopF.append("\n");
stopF.addCommand(stop);
stopF.setCommandListener(this);
rrF.append("\n");
rrF.append("\n");
rrF.append("\n");
rrF.addCommand(reset);
rrF.addCommand(resume);
rrF.setCommandListener(this);
resetF.append("\n");
resetF.append("\n");
resetF.append("\n");
resetF.addCommand(exitCommand);
resetF.addCommand(start);
resetF.setCommandListener(this);
resumeF.append("\n");
resumeF.append("\n");
resumeF.append("\n");
resumeF.addCommand(exitCommand);
resumeF.addCommand(reset);
resumeF.setCommandListener(this);
public void startApp() {
display.setCurrent(watch);
public void pauseApp() {
public void destroyApp(boolean unconditional) {
public void commandAction(Command c,Displayable s){
if(c==exitCommand){
destroyApp(false);
notifyDestroyed();
if(c==start){
stopF.append(timeS);
display.setCurrent(stopF);
startWatch();
if(c==stop){
running=false;
rrF.append(timeRR);
display.setCurrent(rrF);
if(c==reset){
hrs=0;
min=0;
sec=0;
timeS.setText(" "+hrs+":"+min+":"+sec);
display.setCurrent(watch);
count=1;
if(c==resume){
running=true;
startWatch();
display.setCurrent(stopF);
public void startWatch(){
begin=new Thread(){
public void run(){
while(running){
try{
sec+=1;
if(sec==60){
sec=0;
min+=1;
if(min==60){
min=0;
hrs+=1;
if(hrs==24){
hrs=0;
Thread.sleep(1000);
timeS.setText(" "+hrs+":"+min+":"+sec);
timeRR.setText(" "+hrs+":"+min+":"+sec);
timeRm.setText(" "+hrs+":"+min+":"+sec);
}catch(Exception e){}
};begin.start();

Similar Messages

  • How to refresh screen in abap

    Hi
    I have created an alvtree. Upon deleting one of the nodes I update the tables. How do I refresh the screen to display the new alv tree please?
    Thank you

    Hi,
    There are two ways to do that...
    1. free that alv object and recreate it(Recreating might have already done in PBO... it will refresh the screen.
    2. Check for any method for refreshing the screen.
    Regards
    Maneesh Chandran

  • How to refresh screen in normal reports?

    Hi Experts,
    I am developing normal report. I am writing the output using write statement.
    In my out put one filed is check box.
    Suppose I have 12 records in the output, if I tick the 2 records and process these records using application tool bar button,
    After that I need to refresh the screen and output should be only 10 records needs to be displayed.
    How to do this requirement? Please suggest on this.
    Thanks in Advance,
    Uru2019s Harsha

    Hai Harsha,
    Please look at the following given Code May be helpful for you.
    TYPES : BEGIN OF str_mard ,
            matnr TYPE mard-matnr,
            lgort TYPE mard-lgort,
            werks TYPE mard-werks,
            END OF str_mard.
    DATA : wa_mard TYPE str_mard,
           it_mard TYPE TABLE OF str_mard.
    data : BEGIN OF str_makt occurs 0,
    chkbx type checkbox,
    matnr TYPE makt-matnr,
    maktg TYPE makt-maktg,
    END OF str_makt.
    DATA : wa_makt.
    data: it_makt like str_makt OCCURS 0 WITH HEADER LINE.
    data: lines type i.
    PARAMETERS : plant TYPE mard-werks,
                 stor LIKE mard-lgort.
    DATA:  matnr like mseg-matnr,
          maktx like makt-maktx.
    SET PF-STATUS 'MYLIST'.
    START-OF-selection.
      perform fetch_data.
      PERFORM display_data.
    *&      Form  fetch_data
    *       text
    FORM fetch_data.
      if sy-ucomm <> 'SAVE'.
        SELECT matnr lgort werks FROM mard
           INTO CORRESPONDING FIELDS OF TABLE it_mard
                                    WHERE lgort = stor
                                      AND werks = plant.
        SELECT  matnr maktg FROM makt
      INTO CORRESPONDING FIELDS OF TABLE it_makt FOR ALL ENTRIES IN it_mard
                                WHERE matnr = it_mard-matnr AND spras = 'E'.
      endif.
      if sy-ucomm = 'SAVE'.
        describe table it_makt lines lines.
        do lines times.
          READ LINE sy-index FIELD VALUE it_makt-chkbx it_makt-matnr
                                         it_makt-maktg.
          IF it_makt-chkbx = 'X'.
            matnr = it_makt-matnr.
            maktx = it_makt-maktg.
            read table it_makt WITH KEY matnr = it_makt-matnr
                                   maktg = it_makt-maktg.
            clear it_makt.
            modify it_makt index sy-tabix.
          endif.
        enddo.
      endif.
    endform.                    "fetch_data
    *&      Form  display_data
    *       text
    form display_data.
      LOOP AT it_makt.
        WRITE : /1 it_makt-matnr COLOR 1,
                40 it_makt-maktg COLOR 2,
                85 it_makt-chkbx as CHECKBOX input on.
        HIDE: it_makt-matnr,it_makt-chkbx.
      ENDLOOP.
    endform.                    "display_data
    At USER-COMMAND.
      clear it_makt.
      case sy-ucomm.
        when 'SAVE'.
          perform fetch_data.
          perform display_data.
      endcase.
    Edited by: shelly Malik on Aug 1, 2009 8:58 AM

  • No matter what I do, I cannot figure out how to refresh the screen, and so I can't even see what's new on my own website!

    I cannot refresh the screen, no matter what I try. The "restore" is not the same thing. So I always get old versions of websites, including my own. I cannot see a new version of any website I have visited previously. I need to know how to REFRESH my screen, and there is no way to do it!!!!!

    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (MAC)
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"

  • In IE, they have a refresh screen button, you do not..how do I refresh screen w/you?

    In Internet Explorer, in the tools bar there is a refresh screen button, I can not find it in your tool bar in Mozilla Firefox. Please tell me how to refresh a screen in this web. Thanks !
    If you go to IE you will see it in the tool bar under the address line.

    And to keep the reload/Stop buttons from combining after moving them elsewhere, either place them as Stop|Reload or put a flexible space in between if you prefer them as Reload|Stop.

  • How to refresh after delete the records in ALV report ?

    Hi Friends,
    How to refresh after delete the records in ALV report.
    I am deleting records in ALV report .
    After successful delete the screen should refresh.
    u201C Deleted records should not appear in the screen u201C.
    Please guide me.
    Regards,
    Subash

    Hi subhash,
    FORM user_command USING r_ucomm LIKE sy-ucomm      rs_selfield TYPE slis_selfield.
    WHEN 'BACK'.
    Refresh the internal table from the ALV grid
          PERFORM update_alv_tab.
    ENDFORM.                    "user_command
    FORM update_alv_tab .
      DATA :  e_grid TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = e_grid.
      CALL METHOD e_grid->check_changed_data.
      "update_alv_tab
      CALL METHOD e_grid->refresh_table_display.
    ENDFORM.                    " UPDATE_ALV_TAB
    Then see in Debug mode is it updating or not..
    Please confirm .
    And please paste the code if you can.
    Regards.

  • How to refresh the textedit object in module pool

    Hi All,
    I would appreciate if anybody can solve my problem.
    Problem is i have created one TEXTEDIT and now when user clicks on the cancel button and come back to the screen the data which was previously entered is still coming up.
    Please tell me how to refresh the data in TEXTEDIT.

    actualy it is enough to do the following, assuming you have a container to put the textedit into it:
      DATA:  l_parent_container TYPE REF TO cl_gui_custom_container,
             l_obj_editor TYPE REF TO cl_gui_textedit, "make this a global variable
             l_text_table TYPE re_t_textline,
             l_itftext TYPE STANDARD TABLE OF tline,
             l_thead TYPE thead.
    l_parent_container = ... "your container
    move .... to l_thead...    "your text header to read or reread
    read text from SO10
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          id                      = l_thead-tdid "Text-ID
          language                = l_thead-tdspras "im_request-language?
          name                    = l_thead-tdname "TDIC Text-Name
          object                  = l_thead-tdobject "Texte: Anwendungsobjekt
        TABLES
          lines                   = l_itftext
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    convert itf text to stream text (SAPSCRIPT_DEMO_NOTE_EDITOR)
      CALL FUNCTION 'CONVERT_ITF_TO_STREAM_TEXT'
        TABLES
          itf_text    = l_itftext
          text_stream = l_text_table.
      IF l_obj_editor IS INITIAL.
        CREATE OBJECT l_obj_editor
            EXPORTING parent = l_parent_container. " Abstract Container for GUI Controls
      ENDIF.
    discard any previous changes
      l_obj_editor->set_textmodified_status( cl_gui_textedit=>false ).
    übertragen text in editor
      CALL METHOD l_obj_editor->set_text_as_stream
        EXPORTING
          text            = l_text_table
        EXCEPTIONS
          error_dp        = 1
          error_dp_create = 2.

  • How to Refresh "Internal table values" in User EXIT.

    Dear All,
    My requirement is to place some checks in exit ZXQQMU20 in different tabs from the TCODE IW21 . IW22 etc.
    Now after placeing the checks towards the different tabs while doing "NOCO" from IW21 the conditions are fullfilled but
    when i go ahead to modify the created  "NOCO " from the TCODE IW22 by deleting the created values and saving in IW22 , the conditions written in the exit are still satisfied eventhough i have deleted the values in IW22.
    The reason for this is that the tables which are there in the exit ZXQQMU20 T_VIQMFE , T_VIQMUR , T_VIQMMA
    still contains the old values which were there at the time of creation of "NOCO"  in IW21 .
    How to refresh my " internal tables values" used in such that even at the time of modification of the NOCO through IW22 my table values should pick the current screen values and not the values which were there at the time of creation.
    Please help.
    The code i have written in the exit is as below:-
    ********************* Changed vide ******START
    *****IW21  IW22 also added in filter criteria of notification *************
    ******The purpose of this modification is that in the execution of IW21 or IW22 or IW24 or IW25 we have to give a check that if the
    ******notification type is M2 than inside the Transaction screen , if the Breakdown duration comes less than 15 min than there are
    ******no issues but if the breakdown duration is more than 15 min than the mandatory fields needs to be entered in the analysis tab.
    **    The user has to fill up either following mandatory fields in Analysis Data tab.
    **    A. Object Parts & Damages sub tab
    **    Code Group - Object Parts (OTGRP, VIQMFE)
    **                          AND
    **    Code Group - Problem / Damage (FEGRP, VIQMFE)
    **    Or
    **    Notification Item Short Text (FETXT, VIQMFE)
    **   B. Cause sub tab
    **    Code Group # Causes (URGRP, VIQMUR)
    **    Or
    **    Cause Text (URTXT, VIQMUR)
    **   C. Action Taken sub tab
    **    Code Group # Activities (MNGRP, VIQMMA)
    **    Or
    **    Activity Text (MATXT, VIQMMA)
    **            Then, allow user to complete notification (NOCO).
    CLEAR : L_VAR , L_COMP_TIME.
    IF ( SY-TCODE EQ 'IW21' OR SY-TCODE EQ 'IW22' OR SY-TCODE EQ 'IW24' OR
          SY-TCODE EQ 'IW25' ).
       IF ( E_VIQMEL-IWERK = '061' ) OR ( E_VIQMEL-IWERK = '062' ).
         IF E_VIQMEL-QMART = 'M2'.
           L_VAR = E_VIQMEL-AUSZT.
           L_COMP_TIME = L_VAR / 60.
           IF L_COMP_TIME < 15.
             EXIT.
           ELSEIF L_COMP_TIME > 15..
    *         IF ( T_VIQMFE-OTGRP IS INITIAL AND T_VIQMFE-FEGRP IS INITIAL )  OR  ( T_VIQMFE-FETXT IS INITIAL ) .
    *           MESSAGE 'Please fill the mandatory analysis data in Object Parts' TYPE 'E'.
    *         ENDIF.
             IF T_VIQMFE-OTGRP EQ '' OR T_VIQMFE-FEGRP EQ ''.
               IF T_VIQMFE-FETXT EQ ''.
                 MESSAGE 'Please fill the mandatory analysis data in Object Parts' TYPE 'E'.
               ENDIF.
             ENDIF.
             CLEAR L_TAG.
             IF T_VIQMUR[] IS INITIAL.
               MESSAGE 'Please fill the mandatory analysis data in Cause tab' TYPE 'E'.
             ELSE.
               LOOP AT T_VIQMUR.
                 IF  T_VIQMUR-URGRP IS INITIAL .
                   IF T_VIQMUR-URTXT IS INITIAL.
                     L_TAG = 'X'.
                   ENDIF.
                 ENDIF.
               ENDLOOP.
               IF L_TAG = 'X'.
                 MESSAGE 'Please fill the mandatory analysis data in Cause tab' TYPE 'E'.
               ENDIF.
             ENDIF.
             CLEAR L_TAG.
             IF T_VIQMMA[] IS INITIAL.
               MESSAGE 'Please fill the mandatory analysis data in Action' TYPE 'E'.
             ELSE.
               LOOP AT T_VIQMMA.
                 IF  T_VIQMMA-MNGRP IS INITIAL .
                   IF T_VIQMMA-MATXT IS INITIAL.
                     L_TAG = 'X'.
                   ENDIF.
                 ENDIF.
               ENDLOOP.
               IF L_TAG = 'X'.
                 MESSAGE 'Please fill the mandatory analysis data in Action' TYPE 'E'.
               ENDIF.
             ENDIF.
           ENDIF.
         ENDIF.
       ENDIF.
    ENDIF.
    <Added code tags>
    Thank you so much in advance..
    -Sudhish
    Please use the code tags when you're posting any code snippet
    Edited by: Suhas Saha on Jul 13, 2011 12:39 PM

    Hi, I was thinking just like XVBAP and YVBAP values in the USEREXIT_SAVE_DOCUMENT.
    Plz check u have x /y versions or tables like _old/ _new suffixes and then move the value accordingly.
    otherwise there may be inconsistency.
    Edited by: Prasenjit S. Bist on Jul 13, 2011 3:03 PM

  • How to create screen resolution in bdc table control

    hi gurus
    can anyone suggest me
    how to create screen resolution in bdc table control
    thanks&regards
    mark.

    Hi ,
    Using CTU_PARAMS table for screen resolution .
    For this sample code.
    This is for Transation  FB60.
    report ZZFB60
           no standard page heading line-size 255.
    tables t100.
    PARAMETERS : p_file1  like  rlgrap-filename,
                 p_doctyp like  RF05A-BUSCS,
                 p_invdat like  INVFO-BLDAT,
                 p_posdat like  INVFO-BUDAT.
    CONSTANTS  :  C_TRANS_FB60(4) VALUE 'FB60'.
    *Parameter string for runtime of CALL TRANSACTION
    data : l_option type ctu_params,
           l_subrc type sysubrc.
    DATA :  l_mstring(150).
    data      accnt type char17.
    data       : day   type char2,
                 month type char2,
                 year  type char4,
                 date1 type char10,
                 date2 type char10.
    data      :  cnt(2) TYPE n,
                 cnt1 type i,
                 fld(25) TYPE c.
    data : begin of excel occurs 0,
            fieldname(255) type c,
           end of excel.
    DATA:BEGIN OF it_mess OCCURS 0,
             msgtyp(5),
             lms(200),
              msgv1(50),
         END OF it_mess.
    data: begin of t_record occurs 0,
             BUKRS(004),
            ACCNT(017),
            XBLNR(016),
            WRBTR1(016),
            WAERS(005),
            SECCO(004) ,
            SGTXT(050),
            HKONT(010),
            WRBTR2(017),
            MWSKZ(002),
            GSBER(004),
            KOSTL(010),
         end of t_record.
    *Internal Table for Header Data
    DATA :  BEGIN OF t_head OCCURS 0,
            BUKRS(004),      "Company Code
            ACCNT(017),      "Account or Vendor
            XBLNR(016),      "Reference
            WRBTR1(017),     "Amount in document currency
            WAERS(005),      "Currency
            SECCO(004),      "Section Code
            SGTXT(050),      "Text
            END OF t_head.
    *Internal table for Item Data
    DATA :  BEGIN OF t_item OCCURS 0,
            ACCNT(017),      "Account
            HKONT(010),     "GL Account
            WRBTR2(017),    "Line item Amount in document currency
            MWSKZ(002),     "Tax Code
            GSBER(004),     " Business Area
            KOSTL(010),     "Cost centre
            END OF t_item.
    DATA: IT_BDCDATA      LIKE  BDCDATA OCCURS 0 WITH HEADER LINE,
          IT_BDC_MESSAGES LIKE  BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    *include bdcrecx1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
      PERFORM  file_selection.
      PERFORM  data_upload.
      PERFORM  table_control.
    start-of-selection.
    l_option-defsize = 'X'.
    l_option-dismode = 'A'.
    l_option-updmode = 'S'.
    day = p_invdat+6(2).
    month = p_invdat+4(2).
    year =  p_invdat+0(4).
    concatenate day month year into date1 SEPARATED BY '.'.
    day = p_posdat+6(2).
    month = p_posdat+4(2).
    year =  p_posdat+0(4).
    concatenate day month year into date2 SEPARATED BY '.'.
    *perform open_group.
    loop at t_head.
    CLEAR    IT_BDCDATA.
    REFRESH  IT_BDCDATA.
    perform bdc_dynpro      using   'SAPLACHD'         '1000'.
    perform bdc_field       using   'BDC_OKCODE'        '=ENTR'.
    perform bdc_field       using   'BKPF-BUKRS'        t_head-bukrs.
    perform bdc_dynpro      using   'SAPMF05A'          '1100'.
    perform bdc_field       using   'BDC_OKCODE'        '/00'.
    perform bdc_field       using   'RF05A-BUSCS'       p_doctyp.
    perform bdc_field       using   'INVFO-ACCNT'       t_head-accnt.
    perform bdc_field       using   'INVFO-BLDAT'       date1.
    perform bdc_field       using   'INVFO-BUDAT'       date2.
    perform bdc_field       using   'INVFO-XBLNR'       t_head-xblnr.
    perform bdc_field       using   'INVFO-WRBTR'       t_head-wrbtr1.
    perform bdc_field       using   'INVFO-WAERS'       t_head-waers.
    perform bdc_field       using   'INVFO-SECCO'       t_head-secco.
    perform bdc_field       using   'INVFO-SGTXT'       t_head-sgtxt.
    cnt = 1.
    cnt1 = 1.
    loop at t_item where accnt = t_head-accnt.
    *if cnt > 4.
    *cnt = 4.
    *endif.
    if cnt1 gt 1.
    CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
    perform bdc_field      using   fld                   'X'.
    perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    perform bdc_field       using 'BDC_OKCODE'        '=0005'.
    endif.
    perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    perform bdc_field       using   'BDC_OKCODE'        '/00'.
    CONCATENATE 'ACGL_ITEM-HKONT(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-hkont.
    CONCATENATE 'ACGL_ITEM-WRBTR(' cnt ')' INTO fld.
    perform bdc_field  using       fld                t_item-wrbtr2.
    CONCATENATE 'ACGL_ITEM-MWSKZ(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-mwskz.
    CONCATENATE 'ACGL_ITEM-GSBER(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-gsber.
    CONCATENATE 'ACGL_ITEM-KOSTL(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-kostl.
    perform bdc_field      using  'BDC_CURSOR'  fld.
    *CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
    *perform bdc_field      using   fld                   'X'.
    cnt1 = cnt1 + 1.
    *cnt = cnt + 1.
    *if cnt > 1.
    *perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    *perform bdc_field       using 'BDC_OKCODE'        '=0005'.
    **perform bdc_field       using 'BDC_OKCODE'        '=0006'.
    *endif.
    endloop.
    perform bdc_dynpro      using 'SAPMF05A' '1100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BS'.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    *perform bdc_transaction using 'FB60'.
    CALL TRANSACTION C_TRANS_FB60 USING IT_BDCDATA  options from l_option
                                 MESSAGES INTO IT_BDC_MESSAGES.
    perform error.
    perform errordownload.
    endloop.
    *perform close_group.
    *Form  data_upload
    FORM data_upload .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME              =  p_file1
       FILETYPE              = 'DAT'
      TABLES
        DATA_TAB             =  t_record.
    ENDFORM.                    " data_upload
    *Form  file_selection
    FORM file_selection .
    CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  =  syst-cprog
          dynpro_number =  syst-dynnr
          field_name    = 'p_file1'
        IMPORTING
          file_name     =  p_file1.
    ENDFORM.                    " file_selection
    Form  BDC_DYNPRO
    FORM BDC_DYNPRO using program dynpro.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM = PROGRAM.
      IT_BDCDATA-DYNPRO = DYNPRO.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND  IT_BDCDATA.
    endform.
    *Form  BDC_FIELD
    FORM  bdc_field using fnam fval.
      CLEAR  IT_BDCDATA.
      IT_BDCDATA-FNAM = FNAM.
      IT_BDCDATA-FVAL = FVAL.
      APPEND  IT_BDCDATA.
    ENDFORM.
    Table Control
    FORM table_control .
      LOOP AT t_record.
        ON CHANGE OF t_record-accnt.
          MOVE-CORRESPONDING t_record TO t_head.
          APPEND t_head.
        ENDON.
      loop at t_head.
             t_item-accnt   =  t_head-accnt.
             t_item-hkont   =  t_record-hkont.
             t_item-wrbtr2  =  t_record-wrbtr2 .
             t_item-mwskz   =  t_record-mwskz .
             t_item-gsber   =  t_record-gsber .
             t_item-kostl   =  t_record-kostl.
        APPEND t_item.
    endloop.
         If t_record-level = 'H'.
             t_head-bukrs   =  t_record-text1.
             t_head-accnt   =  t_record-text2.
             t_head-xblnr   =  t_record-text3.
             t_head-wrbtr1  =  t_record-text4.
             t_head-waers   =  t_record-text5.
             t_head-secco   =  t_record-text6.
             t_head-sgtxt   =  t_record-text7.
          APPEND t_head.
         else.
            t_item-accnt   =  t_head-accnt.
            t_item-hkont   =  t_record-text1.
            t_item-wrbtr2  =  t_record-text2.
            t_item-mwskz   =  t_record-text3.
            t_item-gsber   =  t_record-text4.
            t_item-kostl   =  t_record-text5.
         APPEND t_item.
         endif.
      ENDLOOP.
    ENDFORM.
    FORM error .
      LOOP AT IT_BDC_MESSAGES.
        IF IT_BDC_MESSAGES-msgtyp = 'E'.
       SELECT single  * FROM t100  WHERE
                                    sprsl = it_BDC_MESSAGES-msgspra
                                    AND   arbgb = IT_BDC_MESSAGES-msgid
                                    AND   msgnr = IT_BDC_MESSAGES-msgnr.
          IF sy-subrc = 0.
            l_mstring = t100-text.
            IF l_mstring CS '&1'.
              REPLACE '&1' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
              REPLACE '&2' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
              REPLACE '&3' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
              REPLACE '&4' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
            ELSE.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
            ENDIF.
            CONDENSE l_mstring.
            it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
            it_mess-lms = l_mstring.
            it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
            APPEND it_mess.
          ELSE.
            it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
            it_mess-lms = l_mstring.
            it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
            APPEND it_mess.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.
    form errordownload.
    *down the internal table to excel file.
    call function 'EXCEL_OLE_STANDARD_DAT'
               EXPORTING
                    file_name                 = 'c:/Error.xls'
               TABLES
                    data_tab                  = it_mess
                    fieldnames                = excel
               EXCEPTIONS
                    file_not_exist            = 1
                    filename_expected         = 2
                    communication_error       = 3
                    ole_object_method_error   = 4
                    ole_object_property_error = 5
                    invalid_filename          = 6
                    invalid_pivot_fields      = 7
                    download_problem          = 8
                    others                    = 9.
    endform.
    Reward if useful
    Regards,
    Narasimha
    Edited by: narasimha marella on May 13, 2008 12:12 PM

  • How to refresh an ALV (CL_SALV_TABLE) after a  parallel process

    Hello all,
    I have created a list using CL_SALV_TABLE. When you click on a line, a new mode must be opened. There, the user will fill in some data that must be retrieved and shown in the main list when the user closes the new mode. To do so Iu2019ve used u201CCALL FUNCTION func STARTING NEW TASK task CALLING meth ON END OF TASKu201D statement.
    Iu2019ve tried to refresh the list within meth (called on end of task) but it doesn't work. I've also tried to get all the data again, but it prompts a short dump, set a new ok code using method cl_gui_cfw=>set_new_ok_code, even a WAIT until process is finished (not valid because I need process 1 active all the timeu2026)
    SAP help says u201CThe SET USER-COMMAND u2018OKCDu2019 statement replaces the REFRESH SCREEN commandu201D
    CALL FUNCTION 'function'
        STARTING NEW TASK w_taskname
        PERFORMING end_of_creation ON END OF TASK
        EXPORTING
           i_zzta         = ztztl_zzta
           i_manual_order = space
        EXCEPTIONS
           communication_failure = 1 MESSAGE w_msg
           system_failure        = 2 MESSAGE w_msg.
    [u2026]
    FORM end_of_creation USING p_taskname.
      RECEIVE RESULTS FROM FUNCTION 'function'
         IMPORTING
            e_zzta         = ztztl_zzta
         EXCEPTIONS
            communication_failure = 1 MESSAGE w_msg
            system_failure        = 2 MESSAGE w_msg.
      [Modify list]
      SET USER-COMMAND 'OKCD'. 
    [u2026]
    AT USER-COMMAND.
     CASE sy-ucomm.
        WHEN 'OKCD'.  
         Perform get_data.  
    How can I have the same behaviour when using CL_SALV_TABLE??
    Thanks in advance!

    Hello Matt,<br><br>
    does not work means that if I write the following within method ON END OF TASK, the report is not refreshed.
    <br><br>
    <pre>
    o_alv->refresh( ).
    </pre><br><br>
    I've also tried:
    <br><br>
    <pre>
    o_alv->refresh( ).
    o_alv->display( ).
    data: o_alv TYPE REF TO cl_salv_table</pre><br><br>
    <pre>Short dump: RPERF_ILLEGAL_STATEMENT
    Error analysis                                                                               
    There is probably an error in the program                                                    
        "SAPLSLVC_FULLSCREEN".                                                                       
        The program was probably called in a conversion exit                                         
        or in a field exit. These are implemented by                                                 
        function modules called CONVERSION_EXIT_xxxxx_INPUT/OUTPUT or                                
        USER_EXIT_xxxxx_INPUT.                                                                       
        Conversion exits are triggered during screen field transports or                             
        WRITE statements, field exits during field transports from the                               
        screen to the ABAP/4 program.                                                                
        In this connection, the following ABAP/4 statements are not allowed:                                                                               
    -  CALL SCREEN                                                                               
    -  CALL DIALOG                                                                               
    -  CALL TRANSACTION                                                                               
    -  SUBMIT                                                                               
    -  MESSAGE W... and MESSAGE I...                                                             
        -  COMMIT WORK, ROLLBACK WORK                                                                
        -  COMMUNICATION RECEIVE                                                                     
        -  STOP                                                                               
    -  REJECT                                                                               
    -  EXIT FROM STEP-LOOP                                                                               
    Moreover, conversion exits for output conversion                                             
        (implemented by function modules called                                                      
        CONVERSION_EXIT_xxxxx_OUTPUT) do not allow                                                                               
    -  MESSAGE E...                                                                               
    to be used.
    Trigger Location of Runtime Error                                                                
        Program                                 SAPLSLVC_FULLSCREEN                                  
        Include                                 LSLVC_FULLSCREENU01                                  
        Row                                     187                                                  
        Module type                             (FUNCTION)                                           
        Module Name                             REUSE_ALV_GRID_DISPLAY</pre><br><br>
    But this short dump is expected since CALL FUNCTION - STARTING NEW TASK help says u201CIn the callback routine, you are not allowed to execute statements that interrupt the program execution or terminate a SAP LUW. Statements for list output are not executed.u201D<br><br>
    Thanks Matt, I'll take a look at that forum, but I also tried a self list refresh using a timer and that prompted another short dump: LIST_TOO_MANY_LPROS -> "Error analysis: At present, the maximum permitted number of nested screen levels is restricted to 50." <br><br>
    If I find a solution I'll let you know.<br><br>
    <br><br>
    Thank you!!
    Edited by: Matt on Aug 26, 2009 1:16 PM

  • How to refresh OLAP Cubes in AWM?

    How to refresh OLAP Cubes in AWM?

    Right click on the cube in AWM and select 'Maintain Cube ...' from the menu to bring up the 'Maintenance Wizard' dialog. Then just follow the instructions on screen.

  • Scrolling banner refresh screen

    Hi,
    I’m trying to create a scrolling banner, therefore on my JSF page I’ve added an outputText and it’s value is based on a backing bean that has the session scope, upon instantiation of the backing bean class I’m creating a timer that will trim the first character of the outputText each time the timer elapsed (in that way on the screen you would have the impression that the String is scrolling).
    When you run the JSF page it is creating the timer and the outputText is modified each time the timer elapsed (inside the bean class), but on the screen nothing is changing, I guess that the outputText is not refreshed each time the timer elapsed and its value is changed.
    So my question would be, does anyone know how to refresh the outputText?
    Note that I’m using jDeveloper 11.1.1.2
    Thank,
    Alain.
    JSF souce code:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:outputText id="ot7" value="#{outputTextBean.outputText}"/>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Backing Bean source code:
    package view;
    import javax.swing.*;
    import java.awt.event.*;
    import oracle.adf.view.rich.component.rich.output.RichOutputText;
    public class outputText {
    private String outputText =
    "Dummy output text for testing the rolling banner";
    private Timer timer;
    public outputText() {
    timer = new Timer(2000, new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    timerExpired(evt);
    timer.start();
    private void timerExpired(ActionEvent ee) {
    outputText = outputText.substring(1);
    if (outputText.length() <= 0)
    timer.stop();
    public void setOutputText(String value) {
    this.outputText = value;
    public String getOutputText() {
    return outputText;
    ******************************************************************************

    Hi,
    try AdffacesContext.getCurrent().addPartialtarget(outputtext);
    at the end of the refresh
    Frank

  • How to refresh the data in a container and to update the new data

    Hi,
    I have created a Module Pool Program in which i have two containers to display the long text.
    Initially this container is filled and based on some condition i want to update the text in the same conatiner.
    I am using the below two classes to do all this.
    cl_gui_textedit,
    cl_gui_custom_container,
    Could someone help me how to remove the long text in the container and update the new long text.
    I am getting the new long text but not able display it in the same container. Please someone help me how to refresh and update the container.
    Thanks in advance.

    Hi
    Try this.
      IF cl_gui_textedit  IS INITIAL.
      create control container
        CREATE OBJECT cl_gui_custom_container
           EXPORTING
                container_name = 'Container Name''
           EXCEPTIONS
                cntl_error                  = 1
                cntl_system_error           = 2
                create_error                = 3
                lifetime_error              = 4
                lifetime_dynpro_dynpro_link = 5.
    create text_edit control
        CREATE OBJECT cl_gui_textedit
           EXPORTING
                parent = cl_gui_custom_container
                wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder
                wordwrap_to_linebreak_mode = cl_gui_textedit=>false
           EXCEPTIONS
                error_cntl_create      = 1
                error_cntl_init        = 2
                error_cntl_link        = 3
                error_dp_create        = 4
                gui_type_not_supported = 5.
      ENDIF.
    *--use method to set the text
      CALL METHOD cl_text_edit->set_text_as_stream
        EXPORTING
          text            =  t_lines ( Internal table with long text).
        EXCEPTIONS
          error_dp        = 1
          error_dp_create = 2
          OTHERS          = 3.
    regards,
    Raghu.

  • How to refresh/initialize sy-tabix in a loop?????

    Dear all,
    Please do let me know how to refresh/initialize 'sy-tabix' for every new document in a loop statement.
    Thanx in advance.
    Alok.

    Never try to refresh or initialize system variable. It shall always lead to errors in the programs. For this I have an alternative way below.
    Please declare a variable for e.g
    data: <b>l_count</b> type sy-tabix.
    Inside loop you can write the code like this:
    say for eg. you need to refresh l_count for every new material.
    Loop at itab.
    on change of itab-material.
    clear : l_count.
    endon.
    l_count = l_count + 1.
    endloop.
    Hope this clarifies your issue.
    Lakshminarayanan

  • How to refresh XML file  from my client machine

    Hai All
    I have temp.XML and temp.XSL template in our server machine.
    when i give a print from client machine first time it gives the record,and next time it did not get refresh.Always it shows the previous records in the browser.But when i go into the server machine and click on temp.xml,it shows the current record(correct records)
    How to refresh XML file  from my client machine?
    Regards
    Dhina

    You never delete a Time Machine backup by dragging it to the Trash. You are supposed to use the TM application to manage the backups. What you will need to do now is to simply erase the drive using Disk Utility.

Maybe you are looking for

  • Going to a certain line in a RandomAccessFile?

    Hi, this doesn't seem to belong anywhere else, since Java doesn't have a forum on I/O. This is pretty simple, but is there any way to go to a certain line in a RandomAccessFile (such as a text file)? seek() doesn't work, it only starts from the chara

  • Unknown file /tmp/inject.txt

    There is a zero-length file /tmp/inject.txt in my iMac running Mavericks. It gets created/touched every minute: 8:/tmp $ ls -lart inject.txt -rw-r--r--  1 root  wheel  0 Apr 20 09:33 inject.txt Does anyone know where this file is coming from. It is t

  • Mac Pro Freeze/Display glitch on start up

    I've only been using my new Mac Pro (late 2013) for a few days now but am expereicing an issue on restart/start up. It seems the computer struggles to search for the two new 1920x1200 Dell displays that are hooked up to it through mini display-DVI co

  • Error Opening iTunes in Vista

    iTunes cannot open in my new vista machine. After several fresh downloads of the iTunes client it still doesn't work. According the to error message the problem is not with iTunes per se, but quicktime. The following is a partial of the error message

  • AciSource object-class and dpsaci attribute

    Dear all, I am trying to create a proxy server that is connected to a JDBC data view. All went well according to the documentation until I reached the point of creating ACI to control access to the data view. According to the documentation, I have to