Skip to Content
avatar image
Former Member

BAPI Call

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,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Feb 12, 2009 at 07:39 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 12, 2009 at 10:12 PM

    Hi Shah,

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

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 13, 2009 at 12:27 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 13, 2009 at 12:33 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 13, 2009 at 06:40 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded