Skip to Content

Does feature exist for activating program immediately on all servers

Hello, if I activate my program and run it immediately in background, it often executes on another application server, and so the old version of the program is used because the application server doesn't know that there is a new version of the program, because the PXA/program buffer is not synchronized yet, the sync being done approximately once every 2 minutes.

Do you know whether it exists a way to sync immediately the buffer on all application servers each time I activate my program? (or an option to execute in background only on current application server without having to enter it manually when I submit in background).

Thanks a lot!

Sandra

Add comment
10|10000 characters needed characters exceeded

  • Sandra,

    "if I activate my program and run it immediately in background, it often executes on another application server, and so the old version of the program is used because the application server doesn't know that there is a new version of the program"

    May I know what is the objective of this acitivity.Just curious to know the scenario that necessitates acitvating a prog and running immediately in background.

    K.Kiran.

  • Easy. Create program that runs in background. Find it doesn't work. Fix, activate, run again (in background) to test.

  • K.Kiran, I have to run the program in background because it's a long-running program (in dialog, it would time out) and I don't want to "lock a user session for nothing". My current assignment is to improve the performance of programs, so I do it very often. It's normal to run a program immediately after having activated it ; it's abnormal to count down 3 minutes before doing a task. I also ask because I never saw this question in the forum, but probably people like me would be interested to know if there's a solution.

  • Get RSS Feed

2 Answers

  • Best Answer
    Jul 11, 2017 at 05:25 PM

    Brute Force and of course not advisable.

    Prepare an RFM that GENERATEs your program. Get all servers with Fumo TH_SERVER_LIST. Call the RFM on all servers. Duh.

    Add comment
    10|10000 characters needed characters exceeded

    • Here's the complete but ugly ("generic" RFC) source code if someone needs it.

      REPORT.
      
      parameters program type syrepid.
      
      START-OF-SELECTION.
        DATA lt_server TYPE TABLE OF msxxlist.
        DATA ls_server TYPE msxxlist.
        DATA l_server_name TYPE btctgtsrvr-srvname. "20c
        DATA l_message(273) TYPE c.
      
        CALL FUNCTION 'TH_SERVER_LIST'
          TABLES
            list = lt_server.
      
        "DELETE lt_server WHERE host = sy-host. " ignore current server
      
        LOOP AT lt_server INTO ls_server.
          l_server_name = ls_server-name. "truncate 40c to 20c ("hostname_sid_99")
          CLEAR l_message.
          DATA STRING TYPE STRING.
          STRING = PROGRAM.
          CALL FUNCTION 'SO_CALLBACK_RFC'
            DESTINATION l_server_name
            EXPORTING
              program               = sy-repid
              form                  = 'TEST' "to call subroutines TEST and TEST_XCHECK
              params                = STRING
            EXCEPTIONS
              system_failure        = 1  MESSAGE l_message
              communication_failure = 2  MESSAGE l_message
              OTHERS                = 3.
          IF sy-subrc NE 0.
            WRITE : / l_server_name, sy-subrc, l_message.
          ENDIF.
        ENDLOOP.
      
      *---------------------------------------------
      FORM test_xcheck CHANGING xcheck TYPE flag.
        xcheck = 'X'.
      ENDFORM.
      
      *---------------------------------------------
      FORM test USING params TYPE string.
        GENERATE REPORT params.
        "CALL METHOD cl_buffer_sync=>synchronize.
      ENDFORM.
      
  • Jul 12, 2017 at 04:59 AM

    /$PXA https://wiki.scn.sap.com/wiki/display/Basis/How+to+Reset+different+SAP+buffers

    Maybe...?

    I'd noticed this behaviour as well - though when importing changes into our 2 appserver test system. Never thought about the cause.

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks Matt. /$pxa only empties the PXA buffer on the current application server (which is the same for all /$ commands). So I would need to switch to every server and run it, it's a little too much fastidious for me. I'd really like a profile parameter for that, or an option in the user's workbench settings (something like "run in background only in current server"), ...