Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to change 2nd row field in WebDynpro

Dear All,

When Bapi have create a table ,example as (part field):

name


age


Paper_Receipt

Anne -


20 -


1

Andy -


22 -


0

now, WebDnypro call this Bapi and display this table in portal

as this rule :

1. if paper_Receipt is "1" then display "Y"

2. if paper_Receipt is "0" then display "N"

Result :

name


age


Paper_Receipt

Anne -


20 -


Y

Andy -


22 -


N

I want come out this funtion ,but have can't transfer the 2nd record , can't turn 0 to N

there are my code (part)

public void onPlugMain_In_Detail

{

int rowsize_ER;

rowsize_ER = wdContext.nodeZtrip_Receipt().size();

if (rowsize_ER > 0)

{

if (Integer.parseInt(wdContext.currentZtrip_ReceiptElement().getPaper_Receipt().toString()) == 1)

wdContext.currentContextElement().setAtt_ment("Y");

if (Integer.parseInt(wdContext.currentZtrip_ReceiptElement().getPaper_Receipt().toString()) == 0)

wdContext.currentContextElement().setAtt_ment("N");

}

}

and the value of table field Paper_Receipt I set is Att_ment

but the result is

name


age


Paper_Receipt

Anne -


20 -


Y

Andy -


22 -


Y

can you help me how to change can succee?

Former Member
Former Member replied

Hi Doke,

We are almost at the solution. Just try with these changes.

Please create a value node (Attach) instead of model node.

i.e. Delete the model node Attach and create a value node with cardinality 1...1

singleton false

Rebuild then all the errors disappear.

Regards,

Siva

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question