on 05-15-2009 10:56 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Farook,
Club all the three filelds into one internal table and then display.
Regards
Akmal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If u get one line for slno 1 in internal table, then check the width of the 'Specification' Column.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.