cancel
Showing results for 
Search instead for 
Did you mean: 

to display the contents of the table in sf

Former Member
0 Kudos

HI,

I have a requirement to display the contents of the table on the smart form main window.

Like there is a dic table containing 8 rows . i would like to to display all the 8 rows on a smartform main window.

Help me how to solve this,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Kindly follow the below steps,

Go with a transaction code : smartforms

Enter the form name like : ysma_forms1 and create with proper description

From the left side window there will be a form interface to provide table .....

Go for tables option

table_name like table_name(ref.type)

Pages and window-> page1-> main window

Go to the form painter adjust the main window.

Select main window and right click --> go for create loop

Name: loop1, desc: display loop.

Internal table ktab into ktab.

select loop right click -> create a text

name : text1, desc: display text.

Go to change editor.

Write the mater what ever you want and if you want to display data from the table write the table fields as follows:

&ktab-<field1>& &ktab-<field2>&

save & activate then execute ,, scripts will generate a function module like : '/ibcdw/sf0000031' copy this function module and call in executable program...

For that

1. go with abap editor se38.

2. table: tablename.

3. parameters: test like tablename-<field1>.

4. data itab like tablename occurs 0 with header line.

5. select * from tablename into table itab where field1 = test1.

6. call function '/ibcdw/sf0000031'

7. tables

ktab = itab.

Save and activate the program ( ^f 3).

Now run the program ( f 😎

Hope this will help you

Regards,

Vijay Duvvada

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

To display data while looping internal table or dic table declare a table in main window which automatically declares header, item and footer windows. Divide each window to corresponding line types as per your requirements so that windows will gets divided into columns. Now write column headings in header window. Write flow logic under item window in that loop the table into corresponding field string write down corresponding fields in corresponding line type fields location so that all items will display. In footer window write down if any required.

Hope this will give you some idea.

Regards,

Aswini.

former_member181995
Active Contributor
0 Kudos
Former Member
0 Kudos
Former Member
0 Kudos

Hi,

Create a template in main window it is for staic table and give the line type as per your requirment

and write all the data respective places.

Regards,

Jagadeesh

Former Member
0 Kudos

loop that table in smartforms

u will find a option there to give u internal table name and workarea.

Regards

Anbu