cancel
Showing results for 
Search instead for 
Did you mean: 

Enhancement

Former Member
0 Kudos

Hi all,

I had posted some questions regarding user exits in this forum previously. It would be great if someone could explain the step by step process for the following.

1) If I have a datasource and want to append fields to it, how do I do it?

2) After appending these fields how do I populate these fields using user exits?

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

the enhancement depends on the type of datasource. Mostly you identify the extract structure and add your fields using a append structure. Once enhanced, you need to generate the datasource again. Then goto transaction cmod, create or choose a project, add enhancement rsap0001 and add your coding in exit...001 for transactional data, exit...002 for master data, exit...003 for texts and exit...004 for hierarchies.

regards

Siggi

PS: there will be coding examples in the available documentation in transaction cmod.

Message was edited by: Siegfried Szameitat

Former Member
0 Kudos

Siegfried,

Thanks for your reply. I have identified the extract structure. Now, do I append fields to this from RSA6 using the push-button Enhance Extract Structure?

Also, in cmod, I created a project and added enhancement rsap0001 and saved it. Now, how do I add the code? In fact, how do I get to the screen that shows the code?

Former Member
0 Kudos

okay, I got it. I clicked on components and it showed the function exits. Thank you.

edwin_harpino
Active Contributor
0 Kudos

hi Pooja,

after the extract structure displayed, click 'append structure', and system will propose the append structure name 'z....', accept it and in next screen add you new field name as zz.... and activate the structure.

double click component exit..01, double click zxrsau01, system will give something 'sap reserved' which actually just warning, quite tricky, just press 'enter' then it will go to next screen for program include zxrsau01.

here you put the code like following :

data : l_s_[structurename] like [extractstructure name],

l_tabix like sy-tabix.

case i_datasource.

when 'your datasource name'.

loop at c_t_data into l_s_[structurename]

l_tabix = sy-tabix.

  • fill the new field

select ... into l_zz...

where ....

l_s_[structurename]-[new field name, zz....] = l_zz...

modify c_t_data from l_s_[structurename] index l_tabix.

endloop.

hope this helps.

Former Member
0 Kudos

Thanks A.H.P.

So, this code is just for appending the field to the extract structure or does it also fill the fields?

I see in your code a portion written 'fill the new field'. I was thinking that the filling needs to be done from CMOD using EXIT_SAPLRSAP_001. Can you make it clear?

thanks again

edwin_harpino
Active Contributor
0 Kudos

hi Pooja,

the code is to fill the new fields, the new field added to 'append structure' through rsa6 and click 'append structure' of extract strucutre.

*fill new field -> i mean logic to fill the new field's value. yes you are right, fill the new field value from cmod exit_saplrsap_001 which when you double click it will go to next screen where you can then double click the zxrsau01, and put the code in it.

hope it's clear now.

Former Member
0 Kudos

Thanks A.H.P

Full points to you.

Just to let you know what I understood from this discussion. The new fields are appended to the extract structure using Append Structure, wherein we need to put in the sample code you gave. This basically defines the logic to fill these fields. The actual filling of these fields by extracting data from the tables is done through CMOD. Am I right? If not, please correct me.

Answers (1)

Answers (1)

edwin_harpino
Active Contributor
0 Kudos

hi Pooja,

you are right, full points to you too

later if you need to trace the code to see if the new field(s) filled or not, you can put a 'break-point.' in your code and run rsa3 with 'debug' checkbox marked.

former_member185071
Contributor
0 Kudos

Hi AHP

Based on the above posting i got some clarification reg enhance ment.

First of all i need to go t code

RSA6-Display data sources-->Then select our ds which we need to enhance then click on the append structure.....> then go to the t code CMOD...>there select the project name> go to the exit in RSAP0001->then give our require coding based on exit...>then check it in the extract checker RSA3 ok then how can i replicate it to BW say its a delta load as of now What will effect in BW how can we approach please let me know if mail me sapbwsource@gmail.com

Thanx In advance

Best regards

Krish K

Bangalore