on 10-04-2011 6:46 AM
Hi,
In smartforms -Main Window - I created like this
1.Loop Statement - This will loop - ITAB1
TEXT statement - ITAB1-ADRNR - (prints the address)
within the loop
ITEM_DATA (item data) table. - This will Loop ITAB2 - where ADRNR = ITAB1-ADRNR
This supposed to put line items which are having ADRNR from ITAB1
But my program is printing in wrong way..
it is printing
ADDRESS1 - ITAB1-ADRNR - correct
ITEM DATA - from ITAB2- related to ADRNR (if it has only 1 record) - correct
ADDRESS2-ITAB1-ADRNR - correct
ITEM DATA - from ITAB2 - where ADRNR = ITAB1ADRNR - if this condition satisfies more than 1 record
supposed to print all the records - but instead it is printing always the first record - wrong
Ex- if 3 records has the same ADRNR of ITAB1 in ITAB2 - it is actually printing 3 times the first satisfying record - Wrong
Can anyone please tell me what is the issue?
Thanks for your time.
Kevin
Solved my self.
Thanks for all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kelvin,
What is the business requirement.Do you need to print address of customers or vendors.
Regards,
Madhu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kevin,
Instead of 2 loops for printing data you can first prepare the data to be printed in smartform in one internal table.
Copy your ITAB2 in one temporaray internal table ITAB3 and delete the records from this table ITAB3 where ADRNR <> ITAB1-ADRNR.
sort this ITAB3 by ADRNR.
And now you can pass this ITAB3 to your main window table with condition of priniting ADRNR only at AT NEW event of table
which you can give in table properties.
Thanks,
Pawan
Hi,
I created like this..
ITAB1 - complete data
ITAB2 - unique records based on ADRNR
1. LOOP ITAB2
Print Address - ITAB2-ADRNR
ITEM DATA(header and line items)
I have given table name in DATA loop section
- loop ITAB1 - where ADRNR = ITAB2-ADRNR
But in item data it is printing the same line item repetedly .
Any comments?
Thanks for ur time.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.