on 08-05-2011 8:36 AM
Hello everybody,
I need help. I´ve made a Smartform and the last thing which is missing, is the table (main window).
I have one internal table which is like this:
Header Customer Postcode Floor Wing Room Side
1000 Germany 44444 1 Alpha A left side
1000 Germany 44444 1 Beta B left side
Third line for example totally different
Then again numbers etc.
Please look at the pic for better understanding: http://imageshack.us/photo/my-images/843/picyz.jpg/
I have problems in understanding, how to realize the first two rows, that all the data, which is the same, is combined in one field and where the differences begin, the row "splits".
Please help me. that´s the last (and obvious most difficult) part of my smartform.
Best regards, Dominik
Hi Dominik,
I have got one more idea,
when you are filling you internal table with values like:
1000 Germany 44444 1 Alpha A left side
1000 Germany 44444 1 Beta B left side
1001 Denmark 55555 1 Alpha A left side
1001 Denmark 55555 1 Beta B right side
Fill it like
1000 Germany 44444 1 Alpha A left side
......................................1 Beta B left side
1001 Denmark 55555 1 Alpha A left side
.....................................1 Beta B right side
And Under event 'header1 Event On Sort End' create a Command node and in Conditions tab of Command use:
header1 NE space
after above use the text node to print : There are two wings for customer Germany .
Let me know if any issue.
BR
Dep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Deepak,
those are very good ideas, thank you very very much! It will help me for sure! But there is still one issue. The fields
1000 Germany 44444 1 need to be centered vertically. Please see link from post #1. And of course all work has to be done dynamically. Depending on Header 1, somtimes there is just one floor, sometimes three or four. So you have something like this for example:
-
..............................1 Alpha A and so on
..............................2 Beta B a.s.o
1000 Greece 11111 1 Kappa A a.s.o
..............................4 Omega A a.s.o
..............................5 Delta B a.s.o
-
... = blanks, just used for formatting here
So 1000 Greece 11111 looks like one row, when the different data begins there are five rows from that point on.
Do you know what I mean?
Thank you very much for all your help so far!
Greetings, Dominik
Edited by: DominikT on Aug 5, 2011 12:58 PM
Hi Dominik,
Great going!!
.. = blanks, you are correct.
Well for to get the centered vertically we need to create a paragraph format using Transaction code SMARTSTYLES .
In there we need to create a paragraph format and charecter format(if required) better create for safe side.
There we can give the option like:
1. Right justified
2. Left justified
3. Cetre.
You can alos give left margin , right margin ... line spacing etc etc..
And then you have to use this format for printing data
example:
CA <CA> &value1&</>
Let me know if any issue.
BR
Dep
Hi Dominik,
Ok, So you have created smartstyles from transaction code SMARTFORMS using second radio button style.
When you give style name and click on change you will find folder Paragraph format .
Right click on paragraph format and click on create node and enter CA in it and press enter.
After that you will find option Indent and Spacing Alignment options:
1. BLOCK Justified
2.CENTER Centered
3.LEFT Left-aligned
4.RIGHT Right-aligned
click on CENTER and save and activate.
Now coming back to smatform form enter the smartstyle in form attribute and use this paragraph format CA to display values with centre alligned.
Just let me know if you have any issue.
BR
Dep
Edited by: DeepakNandikanti on Aug 5, 2011 2:56 PM
Hi Dominik,
Good to hear Progress.
Could you filter the data at driver program level to avoid repetitive records at smartform level by using
SORT itab BY f1 f2 f3.
DELETE ADJACENT DUPLICATES FROM itab COMPARING f1 f2.
If you could do that it would be great.
Or else you can you use Progam Lines before text node in smartfom and filter and restrict the output using Condtions tab of Line Type.
Let me know if any issues.
BR
Dep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dominik,
I have tried in my system and it is working!!
Just do like below
Create a new line type with only one column
1. Input header1 as field in under sort criteria and and check(tick) 'Event on Sort End'.
2. An event is created with Star symbol.
3. header1 Event of sort End.
4. Under this event select a line type which has only one column .
5. Under this select a text node and Typ eyou info like : There are two wings for customer germany .
6. Save check and activate and run to see the ouput.
BR
Dep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Deepak,
that´s the solution for the "mid sentence". I´m a step further now, thank you. But there is still the problem with the output of the internal table entries.
All the redundant data (all the data that comes again and again and again) should only be shown once...the other data, that changes comes behind of it.
Greetings, Dominik
Hi Dominik,
We can use Events option of LOOP.
For your case we could use 'Event On Sort End'.
If you extend the sequence of data to be prited in table, I would be able to give more inputs.
BR
Dep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deepak,
thank you for responding.
Well, thats the input.
For example, there are four entries in internal table:
1000 | Germany | 44444 | 1 | Alpha | A | left side |
1000 | Germany | 44444 | 1 | Beta | B | left side |
1001 | Denmark | 55555 | 1 | Alpha | A | left side |
1001 | Denmark | 55555 | 1 | Beta | B | right side |
So, as we can see, there are redundant parts. I could print all entries but there would be the redundant entries (1000, Germany, 44444, 1).
I´d like to have it like this
1000 | Germany | 44444 | 1 | Alpha | A | left side |
........................................| Beta | B | left side |
-Here´s a row not from the internal table, a sentence like "There are two wings in Germany"-
1001 | Denmark | 55555 | 1 | Alpha | A | left side |
.......................................| Beta | B | right side |
-There are two wings in Denmark-
...
In case of redundancy of fields, I only want to see the redundant parts one time
| 1000 | Germany | 44444 | 1 | xxx some data xxx
....................................... | yyy some different data but with same pre data, e.g. same country yyy
After that, I´d like to ... well... split the row into two for the "non redundant" fields (xxxxxxx).
I hope I could explain it better this time.
Moreover...you said "LOOP"...is there a difference in using a "TABLE" or a "LOOP"?
Best regards, Dominik
Edited by: DominikT on Aug 5, 2011 11:50 AM
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.