cancel
Showing results for 
Search instead for 
Did you mean: 

2LIS_12_VCITM user-exit

Former Member
0 Kudos

Hi,

How can i write user-exit for 2LIS_12_VCITM. In RSA6 it doesn't allow me to extend the structure also. I want to add some extra fields to 2LIS_12_VCITM and fill in user-exit.

thanks,

Yigit

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

what is the problem you are facing while extending that?

Former Member
0 Kudos

Hi Yigit,

If you want to add few more fields to 2LIS_12_VCITM -

Delivery Item Data, you can add them from the pool, if available, in the LBWE transaction. In this case you don't require to add any code.

If you want to add fields other than the ones available in the pool. Then you need to enhance the structure and write a code in the exit.

Steps to be followed in enhancing the structure and writing a code.

1. Go to RSA6.

2. seaarch for 2LIS_12_VCITM data source (SAP R/3 --> SD -> 2LIS_12_VCITM).

3. Click on the data source.

4.Click on the Extract Structure MC12VC0ITM.

5. Press 'Append Structure' button at the top and add the fields you want to enhance.

Then you need to add the code in the exit.

Assuming you need to enhance the vbpa-kunnr and vbpa-parvw fields. ZZPARVW and ZZKUNNR are the names of the fields defined in the enhanced structure.

1. you need to add the code in the program 'ZXRSAU01'

2. The code is as follows.

DATA: D_STRUCT2 LIKE MC12VC0ITM.

data: v_kunnr2 like vbpa-kunnr,

V_parvw2 like vbpa-parvw.

LOOP AT C_T_DATA INTO D_STRUCT2.

SELECT single PARVW KUNNR

INTO (V_PARVW2, V_KUNNR2)

FROM VBPA

WHERE VBELN = D_STRUCT2-VGBEL

AND PARVW = 'RG'.

IF SY-SUBRC = 0.

D_STRUCT2-ZZPARVW = V_PARVW2.

D_STRUCT2-ZZKUNNR = V_KUNNR2.

CLEAR: V_PARVW2, V_KUNNR2.

ENDIF.

Modify C_T_DATA FROM D_STRUCT2.

ENDLOOP.

Hope this solves your problem.-

Regards,

CK

Former Member
0 Kudos

Yigit,

Extend the structure through SE11 and then edit it in RSA6 to unhide the fields.

Cheers

Aneesh