cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms

Former Member
0 Kudos

Dear experts,

I am just clean bowled here.

I am trying to workout smartforms.

I designed a page ,there is a logo some letter kind format which follows printing few records from makt,lfa1.

Uptill here i achieved.

Now i thought if i store all summaries in an internal table

ex i_sums.Then i pass i_sums to functionmodule of smartform.

But this doesnot happen.When i execute,i get the print window but as soon as i see preview

it says Reference field I_FETCHSUMS-SUMA is unknown.

I have tried very hard but could not get.

On my part i created structure object

like

ZDEC

SUMA bseg-dmbtr

SUMB bseg-dmbtr

.

.

.

SUMG

Now when i defined this structure ,it failed to activate and i was

required to enter Reference currency fields manually

like here in this case was T001-Waers.

The moment i did, it activated.

But smartforms doesnot show me output and i get

Reference field I_FETCHSUMS-SUMA is unknown.

I have defined looping of internal table I_FETCHSUMS = I_SUMS and I_SUMS is passed through main report to functionmodule.

All other cases work not particularily this.

Where i am wrong ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Aditya,

Declare the reference fields for currency/ quantity in your smartform> global definitions> currency/quantity tab

this should solve your issue

regards

padma

Answers (4)

Answers (4)

Former Member
0 Kudos

hey aditya,

you have to declare your work area fields in the global definitions / currency quantity fields tab.

just give the work area field name ex ( wa_sums-suma) in the field name column

and then in data type column select if it is currency or quantity.

This is will surely solve your problem.

Hope this helps

reward if useful.

regards,

RK

Former Member
0 Kudos

Aditya ,

You have done every thing fine. But as Pratik mentioned jus check those what he mentioned.

Fine let me tell you my sugessions on this.

See you must be having a print program for this check whether in your smart forms dynamic call function module you must be seeing something like this

CALL FUNCTION C_FUNCTION

EXPORTING

control_parameters = w_ctrlop

output_options = w_compop

user_settings = 'X'

IMPORTING

job_output_info = w_return

TABLES

i_sum = i_sum

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.

So now you have got your tables in call function.

In smartforms:

1)You must be holding this I_sum in tables of form interface.

i_sum like Zstructure/table name.

2)In global definitions you must be creating work area

wa_sum type zstructure/table name.

3)what you do is check if your zstructure holds waers key field or if you did not create a waers field then create it in Ztable/structure.

4)Now in your Global defintions goto tab Currency/Quantity fields Give your field name some thing like this i_sum-<field name(dmbtr)> reference field as i_sum-waers and data type as CURR.

5) As you passed your fields in your table->row->cell->text element. &i_sum-<field name>(dmbtr)&.

Now activate your form check whether any warnings are shown.

Regards

Swetha

Edited by: Swetha on Jul 24, 2008 10:39 AM

Former Member
0 Kudos

Hi,

first u create a structre in data dictionary with what ever u wanted fields. then define a internal table with this structure also declre the

same table in import parameter of of the smart form.

hope this will help to you.

Former Member
0 Kudos

hi

if u want to pass an internal table to a smartform then u got to have that structure defined in the data

dictionary(if it is not already defined). use this structure to define the required internal table in driver program as well as in the tables section of the forms interface of the smartform. in smartform u define in tables section as:

i_fetchsums like <dictionary structure>

u then pass this itab from driver to form as u normally do....also if u have currency and quantity fields in the smartform (work area/ variable ...whatever), u need to declare them in reference currency fields manually..as u did....if u dont ..u will get a formatting error..

hope this solves ur prob....