cancel
Showing results for 
Search instead for 
Did you mean: 

pass data from z report to smartforms

Former Member
0 Kudos

Hi expert,

i have a zreport for display internal order. in this zreport, i create a table(ATAB) contain data of internal order header from coas t003p and other table.

now i want to pass this ATAB to smartforms. i got example smartforms and zreport with similar to mine's case but no instruction or advice from my boss. so, i try to read many previous thread about this for advise. but still confuse with many thing.

anyone can explain to me.

what is function of each tab in "form interface" , "global definition" .

what is "types" tab in global definition (in example zreport i receive also has declare type to what is relation of this ).

what i must create and declare in form interface , global definition.

what is difference and meaning of "type" , "type table of" , "like" in Type assignment

Regards.

Kittisak.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi..

Here is some info about your queries.

Form interface: Using this u can pass data from Print program to Smart Form.

Global definition: once toy declare data objects in this tab, u can access those data objects throughout the smart form.

Types: under this tab u can declare types for further usage like to declare internal tables, work areas etc.

In form interface you can export r import variables n tables.

In Global definitions u can define variables and internal tables those u want to use in program.

Type clause: using this u can define variables and work areas

Type table of : using his u can define internal table using standard tables r types declared in u2018TYPESu2019 tab exist in global definitions.

thanks

KP

Answers (9)

Answers (9)

Former Member
0 Kudos

Hi,

Perform the following to use ztables in smartforms.

1. Create a datatype for your ztable in se11.

2. In the tables tab under form interface create ,

itab type datatype

3.In the smartform create tables and specify there

itab type wa.(wa defined in global definition->global data)

4.Similar to the system fields drag and drop the fileds in the table and use it from the field list.

Hope this is useful.

Regards,

Deepthi.

Former Member
0 Kudos

Hi kittisak,

Refer this wiki the flow of the data between the print program and the smartform.

https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/printing+invoices

Regards,

Sravanthi

tushar_shukla
Active Participant
0 Kudos

This message was moderated.

gastn_jareo
Active Participant
0 Kudos

I sugest you to create two things on data dictionary by SE11 transaction:

1) A structure as data type, structure (let's call it ZLINE) with the structure of an ATAB line.

2) A Z internal table type as data type, table type (let's call it ZTABLE) based on the previous Z structure as a line.

Then you can use on the program the ZTABLE type to define ATAB and ZLINE type to a work area for ATAB. You can also use ZTABLE type on SMARTFORM interface to define a new parameter and ZLINE type to define a workarea. In both cases you should define the parameter on Form Interface, Import and you should use TYPE (TYPE REF TO is used to object references, in object oriented programming). Don't use Tables if you work like this as ZTABLE is already a table, if you use tables you'll have a table of tables.

Hope it helps!

Former Member
0 Kudos

Hi,

In global defination 'types' tab is used to define all structures that u want to use in your smartform.

in 'initialization declare' all internal tables , work area , select queries and constants which u are using.

in 'global data define' the data which u want to use throughout the smartform.

if u are using ny field symbol then declare it in 'field symbols' tab.

in 'form routine' all forms are used that u declared in initialization.

all currency and quantity related field names come into tab 'currency/quant. fields'.

form interface is basically used when u are using a driver program associated to ur smartform.

for seeing difference b/w type, type table of and like use F1 help.

hope this will help.

regards

saurabh

Former Member
0 Kudos

hi study this document u'll be much more comfortable working with smartforms

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf

кu03B1ятu03B9к

Former Member
0 Kudos

hi Kittisak,

Global Data Declarations : The Data defined here can be used throughout the smartform for coding purposes.

Form Interface : Here all the data which will be passed to the smartform from the Print program is defined.

use F1 for your help.

thanks

Sachin.

Former Member
0 Kudos

u can do smartforms in 2 ways......

1..defining every thing in smartform itself...(no need of driver program).

here global definition(it is like that of declaration part ) and initilization tab (program coding can did here) will be used

2..combination of form and driver program.

here FORM INTERFACE is used, it is pass data from driver program to form and interacting with tables...

Former Member
0 Kudos

Hi

Declare the ATAB in FORM interface as tables when you call the FM of the smartforms, it will call this ITAB and pass the ATAB to it

download this document for more info

abapguide.com/uploads/2007/12/smartform-tutorial.pdf

Regards

Shiva