Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORMS

former_member191391
Participant
0 Kudos

HOW TO DEFINE INTERNAL TABLES IN SMARTFORMS

1 ACCEPTED SOLUTION

Former Member
0 Kudos

<b>SmartForms Global Data Types Tab:</b>

TYPES:

BEGIN of mytab,

my_batch type c,

my_char(20) type c,

my_unit(10) type c,

my_value(10) type c,

charg(10) type c,

END OF mytab.

TYPES: wa_mytab TYPE STANDARD TABLE OF mytab .

<b>

Global Data Tab:</b>

wa_mytab TYPE mytab

7 REPLIES 7

Former Member
0 Kudos

<b>SmartForms Global Data Types Tab:</b>

TYPES:

BEGIN of mytab,

my_batch type c,

my_char(20) type c,

my_unit(10) type c,

my_value(10) type c,

charg(10) type c,

END OF mytab.

TYPES: wa_mytab TYPE STANDARD TABLE OF mytab .

<b>

Global Data Tab:</b>

wa_mytab TYPE mytab

dani_mn
Active Contributor
0 Kudos

HI,

you can declare your internal tables in 'GLOBAL DEFINATIONS' by using the 'TYPES' tab.

REagards,

Former Member
0 Kudos

Global Settings --->Form Interface ---> Tables ( Tab )

Regards,

Durga

Former Member
0 Kudos

Hi Manmeet,

1. Create a new smartforms

Transaction code SMARTFORMS

Create new smartforms call ZSMART

2. 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

3. 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

4. To display the data in the form

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)&

5. Calling SMARTFORMS from your ABAP program

Former Member
0 Kudos

Hi All,

Can you please tell me what Naming conventions should be used while creating Smartforms? I need to create a doc for naming standards that would be used in my company for Smartforms. Just like ABAP Coding standards

Your help will be appreciated!!

Former Member
0 Kudos

I have attempted to create an Internal Table within a SMARTFORM as discussed in the threads. I call the SMARTFORM from a Function Module (in-turn called from an ABAP Report).

When I test run the Function Module and manually populate the Internal Table the SMARTFORM populates all of the fields and looks how I want it to. However, when the Function Module is called from within the ABAP, even though the internal table is fully populated, the SMARTFORM only populates the first 2 columns.

Please can you advise what I am doing wrong?

Former Member
0 Kudos

You Can define Internal Tables in Global Defintitios.

or

you can define an internal table like a table in Form Interface

i.e. itab like mara