Invoking A popup Only Once.

Hi Guys/Dolls
I've got the following piece of code but it's not behaving as I expect it to - Can any of you shed some light on it for me.
I have an executable program but prior to the main selection screen being displayed I'm asking the user to check to see if they have done the pre-work as required, done via the use of TR_POPUP_TO_CONFIRM.
If they select Yes the program carries on as normal but when they press the back arrow key (i.e. the big green one on SAP) the popup appears again I don't want it to as they have already answered "Yes" to the pre-work question. Can any of you gurus shed any light on this as I am literally going around in circles.
REPORT zh055rep LINE-SIZE 132 LINE-COUNT 65 NO STANDARD PAGE HEADING.
INITIALIZATION.
  PERFORM prework_check.
... remainder of program
FORM prework_check.
Declare a static variable to show us how many times we have invoked the application.
  STATICS app_invokation TYPE i.
Application invoked thus increment the counter.
  app_invokation = app_invokation + 1.
  IF app_invokation = 1.
  Check to see if the user has done his/her pre-work prior to proceeding.
    CALL FUNCTION 'TR_POPUP_TO_CONFIRM'
      EXPORTING
        iv_titlebar           = 'Pre Work Warning'
        iv_text_question      = ' Have you done your pre-work? check documentation'
        iv_text_button1       = 'Yes'
        iv_text_button2       = 'No'
        iv_with_cancel_button = 'X'
      IMPORTING
        ev_answer             = v_ev_answer.
    IF the answer is No or the Cancel button haul his/her *** out of the program.
      IF v_ev_answer = '2' OR v_ev_answer = 'A'.
        LEAVE.
      ENDIF.
  ENDIF.
ENDFORM.                    " PREWORK_CHECK
Any help would be appreciated.
Many thanks in advance.
Raj

Hi!
You can use the global sap memory to this, but the variable here are living only until you are within the transaction.
IMPORT app_invokation FROM MEMORY ID 'ZZMY_APP_INVOKATION'.
IF app_invokation IS INITIAL.
MOVE 'X' TO app_invokation.
EXPORT app_invokation TO MEMORY ID 'ZZMY_APP_INVOKATION'.
ENDIF.
If it is not enough, you have to store it in a Z-table, for each user maybe...
Regards
Tamá

