Skip to Content

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

How to add multiple records in table thru form via Submit button

Hi all

i have small requirement as follows.

i have a view in which i have 3 UI elements one is webdynpro form,Table UI element and third one is submit button.

now at runtime when i will enter the details in the form and click on the submit button then those record details has been stored in Table. then next time again when i submit the form with details then the table contains all records of current and existing ...so table has to maintain mutile records thru form via submit form..

i need sample code on the same.

points are always rewardable

Thanks

Sunil

Former Member
Former Member replied

Hi,

Create one context attribute and map it to the Inputfiled and one submit button, create a node with a valueattribute map it to a Table and in onActionsubmit write this code

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

{

//@@begin onActionsubmit(ServerEvent)

String str=wdContext.currentContextElement().getInputfiledattribute();

IPrivateTableformView.ITablenodeNode node=wdContext.nodeTablenode();

IPrivateTableformView.ITablenodeElement ele=node.createTablenodeElement();

ele.setNodeattribute(str);

node.addElement(ele);

//@@end

}

thanx,

ramani.p

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question