on 01-30-2007 7:01 AM
hi,
can anyone tell how to declare internal table in smartform.
the internal table contains fields from 2 or more data dictionary tables(eg.kna1
and adrc). after this from the print program(internal table containing data in print
program) internal table should be passed to the smartform.
thanks.
Hi,
You need to create a structure first with those fields, and then in the form interface ITAB like that structure, then the internal table will there in that smartform, after that pass the print program ITAB values to this ITAB values so that the values wil be avilable in the smartform.
Regards
Sudheer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi sudheer,
i am trying to eliminate the step of creating a structure.i want to declare an
internal table. we can do this by declaring in global definitions-->types.
but how to populate data containing in internal table of print program to the
smart form internal table that has been declared as i told above. is there any
procedure to do this kind of application.if not then the only chance is to create a
stucture and do.
thanks.
hi,
first you need to create a structure with those fields.Then use the SMARTFORMS transaction code.In that under FORMINTERFACE declare like this.
itab type (your structure).
then it will crate an internal table in smartforms.hope it will help you.
regards,
krishna chaitanya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
2.Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
declare it in In global definitions:
g_lips_new type table of t_lips
in types i declared as follows:
types: begin of t_lips,
vgbel type vgbel,
end of t_lips.
Regards,
Santosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi laxya,
if u want to pass the data from internal table in print program to Smartform.. there is only way.. that is using form interface..
1. goto se11, create a structure same as the itab in the print program.ex. <b>z_itab</b>
2. create line type... se11>select radio button-DATA type><b>z_it_itab</b> >press create>then select>TABLE Type> then entrer some text--> in the line type Field in giveth Str name u have created in STEP 1. activate it.
3. got SMARTFORMS-> form inteface>tables tabe--> give some name ex <b>IT_tab type z_it_itab</b>.
then acivate it.. then in the driver progam pass this table data.
Exapmpel
CALL FUNCTION fp_v_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = fp_st_control_parameters
user_settings = space
output_options = fp_st_output_options
wa_vbdkr = fp_st_vbdkr
IMPORTING
job_output_info = l_it_ssfcrescl
job_output_options = l_it_ssfcresop
TABLES
<b> IT_tab = z_it_itab (or table in driver program)</b>
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.
Another way is cteate a type in Globaldifination-->types tab..
ex:
types: begin of ty_itab,
matnr type matnr,
meins type meins
vrkme type vrkme,
end of ty_itab,
ty_it_itab type standard table of ty_itab.
then GLOBAL DIFINATION>GLOBAL DATA TAB>IT)ITAB TYPE TY_IT_ITAB.
BUT In this u can't pass the data from the print Program.. if u want to populate data in to this table... u have to write the Select query in the GLOBAL DIFINATIONS-->INITILIZATIONS TAB.
Please Close this thread.. when u r problem is solved
Reward if Helpful
Regards
Naresh Reddy K
Message was edited by:
Naresh Reddy
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.