Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Enhacing 0CO_OM_WBS_6

Hello BW Experts ,

I want to enhance standard data source 0CO_OM_WBS_6

by adding fields HKONT and BSCHL from table BSEG.

The table BSEG is having the primary key fields named

MANDT , BUKRS , BELNR , GJAHR , BUZEI.

Please tell me the User exit code to be written.

I have already added these two fields to the data source.

So please tell me the User exit code to be written to add these two fields .

Thanks in advance.

Regards ,

AMOL.

replied

hi Amol,

user exit zxrsau01 is used, find some steps here

Enhancement

you code may like ...

tables : BSEG.

data : l_s_wbs6 like ICWBSCSTA1,

l_tabix like sy-tabix,

l_HKONT like BSEG-HKONT,

l_BSCHL like BSEG-BSCHL.

case i_datasource.

when '0CO_OM_WBS_6'.

loop at c_t_data into l_s_wbs6.

l_tabix = sy-tabix.

select single HKONT BSCHL into (l_HKONT,l_BSCHL)

from BSEG

where BUKRS = l_s_wbs6-BUKRS and

BELNR = l_s_wbs6-BELNR and

GJAHR = l_s_wbs6-FISCPER+0(4)

and BUZEI = l_s_wbs6-BUZEI.

  • please re-evaluate GJAHR = l_s_wbs6-FISCPER+0(4)

if sy-subrc = 0.

l_s_wbs6-ZZHKONT = l_HKONT.

l_s_wbs6-ZZBSCHL = l_BSCHL.

modify c_t_data from l_s_wbs6 index l_tabix.

endloop.

hope this helps.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question