cancel
Showing results for 
Search instead for 
Did you mean: 

Enahncing the Data Source using BADI

Former Member
0 Kudos

Hello,

I have already enhanced the Transaction DataSource using exit_saplrsap_001. Now there is new requirment to add one more field to the same Data Source and populate values for the filed.

I want to implement BADI for the same data source. Can we implement using BADI?

Need your suggestion and help for the same.

Regards,

Rajeev

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

For using the BADI :

1) First of all you have to get the BADI Definition name i.e RSU5_SAPI_BADI.

2) Then we have to implement the BADI using TCODE SE19

3) Follow proper naming convetions for the impementation name suppose /KHE/ZBW_IMPL

4) A Class is created automatically i.e /KHE/CL_IM_ZBW_IMPL

5) Go to the method DATA_TRANSFORM by double clicking

6) inside the method write the following code

CASE i_datasource.

WHEN 'DATASOURCENAME'.

write your required logic to enhance the datasource

endcase.

7) activate the BADI

😎 Once you run the datasource it will trigger the BADI internally and datasouce will be enhanced.

Please let me know if you getting any issues.

Thanks,

Rajesh

Former Member
0 Kudos

hi rajesh,

i want to enhance using user exit...

please guide...

cheerz,

raps.

Former Member
0 Kudos

1) Go to function module exit e EXIT_SAPLRSAP_001

2) Double click on the include ZXRSAU01

3) WHEN 'Datasource_Name'.

PERFORM Zdatasource TABLES C_T_DATA[].

4)Double click on the perform and write the code in the FORM.

5)FORM Zdatasource TABLES l_data STRUCTURE (Provide the structure name used in the datasource).

6) Decalare structure like

DATA: st_zox003 LIKE zox003,

l_tabix LIKE sy-tabix .

LOOP AT l_data INTO st_zox003.

l_tabix = sy-tabix.

put your logic regarding enhancement

MODIFY l_data FROM st_zox003 INDEX l_tabix.

endloop.

Do let me know if you require any further help.

Thanks,

Rajesh

Former Member
0 Kudos

HI Rajeev,

You can definitely enhance the data source using BADI.

As of SAP_BASIS 6.20 and PI_BASIS 2004_1 (R/3 Release 4.6C) is available a more efficient way to enhance SAP standard content, using Business Add-Ins (BAdIs) rather than user exits.

The technical name of this BAdI is RSU5_SAPI_BADI, detailed on the SAP Note 691154.

This will ease the pressure of transporting the common Include program which will be carrying codes affecting multiple data sources.

Using this badi you just have to transport the BADI without bothering about the user exit.

Please go through the below link, it will really help you -

[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3001894b-b1fb-2910-77ba-e80b6f2053b7?QuickLink=index&overridelayout=true]

Hope this helps.

Regards,

RahulM

Former Member
0 Kudos

Guyz,

thx for replying...

I want to know how to append two new fields to the already enhanced data source(user exit).

is it neccessary to use the same append structure or can we add new one???

cheerz,

raps.

Former Member
0 Kudos

Hi ,

U can add the field in the same append structure or new append structure . usually it is followed if the earlier structure was created by some other developer and has already been transported , we create a new structure to avoid confusions .

However this is totally dependant on the conventions followed , makes no difference to proceed with either of the scenarios .

Thanks ,

Devraj

Former Member
0 Kudos

Hi,

Refer below thread

[;

Thank,s

former_member182470
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Raps,

Please refer to this link :-

Regards

Sunny

Former Member
0 Kudos

Hi,

Check the below article for enhancing data source using BADI,

[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3001894b-b1fb-2910-77ba-e80b6f2053b7?QuickLink=index&overridelayout=true]

But why don't you add logic for new field in the EXIT itself and use it in data source.

Regards,

Durgesh.