on 09-10-2014 2:13 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.