‎2006 Feb 08 1:38 AM
Hi all,
I have se38 program. In this program I have an internal table with the declartion :
data : begin of itab occurs 0,
carrid like sflight-carrid,
connid like sflight-connid,
fldate like sflight-fldate
end of itab.
I want to display the data in this table in a smartform.
How do I specify it in form interface ?
Please drop in your ideas. Points for Sure........
Regards,
Varun.
‎2006 Feb 08 1:46 AM
Hi Varun,
I hope you have assigned your internal table to function module calling form.
Example:
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = ITAB
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF you want to assign your internable to tables under Global Settings -->form interface( You can define table type with respect to a table/structure avialable in system):
step1 : First Create a Zstructure(say ZTAB) via T/code SE11 same as your Itab.
Step2 :
Now go to smartform--> Form interface --> and assign.
Parameter = Itab
Type Assignment = LIKE
Associated type " Ztab.
Need any help . Let me know.
Lanka
‎2006 Feb 08 1:46 AM
Hi Varun,
I hope you have assigned your internal table to function module calling form.
Example:
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = ITAB
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF you want to assign your internable to tables under Global Settings -->form interface( You can define table type with respect to a table/structure avialable in system):
step1 : First Create a Zstructure(say ZTAB) via T/code SE11 same as your Itab.
Step2 :
Now go to smartform--> Form interface --> and assign.
Parameter = Itab
Type Assignment = LIKE
Associated type " Ztab.
Need any help . Let me know.
Lanka
‎2006 Feb 08 1:52 AM
Hi Lanka,
Your answer ghas solved my problem but I just want to know the difference in giving :
<b>ITab LIKE ZTAB</b> and <b>itab type ztab</b>
Please explain me the difference.
Regards,
Varun.
‎2006 Feb 08 1:55 AM
Hi Lanka,
In the loop I should Specify as itab into itab right ?
Reagards,
Varun.
‎2006 Feb 08 1:58 AM
Hi Varun,
This is simple :
If your program you have defined as internal table then it will take multiple entries then you have to use LIKE.
Examples : IT_EKPO like EKPO
If your program you have defined as table as work area then it will take single entry then you have to use Type.
Example : IT_EKKO TYPE EKKO.
Type reference always contains single value.
Hope this may help you.
Lanka
‎2006 Feb 08 1:59 AM
You can specify as itab into wa_itab where wa_itab is work area.
‎2006 Feb 08 2:01 AM
Hi varun,
Please define a work area at
Smartforms > Global settings> Global data -->
WA_Itab type Ztab.
then at loop or table --> Data --> ITAB to WA_ITAB.
Please remember to award points for helpful answers. Thanks.
Lanka
‎2006 Feb 08 2:16 AM
Hi varun,
Looks like your issue was resoved . Please close the post.
Lanka
______________________________________
Hi Lanka
Your answer ghas solved my problem but I just want to know the difference in giving :
ITab LIKE ZTAB and itab type ztab
Please explain me the difference.
Regards,
Varun.