Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
burakcansarpel
Explorer
0 Kudos
1,400
Hi Everyone,

In previous versions, we were able to give the column names numerical or custom expression for the reports, but the structure of this has changed a bit with hana. If we give the column names numerically or letter , we may get an error while downloading excel in IDA ALV.

Now, if you have kept the structure of the tables used in the report with 'DDIC' as a standard, column names should only start with a letter.But I will suggest a practical solution for this. If you encounter this error like me, you can continue with my method.

 

For example, I created a structure from transaction code 'SE11'. Some of these structure components start with numbers.


SE11 Structure


 

In such cases, if you directly name this structure as the type of the table with this structure, you will get a dump. This is because it appears as a 'DDIC' data type. In ALV_GRID structures ( for example IDA_ALV ) it cannot start with a number if 'DDIC' is a structure.

 


Standart Program Column Name Check


 

If you encounter an error like below (dump). You can solve this error in your reports with the way I suggest.

Example Dump


Image


If you are getting this error in IDA ALV , it is because it is checking whether your data type( structure or table type ) is in 'DDIC' as in 'Image2'. If your data type( structure or table type ) is 'DDIC' and the column name in this data type starts with something other than letter, you will get a dump.


Image2


 

As a solution to this, I made a simple change as follows.

 
BEFORE

DATA : gt_output TYPE zbc_s_t0007.
By the way 'zbc_s_t0007' ddic structure( se11 )

CALL METHOD go_alvgrid->set_table_for_first_display
CHANGING
it_outtab = gt_output
it_fieldcatalog = gt_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.


After

TYPES : BEGIN OF tt_s0007.
INCLUDE TYPE zbc_s_t0007.
TYPES : END OF tt_s0007.

DATA : gt_output TYPE TABLE OF tt_s0007,

CALL METHOD go_alvgrid->set_table_for_first_display
CHANGING
it_outtab = gt_output
it_fieldcatalog = gt_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.

( The 'GT_OUTPUT' table contains the on-screen data for the report. )

In this way, column names can start with numbers and can be downloaded to excel.

 

I made the above correction in my own report. Here I used the ALV_GRID structure and got an error because the column names start with numbers. I then fixed this as I mentioned above. If you do, your data type will not be detected as a 'DDIC' structure. This allows you to start column names with numbers.You will also experience this error when exporting the data in the report to excel. The solution to this problem is the same (tried).

I hope it has been informative and a logical solution to the error you encountered. Waiting for your comments and questions.

 
2 Comments
Labels in this area