on 02-24-2009 7:59 AM
Hi,
I am creating a Smartform in which I have a table of 4 fields.
Now I want to split the table depending on the value of 2nd field.
Means whenever the 2nd field's value is changed,then a blank row will be inserted into the table.
How can I proceed?
Hi;
1. Declare a flag and put the value 'X' by default
2. Store the value in an another value which would match under the condition in the table containing the blank like , then clear the variable and store with the new value
Regards
Shashi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mini,
Try it this way:
Create a table, in that loop the internal table, under that first create a program line and after that create two text, one for blank line another to display data. Now in the condition tab of the blank text give a condition as BLANK EQ 'X'. Do it as below:
TABLE (loop itab into wa)
Header
Main Area
ROW1
CELL1
Program_lines
TEXT1 (empty no data, give condition for blank line that is BLANK EQ 'X')
TEXT2 (data)
Footer
In the program lines write a code as below and firstly decalre to global variable, in this case:
BLANK TYPE CHAR1
CARRID TYPE SPFLI-CARRID
Pass FS_ITAB-CARRID & CARRID as Input Parameters in program lines and BLANK as Output Parameters
Clear blank.
If carrid ne FS_ITAB-carrid.
blank = 'X'.
carrid = FS_ITAB-carrid.
Else.
blank = Space.
Endif.
With luck,
Pritam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
there are other ways.
this is also one.
first declare 2 fields
gv_first type c with default 'X' at start
gv_secfield type xxxxxxxx (you know the type of your second itab-field)
in the table loop of your smartform some program statements
*first thing in the loop.
if gv_first = 'X'.
gv_secfield = wa_itab-secfield.
clear gv_first.
endif.
just before the normal printing of your line.
print a empy line only if gv_secfield <> wa_itab-secfield. (output condition)
normal your line printing
just before the end in the loop.
progrma logic with statement
gv_secfield = wa_itab-secfield
hope this works.
Gr., Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Mini,
Create the event Begin on that particular field create the line type and create the text node and leave as blank and display as per your requirement.
Regards,
Sravanthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can modfiy your internal table based on your requirement. where your filed got chnaged append the empty line your internal table...
AT NEW of second filed
you can prepare your internal table and pass it in smartform
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.