Application Development and Automation 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: 
Read only

OLE Programming: Hide Excel Pivot Field Subtotals

Former Member
0 Likes
677

Hi, Experts,

I am using OLE to pass data to an Excel file and create pivot table.

I wrote the following to add a row in the pivot table:


  DATA: L_FIELD TYPE OLE2_OBJECT.
  CALL METHOD OF M_TABLE 'PivotFields' = L_FIELD
    EXPORTING #1 = 'Country'.
  SET PROPERTY OF L_FIELD 'Orientation' = 1.
  FREE OBJECT L_FIELD.

However, there is a subtotal for each country in the pivot table, I do not want them.

I know how to do it in Excel, but I cannot do in the ABAP OLE.

Need your advice.

Thanks,

Urchin

Hi, Experts,

I am using OLE to pass data to an Excel file and create pivot table.

I wrote the following to add a row in the pivot table:


  DATA: L_FIELD TYPE OLE2_OBJECT.
  CALL METHOD OF M_TABLE 'PivotFields' = L_FIELD
    EXPORTING #1 = 'Country'.
  SET PROPERTY OF L_FIELD 'Orientation' = 1.
  FREE OBJECT L_FIELD.

However, there is a subtotal for each country in the pivot table, I do not want them.

I know how to do it in Excel, but I cannot do in the ABAP OLE.

Need your advice.

Thanks,

Urchin

1 REPLY 1
Read only

Former Member
0 Likes
521

Done by using the "delete" function on the summarization row