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: 2 columns (each column consist 1 table) in 1 page

Former Member
0 Kudos

Hi...,

I've got problem that there is requirement to development smartforms as below format:

Page 1

column "A" column "B"

No. Description Qty Amt | No. Description Qty Amt

1. Desc1 1 100 | 5. Desc5 5 500

2. Desc2 2 200 | 6. Desc6 6 600

3. Desc3 3 300 | 7. Desc7 7 700

4. Desc4 4 400 | 8. Desc8 8 800

Page 2

column "A" column "B"

No. Description Qty Amt | No. Description Qty Amt

9. Desc11 11 110 | 13. Desc15 15 510

10. Desc12 12 210 | 14. Desc16 16 610

11. Desc13 13 310 |

12. Desc14 14 410 |

It means that in one page consist of 2 column, A and B. Each column has each own table which is identically each other. After writing line item in column "A", then automatically go to column "B" until finished.

My question is how to solve it in smartforms?

What I did before, I created internal table which is already containing the data like above then just pass through table in smartforms like usual.

Is there any solution?

Thanks a lot in advance.

1 ACCEPTED SOLUTION

FredericGirod
Active Contributor
0 Kudos

Hi Herlina,

maybe you have to solve this problem like in Abap code. You know the number of column that you could set on your page, for example 4.

So create a table with col_A and col_B, use the number 4 to set data into this table.

Like that.

loop at it_x.
  w_num = sy-tabix / 4.
  perform p_test_odd using w_num changing w_odd.
  if w_odd eq 'X'.
*   move in col_b    
  else.
*   move in col_a
  endif.
endloop.

(w_num is a type n)

I didn't test the code, but I hope that will help you.

Regards

Frédéric

2 REPLIES 2

FredericGirod
Active Contributor
0 Kudos

Hi Herlina,

maybe you have to solve this problem like in Abap code. You know the number of column that you could set on your page, for example 4.

So create a table with col_A and col_B, use the number 4 to set data into this table.

Like that.

loop at it_x.
  w_num = sy-tabix / 4.
  perform p_test_odd using w_num changing w_odd.
  if w_odd eq 'X'.
*   move in col_b    
  else.
*   move in col_a
  endif.
endloop.

(w_num is a type n)

I didn't test the code, but I hope that will help you.

Regards

Frédéric

Former Member
0 Kudos

Hello Herlina,

i think you also will be able to solve it in this case:

Open the adobe designer switch to the data view drop your both internal tables on the form.

Arange it so that the both fit to one page.

After that go to hirarchy view and move the subform consist data of colum b inside the comul a subform.

After that be sure that in the object-->binding propperties of colum b subform the checkbox repeat this subform is set.

After these changes the form should be processed like you want it.

kind regards

Fabian