cancel
Showing results for 
Search instead for 
Did you mean: 

Are there user exits to alter Excel Output from CG02

Former Member
0 Kudos

Hi All,

I have a need to change the way SAP exports specification data to Excel using the standard Empty -> Excel output variant.  When I output data currently and there are specs that have more than one sort sequence in a VAT, the spec number, NAM PROD identifier and material number are not copied down for each line that holds the subsequent sort sequences.

So I get something like this:

Spec Number          Nam PROD          Material Number          Data field 1          Data field 2

12345                     Spec one               1234                          55 Grams             45 Degrees

                                                                                           70 Grams             50 Degrees

                                                                                           60 Grams             60 Degrees

62738                     Spec two                4321                         80 Grams             55 Degrees

                                                                                           40 Grams             32 Degrees

What I need to have happen is this:

Spec Number          Nam PROD          Material Number          Data field 1          Data field 2

12345                     Spec one               1234                          55 Grams             45 Degrees

12345                     Spec one               1234                          70 Grams             50 Degrees

12345                     Spec one               1234                          60 Grams             60 Degrees

62738                     Spec two                4321                         80 Grams             55 Degrees

62738                     Spec two                4321                         40 Grams             32 Degrees

I'm not finding any configuration that changes this.  I was told this is standard SAP output.  Is there a user exit to alter this, or would we need to add a macro to the output template within SAP?  Any advice would be greatly appreciated.  We need to avoid customizing any standard SAP code, so if that is the only way to accomplish this, please advise and we'll look for other options.

Thank you so much!

Jason

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jason,

The excel that is outputted is based on Macros. If you want to change the output you have to change the macro in the Excel.

Please verify the following notes can be of help.

1) SAP Note 1223805 - Output variant for Excel

2) SAP Note 1103234 - FAQ: Output in Excel

Let me know if this works.

Former Member
0 Kudos

Thanks Kalyan!  This is very helpful information.  Based on what I'm seeing here, our option is to create a "clone" of the output function module and replace the standard function module with the customized version in IMG customizing.  Is that correct?

Former Member
0 Kudos

hi Jason,

Sorry,we didn't implement the requirement to alter the excel variant and went with the standard. However I remember that we were in contact with the developer and sent him the above notes and did get an confirmation from him that this was possible.

christoph_bergemann
Active Contributor
0 Kudos

Dear Jason

as Kalyan provided as input: it is very common and quite standard to "copy" SAP standard output variants; to change/adapt them to "optimize" etc. for the companies need. Your findings in context of "EXCEL" output variant are correct. Most of the customers "love " this output variant (as it generates EXCEL) but hate it at the same time because of the reasons etc. you have described.

But by analysing the ABAP code and by analysing how the "EXCEL" work (you need a makro) you can "migrate" the EXCEL one to you own one.

In theory (here I have less experience): you may be know that SAP delivers as well something which is called "EXCEL in place"; what I do not know if you can use here as well a macro. But other "workaorunds" might exists here as well.

But you can try to do it complely different. You can completely use your own ABAP code and generate a "ALV" look and feel display. Here you can sort, switch columns,export to EXCEL etc. etc. using own user interface. ALV is in most cases a very good solution option to solve such kinds of demands

Take a look in:

and

You will find links to threads in context of "output variant" and "idea" how to use the exising "Exit" options in EHS

C.B.

Answers (0)