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

Smart Forms - Form Interface

Former Member
0 Likes
847

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
823

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

7 REPLIES 7
Read only

Former Member
0 Likes
824

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

Read only

0 Likes
823

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.

Read only

0 Likes
823

Hi Lanka,

In the loop I should Specify as itab into itab right ?

Reagards,

Varun.

Read only

0 Likes
823

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

Read only

0 Likes
823

You can specify as itab into wa_itab where wa_itab is work area.

Read only

0 Likes
823

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

Read only

0 Likes
823

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.