Skip to Content
0
Sep 26, 2012 at 09:54 AM

Opinion on BW User Exit

55 Views

Hello experts,

I implemented few days ago some user exits to enhance some Datasources. Among them one concerning DS 2LIS_11_VAITM.

Her's the code:

WHEN '2LIS_11_VAITM'.

DATA: s_data_11va0itm TYPE mc11va0itm.

LOOP AT c_t_data INTO s_data_11va0itm.

* Retrieve ZZXFIELD and ZPROG from table VBAP

SELECT SINGLE zprog INTO s_data_11va0itm-zzprog FROM vbap

WHERE vbeln = s_data_11va0itm-vbeln

AND posnr = s_data_11va0itm-posnr .

SELECT SINGLE zzxfield INTO s_data_11va0itm-zzxfield FROM vbap

WHERE vbeln = s_data_11va0itm-vbeln

AND posnr = s_data_11va0itm-posnr.

MODIFY c_t_data FROM s_data_11va0itm .

CLEAR s_data_11va0itm.

ENDLOOP.

The aim of this Abap code was to add two fields from table VBAP to the exractor.

After an audit of the different codes by an Abap expert. He tolds me that there is scope for performance improvment (Select Queries inside the loops can be avoided).

Is that possible? If yes how?

Many thanks for your ideas.

Amine.