cancel
Showing results for 
Search instead for 
Did you mean: 

FM not recieving table content

Former Member
0 Kudos

Hello Friends,

I am facing a tricky issue.

At the first screen of my applicaton, the data is displayed in tabular form by executing a FM in 'DISPLAY' mode

If the user choose to edit, the second screen is displayed to the user, where he can edit Data and Save it by pressing Submit button.

On submit, the input node is populated with all table contents and the same FM is executed with 'SAVE' mode.

Now the issue I am facing is that the table data is Not reaching FM (other data like empno, year, mode etc is recieved)

I have checked the Node Content just before execute method and the data is there.

I have debugged both at NWDS side and R3 side but I m not able to locate the source of problem.

please Help !!

Regards

Vidit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I am not sure if you have bind your structure to the input node. Make sure that you bind the DTA to the input node in DoInit of the component controller.

Example

//Nodes to Insert

__Civbr__Gem_E_Cltdb_Ins_Input nodeInsInput =

new __Civbr__Gem_E_Cltdb_Ins_Input();

wdContext.node__Civbr__Gem_E_Cltdb_Ins_Input().bind(nodeInsInput);

nodeInsInput.setIs_Gem_Dta(new __Civbr__Gem_Dta());

Former Member
0 Kudos

Hi Baskaran

I have done that.

As I have mentioned in my previous post, I have iterated (using MessageManager )over the whole Context node just before execute() method call and the data is properly populated in it.

But this data is not reaching FM some how.

Do you have some more inputs

Regards,

vidit

Former Member
0 Kudos

Hi,

If it is a structure then you may have to check the SupplyRelationRole in Context model node.

If it is a table then you have to create a list,set the attributes and add the list to the node.

If they are still not working, then post the component controller code,context node screen print.May be i can have a look on it.

Former Member
0 Kudos

Hi Baskaran,

Here is the Component Controller code

public void wdDoInit()

{

//@@begin wdDoInit()

initializeContext( );

setlabel();

//@@end

}

public void executeRFM( )

{

//@@begin executeRFM()

try

{

if(secondtime)

{

for (int i=0 ; i<25; i++)

{

printMsg("Values recieved are "+wdContext.nodeZhr_Investment_Input().nodeZitinv1_input().getZitinv1_inputElementAt(i).getPcntr());

}

}

printMsg("Execution Mode :"+wdContext.nodeZhr_Investment_Input().currentZhr_Investment_InputElement().getMode());

input_Zhr_Investment.execute();

wdContext.nodeOutput().invalidate();

secondtime =true;

}

catch (WDDynamicRFCExecuteException e)

{

msgManager.raiseException("Failed to Execute" +e.getMessage(),false);

e.printStackTrace();

}

//@@end

}

public void initializeContext( )

{

//@@begin initializeContext()

userID = wdContext.nodeUid().currentUidElement().getUserID();

msgManager = wdThis.wdGetAPI().getMessageManager();

input_Zhr_Investment = new Zhr_Investment_Input();

input_Zhr_Investment.setEmpno(userID);

wdContext.nodeZhr_Investment_Input().bind(input_Zhr_Investment);

// Default to Read only mode

wdContext.nodeReadMode().currentReadModeElement().setBActualDeclaration(true);

wdContext.nodeReadMode().currentReadModeElement().setBProposedDeclaration(true);

//@@end

}

public void saveDeclaration( )

{

//@@begin saveDeclaration()

wdContext.nodeZhr_Investment_Input().currentZhr_Investment_InputElement().setMode(SAVE_MODE);

int size = wdContext.nodeOutput().nodeZitinv1().size();

Zitinv_Inv input_Zitinv_Inv[] = new Zitinv_Inv[size];

com.sap.aii.proxy.framework.core.AbstractList inputObjlist = new Zitinv_Inv.Zitinv_Inv_List();

String ActualAmount;

String ProposedAmount;

for (int i=0;i<size;i++)

{

input_Zitinv_Inv<i> = new Zitinv_Inv();

if(null!=wdContext.nodeOutput().nodeZitinv1().getZitinv1ElementAt(i).getAcntr())

{

ActualAmount = wdContext.nodeOutput().nodeZitinv1().getZitinv1ElementAt(i).getAcntr().toString();

input_Zitinv_Inv<i>.setAcntr(ActualAmount);

input_Zitinv_Inv<i>.setSrno(wdContext.nodeOutput().nodeZitinv1().getZitinv1ElementAt(i).getSrno());

input_Zitinv_Inv<i>.setSbtxt(wdContext.nodeOutput().nodeZitinv1().getZitinv1ElementAt(i).getSbtxt());

input_Zitinv_Inv<i>.setZsection(wdContext.nodeOutput().nodeZitinv1().getZitinv1ElementAt(i).getZsection());

input_Zitinv_Inv<i>.setSdvlt(wdContext.nodeOutput().nodeZitinv1().getZitinv1ElementAt(i).getSdvlt());

}

if(null!=wdContext.nodeOutput().nodeZitinv1().getZitinv1ElementAt(i).getPcntr())

{

ProposedAmount = wdContext.nodeOutput().nodeZitinv1().getZitinv1ElementAt(i).getPcntr().toString();

input_Zitinv_Inv<i>.setPcntr(ProposedAmount);

}

inputObjlist.add(input_Zitinv_Inv<i>);

}

wdContext.nodeZhr_Investment_Input().nodeZitinv1_input().bind(inputObjlist);

executeRFM();

//@@end

}

public void displayInvestmentDeclaration( )

{

//@@begin displayInvestmentDeclaration()

wdContext.nodeZhr_Investment_Input().currentZhr_Investment_InputElement().setMode(DISPLAY_MODE);

executeRFM();

CheckReadMode();

//@@end

}

Context Structure is :

Context

-


zhr_Investment_Input

-


output

-


Zitinv1

-


<attributes>like Acntr, invtyp etc..

-


Zitinv1_input

-


<attributes> like acntr, invtyp etc..

-


Empno

-


Mode

Regards,

Vidit

---

Former Member
0 Kudos

Hi Vidit,

We have encountered this problem. Solution is that for Tables you need to bind them directly with ModelObject.

So i guess if you replace your code

wdContext.nodeZhr_Investment_Input().nodeZitinv1_input().bind(inputObjlist);

with this (something simillar) would work

wdContext.currentZhr_Investment_InputElement().modelObject().add<fill your table name>

PS: This means you need to clear the modelObject every consequtive times you execute this model.

if (wdContext.currentZhr_Investment_InputElement().modelObject().add<fill your table name>!= null) {

wdContext.currentZhr_Investment_InputElement().modelObject().add<fill your table name>.clear();

}

Former Member
0 Kudos

Hi Baskaran,

I tried your suggestion and its working !!!!!!!

Thanks for your prompt and precise help.

Full points to you !

Regards

Vidit

Edited by: Vidit on Aug 16, 2008 8:09 AM

Answers (0)