Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BADi for C223

Former Member
0 Kudos

I need to add some fields to the report generated when C223 is executed...is there a BADi that can be used to accomplish this task? Also...can someone provide me with an example of how to customize a standard SAP report using a BADi?

regards,

Mat

7 REPLIES 7

Former Member
0 Kudos

To find out the BADI for a particular transaction put the break point in the

method CL_EXITHANDLER=>GET_INSTANCE and execute the business transaction

when the system stop at break point you can easily check the BADI name.

use T-code SE19 to create implementation of BADI defination.

First try th above code and let us know if you got any BADI.

Regards

Aman

0 Kudos

OK...I'm a lil new at this...so let's see if I'm looking at this design issue correctly. I need to add some fields to the ALV displayed when tcode C223 - Maintain Production Versions - is executed. I can approach this a couple of ways:

1. Clone the function group CMFV in the customer namespace. Redefine specific screens and associated subroutines to include the custom code needed to display the new columns. Negative here is the need to create a new tcode to exscute the report and maintaining the code through SAP updates.

2. Use the BADi called in the C223 transaction - CPFX_SCREEN_SET - to implement the logic to display the new fields. Problem here is the BADi interface doesn't appear to allow me to alter the data displayed in the report...I think I'm also unsure about adding columns to the screen implemented in the standard transaction and how SAP updates would effect them. Does that mean that I would still have to redefine the entire transaction with a new tcode in the customer namespace?

3. Define my own BADi and call it from a user exit called from within the C223. Problem is there is no user exit called from within C223. I also come back to the problem of how to maintain the subscreen where I add my columns as described in 2 above.

Another issue is appending / including my new fields to the existing MKAL_EXPAND struct used to populate the ALV displayed when C223 is executed. How will that impact the performance of any other tcode using MKAL_EXPAND?

Did I miss anything?

Hey...this is tricky stuff

0 Kudos

Hi,

As the BADI's cannot be created an called in a standard transaction, unless SAP is allowing you to do and more over as SAP will NOT allow you to change the structure of the DATA table of the report, to me it does NOT look like we have got too many option than just cloning the report and change the code according to our requirements.

Regards,

Ravi

Note : Please mark the helpful answers

0 Kudos

Hi Ravi,

A few more questions for you:

1. Is it true that since the BADi interface described above doesn't inculde any CHANGE parameters that I would NOT be able to change the value of the fields associated with the appended struct? I dunno...I've never done this before

2. Is it also true that appending the new fields, as a struct, to the original struct (used to populate the standard report from which this report is derived) will impact the performance of the standard report every time it is executed? How do I overcome that issue?

best regards,

Mat

0 Kudos

Hi,

1. Going the ideal way, if BADI does not offer CHANGING parameters, you will NOT be able to change value. However, a work around, if you are able to figure a global variable which is accessible via field symbols, you can change the value. Assuming there is a variable var1 which is NOT a parameter but you can see the value of that what you can do is

ASSIGN (PROGRAM)VAR1 to <FS_ANY>.

Now change the value of <FS_ANY> and the same will reflect in the variable, not a very safe option though.

2. Yes, append structure might have a issue with performance, but not always. We need to test the same on a case by case basis.

Regards,

Ravi

Former Member
0 Kudos

Mathew,

Take a look at by weblog which talks about modifying the standard report. Pay close attention to the comments provided by the SAP Developers.

/people/ravikumar.allampallam/blog/2005/12/05/need-a-way-to-change-appearance-of-a-standard-existing-alv-report

However, the BADI mentioned in the blog is available only from WAS 640 and is generic for any standard ALV report.

You cannot add fields to the report, unless the developer has been kind enough, or you can edit the structure used to define the field catalog can be edited to add more fields or include a CUSTOM structure.

Regards,

Ravi

Note : Please mark the helpful answers

Message was edited by: Ravikumar Allampallam

0 Kudos

Hi,

It is observed that from time to time many users have tried to find User Exit/ Badi in c223. Being such an important master data for PP- PI industries, users  need to implement checks and controls specific  to their customised requirements.

Recently, I had taken up this issue with SAP with detail business case. SAP has appreciated this requirement. However, as per SAP protocol, I have put this in SAP Jam, with Title "implement User Exit/ BADI in C223". Requesting you to visit that site and express this necessity, so that SAP takes up this.

Thank You!

With regards

Animesh