on 09-17-2010 11:16 AM
Hi,
I have a requirement to print internal table itab data as
-
ItemNO Item Description Sold-To Date
-
10456 xyz ABC 15Aug10
12045 LMN DFG 17Aug10
KMN 19Aug10
PLO 20Aug10
14502 HGT MLN 01Sep10
-
I used ' delete ADJACENT DUPLICATES FROM itab COMPARING ITEMNO' to avoid duplication of ItemNO and its Description.
This inturn also deletes complete 2 dulplicate rows of item # 12045.
Please sugest me how I can delete only duplicates in ItemNo and Item Description columns while printing to form.
Thanks in advance
Hi,
Thanks to all, Karthick's logic helped and it sis working.
Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi..
Delete ADJACENT DUPLICATES will always delete completely the duplicate rows.
As per your post I understand that for same item numbers you do not want to print the item no. again, instead it should be like as below..
12045 LMN DFG 17Aug10
KMN 19Aug10
PLO 20Aug10
If I am right, then you need to create a program line inside the main area's cell above the text element (Item Number field) and write logic to check if the item number is repeating or not. Based on this logic set a flag as 'X', whenever it repeats and put a condition on text element (on text element's condition tab) printing Item number as "FLAG NE 'X' ".
In this way it will print item number only if flag is not X, hence when it is not repeating.
Hope this helps.
Regards,
Karthik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I like Karthik's logic, but rather than setting a flag (hate flags...), after displaying your item number, just copy the item number to a global variable, ie. GV_LAST_ITEMNO.
Then use this field in the test on your cell so that it only displays when the current item number is different from GV_LAST_ITEMNO.
Regards, Andy
i hope you are aware that the table has to be sorted by the fields for which you want to do the compare when using delete adj.
/edit damn typos...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.