cancel
Showing results for 
Search instead for 
Did you mean: 

Enhacement coding

Former Member
0 Kudos

HI everyone,

I have table ANLA in R3 and the fields xxxx and yyyy to be added to the datasource of asset master data .

attribute i know the processing steps .just i dont know how to code in cmod for include <b>zxrsu01</b> .Pls can give me code for this.

Thanks in advs

Sreeni

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Go to your project in CMOD --> Components --> click on function exit EXIT_SAPLRSAP_001(transaction data) or 002(master data) --> make changes to INCLUDE ZXRSAU01.

Here is the sample code for masterdata enhancement ..

tables: pa0001, "HR Master Record: Infotype 0001 (Org. Assignment)

pa0002, "HR Master Record: Infotype 0002 (Personal Data)

PA0022. "HR Master Record: Infotype 0022 (Education)

data: my_counter.

case i_datasource.

when '0EMPLOYEE_ATTR'.

data: my_structure like hrms_biw_io_occupancy,

my_tabix like sy-tabix.

  • Endless loop for debugging *

  • my_counter = 7.

  • while my_counter = 7.

  • endwhile.

loop at i_t_data into my_structure.

my_tabix = sy-tabix.

select single * from pa0001 where pernr = my_structure-pernr.

*+ fill additional fields with master data

if sy-subrc = 0.

my_structure-zzworkcon = pa0001-ansvh. "work contract

my_structure-ZZORGKEY = pa0001-VDSK1. "Organizational Key

modify i_t_data from my_structure index my_tabix.

endif.

select single * from pa0002 where pernr = my_structure-pernr.

*+ fill additional fields with master data

if sy-subrc = 0.

my_structure-ZZRELIGIOUS = pa0002-konfe. "Religious

my_structure-ZZMARITAL = pa0002-FAMST. "Marital Status

modify i_t_data from my_structure index my_tabix.

endif.

select single * from pa0022 where pernr = my_structure-pernr.

*+ fill additional fields with master data

if sy-subrc = 0.

my_structure-ZZEDUESTABLISH = pa0022-SLART. "Educational esta

my_structure-ZZEDUTRAINING = pa0022-AUSBI. "Education/traini

my_structure-ZZCERTIFICATE = pa0022-SLABS. "Certificate

modify i_t_data from my_structure index my_tabix.

endif.

endloop.

endcase.

Former Member
0 Kudos

Hi srini

I dont have id to acess that site.pls can u give some code just to populate the two fields.

Thanks

Sreeni

Former Member
0 Kudos

Hi Sreeni,

Have a look:

User Exits Examples (doc) - Sample coding

https://websmp208.sap-ag.de/~sapidb/011000358700005475101999

User Exits in SAP BW (ppt)

https://websmp208.sap-ag.de/~sapidb/011000358700005475091999

Hope it Helps

Srini