cancel
Showing results for 
Search instead for 
Did you mean: 

how to Transper data Model Node to Vallue Node

Former Member
0 Kudos

Hi Friends

I am getting problem in Create the Check box in Table

I am getting model node from ECC System(Zmmoa_Pending_Getlist_Input)

This is path for attributes avaliable

Zmmoa_Pending_Getlist_Input-Output-outtab

Under outtab all attributes available

My Requrement is display Check box. So I am doing like this I will care one more Vallue Node (OutTab_1) under this Vallue Node I put I have node attributes.here I careate one Check boxdatatype --Boolean(i.e Under outtab attributes)

Now I will get data from ModelNode and send that data to Vallue Node(by this node that data display in table formate.Eache Row Having Check box)

So I have to this Code But Data is Not getting in Vallunode table

in FirstView

in Submit Button

public void onActionGetData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionGetData(ServerEvent)

//$$begin ActionButton(1164287125)

//wdThis.wdGetExamp2CompController().checkSRA();

wdThis.wdGetExamp2CompController().checkBox();

wdThis.wdFirePlugToSV();

//$$end

//@@end

}

This is code writen in CC

public void checkBox( )

{

//@@begin checkBox()

//Date today = new Date(System.currentTimeMillis());

IWDMessageManager mes = wdComponentAPI.getMessageManager();

try

{

Zmmoa_Pending_Getlist_Input input1 = new Zmmoa_Pending_Getlist_Input();

wdContext.nodeZmmoa_Pending_Getlist_Input().bind(input1);

wdContext.currentZmmoa_Pending_Getlist_InputElement().modelObject().execute();

wdContext.nodeOuttab().invalidate();

// IPrivateExamp2Comp.IOutTab_1Element elem = wdContext.nodeOutTab_1().getOutTab_1ElementAt(i);

//mes.reportSuccess("Input:" +wdContext.nodeOuttab().size());

for (int i =0; i < wdContext.nodeOuttab().size(); i++)

{

//mes.reportSuccess("Input Of I:" +wdContext.nodeOutput().size());

//mes.reportSuccess("Input:" );

IPrivateExamp2Comp.IOuttabElement elem = wdContext.nodeOuttab().getOuttabElementAt(i);

//wdComponentAPI.getMessageManager().reportSuccess("elem:: "+elem);

IPrivateExamp2Comp.IOutTab_1Element result = wdContext.nodeOutTab_1().createOutTab_1Element();

//Zbapiresult result = new Zbapiresult();

result.setCheckBox(false);

result.setConf_Shp_Date(elem.getConf_Shp_Date());

wdComponentAPI.getMessageManager().reportSuccess("Conf_Shp_Date:: "+elem.getConf_Shp_Date());

result.setExpt_Shp_Date(elem.getExpt_Shp_Date());

result.setMaterial(elem.getMaterial());

result.setMatl_Desc(elem.getMatl_Desc());

result.setOa_Quantity(elem.getOa_Quantity());

result.setOpn_Quantity(elem.getOpn_Quantity());

result.setPo_Item(elem.getPo_Item());

result.setPo_Number(elem.getPo_Number());

result.setPo_Status(elem.getPo_Status());

result.setPur_Group(elem.getPur_Group());

result.setStat_Date(elem.getStat_Date());

result.setQuantity(elem.getQuantity());

wdContext.nodeOutTab_1().addElement(result);

}

}

catch(Exception e)

{

mes.reportException(e.getMessage(), false);

}

//@@end

}

can u help me

how to Transper data Model Node to Vallue Node. By using vallue node that data will display in table format with Check box.

I need data display in table format with Check box

Regards

Vijay Kalluri

Accepted Solutions (1)

Accepted Solutions (1)

former_member214651
Active Contributor
0 Kudos

Hi Vijay,

TO copy values from Model Node to Value Node use the copyElements() method of the WDCopyService API. To acheive this, the name and type of the attibutes in the Value Node should be same as Model node attributes.

Example: -

Model Node <----


> Value node

---Name-String ---Name - String

---Number-Integer ---Number - Integer.

then use the following statement:

WDCopyService.copyElements(wdContext.node<ModelNode>(),wdContext.node<ValueNode>());

This will copy all the values.

Regards,

Poojith MV

Former Member
0 Kudos

hi,

I want to copy from value node to model node will it work. i have binded a table to value node. if suppose i enter data in 3 rows. will it be possible to send these table data to model node.....

regards,

shreeharsha

Answers (2)

Answers (2)

p330068
Active Contributor
0 Kudos

Hi Vijay,

Please create custom value node and attribute in controller, then iterate the model node and put the value using I<Custom Node>Element object in your custom value node. check the codes for supply function

Hope it helps

Regards

Arun

Former Member
0 Kudos

Hi,

Your posted question is cluttered. Please post your question in simple terms. I am not able to understand your question.

Regards,

Ganga