Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 27, 2015 at 02:40 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Eddy,

      In addition to kartik's replay, you can optimize ur code using:

      1) use required fields instead  of Select *

      2) Use Field Symbol instead of Work area

      3) Use Binary Search with Read table statement (make sure table should be sorted based )

      Regards,

      Hitesh

  • avatar image
    Former Member
    Oct 27, 2015 at 03:02 PM

    Hello everybody,

    As you mentioned right, those code parts should be replaced with RESULT_PACKAGE.

    However I am receiving further below error for the same code.

    I would like to ask for your little help.

    E:Specify either "INTO wa", "ASSIGNING", "REFERENCE INTO", or "TRANSPORTING NO FIELDS" addition

    Thanks

    Regards.

    Eddy

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Karthik Vasudevan

      Thank you for the suggestion.

      However still receiving error

      E:The field "UCINSTALLA" is unknown, but there are the following fields with similar names: "L_T_UCINSTALLA" and "L_S_UCINSTALLA".

      Eddy