Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8802

Re: Raise no_more-data and endless loop

$
0
0

It is endless loop, i don't know why?


IMPORT keyfgr           TO p_keyfgr              FROM MEMORY ID 'CM_KEYFGR'.
IMPORT vrsioz           TO p_vrsioz              FROM MEMORY ID 'CM_VRSIOZ'.
IMPORT spmon            TO p_spmon               FROM MEMORY ID 'CM_SPMON'.
IMPORT SEL              TO g_sel                 FROM MEMORY ID 'CM_SEL'.
IMPORT num_format       TO g_num_format          FROM MEMORY ID 'CM_NUM_FORMAT'.
IMPORT t445a            TO wa_t445a              FROM MEMORY ID 'CM_T445A'.
IMPORT fcst_filedata    TO GT_fcst_filedata      FROM MEMORY ID 'CM_FCST_FILEDATA'.
IMPORT tmc1k            TO gt_tmc1k[]            FROM MEMORY ID 'CM_TMC1K'.
IMPORT horzncnt         TO gt_horzncnt[]         FROM MEMORY ID 'CM_HORZNCNT'.
IMPORT inputfile_fields TO gt_inputfile_fields[] FROM MEMORY ID 'CM_INPUTFILE_FIELDS'.

LOOP AT GT_horzncnt INTO WA_horzncnt. "COUNT ROW AND COL
ENDLOOP.

"-- Execute Functionality by table Structure
     case i_gstru.
       when 'S076'. "-- Table S076.
"-- Delete Header line at first pass.
         if i_index = 1.

           delete GT_fcst_filedata index 1.

         endif.

LOOP AT GT_fcst_filedata INTO WA_fcst_filedata.

* IF CL EQ 1."WA_horzncnt-ROWNUMBER.
*   LEAVE PROGRAM.
* ENDIF.

   CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
     EXPORTING
       INPUT              = WA_fcst_filedata-FIELD2
    IMPORTING
      OUTPUT             wa_t_data_S076-PMNUX
    EXCEPTIONS
      LENGTH_ERROR       = 1
      OTHERS             = 2
             .

   wa_t_data_S076-ssour = space.
   wa_t_data_S076-WENUX = WA_fcst_filedata-FIELD1.
   wa_t_data_S076-basme = WA_fcst_filedata-FIELD3.
*  wa_t_data_S076-VRSIO = p_vrsioz.


    "-- Check if Field Exists in S076e
    select single * into  wa_c_data_S076e
                    from  S076e
                    where ssour = wa_t_data_S076-ssour
                    and   PMNUX = wa_t_data_S076-PMNUX
                    and   WENUX = wa_t_data_S076-WENUX.

   IF SY-SUBRC <> 0.
     continue. "-- Exit Current Loop Record Processing
   ENDIF.

   v_per_amt_ind = 3.

   DO WA_horzncnt-horzncnt + 1 TIMES.
       v_per_amt_ind = v_per_amt_ind + 1.

             move    v_per_amt_ind       to  v_per_amt_field+22(2).
             assign (v_per_amt_field)    to  <fs_per_amt_idx>.
             if <fs_per_amt_idx> is ASSIGNED.
               move    <fs_per_amt_idx>    to  wa_t_data_S076-ABSAT.
               wa_t_data_S076-SPMON = p_spmon.
               append wa_t_data_S076 to T_DATA.
               ADD 1 TO P_SPMON.
               unassign: <fs_per_amt_idx>.

             ENDIF.
   ENDDO.
   clear wa_t_data_S076.
ENDLOOP.

ENDCASE.


Viewing all articles
Browse latest Browse all 8802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>