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: 

Retrieving record from a table and display beside the field name

Former Member
0 Kudos

Hi,

I have a doubt on displaying the data in the smart forms.

I am doing a report and i need the report to be displayed in the following layout

*fields in the internal table is not standard but the line spacing between 2 field must be the same regardless of the number of record in the internal table

*record2 must be aligned directly below the starting letter of record1 which means record2 is begin to display directly below record1 and not directly start at the beginning of the most left

field1: record1 from internal table

record2 from internal table

.

.

.

field2: name

field3: age1 from internal table

age2 from internal table

age3 from internal table

.

.

.

Wonder anyone can give me some suggestion to this question. Thanks in advance.

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

Hi Lin,

Define your own paragraph format,say p1 with tabs defined.

in your text element editor,

/E: ITAB_DATA

/: if &syst-tabix& = 1

p1: ,,field1,,&itab-field1&

/: else

p1: ,,,,&itab-field1&

/: endif.

call this text element in the driver program inside the itab loop.

Regards,

Ravi

2 REPLIES 2

former_member181962
Active Contributor
0 Kudos

Hi Lin,

Define your own paragraph format,say p1 with tabs defined.

in your text element editor,

/E: ITAB_DATA

/: if &syst-tabix& = 1

p1: ,,field1,,&itab-field1&

/: else

p1: ,,,,&itab-field1&

/: endif.

call this text element in the driver program inside the itab loop.

Regards,

Ravi

venkat_o
Active Contributor
0 Kudos

Hello Lin Xiulian,

You can achieve ur requirement in two ways.

<b>1</b>.Create table node.Loop ur ITAB.

Define Header with two fields Field1,Field2.

Main Area:first field is displayed by giving

&ITAB-FIELD1&.

For Second field:Create LOOP node using the path

Right click ->Create->Flow Logic->LOOP.

2 nd Field is displayed with multiple records as u asked.

Alignment is done automatically.

<b>2</b>.Create Template Node .

Define two lines in the template one for Header and 2nd

for records.

use LOOP Node for multiple records.For 2nd field

multiple records use another LOOP node before it is

displayed.

I think it helps u.

If u have still doubt ,Let me know i will send you Smartform which i developed.

<b>Thanks,

Venkat.O</b>