cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI Call

Former Member
0 Kudos

Hello Friends,

I have to call a BAPI and made the return table visible in view...

So From my first view I call the bapi like this...

	
                Zport_Read_Serial_No_Input 	input = new Zport_Read_Serial_No_Input();
	input.setIv_Vbeln_Vl(vbeln);
	input.setIv_Posnr(posnr_Vl);
	try {
		input.execute();
	} catch (Exception ex) {
		
		mm.reportSuccess(ex.getMessage());
	
	}

my mapping is over the custom controller......

I placed the breakpoint at backend to see if my data is comming....... and yes data is comming in backend and it returns the table... but unfortunately the table data is not visible in my 2nd view.... ( the context of my 2nd view is mapped also with custom controller.....

I made few test try... e.g


mm.reportSuccess("size " + wdThis.wdGetDownloadControllerController().wdGetContext().nodeZport_Read_Serial_No_Input().nodeOutput_Serial_No().nodeIt_Ser_No().size());

The size is 0, where as there is some data in the return table.. then I tried following

mm.reportSuccess("size " + input.getIv_Vbeln_Vl());

where as vbeln_vi is one field of the table and the above line has printed one value.....

I dont understand why my mapped table is not showing the result ?? I did mapping like following

MODEL: Serial_no_list

- zport_read_serial_input

-


output

-


it_ser_no

and this it_ser_no is the table whic I try to print ??? is it the wornge one ??

Please suggest what I am doing wronge ?

Regards,

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

hii,

If u r checking at R3 side, data is coming from dynpro and output not returned from R3 to dynpro, check with the ABAP guy for the logic or some error at ABAP.

Former Member
0 Kudos

hi,

U have to bind the instance of model node after creating it.Use th code i have given above an after execute use

wdContext.nodeYourOutput().invalidate();

YourOutput----the output model node that is nested inside Zport_Read_Serial_No_Input node.

Regards

Jayapriya

Former Member
0 Kudos

hi,

Zport_Read_Serial_No_Input input = new Zport_Read_Serial_No_Input();

wdContext.nodeZport_Read_Serial_No_Input().bind(input);

input.setIv_Vbeln_Vl(vbeln);

input.setIv_Posnr(posnr_Vl);

try {

input.execute();

} catch (Exception ex) {

mm.reportSuccess(ex.getMessage());

}

Regards

Jayapriya

Former Member
0 Kudos

Hi Shah,

I don't see the "invalidate" sentence for your ouptput node in your code.

Regards.

Former Member
0 Kudos

Does anyone has any tip for me ??

input parameters are comming to the BAPI but return parameters are not avaiable.... the return table is not comming in VIEW....

Please suggest wht I am doing wrong...

Edited by: Shah H on Feb 12, 2009 8:47 PM