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

Debugging- dynamic internal table code

Former Member
0 Likes
1,095

Hello All,

This code (please scroll down) runs perfectly but when I replace this

select statement

select * from ZINPUT into table it where FIELD = 'RSAABAP'.

to this select statement

select * from ZINPUT into table it.

Then i get error.Error is 'Load_program_not_found'. I am stuck with this. Can somebody reason out why?

Thanks

Karthik

-


REPORT ZSIMPLE9 message-id zz NO STANDARD PAGE HEADING

LINE-SIZE 178 LINE-COUNT 65.

************************************

data it like ZINPUT occurs 23 with header line.

*data it1 like DD03L ccurs 170 with header line.

data p_tab(30) type c.

********************************************

type-pools: slis.

field-symbols: <dyn_table> type standard table,

<dyn_wa>,

<dyn_field>.

data: alv_fldcat type slis_t_fieldcat_alv,

it_fldcat type lvc_t_fcat.

type-pools : abap.

data : it_details type abap_compdescr_tab,

wa_details type abap_compdescr.

data : ref_descr type ref to cl_abap_structdescr.

data: new_table type ref to data,

new_line type ref to data,

wa_it_fldcat type lvc_s_fcat.

selection-screen begin of block b1 with frame title text .

data p_table(30) type c.

*******************************************************

  • SELECT STATEMENT

select * from ZINPUT into table it where FIELD = 'RSAABAP'.

*****************************************************

loop at it. " Endloop statement for this loop found at the end of the program

p_table = it-FIELD.

  • Get the structure of the table.

ref_descr ?= cl_abap_typedescr=>describe_by_name( p_table ).

it_details[] = ref_descr->components[].

loop at it_details into wa_details.

clear wa_it_fldcat.

wa_it_fldcat-fieldname = wa_details-name .

wa_it_fldcat-datatype = wa_details-type_kind.

wa_it_fldcat-inttype = wa_details-type_kind.

wa_it_fldcat-intlen = wa_details-length.

wa_it_fldcat-decimals = wa_details-decimals.

append wa_it_fldcat to it_fldcat .

endloop.

  • Create dynamic internal table and assign to FS

call method cl_alv_table_create=>create_dynamic_table

exporting

it_fieldcatalog = it_fldcat

importing

ep_table = new_table.

assign new_table->* to <dyn_table>.

  • Create dynamic work area and assign to FS

create data new_line like line of <dyn_table>.

assign new_line->* to <dyn_wa>.

  • Select Data from table.

select * into table <dyn_table>

from (p_table).

  • Write out data from table.

loop at <dyn_table> into <dyn_wa>.

do.

assign component sy-index of structure <dyn_wa> to <dyn_field>.

if sy-subrc <> 0.

exit.

endif.

if sy-index = 1.

write:/ <dyn_field>, ';'.

else.

write: <dyn_field>, ';'.

endif.

enddo.

endloop.

endloop.

1 ACCEPTED SOLUTION
Read only

sridharreddy_kondam
Active Contributor
0 Likes
937

Hi Krishna,

>> Load_program_not_found

According to SAP notes <b>874480</b>

Symptom

Table TCOLL contains entries that are invalid for Basis Release 6.40.

Other terms

TCOLL, COLL_RNAME, SWNCCOLL, SWNCREORG, SWNCTOTAL, RSAMON40

Reason and Prerequisites

There are incorrect entries in the table TCOLL.

Solution

Import the relevant Support Package or make the entries in table TCOLL as described in Note <b>12103</b>.

<b>Alternative solution:</b>

Remove the entries in the table TCOLL for the following reports:

- SWNCCOLL

- SWNCREORG

- SWNCTOTAL

<b>Add the following reports:</b>

- RSSTAT83

- RSSTAT87

If necessary, remove the entry for the report

- RSAMON40

since it is not started using TCOLL in the standard system. It is essential that you now check the contents of the table TCOLL again, as described in Note 12103.

Follow this and u will solve the problem..

Regards,

Sridhar

7 REPLIES 7
Read only

Former Member
0 Likes
937

Info about the Table ZINPUT

ZINPUT has only one field containing list of SAP TAbles

like

FIELD

-


RSAABAP

RSAIO

RSAREP

...

...

Read only

0 Likes
937

Hi Karthik!

Let's do this step by step:

1) change the source code (in SE38).

2) activate the report

3) start a new session, (/nSE38 or /oSE38)

4) start your report, fill your selection screen

5) run your program

In which step exactly do you get the error message?

Regards,

Christian

Read only

0 Likes
937

Hello Karthik,

There may some small bug in your code.

Could you please check this part.

Inside the method

CREATE_DYNAMIC_TABLE >LVC_TABLE_CREATE>ALV_TABLE_CREATE>fb_table_create>

At this point u put the break-point and see what is the value of the variable l_message.

You will get the exact problem in ur code in this message variable

case sy-subrc.

when 0.

when 9.

raise generate_subpool_dir_full.

when others.

message x000(0k) with l_message l_line l_word.

endcase.

*<<< Y9CK026407

if r_oo_class is initial.

perform (l_form) in program (l_name).

else.

perform (l_form) in program (l_name) using r_oo_class.

endif.

endform. " FB_TABLE_CREATE

Hope this will be helpful for u.

Don't forget to reward the points.

Regards,

Vasanth

Read only

Former Member
0 Likes
937

Hello Christian,

Thx for that reply. Syntactically the program is right.

I get the problem when i run the code. the code runs with single p_table entry. but doesn't run with multiple p_table entries. getting error LOAD_PROGRAM_NOT_FOUND.

rgds

Karthik

Read only

sridharreddy_kondam
Active Contributor
0 Likes
938

Hi Krishna,

>> Load_program_not_found

According to SAP notes <b>874480</b>

Symptom

Table TCOLL contains entries that are invalid for Basis Release 6.40.

Other terms

TCOLL, COLL_RNAME, SWNCCOLL, SWNCREORG, SWNCTOTAL, RSAMON40

Reason and Prerequisites

There are incorrect entries in the table TCOLL.

Solution

Import the relevant Support Package or make the entries in table TCOLL as described in Note <b>12103</b>.

<b>Alternative solution:</b>

Remove the entries in the table TCOLL for the following reports:

- SWNCCOLL

- SWNCREORG

- SWNCTOTAL

<b>Add the following reports:</b>

- RSSTAT83

- RSSTAT87

If necessary, remove the entry for the report

- RSAMON40

since it is not started using TCOLL in the standard system. It is essential that you now check the contents of the table TCOLL again, as described in Note 12103.

Follow this and u will solve the problem..

Regards,

Sridhar

Read only

Former Member
0 Likes
937

Hi Reddy,

The Tcoll table already has the entries which u have specified. I Just checked.

Rgds

Karthik

Read only

Former Member
0 Likes
937

Hello all,

Thanks for ur spending your time on reading my big code.

all the code needed was

'clear it_fldcat.' Now the code works fine!!

Thanks again!

Karthik