cancel
Showing results for 
Search instead for 
Did you mean: 

Multipl line item for single line item in smart form

Former Member
0 Kudos

Hi

I have an issue wwith smart form. i Designed a Smarform with main window but each line item have again multilpe line items.Example.My smartform should print like this

_______________________________________________________________________

SNO.......Descriptions..................................................................Specifications

_______________________________________________________________________

1.............. Pepsi.......................................................................500ML Bottle

................................................................................................Rs.20.

................................................................................................No sugar COntent

................................................................................................Buy one get one free.

________________________________________________________________________

2..............Coke.......................................................................1000ML Bottle

...............................................................................................Rs.$10.

...............................................................................................Added flavours COntent

...............................................................................................Buy one get 2 free.

________________________________________________________________________

IN the above example Sno and Descriptions are from one internal table and Specifcations are form

other internal table and both the tables are linked with one common field.

Any inputs please.

Regards

Farook

Edited by: farook shaik on May 15, 2009 11:56 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Farook,

Either you cam merge in the driver program as said before -this is the best option.

OR in smartform:

Create a line type with columns for sno ,descr ,specification.

Use a DATA TABLE for the first internal table with the above line type and fill the first 2 columns.

and a LOOP inside the data table's 3rd column for specifications with the common field in where condition.

eg

first table - DATA TABLE
 HEAD
 MAIN
  |___ linetype
          |-cel1
              |-Sno-text
          |-cel2
              |-Descriptions text
          |-cel3-Specifications 
                |__loop for second table  in where condition - match common fields.
                      |-text for Specifications
FOOTER

Regards,

Fonseca DC

Edited by: Fonseca Christina on May 15, 2009 1:10 PM

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

You need to use nested loop.You got data in itab and jtab.Now do like this

create a loop

loop at itab.

then create a text --write:/srno ,,,description

loop at jtab. in the condition tab itab-fieldname = jtab-fieldname.

create text---write jtab data.

endloop.

endloop.

Regards,

Nicklas.

Former Member
0 Kudos

Hi,

Take two Table Nodes :

1 for : 1.............. Pepsi.......................................................................500ML Bottle

2 for : ................................................................................................Rs.20.

................................................................................................No sugar COntent

................................................................................................Buy one get one free

in second Table node check the condition with common value between the two internal tables..

Former Member
0 Kudos

Hello Farook,

Club all the three filelds into one internal table and then display.

Regards

Akmal

Former Member
0 Kudos

Hi,

First create a line type with three columns.

Create table in smartform -> In data tab -> Loop at first table (sr.no. & desc)

For header of table no problem , just assign this line type.

For main area -

In first two columns of line type print this two data fields.(sr.no. & desc)

Inside third column of line type create loop -> Loop at second table (specification table )

Print specification in third column by creating text element inside this loop.

I hope this will solve ur problem,

Regards

Former Member
0 Kudos

Hi,

Try this, u can create an itab for smartform and use the following code.

LOOP AT ITAB_EARLIER.

AT NEW MATNR.

ITAB-MATNR = ITAB_EARLIER-MATNR.

END AT.

ITAB-SPEC = ITAB_EARLIER-SPEC.

APPEND ITAB .

ENDLOOP.

Former Member
0 Kudos

Hi Friends,

Any more other inputs plz.Thanks for the earlier inputs.

Regards,

Farook.

Former Member
0 Kudos

Hi,

If u get one line for slno 1 in internal table, then check the width of the 'Specification' Column.