Skip to Content

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

Endroutine: Lookup DSO->DSO

Hi experts

Need some help from ABAP experts.

Below is some coding snips...source DSO, target DSO and lookup DSO (ds05).

source, target and lookup DSO ds05 have 4 key fields, they are all the same at each DSO.

Question: How must the coding be changed for the READ to include all key fields?

Thanks for your help.

TYPES:

   BEGIN OF ds05,

      FC_OPBEL           TYPE /BI0/OIFC_OPBEL,

      FC_OPUPK           TYPE /BI0/OIFC_OPUPK,

      FC_OPUPZ           TYPE /BI0/OIFC_OPUPZ,

      FC_OPUPW           TYPE /BI0/OIFC_OPUPW,

      CLEAR_DATE           TYPE /BI0/OICLEAR_DATE,

      FC_BLART           TYPE /BI0/OIFC_BLART,

     /BIC/ZZBRA3        TYPE /BIC/OIZZBRA3,

END OF ds05.

DATA: ITAB2 TYPE TABLE OF ds05 with KEY FC_OPBEL FC_OPUPK FC_OPUPW  FC_OPUPZ,
             WA2 type ds05.


LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
       
        READ TABLE ITAB2 INTO WA2 WITH KEY
            FC_OPBEL = <RESULT_FIELDS>-FC_OPBEL.

Former Member
replied

Thomas Fabian wrote:

LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
       
        READ TABLE ITAB2 INTO WA2 WITH KEY
            FC_OPBEL = <RESULT_FIELDS>-FC_OPBEL.

read table itab2 into wa2 with key fc_opbel = <result_fields>-fc_opbel

                                                 fc_opupk = <result_fields>-fc_opupk

                                                 fc_opupw = <result_fields>-fc_opupw

                                                 fc_opupz = <result_fields>-fc_opupz.

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