‎2012 Dec 15 7:39 AM
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
‎2012 Dec 17 4:45 AM
‎2012 Dec 17 4:45 AM
‎2012 Dec 17 12:26 PM
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
‎2012 Dec 17 1:06 PM
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.
‎2012 Dec 17 1:06 PM
You should have the same type in import parameter of the function module. check it.
‎2012 Dec 18 4:47 AM
‎2012 Dec 18 6:00 AM
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
‎2012 Dec 18 7:11 AM
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.
‎2012 Dec 18 7:23 AM
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
‎2012 Dec 18 7:44 AM
‎2012 Dec 18 8:08 AM
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
‎2012 Dec 18 8:19 AM
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.
‎2012 Dec 19 9:53 AM
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
‎2012 Dec 19 10:59 AM
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