cancel
Showing results for 
Search instead for 
Did you mean: 

smart form problem - form interface issue

former_member632991
Active Contributor
0 Kudos

Hi,

I have a problem in smartform related to form interface .

I have to pass my internal table into the smartform which is not of any standard type.

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'

P_VBELN = P_VBELN

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

<b>T_FINAL = T_FINAL</b>

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5

.

this T_FINAL is not of any standard type and i have to pass this in the smartform i

But in the smartform , where can i declare this internal table. i have written this in the tables TAB in form interface but I cannot declare this table type in the type definition in smartform, please suggest me.

Regards,

Sonika

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sonika,

I do also faced the same problem.

How I made changes:-

My Final internal table is t_final and am passing this internal into the smartform.

T_final is declared in print program as given below:-

      • Create one Structure zfinal_data*****

t_final TYPE STANDARD TABLE OF zfinal_data,( "Z" Structure created )

CALL FUNCTION w_fmname

EXPORTING

w_header = w_header

w_adrc = w_adrc

w_adrc_forw = w_adrc_forw

w_adrc_comp = w_adrc_comp

TABLES

t_final = t_final

EXCEPTIONS "#EC *

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4.

Then in the FORM interface in "Tables" Tab

declare - t_final "like" zfinal_data...

Try this it may solve ur problem

regards

Avi...........

Answers (4)

Answers (4)

Former Member
0 Kudos

hi sonika,

u can define an internal table in form intreface. the only thing u can define a structure in SE11 of Z series...and define all the fields which u had define in that particular internal table....

when you will define the internal table in smartform define with type of Zseries structure...thats all

Regards

Prashant

Former Member
0 Kudos

Hi ,

See this program like this u can declare the internal table and pass it.

REPORT ZTACA_DRIVER_SMARTFORM .

Tables : sflight.

Data : fm_name TYPE rs38l_fnam.

*data : Begin of it_flttab occurs 0,

  • carrid type sflight-carrid,

  • connid type sflight-connid,

  • fldate type sflight-fldate,

  • seatsmax type sflight-seatsmax,

  • seatsocc type sflight-seatsocc,

  • End of it_flttab.

data : it_flttab like table of sflight.

Data : g_salary type i .

  • it_flttab type standard table of ty_flt.

g_salary = 1000.

select carrid connid fldate seatsmax seatsocc from sflight into

corresponding fields of table it_flttab.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZTACA_SMFORM2'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = fm_name

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

call function fm_name

Exporting

salary = g_salary

TABLES

it_flttab = it_flttab

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5 .

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Rgds,

P.Naganjana Reddy

former_member632991
Active Contributor
0 Kudos

Hi,

Here u have declared the internal table as of standard structure sflight and not of customized internal table.

Regards,

Sonika

Former Member
0 Kudos

hi Sonika

you can't pass an internal table to the smartform if it's not of any standard type..first, you have to create a structure in se11 (which will have the fields with which your itab is build), then in the smartform --> form interface --> tables declare itab like the structure created in se11...then, when you call the fm

you will be able to pass the itab...this will work..

CALL FUNCTION fm_name

EXPORTING

TDLINE = TDLINE

TABLES

INT_HEAD = INT_HEAD

INT_OPER = INT_OPER1

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS

here, int_head and int_oper1 are itabs that refer two z structures that's created in se11 adn declared in the tables tab in the form interface--> tables..

revert back for queries..

reward if helpful,

Sahish. R

Message was edited by:

Sathish R

Former Member
0 Kudos

Hi Sonika,

u can try madam u will get it plz declare the internal table in the global defination.

Rgds,

P.Naganjana Reddy

former_member632991
Active Contributor
0 Kudos

Hi,

I have tried that but its of no use since form interface are accessed before the global definition are declared as u can see in smartform flow.

Regards,

Sonika

Former Member
0 Kudos

Hi Sonika,

Did u declare the internal table in global definations there is option global data in that u have to declare the internal table name and the corresponding associate type name . u have to choose the types option in there u declare the inernal table names.

When u r defining the loop u must pass the workarea and the interal table type.

Syntax for that: i_ekko type wa_ekko.

******Hope this will resovle ur problem.

*********Rewards points for all helpful answers.

Rgds,

P.Naganjana Reddy

former_member632991
Active Contributor
0 Kudos

Hi Palle,

i have to pass internal table in form interface and that i cannot declare that in Global definition, I have tried that.

Regards,

Sonika