Skip to Content

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

CMOD - fields not populated

CMOD - fields not populated

-


Hi,

When I extract the data,

I am able to populate

ZZDATVR

ZZIHREZ

ZZINCO1

ZZBUDAT

But, I AM NOT ABLE TO POPULATE

ZZNETPR

ZZLOEKZ

ZZMENGE

---

Please let me know the changes that I need to make in the below code:

-


**************************************************************************

  • Enhancement to the Purchasing Data (Item Level)

DATA DATVR1 LIKE NAST-DATVR.

DATA: BUDAT1 LIKE EKBE-BUDAT,

IHREZ1 LIKE EKKO-IHREZ,

INCO11 LIKE EKKO-INCO1.

data: Begin of i_EKKO occurs 0,

EBELN LIKE EKKO-EBELN,

IHREZ1 LIKE EKKO-IHREZ,

INCO11 LIKE EKKO-INCO1,

END OF I_EKKO.

DATA W_MC02M_0ITM LIKE MC02M_0ITM.

WHEN '2LIS_02_ITM'.

LOOP AT C_T_DATA.

CLEAR W_MC02M_0ITM.

W_MC02M_0ITM = C_T_DATA.

CLEAR: DATVR1,IHREZ1, INCO11, BUDAT1.

SELECT SINGLE DATVR INTO DATVR1 FROM NAST WHERE OBJKY = W_MC02M_0ITM-EBELN.

W_MC02M_0ITM-ZZDATVR = DATVR1.

SELECT SINGLE BUDAT INTO BUDAT1 FROM EKBE WHERE EBELN = W_MC02M_0ITM-EBELN

AND BWART = '101'.

W_MC02M_0ITM-ZZBUDAT = BUDAT1.

SELECT EBELN IHREZ INCO1 INTO TABLE I_EKKO FROM EKKO.

read table i_EKKO with key EBELN = W_MC02M_0ITM-EBELN.

IF SY-SUBRC EQ 0.

W_MC02M_0ITM-ZZIHREZ = I_EKKO-IHREZ1.

W_MC02M_0ITM-ZZINCO1 = I_EKKO-INCO11.

ENDIF.

MODIFY C_T_DATA FROM W_MC02M_0ITM INDEX SY-TABIX.

ENDLOOP.

Former Member
replied

try to include them in your i_ekko structure.

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