cancel
Showing results for 
Search instead for 
Did you mean: 

getting data into itembox from rfc

Former Member
0 Kudos

hi

i have writen the follwing code to get the rfc data into the

itemlistbox

IPrivateTestView.IG_XXX_ModelElement carModelElement=wdContext.nodeG_Car_Model().createG_XXX_ModelElement(new Zlgs_Sglfild_Model());

carModelElement.getP_Model();

wdContext.nodeG_Car_Model().addElement(carModelElement)

and i have called the rfc from the component controller

but i am not able to get the data into the itemlistbox

i have binded the node to the datasource and text to the xxx

can any one help me out? its urgent ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Kishore,

Try following code:

In wdDoInit of Component controller:

wdContext.nodeZXXX_Input().bind(new ZXXX_Input());

In a public method, suppose executeRfc method type following code:

try {
wdContext.nodeZXXX_input().currentZXXX_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
catch(WDRFCException e) {
 wdComponentApi.getMessageManager().reportException(e.getMessage(),true);
}

Call this method of component controller in wdDoInit of the view.

Regards,

Gopal

Former Member
0 Kudos

hi

thanks for the reply

i have done the same thing what u have said

but iam not able get the data in the itemlistbox

the rfc has been written in a such a way that

three itemlistboxes will be filled at a time

w.r.t the structure which i have for the backend

is bind to the datasource and text

i have gxx,gyy,gzz as structures

pxx,pyy,pzz as element for the respective structures and all these structures are under ZBapi_input

and i have the zbapi.gxx to the first data source

of the itembox and zbapi.gxx.pxx to the text of the

same itembox and similarily others itemlistboxes

and i have done exactly what Gopal had said

but i am unable to view the get the data in the itemlist?

can any solve this issue ? its very urgent?

nikhil_bose
Active Contributor
0 Kudos

To call RFC in the component controller use following code:


try {
wdContext.currentG_XXX_ModelElement().modelObject().execute();
}
catch(WDRFCException e) {
 e.printStackTrace();
}
wdContext.nodeOutItems().invalidate();

tell me what does carModelElement.getP_Model(); statement for?

nikhiL

Former Member
0 Kudos

hi

thanks for the reply .

my problem is i have 3 itemlistbox

and i have called an RFC ex. ZXXX

not in the context of view controller i have

ZXXX_input and under this i have GXXnode and

for GXXnode i have pyy element , not i have

binded the gxxnode to the datasource of the itembox

and text to the pyy. and lly i have done for the other

two itemlistbox.

and i have executed the rfc.

not the problem is iam not able to view the data in the

itemlistbox ?

its urgent? can any one help me out ? .