2012 Dec 04 5:14 AM
Hi All,
We have a requirement to create an excel with dynamic data. We have designed the filling of a field symbol with dynamic values. But we are not able to display the same and a runtime error is appearing at I_OI_SPREADSHEET->INSERT_ONE_TABLE.
Here is our code:
CALL METHOD oref_spreadsheet->insert_one_table
EXPORTING
data_table = <gt_data>
rangename = 'TAB1'
no_flush = ' '
wholetable = 'X'
IMPORTING
error = oref_error.
Here I am not exporting DDIC_NAME as the structure is dynamic.
Can somebody please help me out?
Thanks a lot in advance!!
2012 Dec 04 7:53 AM
Hi All,
I found that we can export FIELDS_TABLE with the fields present in the data structure to achieve this. But, when I used DP_GET_FIELDS_FROM_TABLE, I am not getting fieldnames but getting numbers as 1, 2, 3.....
CALL FUNCTION 'DP_GET_FIELDS_FROM_TABLE'
TABLES
data = <gt_data>
fields = gt_fields
EXCEPTIONS
DP_INVALID_TABLE = 1
OTHERS = 2.
However, when I export gt_fields to INSERT_ONE_TABLE, data is being displayed only for a few and a few are blanks.
Can somebody help me out?
2012 Dec 04 7:53 AM
Hi All,
I found that we can export FIELDS_TABLE with the fields present in the data structure to achieve this. But, when I used DP_GET_FIELDS_FROM_TABLE, I am not getting fieldnames but getting numbers as 1, 2, 3.....
CALL FUNCTION 'DP_GET_FIELDS_FROM_TABLE'
TABLES
data = <gt_data>
fields = gt_fields
EXCEPTIONS
DP_INVALID_TABLE = 1
OTHERS = 2.
However, when I export gt_fields to INSERT_ONE_TABLE, data is being displayed only for a few and a few are blanks.
Can somebody help me out?
2012 Dec 04 11:01 AM
Problem was somewhere else in the program. Not related to OLE.