cancel
Showing results for 
Search instead for 
Did you mean: 

Change RFC Output Data Before Display

HuseyinBilgen
Active Contributor
0 Kudos

Hi,

We've an application which gets data from R/3 into a table.

We need to hide the zero values displayed in rows. We cannot customize RFC Report, but something must be done within Dynpro before data is displayed.

We've 2 iviews; SearchView, ResultView

After pressing execute button, ResultView is called. ON resultview method onPlugFromSearchView, normally data called by calling method Comp. Controller method getData()

I tried the following code within onPlugFromSearchView method to see if I could change the displayed data. But only first row changed.

//get row number

int count = wdContext.nodeT_Gnlktermin().size();

//get column data for row i of column Col02

BigDecimal val = wdContext.currentT_GnlkterminElement().getCol02();

// check value int type

int zero = 0;

//check value BigDecimal type

BigDecimal bd = new BigDecimal (zero);

// value to assign if col value is zero

int elli = 50;

// convert value to BigDecimal

BigDecimal ell = new BigDecimal (elli);

for(int i=0; i<count;i++){

// check if column value is zero

if ( val.equals(bd)){

//assign new value

wdContext.currentT_GnlkterminElement().setCol02(ell);

}

}

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I did something similar, the code looks like this:

IPrivateResultView.IEp_OpportunitiesNode node = wdContext.nodeEp_Opportunities();

if (node.size() > 0) {

i=0;

while (i<node.size()) {

amount = node.getEp_OpportunitiesElementAt(i).getExp_Revenue();

if (amount=0) {

node.getEp_OpportunitiesElementAt(i).setExp_Revenue(50);

}

i++;

}

}

I added the code to wdDoModifyView.

Good luck,

Roelof

Answers (1)

Answers (1)

Former Member
0 Kudos

Iterate result node from tail to head (from node.size() - 1 to 0), remove elements that does not satisfy filtering criteria.

VS

HuseyinBilgen
Active Contributor
0 Kudos

hi,

how to remove elements?

Former Member
0 Kudos

you could try this:

node.removeElement(node.getElementAt(i));

Good luck.

Roelof

HuseyinBilgen
Active Contributor
0 Kudos

Hi,

thanx for helpful answers, but there are many columns in this table and data displayed is in format BigDecimal, so how to make the cell look empty if its value equals to zero?

using null didn't helped me.

HuseyinBilgen
Active Contributor
0 Kudos

Hi,

thanx for helpful answers, but there are many columns in this table and data displayed is in format BigDecimal, so how to make the cell look empty if its value equals to zero?

using null didn't helped me.