Similar Messages

  • How to use postback property for JSF to reneder a popup only once

    Hi All,
    I'm using java script function to show a JSF page as popup. I have called the javascript function on page load of another JSF page.
    How do i make sure that the popup is getting rendered only once and not everytime the page is getting refreshed .
    Can i use postback property in JSF page for this purpose ?
    Thanks in Advance.

    try postback..
            Boolean postBackValue = (Boolean)resolveExpression("#{adfFacesContext.postback}");
            Boolean defaultBooleanValue = new Boolean("false");
            if (postBackValue.equals(defaultBooleanValue)) {
      public static Object resolveExpression(String expression) {
        FacesContext ctx = FacesContext.getCurrentInstance();
        Application app = ctx.getApplication();
        ExpressionFactory elFactory = app.getExpressionFactory();
        ELContext elContext = ctx.getELContext();
        ValueExpression valueExp = elFactory.createValueExpression(elContext,expression,Object.class);
        return valueExp.getValue(elContext);
      }

  • Popup only once ?? (Raised by message)

    Hi there,
    I have configured and coded, when a message is raised in PCUI, the message will then trigger a popup. This is OK, but when i do it the second time, and raise the message (after deleting it), the pop up doesn't appear.
    But if check on the application log error list, when I click on the message, the pop up will appear. I would like this popup to appear everytime the message is raised.
    Any ideas why this popup isn't showing after the first time?
    Thanks,
    J

    Hi,
    How to place data in Popup.
    I want to display for input help where i can show some initiative and select them in a popup format.
    Please help me.  I was able to raise popup by message but I am unable to place any data i am unable to reach the class of the popup.
    thanks
    Naveen

  • Show popup screen only once

    Hi Friends,
    We have the following problem: our application should print some document (a Smartform) for all selected
    documents in an ALV Grid control. So the application does a loop over an internal table and calls every time
    the function for the Smartform, passing it some data to print.
    For every function call the user sees a popup screen where he/she can choose the printer, whether or not to
    print directly, print preview etc. The problem is - if the user selects 20 documents to print he/she will see
    that screen 20 times, and that's not nice. It would be better if the user saw the popup screen only once and
    the settings he chose were passed to all the calls of the smartform in the loop.
    Any idea how to do it?
    Thanks a lot in advance.

    Hi,
    Thanks a lot..  i have used in the below way....
             wa_cparam-no_open = 'X'.
              wa_cparam-no_close = 'X'.
             wa_output-tdnoprev = 'X'.
              wa_output-tddest = printer.
              AT FIRST.
                wa_cparam-no_open = ' '.
              ENDAT.
              AT LAST.
                wa_cparam-no_close = ' '.
              ENDAT.
    it is working fine but only one problem. I want to supress the pop up to enter printer name there..  i mean i want print directly, dont want that pop up to enter printer i will send that printer in my program.
    What option i have to use in the output option parameters, do i need to use control parameters option?
    Thanks,

  • Popup with window.open should arise only once onclick

    i want a popup that should arise only once onclick but i am getting that popup how many times i am clicking

    That's a JavaScript problem. This forum is about Java. Java and JavaScript don't have anything in common apart from the first 4 letters of the name and a superficial similarity in syntax.
    You'll get better help in a JavaScript forum.

  • Need print popup to display only once

    Hi Experts ,
    I have a customer account statement in smartform . For multiple customers the clients wants the print dialog to be displayed only once and the options mentioned in the first display to be carried for other customer accounts . Please any suggestions for the same .

    Hi,
    If using a custom print program you can achieve this using functions SSF_OPEN and SSF_CLOSE:
    [Printing Several Forms in One Print Request|http://help.sap.com/saphelp_nw70/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/content.htm]
    This way the print dialog will be displayed only once no matter how many times the smartform is called.
    Che.

  • When i type the https URL in my FireFox browser version 3.6 to 5.0, i get login pop up window two times. But in IE browser i get only once. Please tell me why FireFox is showing pop up screen two times to enter my uid/pwd. Thanks!

    We have our company internal application which is protected by SiteMinder. When we type https://appname.domain.com in IE i get popup window asking me to enter uid/pwd and works fine. However same URL when i login in FireFox, i get pop up window two times. So i wonder why FF is asking two times instead of just only once.
    Thanks for your help.

    Do you have that problem when running in the Firefox SafeMode?
    [http://support.mozilla.com/en-US/kb/Safe+Mode]
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this:
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • Custom Render service is called only once, why?

    Hi All,
    I've created a custom render service in order to prepopulate principals name on each step of my process.
    The input form of the process is a Document Form cause users attach files to the form and it is routed to next station with the attachments.
    "Call Render Service only once" checkbox in advanced settings is unchecked.
    When the process is initiated my custom render is invoked fine, but when it reaches the assign task activity the form is opened but no render service is invoked.
    Why is it happens?
    Thanks in advance, Yan.

    Hi Parth,
    I'm writing to the log file every time that my custom service is invoked.
    When I open a form for a first time in workspace I see that it was invoked but when it reaches "assign task" activity and opened again the service is not invoked.
    I have only one form variable.
    Yan.

  • Popup only comes after the Externla Interface call is compete.

    Hi,
    I am calling a function define in javascript using the EternlaInterface.call method. Before the call I am trying to show a popup, below is the code
                myProgressBar = ProgressComponent(PopUpManager.createPopUp(DisplayObject(myParent),ProgressComponent,true ));
                PopUpManager.centerPopUp(myProgressBar);           
                if (ExternalInterface.available) {
                    returnValue = ExternalInterface.call("execute", sqlStr);                  
    But the issue here is that the popup is displayed only once the external interface.call is complete.
    Thanks,
    Yumga

    Hi Yumga,
    flash is single-threaded and all code and drawing occurs in the same thread (call it main thread). Your block of code has to be executed fully before screen is updated. So you wan't be able to see any screen update before code returns because there is no render state.
    I think that - if you want to show screen update (e.g. information to user) - you need to to either:
    - defer external call execution - so it happens after screen is updated (you could use callLater for that:
    This method accepts a function pointer as an argument. The method then puts the function pointer on a queue, so that the function is called the next time the player dispatches either a render event or an enterFrame event.
    http://livedocs.adobe.com/flex/3/html/help.html?content=performance_04.html
    - or make your external call to javascript asynchronous (by providing callback method in actionscript, etc),
    hth,
    kind regards,
    Peter

  • Materialized View to run only once in a year...

    Hi everybody...
    I want to create a materialized view which will run only once in a year and specifically some minutes after 00:00 a.m. on new year's day,
    so i created the following:
    CREATE MATERIALIZED VIEW <mv_name>
    BUILD IMMEDIATE
    REFRESH START WITH TO_DATE('01/01/2007 00:15:00','DD/MM/RRRR HH24:MI:SS')
    NEXT SYSDATE+366
    I have two notes:
    1) how to declare the refresh to be done the first new year's day after the day it'll be created , i mean not static date (01/01/2007)
    2)some years are leap and some are not , so in order to run every new year's day how should i transform the above..????
    3)is there any view which displays the next run of a materialized view..???
    the view DBA_MV_REFRESH_TIMES displays the last refresh of mv's...
    I use Oracle 10.2.0.1 on XP ...
    Thanks , a lot
    Simon

    1).
    use the expression that evaluates to next january first.
    SQL> select sysdate, add_months(trunc(sysdate, 'yyyy'), 12) from dual ;
    SYSDATE     ADD_MONTHS(
    19-JUN-2006 01-JAN-2007
    1 row selected.
    SQL>2). for this also use the same expression that will evaluate to the january first of the year after that.

  • Animated gif plays only once

    I am using Captivate 5.5 on a Windows machine. I inserted an animated gif into my Captivate, using insert > animation...  Then, I inserted a button. When I pressed F4 to preview the animation, it played only once. I put a check mark on the loop on the timing of the properties of the animation. Still, it played only once. It stopped when the play head stoped moving. I cannot make the animated gif play continuously. Does anybody know how to make the animated gif play continuously?
    thaks.

    You can try this:
    Stick this in the header area of your code
    <script type="text/javascript"> function showBuyLink() {
    document.getElementById("buylink").style.visibility = "visible";
    } // adjust this as needed, 1 sec = 1000
    setTimeout("showBuyLink()", 5000);
    </script>
    Stick this around your buy link code.
    <div id="buylink" style="visibility: hidden"> <!-- put all your add to cart buy links and images inside this hidden div --> <p style="text-align:center; font-size:26px;"> <a href="http://mybuylink">Add to Cart or Buy Link</a> </p> </div>
    Yopu can rename "buylink", but you have to make sure you rename all instances or it will kill the script.
    If you're not comfortable incorporating that, unfortunately, the other option would be to create a Flash animation and put a button in the last frame.
    That would be just as difficult (if not worse) as writing (or tweaking) a javascript to delay the hotspot, and even worse because it would be invisible to phone users. Additionally, people who disable javascript would never see the link if you did add the script.
    There isn't any way to do this with HTML or CSS, and you now know the flaws with the methods that will work.

  • Some of my albums are in double in my iPod touch but they are only once in my iTunes, how can I delete the one in excess on my iPod

    Some of my music albums are doubled in my iPod Touch 4th generation, but they are only once in my iTunes library. how can I remove the one in excess in my iPod

    swipe to the right on the individual podcast, this will allow you to delete them right on the iPad.

  • How to display field value only once in REUSE_ALV_GRID_DISPLAY

    hi experts,
                   i am using REUSE_ALV_GRID_DISPLAY, for alv outpur display.but i want one of the field in output ,not to display the value which is of same, it have to be displayed only once, I mean i have a number which contains multiple line items corresponding, here i want to display the field value only once when it is repeating , for the same header number, how can i achieve it

    Hi,
    check the sample code,
    REPORT  Z_ALV.
    Database table declaration
    TABLES:
      sflight.
    Typepool declaration
    TYPE-POOLS:
      slis.
    Selection screen elements
    SELECTION-SCREEN BEGIN OF BLOCK blk_1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS:
      s_carrid FOR sflight-carrid.
    SELECTION-SCREEN END OF BLOCK blk_1.
    Field string to hold sflight data
    DATA:
      BEGIN OF fs_sflight ,
        carrid   TYPE sflight-carrid,      " Carrier Id
        connid   TYPE sflight-connid,      " Connection No
        fldate   TYPE sflight-fldate,      " Flight date
        seatsmax TYPE sflight-seatsmax,    " Maximum seats
        seatsocc TYPE sflight-seatsocc,    " Occupied seats
      END OF fs_sflight.
    Internal table to hold sflight data
    DATA:
      t_sflight LIKE
       STANDARD TABLE
             OF fs_sflight .
    Work variables
    DATA:
      t_fieldcat TYPE  slis_t_fieldcat_alv,
      fs_fieldcat LIKE
             LINE OF t_fieldcat.
    *START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM get_data_sflight.            " Getting data for display
      PERFORM create_field_cat.            " Create field catalog
      PERFORM alv_display.
    *&      Form  create_field_cat
          Subroutine to create field catalog
          There is no interface paramete
    FORM create_field_cat .
      PERFORM fill_fieldcat USING   'Carrier Id'    'CARRID'   '2'.
      PERFORM fill_fieldcat USING   'Connection No' 'CONNID'   '1'.
      PERFORM fill_fieldcat USING   'Flight Date'   'FLDATE'   '3'.
      PERFORM fill_fieldcat USING   'Maxm.Seats'    'SEATSMAX' '4'.
      PERFORM fill_fieldcat USING   'Seats Occ'     'SEATSOCC' '5'.
    ENDFORM.                                    "create_field_cat
    *&      Form  fill_fieldcat
          Subroutine to fill data to field column
         -->p_seltext      Column label
         -->p_fieldname    Fieldname of database table
         -->p_col_pos      Column position
    FORM fill_fieldcat  USING
                        p_seltext    LIKE fs_fieldcat-seltext_m
                        p_fieldname  LIKE fs_fieldcat-fieldname
                        p_col_pos    LIKE fs_fieldcat-col_pos.
      fs_fieldcat-seltext_m  = p_seltext.
      fs_fieldcat-fieldname  = p_fieldname.
      fs_fieldcat-col_pos    = p_col_pos.
      APPEND fs_fieldcat TO t_fieldcat.
      CLEAR fs_fieldcat.
    ENDFORM.                    " fill_fieldcat
    *&      Form  get_data_sflight
          Subroutine to fetch data from database table
          There is no interface parameter
    FORM get_data_sflight .
      SELECT carrid
             connid
             fldate
             seatsmax
             seatsocc
        FROM sflight
        INTO TABLE t_sflight
       WHERE carrid IN s_carrid.
    ENDFORM.                    " get_data_sflight
    *&      Form  alv_display
          Subroutine for ALV display
          There is no interface parameter
    FORM alv_display .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          it_fieldcat   = t_fieldcat
        TABLES
          t_outtab      = t_sflight
        EXCEPTIONS
          program_error = 1
          OTHERS        = 2.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " alv_display
    End of code

  • How to get page one to animate only once in interactive pdf?

    how to get page one to animate only once in interactive pdf? I like when the document opens up in acrobat and the the page animations work but when I go to one of the pages and hit my designated home button it goes back to page one but it reloads again. As a user it would drive me crazy to have to wait for all of it to load......anyway to have that page one load once as the opening page?

    I don't think you really mean animations (unless you have a placed SWF file) because things created with the Animation panel don't work in PDF. Nonetheless, you're talking about some kind of interactivity which is set to happen On Page Load.
    So when you return to that page, of course the interactivity loads again.
    There isn't a On Page Load Once command.
    Perhaps you need to rethink why the interactivity is there. If it's important, maybe it should be triggered by a rollover or by clicking a button.

  • My ipod touch wont charge and it will only heat up and it charges only once in a while and after that the batery drains very fast even when i put it on airplane mode and close the apps once im done with them please help

    When i plug in my ipod to the comp it wont charge even if i keep it plugged in for an hour but it heats up like crazy i have also got the temperature warning once , it charges only once in a while and and my ipod nano works fine when i plug it into my comp so please help

    Try here:
    iPod touch: Hardware troubleshooting
    However, from yur symptoms Isuspect a hardware probblem like a dead battery.  An appointment at the Genius Bar of an Apple store might be in order.

Maybe you are looking for

  • How to retrieve data from a MSSQL?

    Dear All, How can I retrieve data from a MSSQL server in my custom iView which is developed by Eclipse? Thanks Sam

  • Issues configuring network-ups-tools with Powerware 5110

    Been using Arch for about 24hrs now (It replaced RHEL5 which was running for 18mths) and I'm very impressed. Have found it very good for a new user, the extensive wiki's have been a huge help to get things going. Under RHEL I really needed to do a lo

  • BW Reporting Role management

    Hi, We have BI Reporting roles in which we publish new queries from Query designer. Currently BI Developers develop a query in Dev Box and publish it to relevant role and transport both query and role to PRD box. But now Power Users are allowed to cr

  • Accessing data from 2 different servers

    I have oracle data on 2 different servers. I want to access the data retrieve it through a sql query and combine the data retrieved. How do i retrieve the data on the 2 servers. thanks

  • Not being able to connect to Wifi Iphone5 after IOS 8.3

    After updating to IOS and especially IOS8.3 my IPhone 5 is not able to connect to a Wifi network or is constantly asking for a password even though the correct password is entered. How to solve this problem?