cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform: How to not print blank internal table

Former Member
0 Kudos

I have two tables in the MAIN window in smartforms. How do I make sure that the HEADER, MAIN, FOOTER section of each TABLE dont print if that internal table is blank?

Regards,

Salil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

Here is the solution, Pls follow the steps,

1. Create a Global variable in Global definition, say w_flag type flag

2. In your window node, Create -> Flow Logic -> Program Lines .. After that, In this node, In genral attributes tab, in Input parameters put following two parameters, w_flag then i_tab (name of your internal table). Here in Output parameters put w_flag only.

In code edityor section put the below code.

clear w_flag.
if i_tab is not INITIAL.
  w_flag = 'X'.
endif.

3. Now double click on your I_tab table, In the Conditions tab, put the values as below:

Field name     relational operator       Com value

W_FLAG             =                              'X'

Now you table will only print if i_tab has something to print...

Thats all you need...

Regs,

Lokesh.

Former Member
0 Kudos

Lokesh - Good Try. Rewarded points.

I figured out what to do:

For each table that you do not want to display when blank - in the table CONDITIONS tab - put the following:

ITAB NE INITIAL

Simple - but it works. Thanks.

Salil

Edited by: salild1 on May 14, 2010 12:37 AM

Answers (0)