Application Development 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: 

Smart forms

Former Member
0 Kudos

Hi all,

I have a requirement like this. I want to display materials details of table mara in the smart form.

I just started designing smartform. In the global definitions -> types I have given like this.

types : begin of i_mara,

matnr like mara-matnr,

ersda like mara-ersda,

ernam like mara-ernam,

pstat like mara-pstat,

end of i_mara.

And in the form interface under table I hav egiven like this :

i_mara type t_mara. But it gives me an error saying

<b>Form Interface : type t_mara does not exist.</b>

Can anybody please help me out with this.

Regards,

Varun.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Varun,

Dont write that in Form Interface.

Write it in Global definition-->Global data.

8 REPLIES 8

Former Member
0 Kudos

Hi Varun,

Please note that form interface tables are different than that you are defining in global data.

Form interface tables will be passing (Externallly) to function module(generated after activation of smartform).You will pass these tables to function module in Driver program.

Your definition of tables are local to smartform. these tables/types defined can be used with in samrtform.

Hope this may help you.

Example : IT_TAB and IT_EKKO will be added at form interface.

*--Call Function (Smart Form)

CALL FUNCTION LF_FM_NAME

EXPORTING

ARCHIVE_INDEX = TOA_DARA

ARCHIVE_PARAMETERS = ARC_PARAMS

CONTROL_PARAMETERS = LS_CONTROL_PARAM

MAIL_RECIPIENT = LS_RECIPIENT

MAIL_SENDER = LS_SENDER

OUTPUT_OPTIONS = LS_COMPOSER_PARAM

USER_SETTINGS = SPACE

I_HEADER = XMSEG

NAST = NAST

IS_REPEAT = REPEAT

W_BWART = W_BWART

W_BUDAT = W_BUDAT

V_TITLE = V_TITLE

IS_NAST = NAST

TABLES

<b> IT_DATA = IT_TAB

IT_EKKO = IT_EKKO</b>

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

Please reward points if this answers helps you.

Lanka

0 Kudos

Hi Lanka,

I have defined it in the form global definitions only. Not in the print program.I have given the navigation also in the query. In fact I did not even develop a print program.

Regards,

Varun.

0 Kudos

hi Varun,

Define tables at global definitions -> global data:

Examples : I_MARA type I_MARA at global data .

You can't do

-


by defining a table/structure at global data and to assign at form interface.

Lanka

0 Kudos

Hi lanka,

If possible can you send me any doc which explains me in detail how do I design a smart form and how do I specify the global definitions and form interface parameters.I know a little about scripts but this is really new to me.

I promise you that I will award you points without failure. I did also for all your previous answers.

Regards,

Varun.

0 Kudos

Hi Varun,

Rich is too fast and he already provided you some good docs. Sapgenie.com has some sample programs also.

SAP Standard sample forms : FIRSTTEST and SF_BC_TEST_PRINT

Need any help please let meknow.

Lanka

0 Kudos

Hi Varun,

Please provide your e-mail . I will send you a power point file on smartforms.

Lanka

Former Member
0 Kudos

Hi Varun,

Dont write that in Form Interface.

Write it in Global definition-->Global data.