Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

HELP - ABAP Program Cancelled After Running for 2.5 Hours in Background

I have an ABAP report program that was being tested in our QA system and it died after running for 2.5 hours with the status of "Cancelled" (which, I assume, means it was terminated by SAP for exceeding some type of governor).

I ran Code Analyzer and no performance issues were recognized.

I am running several SELECT statements during program execution. These are a list of all the SELECT statements used in my program. Also, I'm using PNPCE to get a list of pernrs for which to pull data at the beginning of the program.

SELECT *
      INTO CORRESPONDING FIELDS OF TABLE gt_p0167
      FROM pa0167
      WHERE pernr EQ gt_selected_pernrs
        AND bplan IN s_bplan
        AND begda LE pn-endda
        AND endda GE pn-begda.

          SELECT SINGLE fgbdt fasex
            INTO (lv_dob, lv_gender)
            FROM pa0021
            WHERE pernr EQ gt_selected_pernrs
              AND subty EQ <fs_dtyxx>
              AND objps EQ <fs_didxx>
              AND begda LE pn-endda
              AND endda GE pn-begda.

  SELECT SINGLE agency ansvh
    INTO (p_agency_out, lv_ansvh)
    FROM pa0001
    WHERE pernr EQ p_pernr_in
      AND begda LE pn-endda
      AND endda GE pn-begda.

  SELECT SINGLE vorna nachn gbdat perid gesch
    INTO (gt_control_table-fname, gt_control_table-lname, gt_control_table-dob, gt_control_table-mskssn, gt_control_table-gender)
    FROM pa0002
    WHERE pernr EQ p_pernr_in
      AND begda LE pn-endda
      AND endda GE pn-begda.

  SELECT SINGLE perid
    INTO (lv_ssn)
    FROM pa0106
    WHERE pernr EQ p_pernr_in
      AND subty EQ p_subty_in
      AND objps EQ p_objps_in
      AND begda LE pn-endda
      AND endda GE pn-begda.

  SELECT SINGLE smoke
    INTO (p_smoker_out)
    FROM pa0376
    WHERE pernr = p_pernr_in
      AND begda LE pn-endda
      AND endda GE pn-begda.

  SELECT SINGLE state pstlz zcounty
    INTO (p_state_out, lv_zip, p_county_out)
    FROM pa0006
    WHERE pernr EQ p_pernr_in
      AND begda LE pn-endda
      AND endda GE pn-begda.

  SELECT SINGLE werks btrtl
    INTO (lv_werks, lv_btrtl)
    FROM pa0001
    WHERE pernr EQ p_pernr_in
      AND begda LE pn-endda
      AND endda GE pn-begda.

    SELECT SINGLE region
      INTO (p_region_out)
      FROM zpat_county_code
      WHERE county EQ p_county_in.

      SELECT SINGLE pernr
        INTO lv_pernr
        FROM pa0002
        WHERE perid EQ gt_cobra_table-l_essn.

  SELECT SINGLE eecst ercst
    INTO (lv_eecst, lv_ercst)
    FROM t5ubi
    WHERE barea EQ '01'
      AND bplan EQ lv_bplan
      AND bcost EQ p_bcost_in
      AND cstv1 EQ '0001'
      AND smoke EQ p_smoker_in
      AND begda LE pn-endda
      AND endda GE pn-begda.

    SELECT SINGLE kwert
      INTO lv_kwert
      FROM t511k
      WHERE molga EQ '10'
        AND konst EQ 'ZCOB1'
        AND begda LE pn-endda
        AND endda GE pn-begda.

Former Member
Former Member replied

Use transaction ST22 to look at the dump. I think you'll see that the problem is that you were trying to write to a dataset on the application server that was not opened.

This has nothing to do with how long the program was running.

Rob

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question