DATA:BEGIN OF HEADDATA. INCLUDE STRUCTURE BAPIMATHEAD. DATA:END OF HEADDATA. DATA:BEGIN OF PLANTDATA. INCLUDE STRUCTURE BAPI_MARC. DATA:END OF PLANTDATA. DATA:BEGIN OF PLANTDATAX. INCLUDE STRUCTURE BAPI_MARCX. DATA:END OF PLANTDATAX. READ TABLE XMKPF INDEX 1. IF XMKPF-TCODE2 = MIGO_GR . LOOP AT XMSEG.