cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong output while executing same RFC with different values

Former Member
0 Kudos

Hi All

i am executing rfc using following method.But the prob is that the data it returns first time doesn't change even when i invoke same method with different input values.

public void callPDPFunction( java.lang.String status )

{

//@@begin callPDPFunction()

try{

custCode = wdContext.currentStatusTableElement().getCustomerCode();

pdpFunctionInput.setStatus(status);

Zpdp_Entry inputStructure = new Zpdp_Entry();

inputStructure.setKunnr(addZeroes(custCode,10));

inputStructure.setPlan_Mm(getMm());

inputStructure.setPlan_Yyyy(getYear());

pdpFunctionInput.addIo_Table(inputStructure);

wdContext.currentZpdp_Function_InputElement().modelObject().execute();

wdContext.nodePDPFunctOutput().invalidate();

}catch(Exception e)

{

msgMngr.reportSuccess("Error while executing ZPDP_FUNCTION"+e);

}

//@@end

}

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member720137
Active Participant
0 Kudos

Hi Deepak

Just tell me u have used Table or any Other UI Element.. coz in case u have used the Table..

All u need to do is calculate the size of ur Table Node and iterate till the end...

U need to instantiate Zpdp_Entry structure every time u add a new element..

e.g :

just add this line of code..

for(int i=o ; i<wdcontext.TABLENODE().size();i++)

{

Zpdp_Entry inputStructure = new Zpdp_Entry();

inputStructure.setKunnr(addZeroes(custCode,10));

inputStructure.setPlan_Mm(getMm());

inputStructure.setPlan_Yyyy(getYear());

pdpFunctionInput.addIo_Table(inputStructure);

}

I hope it will solve ur problem..

Regards

Puneet

Former Member
0 Kudos

Hi Puneet

u didn't get my question.

actually fact is that the input to RFC are just 3 parameters (Kunnr, Plann_Mm, Plan_Yyyy). RFC is returning table which i have bind to another Table UI Element.

When i execute this RFC it rerurns correcr table rows first time.

But prob is that when i execute same RFC with another Kunnr value & same Plann_Mm, Plan_Yyyy the values of table doesn't change. they remain same forever

former_member720137
Active Participant
0 Kudos

Hi..

Try changing the View Property (LIFESPAN) to When_Visible..

Hope it will solve ur problem..

Regards

Puneet

Former Member
0 Kudos

Hi Puneet which lifespan property u r talking baout? and hw to change it??

Deeps