Skip to Content
0
Former Member
Dec 04, 2008 at 02:45 PM

Enhance 0CO_OM_CCA_1 to add new quantity KF

49 Views

Hi,

I am enhancing extractor 0CO_OM_CCA_1 by adding new quantity keyfigure

SMBG - Consumption quantity

SMBF - Fixed Consumption Quantity

SMBV - Variable Consumption Quantity ( SMBV = SMBG - SMBF)

MEINB - Posted Unit of Measure

I want to populate above fields from COEP table.. while writing ABAP routine i am not able to find which should be the key fields in Select statement

Please help me with the Key fields.. my SELECT staement is

SELECT SINGLE mbgbtr mbfbtr meinb

INTO (ws_smbg, ws_smbf, ws_meinb )

FROM coep

WHERE kokrs = l_s_icctrcst-kokrs AND ????????????????????? (Which should be my Key fields)

IF sy-subrc = 0.

l_s_icctrcst-smbg = ws_smbg.

l_s_icctrcst-smbf = ws_smbf.

l_s_icctrcst-meinb = ws_meinb.

l_s_icctrcst-smbv = ws_smbg - ws_smbf.

MODIFY c_t_data FROM l_s_icctrcst INDEX l_tabix.

CLEAR : ws_smbg, ws_smbf, ws_meinb.

ENDIF.

Am i right in my approach?

Any help is appriciated..

Thanks,

AB