cancel
Showing results for 
Search instead for 
Did you mean: 

Printing Smartform with Table data from PrintProgram

Former Member
0 Kudos

Hi,

Can any one explain the steps involved in printing the Smartform with the data from the Print Program table. How to fit table in the Smartform i.e, while designing the Smartforms layout for the table.

Thanks & Regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member181962
Active Contributor
0 Kudos

First Create a Z structure and a table type in SE11 for the internal table data that is to be transferred from the print program to the smartform layout.

IN the layout define a interface parameter for the table (Referance to the table type you have created).

Create a work area (type the zstructure you have created) in the Global Paramaters.

Create a LOOP element in the Main window of the smartform.

in the loop element, give the internal table and work area names.

Then, in the loop element, create a TEMPLATE element and place the text elements in each cell to be printed.

In the print program, call the Smartform Function module that gets generated when the smartform is activated and pass the internal table filled with data.

Regards,

Ravi

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

As data is coming from the print program in the table. Do the following procedure

1. In the form interface ---> Declare the internal table as same structure as in the print program. for ex: you r passing MARA table data then declare it as itab type table of mara.

2. In the window you want to create the table, right click > create> table.

3. Go to data tab give the internal table name and work area .

4. Now go to General tab-->Details.

5. Declare the line types.

6. Right click on header/main area/footer -->create table line.

7. Now give the line type which you want to use.

8. In the displayed columns>right click> create text node.

9. In the text node &mara-matnr&.

Procedure to create line type:

1. Double click on table

2. Go to table tab --> details

3. Give the table width (width you want to display on the screen should be less than or equal to the window width).

4. Line type --> Divide this into no of column you want to have in header/item.

Note: total length of all columns should be equal to the table width.

5.save.

Br,

Laxmi