cancel
Showing results for 
Search instead for 
Did you mean: 

2LIS_13_VDITM enhancement

0 Kudos

Hi All,

I have a requirement from the business to enhance the 2LIS_13_VDITM to add the field 'PERIO' of table FPLA.

Is this possible and if it is can anybody explain me how it can be done?

Thanks,

Prateeksha.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prateeksha,

Try this logic in BADI(SE19) or CMOD as suggested.

types: beging of ty_fpla,

       perio type fpla-perio,

       vbeln type fpla-vbeln,

end of ty_fpla.

data: it_fpla type standard table of ty_fpla,

        wa_fpla type ty_fpla,

        it_MC13VD0ITM type standard table of MC13VD0ITM.

fields_symblos:<fs_MC13VD0ITM> type MC13VD0ITM.

case 'i_datasource'.

    when '2lis_13_vditm'.

if c_t_data is not intial.

   it_MC13VD0ITM[] = c_t_data[].

select vbeln perio from fpla into table it_fpla for all entries in it_MC13VD0ITM

                        where vbeln = it_MC13VD0ITM-vbeln.

sort it_fpla by vbeln.

loop at it_MC13VD0ITM assigning <fs_MC13VD0ITM>.

  read table it_fpla into wa_fpla with key vblen = <fs_MC13VD0ITM>-vblen.

  if sy-subrc = 0.

  <fs_MC13VD0ITM>-yperio = wa_fpla-perio.

  endif.

endloop.

endif.

c_t_data[] = it_MC13VD0ITM[].

endcase.

Thanks,

Somesh.

Answers (3)

Answers (3)

0 Kudos

Thanks Everyone.

Can anyone help me with the component type for this new field which I'll be adding in the VDITM extract structure? Will it be the same as the component type of PERIO in FPLA?

RamanKorrapati
Active Contributor
0 Kudos

Please check with source(SD) team.

Former Member
0 Kudos

Hi Kalyani,

Most of the scenarios the component type would be same from the table where it is enhanced.

Thanks,

Srinivas

Former Member
0 Kudos

Hi,

Please try below logic.

DATA: L_S_MC13VD0ITM LIKE MC13VD0ITM.

When '2LIS_13_VDITM'.

LOOP AT C_T_DATA INTO L_S_MC13VD0ITM.

L_TABIX = SY-TABIX.

SELECT SINGLE PERIO FROM FPLA INTO L_S_MC13VD0ITM-ZZPERIO

WHERE FPLNR = L_S_MC13VD0ITM-VBELN

MODIFY C_T_DATA FROM L_S_MC13VD0ITM INDEX L_TABIX.

ENDLOOP.

WHEN OTHERS.

EXIT.

ENDCASE

Thanks

Ganesh Reddy.

RamanKorrapati
Active Contributor
0 Kudos

Hi,

I think you would all enhancements steps.

Am just giving conditions which can be useful to you.

Use conditions in your cmod logic to fill PERIO

VBRK-VBELN = FPLA-VBELN then you can fill PERIO from table FPLA.

Even if you check with your abap team also they can suggest you about possible logic.

You can explore your data source base tables and FPLA table. if you observe tables fields you may know the fields which are common in both tables. Based on common fields you can implement logic.

Thanks