on 11-14-2006 5:24 PM
Hi,
How to create an internal table in smartform. What are the areas has to be define.
What all the syntax available to append the records to the internal table.
Regards
reddy
hi,
goto Form Interface-> tables.
here you define the internal table,which you defined in the driver Program.
if you created the table in the smartform,then
goto table->data
here you give loop at itab into itab.
in main area insert the variable which you want to display in the table.
if any query reply me.
*reward if it helps.
regards,
Ashok.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<b>Define table in smartforms</b>
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
<b>Define looping process for internal table</b>
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
<b>To display the data in Smartform</b>
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
Feel free to revert back.
--Ragu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To create a global internal table first define the Type in the Types tab of the Global Definitions.
TYPES: BEGIN OF T_ITEM_TABLE_TYPE,
SHIP_MARKS LIKE TLINE-TDLINE,
IMO_REGS LIKE TLINE-TDLINE,
WEIGHT TYPE STRING.
TYPES: END OF T_ITEM_TABLE_TYPE.
Then in the Global Data tab define the internal table:
Variable name = whatever you want to call the table
Type assignment = TYPE
Reference type = TABLE OF T_ITEM_TABLE_TYPE INITIAL SIZE 0
Then define your work area
Type assignment = TYPE
Reference type = T_ITEM_TABLE
You can then loop at your internal table into your work area in Program Lines Node, Table Node, Loop Node...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please find the error: which i am getting when declaring.
Global Data:
WA_INV_DATA TYPE TABLE OF INVX_DATA INITIAL SIZE 0
Types:
types: invx_data type table of ZPSS_RRBINV_ITEMS.
Error:
"INVX_DATA" is a generic type. A type reference is possible only for field symbols and formal parameters. -
Regards
Reddy
Hi Chandu,
This is how you need to do.
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
In program:
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
<b>TABLES</b>
GS_MKPF =<b> INT_MKPF</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.
Have a look at below link for more help on smart forms.
http://sap.ionelburlacu.ro/sap0/sapsf001.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
Reward points if this Helps.
Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.