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

How pass Internal table in Smartforms whose structure is deep structure

Former Member
0 Likes
11,088

Hey All,

I have a requirement of creating internal table whose structure is deep structure and pass it to smartform, So in se11 i have created a structure that has 10 components, all the components are normal fields except one 'TAG_NO'. The field tag_no is an internal table. Since our Structure has one component has internal table it is deep structure. Below are the of screen shots of structure that i have created in se11.

Using the above structure i have created an internal table in my driver program, in which all the data is getting inserted. In my driver program i have defined it in function module that pass the parameters & table to the smartform. I don't have any problem in driver program every thing is running fine.

The problem arise when i am trying define it in form interface of smartform. It display an error message " ONLY TABLE TYPES MAY BE USED AS THE REFERENCE TYPE FOR A TABLE PARAMETERS". I have used TYPE, LIKE & TYPE REF TO in type assignment column but no use.

It is my humble request to help me in this.

Thanks & Regards

Faiz Khan

1 ACCEPTED SOLUTION
Read only

Sijin_Chandran
Active Contributor
0 Likes
10,452

Hi Faiz ,

Declare a Table Type in SE11 with same as ZPEI_QUOTE_HDRDATA_01.

And use the same for table for declaration in form interface.

Actually ZPEI_QUOTE_HDRDATA_01 is a structure and IT_HEADER in Form interface need to be declared with a table type.

13 REPLIES 13
Read only

Sijin_Chandran
Active Contributor
0 Likes
10,453

Hi Faiz ,

Declare a Table Type in SE11 with same as ZPEI_QUOTE_HDRDATA_01.

And use the same for table for declaration in form interface.

Actually ZPEI_QUOTE_HDRDATA_01 is a structure and IT_HEADER in Form interface need to be declared with a table type.

Read only

0 Likes
10,451

Hello Sijin Sij,

Thanks for your responses, i have done as you said and error is removed but when i execute the program through va02 / va03 run-time error is coming. below is screen shot.

I also made changes in program i.e. before i defined internal table as type of structure zpei_quote_hdrdata_01 but now i have defined it has table type zpei_quote_hdrdata_011.

after making this changes in program i am getting error's,

i think some where i have defined wrong types.

Thanks & regards

Faiz Khan

Read only

0 Likes
10,451

hi,

is ZPEI_QUOTE_HDRDATA_011 table type?

if yes then declare like

data:table_hdr type ZPEI_QUOTE_HDRDATA_011.

might bcz of this wa_hdr become internal table,,,,,,

try by changing,,.

regards.

Lingaraj.

Read only

0 Likes
10,451

You should have the same type in import parameter of the function module. check it.

Read only

0 Likes
10,451

Hi Faiz ,

You have done the declaration of WA_HDR wrong I guess.

Can you paste or tell how you have declared WA_HDR ?

Declare it like thi

WA_HDR TYPE <ASSOCIATEDTYPE>

Read only

0 Likes
10,451

Hey Aswatha,

Your are correct the error was coming because of difference in type, but when i change it to the type of  table type i am getting error in driver program as i stated in my above post. I am not able to understand why my work area wa_hdr become internal table.

Thanks & Regards

Faiz Khan

Read only

0 Likes
10,451

Hey every where declare internal table with table type of ZPEI_QUOTE_HDRDATA_011 and work area with type ZPEI_QUOTE_HDRDATA_011.  check if you are declaring as same.

Read only

0 Likes
10,451

Hey Sijin sij,

I have done following things:

created structure zpei_tab_no_str that has only one field "TAG_NUM" for tag no's.

  

using above structure i have created a table type zpei_tab_no.

created one more structure zpei_quote_hdrdata_01 that has 10 fields. All the fields are of normal type except "TAGNO", the component type of this field is zpei_tag_no so this field act as an internal table in structure zpei_quot_hdrdata_01.

in my driver program i have created a internal table and corresponding internal table and all the data is inserted in it and passed to function module.

in form interface & global dfinitions of smartform i have created an internal  table and corresponding work area.

when i try to activate i get error.

I have done this all procedure before you told to create table type and define internal table in smartform as table type. To do what u said me i have created:

table type zpei_quote_hdrdata_011 by including structure zpei_quote_hdrdata_01.

defined internal table and work area in sf as table type.

the error got resolve, but when i tried to run program through va02/va03 i got abap dump.

to remove this abap dump, in my program i defined internal table "table_hdr" of table type and when i tried to activate the program system displayed below error, i am not able to understand why my work area wa_hdr become internal table.

pls help me to resolve the above error. if you want you can mail me step or procedure to faizkhanabap@gmail.com

Thanks Regards

Faiz Khan

Read only

0 Likes
10,451

Hi Faiz ,

Have you tried with

WA_HDR TYPE <ASSOCIATEDTYPE>

Read only

0 Likes
10,451

Hey sijin sij,

I have tried that also it is given erroe in smartform when i try to check.

the error is "wa_hdr is a table without a header line and therefore has no component called qty.

thanks & regards

Faiz Khan

Read only

0 Likes
10,451

Just check standard smartform and driver program for invoice processing :

Smartform Name : LB_BIL_INVOICE

Driver Program Name : RLB_INVOICE

In these if you see form interface of parameter IS_BIL_INVOICE, this contains deep structure inside its lots of tables and other parameters are filled, this is refering normal Structure type : LBBIL_INVOICE which extend deep to hold various table type, so no need to pass that in Tables parameter, just create a normal import parameter and pass it from Driver program to smartform.

Read only

0 Likes
10,451

Hey Gagan,

I have already checked and what u said is correct but i want to pass internal table of deep structure type.n pls help if you have any idea.

Thanks & Regards

Faiz Khan

Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
10,451

Hi Faiz Khan

Check the Structure SSFCOMPOP

This will be use in all smartform driver programs

it has a deep structure.

You can check how the data is passed to this strucutre

It will be like table-table-field = value.

Hope this helps