Skip to Content
0
Former Member
Feb 09, 2007 at 03:11 PM

Trying to sue c_T_data in user EXIT_SAPLRSAP_001

25 Views

I have some code that keeps failing when I set my interal table to the global table c_t_data. here is the code. It says they are not compatible but i have used this before. any ideas

DATA : T_MCVBAK TYPE TABLE OF MCVBAK,

T_VBPA TYPE STANDARD TABLE OF TY_VBPA,

*-- Work Area

W_MCVBAK TYPE MCVBAK,

W_VBPA TYPE TY_VBPA.

WHEN '2LIS_11_VAHDR'. "RETRIEVING THE EXTRACTOR

REFRESH: T_MCVBAK,

T_VBPA.

CLEAR: W_VBPA,

L_TABIX.

T_MCVBAK[] = C_T_DATA[]. fails here!!!!!

SELECT VBELN

KUNNR

PARVW

INTO TABLE T_VBPA

FROM VBPA

FOR ALL ENTRIES IN T_MCVBAK

WHERE VBELN = T_MCVBAK-VBELN.

IF NOT T_VBPA IS INITIAL.

SORT T_VBPA BY VBELN KUNNR PARVW.

CLEAR: W_MCVBAK,

W_VBPA.

LOOP AT T_MCVBAK INTO W_MCVBAK.

L_TABIX = SY-TABIX.

READ TABLE T_VBPA INTO W_VBPA WITH KEY VBELN = W_MCVBAK-VBELN BINARY SEARCH.

IF SY-SUBRC = 0. "IF READ TABLE IS SUCESSFULL

  • START OF FILLING THE ZFIELDS CREATED

CASE W_VBPA-PARVW.

WHEN 'CR'. "Forwarding Agent

W_MCVBAK-ZZCR_FRAGNT = W_VBPA-KUNNR.

MODIFY T_MCVBAK FROM W_MCVBAK INDEX L_TABIX.

WHEN 'EU'. "End User

W_MCVBAK-ZZEU_ENDUSR = W_VBPA-KUNNR.

MODIFY T_MCVBAK FROM W_MCVBAK INDEX L_TABIX.

WHEN 'Z1'. "Sales Rep

W_MCVBAK-ZZ1_SLSREP = W_VBPA-KUNNR .

MODIFY T_MCVBAK FROM W_MCVBAK INDEX L_TABIX.

WHEN 'Z2'. "Sales Rep-2

W_MCVBAK-ZZ2_SLSREP = W_VBPA-KUNNR.

MODIFY T_MCVBAK FROM W_MCVBAK INDEX L_TABIX.

WHEN 'ZA'. "Agent

W_MCVBAK-ZZA_AGENT = W_VBPA-KUNNR.

MODIFY T_MCVBAK FROM W_MCVBAK INDEX L_TABIX.

WHEN 'ZC'. "Bemis Frt Forwarder

W_MCVBAK-ZZC_FRTFOR = W_VBPA-KUNNR.

MODIFY T_MCVBAK FROM W_MCVBAK INDEX L_TABIX.

WHEN 'ZF'. "Cust Frt Forwarder

W_MCVBAK-ZZF_CFRTFO = W_VBPA-KUNNR.

MODIFY T_MCVBAK FROM W_MCVBAK INDEX L_TABIX.

WHEN 'ZI'. "Intermediate Consign

W_MCVBAK-ZZI_INTCON = W_VBPA-KUNNR.

MODIFY T_MCVBAK FROM W_MCVBAK INDEX L_TABIX.

WHEN 'ZS'. "Customer Service Rep

W_MCVBAK-ZZS_CSEREP = W_VBPA-KUNNR.

MODIFY T_MCVBAK FROM W_MCVBAK INDEX L_TABIX.

WHEN 'ZX'. "Canadian Importer

W_MCVBAK-ZZX_CANIMP = W_VBPA-KUNNR.

MODIFY T_MCVBAK FROM W_MCVBAK INDEX L_TABIX.

WHEN 'SB'. "Special Stock Customer

W_MCVBAK-ZZSB_SPSTKC = W_VBPA-KUNNR.

MODIFY T_MCVBAK FROM W_MCVBAK INDEX L_TABIX.

WHEN OTHERS.

EXIT.

ENDCASE.

  • END OF FILLING THE ZFIELDS CREATED

ENDIF. "ENDIF FOR READ TABLE IS SUCESSFULL

CLEAR: W_MCVBAK,

L_TABIX,

W_VBPA.

ENDLOOP. "ENDLOOP FOR T_MCVBAK

ENDIF. "ENDIF FOR T_VBPA NOT INITIAL

REFRESH C_T_DATA.

C_T_DATA[] = T_MCVBAK[].

REFRESH: T_MCVBAK,

T_VBPA.

  • End of code by EXT_SAP_149 for RBW-133 with Transport request number ED1k902514*****

WHEN OTHERS.

EXIT.