Quantcast
Viewing all articles
Browse latest Browse all 8065

57,299 records are displayed for one source record in RSA3 with User Exit


Hi all,

    I have created custom extractor (view based) on table ZPROD_TARGET. I have selected 10 data records on RSA3. The first record from that table is displayed 10 times. If I give 100 on RSA3, then it is displaying 100 records of first record from that table. If I give 999,999 on RSA3, then it is displaying 229,196 (57,299 x 4) records for all 4 records. It means it is displaying 57,299 records for one source record. I did debug the program,

c_t_data has 10 records with first test of 10 on RSA3, 100 records during the second test and 229,196 records during the last test.

 

What could be the problem, please. The screenshots are attached.

 

Thanks,

Venkat.

*** The below program is to populate TARGET from ZPROD_TARGET ***

 

REPORT  ZBW_ZDS_ZPROD_TARGET_TD.

 

type-pools: sbiwa.

 

FORM ZBWZDS_ZPROD_TARGET_TD

  TABLES i_t_select type sbiwa_t_select

         i_t_fields type sbiwa_t_fields

         c_t_data   structure zoxgsd0027     " Datasource structure

         c_t_messages structure balmi.

 

  TYPES : BEGIN OF TYPE_ZPROD_TARGET ,

           TRGT_DATE  LIKE ZPROD_TARGET-TRGT_DATE,

           WERKS      LIKE ZPROD_TARGET-WERKS,

           FURNACE    LIKE ZPROD_TARGET-FURNACE,

           CATEGORY   LIKE ZPROD_TARGET-CATEGORY,

           MOLT_MATNR LIKE ZPROD_TARGET-MOLT_MATNR,

           TARGET     LIKE ZPROD_TARGET-TARGET,

          END OF TYPE_ZPROD_TARGET .

 

  FIELD-SYMBOLS <ls_data> TYPE zoxgsd0027 .

 

  DATA: lt_zprod_target TYPE STANDARD TABLE OF type_zprod_target,

        Ls_zprod_target TYPE type_zprod_target.

 

*----------------------------------------------------------------*

* Read data from ZPROD_TARGET table into internal memory         *

*----------------------------------------------------------------*

  SELECT trgt_date  werks  furnace  category  molt_matnr  target

    INTO CORRESPONDING FIELDS OF TABLE lt_zprod_target

    FROM zprod_target

    FOR ALL ENTRIES IN c_t_data

    WHERE trgt_date  EQ c_t_data-trgt_date  AND

          werks      EQ c_t_data-werks      AND

          furnace    EQ c_t_data-furnace    AND

          category   EQ c_t_data-category   AND

          molt_matnr EQ c_t_data-molt_matnr.

 

  LOOP AT c_t_data ASSIGNING <ls_data>.

 

    READ TABLE lt_zprod_target INTO ls_zprod_target

         WITH KEY trgt_date  = <ls_data>-trgt_date

                  werks      = <ls_data>-werks

                  furnace    = <ls_data>-furnace

                  category   = <ls_data>-category

                  molt_matnr = <ls_data>-molt_matnr.

 

    IF sy-subrc EQ 0.

      <ls_data>-zztarget = ls_zprod_target-target.

    ENDIF.

 

    CLEAR: ls_zprod_target.

 

  ENDLOOP.

ENDFORM.

Image may be NSFW.
Clik here to view.
Image 1.GIF

 

Image may be NSFW.
Clik here to view.
Image 2.GIF

Image may be NSFW.
Clik here to view.
Image 3.GIF

Image may be NSFW.
Clik here to view.
Image 4.GIF


Viewing all articles
Browse latest Browse all 8065

Trending Articles



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