Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Question from sreekarreddya on Sep 14 at 11:21 AM Hi sir/mam, I'm trying to get Txz01 and Bednr data from ekpo using the key fields Mseg-ebeln, Mseg-lgort and Mseg-werks as there are same PO No., werks and lgort in ekpo as in Mseg so that i could read only the first record at each time it loops. let me show example of my code: LOOP AT LT_MSEG INTO LW_MSEG. MOVE : LW_MSEG-MBLNR TO WA_MSEG-MBLNR, LW_MSEG-MJAHR TO WA_MSEG-MJAHR, LW_MSEG-ZEILE TO WA_MSEG-ZEILE, LW_MSEG-MATNR TO WA_MSEG-MATNR, LW_MSEG-WERKS TO WA_MSEG-WERKS, LW_MSEG-LGORT TO WA_MSEG-LGORT, LW_MSEG-LIFNR TO WA_MSEG-LIFNR, LW_MSEG-MENGE TO WA_MSEG-MENGE, LW_MSEG-MEINS TO WA_MSEG-MEINS, LW_MSEG-EBELN TO WA_MSEG-EBELN. READ TABLE LT_EKPO INTO LW_EKPO WITH KEY EBELN = LW_MSEG-EBELN LGORT = LW_MSEG-LGORT WERKS = LW_MSEG-WERKS . IF SY-SUBRC EQ 0. IF lw_ekpo-matnr = v_matnr. * i really not getting any idea of how to read the very next line of lt_ekpo. else. MOVE : LW_EKPO-BEDNR TO WA_MSEG-BEDNR, LW_EKPO-TXZ01 TO WA_MSEG-TXZ01. ENDIF. ENDIF. APPEND WA_MSEG TO IT_MSEG. ENDLOOP. Please guide me, how to read the other 3 records in lt_ekpo | Reply to this email to post your response. __.____._ | _.____.__ |