cancel
Showing results for 
Search instead for 
Did you mean: 

error in passing internal table to smartform

Former Member
0 Kudos

I have created a structure type in the driver program as below.

tYPES : BEGIN OF gy_final,

matnr TYPE mara-matnr,

ersda TYPE mara-ersda,

ernam TYPE mara-ernam,

laeda TYPE mara-laeda,

mtart TYPE mara-mtart,

matkl TYPE mara-matkl,

meins TYPE mara-meins,

lgort TYPE mard-lgort,

werks TYPE mard-werks,

END OF gy_final.

Then i created internal table and its work area of the above structure type as below

data: it_final type STANDARD TABLE OF gy_final,

wa_final type gy_final.

I fetched the records in to the internal table it_final.

Now i wanted to pass this in to smartform.

nasi

CALL FUNCTION 'fname'

EXPORTING

it1_final = it_final.

I have created a similar structure in DDIC and declared in the smartform

still it shows the error

The following syntax error occurred in program "/1BCDWB/SAPLSF00000239 " in

include "/1BCDWB/LSF00000239F01 " in

line 669:

""IT_FINAL" is neither specified under "TABLES" nor is it defined as an"

" internal table."

" "

Please help me to sove this issue.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Thank u all for ur valuable suggestion.It get solved.

Former Member
0 Kudos

Hi,

create table node in smartforms and where you need to pass your internal table and work area.. then get the generated function module and call that function module in your driver program.... otherwiese use function module SSF_Fuction_module_name and pass form name as a parameter to this fumction module it will give you the generated function module name and then call it inyour driver program..

Hope this will help you..

Regads,

Kiran

Former Member
0 Kudos

I have tried this tooo

data: it_final type STANDARD TABLE OF <STRUCT DDIC>,

wa_final type <STRUCT DDIC>.

And i declared in the table interface of smartform.

Karthik , can u make it clear to me.

I am stuck in my work,plzzz help

still the same error.

Naseema

Former Member
0 Kudos

In form interface -> go to tab TABLE then declare as IT1_FINAL LIKE <structure DDIC>.

And i think when call form it should:


CALL FUNCTION 'fname'
TABLES
it1_final = it_final.

Regards,

Edited by: Thien M. Pham on Sep 15, 2010 3:28 PM

Edited by: Thien M. Pham on Sep 15, 2010 3:29 PM

Edited by: Thien M. Pham on Sep 15, 2010 3:30 PM

Former Member
0 Kudos

Hi..

Create a structure and table type with fields you are using, as described in above posts.

Then declare your internal table in Form Interface-> Tables as "itab TYPE <table_type>".

Regards,

Karthik

Former Member
0 Kudos

Hi Karthik,

can u make clear the steps for me. i hav tried all the way

i have created a structure in se11 of the same format of my program internal table. where should i declare the table type in smartform, whether in form interface-parameters tab or in table tab.

na

Former Member
0 Kudos

Hi..

Follow the below steps:

1. Create structure in SE11 say Z_STR.

2. Create a Table Type say Z_TAB_TYP in SE11 using the above created structure.

In Smartform:

3. Declare your internal table which is passed from program to smartform in FORM INTERFACE -> TABLES

as IT_TAB TYPE Z_TAB_TYPE

4. Declare your work area in Global definitions -> Global data.

In prgram :

5. Declare <internal table> type standard table of Z_STR.

6 Declare <work area> type Z_STR.

Hope things are clear now.

Karthik

Former Member
0 Kudos

Hi,

Instead of declare types in your driver printing:

data: it_final type STANDARD TABLE OF gy_final,

wa_final type gy_final.

use structure type that you define in DDIC:


data: it_final type STANDARD TABLE OF <STRUCT DDIC>,
wa_final type <STRUCT DDIC>.

regards,

Former Member
0 Kudos

in your form you are using IT_FINAL. this one is neither declared via tables, types, or form interface.