2008 Jul 26 10:51 AM
Hi All,
I have created a dynamic internal table but when i try to execute the program it is giving me the following error
LOAD_PROGRAM_NOT_FOUND and
CX_SY_PROGRAM_NOT_FOUND.
Can anyone tell me a solution for this
Thanks
Chaitanya Swaroop
Hi All,
I have created a dynamic internal table but when i try to execute the program it is giving me the following error
LOAD_PROGRAM_NOT_FOUND and
CX_SY_PROGRAM_NOT_FOUND.
Can anyone tell me a solution for this
Thanks
Chaitanya Swaroop
2008 Jul 26 10:57 AM
2008 Jul 26 10:58 AM
There is some problem with your coding. Check it once. Or else show the code once.
cehck the sample code.
REPORT zdynamic.
FIELD-SYMBOLS: <l_table> TYPE table,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
DATA: is_lvc_cat TYPE lvc_s_fcat,
it_lvc_cat TYPE lvc_t_fcat.
DATA: new_table TYPE REF TO data,
new_line TYPE REF TO data.
START-OF-SELECTION.
is_lvc_cat-fieldname = 'KUNNR'.
APPEND is_lvc_cat TO it_lvc_cat.
is_lvc_cat-fieldname = 'NAME1'.
APPEND is_lvc_cat TO it_lvc_cat.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_lvc_cat
IMPORTING
ep_table = new_table.
*Create a new Line with the same structure of the table.
ASSIGN new_table->* TO <l_table>.
CREATE DATA new_line LIKE LINE OF <l_table>.
ASSIGN new_line->* TO <l_line>.
DO 2 TIMES.
ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <l_line> TO <l_field>.
<l_field> = sy-index.
ASSIGN COMPONENT 'NAME1' OF STRUCTURE <l_line> TO <l_field>.
<l_field> = 'A'.
INSERT <l_line> INTO TABLE <l_table>.
ENDDO.
LOOP AT <l_table> INTO <l_line>.
WRITE:/ <l_line>.
ENDLOOP.
READ TABLE <l_table> INTO <l_line> INDEX 2.
<l_line>+10(2) = 'B'.
MODIFY <l_table> FROM <l_line> INDEX 2.
LOOP AT <l_table> INTO <l_line>.
WRITE:/ <l_line>.
ENDLOOP.
2008 Jul 26 11:19 PM
Hello Chaitanya
You may want to have a look at my Wiki posting [Creating Flat and Complex Internal Tables Dynamically using RTTI|https://wiki.sdn.sap.com/wiki/display/Snippets/CreatingFlatandComplexInternalTablesDynamicallyusingRTTI]
Regards
Uwe
2008 Aug 15 10:08 AM
Hi,
I get a similar problem. It depends on what field-catalog fields I populate!
If I give field-catalog values for fieldname, ref_field and ref_table, then the method CREATE_DYNAMIC_TABLE short-dumps with
Runtime errors LOAD_PROGRAM_NOT_FOUND
Exception CX_SY_PROGRAM_NOT_FOUND
Program " " not found.
If I give field-catalog values for fieldname and rollname (which logically ought to be enough), then there is no short dump, but all the fields of the internal table seem to be character fields of length 10.
Frustrating.
Shot in the dark: we have virtualized servers - any chance that could be relevant?
John
2008 Aug 15 10:54 AM
Hi again,
My problem (described in my previous post to this thread) was solved by restricting field-catalog assignments to fieldname, inttype, intlen and, where appropriate, decimals. No short dump now.
Can't explain this.
John
2011 Dec 31 10:11 PM
I'd same problem due to duplicate field names in dynamic internal table being created. so when I deleted duplicate entries from lt_components, it worked.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |