Skip to Content

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

Error in End Routine

Hello Everybody,

Below-written code has generating error like "E:"L_T_UCPREMISE" is a table without a header line and therefore has no component called "UC_POD"", which i am no sure the underlying error.

DATA: l_t_result_package LIKE result_package,

           l_s_result_package LIKE LINE OF l_t_result_package.

     TYPES: BEGIN OF ltype_work_area,

       ucinstalla  TYPE /bi0/oiucinstalla,

       ucpremise TYPE /bi0/oiucpremise,

       uc_connobj TYPE /bi0/oiuc_connobj,

       postcd_gis TYPE /bi0/oipostcd_gis,

       uc_pod_ext TYPE /bi0/oiuc_pod_ext,

       END OF ltype_work_area.

*    DATA: ls_work_area LIKE ltype_work_area,

           Data:

           l_t_ucinstalla type table of /bi0/pucinstalla,

           l_t_ucpremise type table of /bi0/pucpremise,

           l_t_uc_connobj type table of /bi0/puc_connobj,

           l_t_uc_pod type table of /bi0/muc_pod.

     DATA: l_s_ucinstalla LIKE LINE OF l_t_ucinstalla,

           l_s_ucpremise LIKE LINE OF l_t_ucpremise,

           l_s_uc_connobj LIKE LINE OF l_t_uc_connobj,

           l_s_uc_pod LIKE LINE OF l_t_uc_pod.

     SELECT * FROM /bi0/pucinstalla

       INTO CORRESPONDING FIELDS OF TABLE l_t_ucinstalla

       FOR ALL ENTRIES IN result_package

           WHERE ucinstalla result_package-ucinstalla

           AND objvers = 'A'

           AND soursystem = 'L1'.

     SELECT * FROM /bi0/mucpremise

      INTO CORRESPONDING FIELDS OF TABLE l_t_ucpremise

      FOR ALL ENTRIES IN result_package

          WHERE ucpremise = l_t_ucpremise-uc_pod

          AND objvers = 'A'

          AND soursystem = 'L1'.

     SELECT * FROM /bi0/puc_connobj

       INTO CORRESPONDING FIELDS OF TABLE l_t_uc_connobj

       FOR ALL ENTRIES IN result_package

           WHERE uc_connobj = l_t_uc_connobj-uc_connobj

           AND objvers = 'A'

           AND soursystem = 'L1'.

     SELECT * FROM /bi0/muc_pod

     INTO CORRESPONDING FIELDS OF TABLE l_t_uc_pod

     FOR ALL ENTRIES IN result_package

         WHERE uc_pod = l_t_uc_pod-uc_pod

         AND objvers = 'A'

         AND soursystem = 'L1'.

     LOOP AT l_t_result_package INTO l_s_result_package.

       READ TABLE l_t_ucinstalla WITH KEY

        ucinstalla = l_s_result_package-ucpinstalla

        soursystem = 'L1'

        objvers = 'A'.

       READ TABLE l_t_ucpremise WITH KEY

        ucpremise = l_s_result_package-ucpremise

        soursystem = 'L1'

        objvers = 'A'.

       READ TABLE l_t_uc_connobj WITH KEY

        uc_connobj = l_s_result_package-uc_connobj

        soursystem = 'L1'

        objvers = 'A'.

       READ TABLE l_t_uc_pod WITH KEY

        uc_pod = l_s_result_package-uc_pod

        soursystem = 'L1'

        objvers = 'A'.

       IF sy-subrc EQ 0.

         l_s_result_package-uc_installa = l_s_uc_istalla-uc_installa.

         l_s_result_package-uc_connobj = l_s_uc_connobj-uc_connobj.

         l_s_result_package-postcd_gis = l_s_uc_connobj-postcd_gis.

         l_s_result_package-uc_pod_ext = l_s_uc_pod-uc_pod_ext.

         APPEND l_s_result_package TO result_package.

       ENDLOOP.



I would kindly request your help on the relevant correction on the syntax.


Regards.


Eddy

Former Member
replied

Hi Eddy

In you below code, you should use result package instead of the internal table.

     SELECT * FROM /bi0/mucpremise

      INTO CORRESPONDING FIELDS OF TABLE l_t_ucpremise

      FOR ALL ENTRIES IN result_package

          WHERE ucpremise = result_package-uc_pod

          AND objvers = 'A'

          AND soursystem = 'L1'.

Try and let us know if it works.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question