on 06-23-2010 8:34 AM
Hello all
I am working on requirement in Adobe forms where i need to print a list in which, for a particular equipment no. there are multiple order nos...
I want to print this list based on the Equipment no..
For ex
Equip No... Order no
A....................001
......................002
......................003
B....................001
......................002
And so on...
But output i m getting is ,
Equip No... Order no
A...................001
A...................002
A...................003
B...................001
B...................002
i.e. equip.no is getting repeated for every record, which i dont want ...
In context of the form i have mentioned the Control level for internal table at equipment No.
PLease suggest any solutions...
Thanks in advance
Nilesh
Most surely you know abap.
In the interface > Code Initialization you can code in abap and play with the values inside that table you are passing. Just set the table as Input and output parameters and have fun with abap.
Option 2. Use nested tables. I do this a lot.
Table A
- Field1
- Table B
-- Field2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
The problem is solved !
Thanks Amit for ur most valuable inputs in Formcalc, though unfortunately none of the solutions worked for me.
I always thought instead of playing with code in the script , this shld have been done automatically using Control level processing.
Thanks Paul for ur options but again writing a code for the feature which is already present is not what i wanted and in case of nested tables i wud have to separate single table into 2 tables unnecessarily, which i didnot want.
So after lot of head scratching and adjusting the object properties of my subforms ( i.e. subform for Equip. no and subform for corresponding order details ) i got what i wanted.
Thanks all !
Question is closed and points assigned !
Cheers
Nilesh
Hi Nilesh,
You can write following FormCalc on the Table Row:
var prev_index = $.index - 1
var first_value
first_value = BP.sf_Partner.sf_Table.Table1.Row1[0].NAME.rawValue
if($.index > 0) then
var prev_value = BP.sf_Partner.sf_Table.Table1.Row1[prev_index].NAME.rawValue
if ( $.NAME.rawValue eq first_value ) then
$.NAME.rawValue = " "
else
first_value = $.NAME.rawValue
endif
endif
Hope this helps,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi amit
I tried with your code but it didnt work out...I used folllowing script
var prev_index = $.index - 1
var first_value
first_value = data.Bodypage1.Table.DATA[0].EQUNR_S.rawValue
<b>if</b>($.index > 0) then
var prev_value = data.Bodypage1.Table.DATA[prev_index].EQUNR_S.rawValue
<b>if</b> ( $.EQUNR_S.rawValue eq first_value ) then
$.EQUNR_S.rawValue = " "
<b>else</b>
first_value = $.EQUNR_S.rawValue
endif
endif
The Object hierarchy in my case is as follows.
Data
......... |_Masterpag
..........|..........|_Bodypage1
..........|
..........|_ Bodypage1
............... |_Table
...................|_DATA
......................|_EQUNR_S
......................|.....|_Textfield EQUNR
......................|
......................|_ Datarow
...............................|_Datarow_S
....................................|-orderno
....................................|-order text
....................................|-order type
Please help
Iisnt there is any solution in the designing itself...
Is it not possible without scripts ?
Also im now getting into one more strange situation here.....When i print this form..if i have 10 records only 9 gets printed , the first record is missing...
any idea on this?
Please help !!!
Thanks
Nilesh
Hi Nilesh,
Yeah I tried it, you have to make small changes in the script.
First, add a TextField in the BodyPage and make it hidden.
then make some changes in the script.
var prev_index = $.index - 1
var first_value
first_value = BP.TextField1.rawValue
<b>if</b>($.index > 0) then
var prev_value = data.Bodypage1.Table.DATA[prev_index].EQUNR_S.rawValue
<b>if</b> ( $.EQUNR_S.rawValue eq first_value ) then
$.EQUNR_S.rawValue = " "
<b>else</b>
BP.TextField1.rawValue = $.EQUNR_S.rawValue
endif
endif
This should work.
Regards,
Amit
User | Count |
---|---|
83 | |
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.