2006 Jun 07 10:13 AM
Hi All..
I designed a smartform & print Pgm.( for Invoice not SAP standard)
How can i send multiple table(kna1,vbrk,vbrp,vbdk) data in to a smart form? & how can i declare that internal table in smart form & in print pgm?
And it is also not printing.even i set it in NACE.
Plz any one can help me asap..
Thanks & Regards
Raj
Hi All..
I designed a smartform & print Pgm.( for Invoice not SAP standard)
How can i send multiple table(kna1,vbrk,vbrp,vbdk) data in to a smart form? & how can i declare that internal table in smart form & in print pgm?
And it is also not printing.even i set it in NACE.
Plz any one can help me asap..
Thanks & Regards
Raj
2006 Jun 07 10:41 AM
Hello Raj.
There are many method to send the data from diff-2 table from the database table.
1. U will join in the print program and pass the internal table using smartform function module.
( if you wanted the commann information.
You can also pass as many single internal table as a parameter of the SSF fucntion module parameters.
or
decalare the internal tables in the smartform in the table tab and declare a work area as well.
fill the table using the code node or use the code under routine tab.And then use in the samartform where u needs.
It is not enoughf to customize using NACE. U have to declare the output type as well and while printing select the same output type to see the output of your smartform.
I hope it will help u.
Reg.
Vikas Gupta
2006 Jun 07 10:41 AM
Hi,
smart forms works like any function module. In global settings->form interface there´s the tab Import, where you can declare your tables, which are transmitted from the calling program. I recommend not to do it under Tables because somehow it doesn´t work properly.
In Import you can say
MYKNA1 type typ_kna1
and in global definitions->types you declare
types typ_kna1 type table of kna1.
Greetings
2006 Jun 07 10:42 AM
Hi Raj,
You must have to create a new Structure and a new TABLE TYPE in program to send multiple data.
Lets say, you have created Main internal table in your print program to send multiple data to smartforms as below.
TYPES: BEGIN OF ty_cus,
F1,
F2,
F3,
F4,
END OF ty_cus.
so, instead defining above types in your program, just create a new structure(lets say Z_CUS) with the above fields in SE11.
Then create new TABLE TYPE (ZT_CUS) with that structure (Z_CUS).
Now, in your print program, create internal table with the type of Z_CUS as below.
DATA: it_cus TYPE TABLE TYPE z_cus,
wa_cus TYPE z_cus.
And in the Layout, Form interface - Tables section give it as below
IS_CUS TYPE ZT_CUS.
..
In your print program, assign your internal table to IS_CUS for generated function module.
CALL FUNCTION fm_module.
EXPORTING
.....
.....
IMPORTING
.....
.....
TABLES
IS_CUS = it_cus
EXCEPTIONS
......
Let me know if you hav any quesions
2006 Jun 07 10:42 AM
Hi Rajendra,
Better way is to create a structure with reference to the internal table what you have to pass to smartform.
For more Help Check this Tutorial <a href="http://www.sapgenie.com/abap/smartforms.htm">SAPGENIE</a>
Or You can see many example step by step with screen shots in <u><b>SDN CODE SAMPLES.</b> </u>
Regards,
Raghav
2006 Jun 07 10:48 AM
You can pass any number of internal tables as you like.
Like this.
CALL FUNCTION fm_name
TABLES
itab_post = itab_post
exp_obj44 = exp_obj44
exp_obj66 = exp_obj66
copy_fund = copy_fund
In smartform you have declare these tables in
'Form Interface'
And create structures in data dictionary for reference in declaration.
Regards,
Wasim Ahmed
Message was edited by: Wasim Ahmed
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |