cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent duplicate outputs within a table?

TimoRenz
Participant
0 Kudos

Hi at all,

we have a table in a subform. At the moment there are several lines with the same material. This is ok.

Is it possible to prevent duplicate output in the form? We want to print out the rest of this line but set the material to blank.

I tried this with scripting with java script:


If (data.TF.DATA.field.rawValue == data.TF.DATA[-1].field.rawValue)
{
	data.TF.DATA.field.rawValue = "";
}

Is it possible to point on the previous line with

DATA[-1]

?

This works for the conditional break so I hope this will works too.

I don`t want to use group levels...

Thanks.

Timo

Accepted Solutions (0)

Answers (2)

Answers (2)

TimoRenz
Participant
0 Kudos

Thanks for your answer.

It works.

data.formular.DATA.field::ready:layout - (FormCalc, client)


If ($.rawValue == data.form.DATA[-1].field.rawValue) then
	this.presence = "hidden";
endif

OttoGold
Active Contributor
0 Kudos

Hello,

1) glad you provided the solution, so please close the thread, hm?

2) if you would like to simplify your logic and speed up your form a lot, consider moving this "filtering" to the backend. Printing program or the interface intitialization should work better than the scripting. It is also more transparent to use ABAP than JS.

Regards Otto

chintan_virani
Active Contributor
0 Kudos

I would suggest use Nested Tables instead of trying to do such things through scripting. The ALD help has a section on it which could be helpful.