cancel
Showing results for 
Search instead for 
Did you mean: 

(Urgent) displaying Bapi return values...

Former Member
0 Kudos

Hii All..

i've developed a web service in asp.net which uses .ent connector to talk to sap server.i'm calling Bapi_po_Getdetail to get the details of a particular PO Number.but the proxy classes generated returns an object which contains different saptables n other structures.

Someone cud please help me in getting the return values which i can return via webservice and display in a datagrid.

if u have any other way to acheive this please guide....

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prakash,

There are many tables and structures that are returned but there is the way u can get the only structure or table u want....

right click on the BAPI_Po_GetDetail method in the design window of wsdl file of sapproxy generated.In the popup menu select edit properties.

Members of the method are shown at the right hand side of the window.Select the member(structure/table) that is bind to some field, then on the left flank see the properties(optional and Removed) of that member. If Optional property is false then u can not remove this member from the object returned.If Optional property is True then u can get or remove this member from the object returned by setting Removed property False or True respectively.

Now Bind the desired Field(table type) to the datagrid to see the result.

Regards,

Vishal Gupta

Former Member
0 Kudos

Thanx Vishal..

Your advice was helpful but,this bapi call has 17 return values with 15 sap tables and 2 other structures namely BAPIADDRESS and BAPIEKKOL. There is no data in the sap tables but data in these two structures.what do i need to do to read these values.Also cud u tell me how do i make out which table of all the returned tables contained all the required data(in this case PO Details)

Prakash

Former Member
0 Kudos

Hi Prakash,

Create sapproxy field and assign it to desired type (i.e. table or structure). Assign the default value of member of BAPI_PO_GetDetail method (when right click on it and edit parameters) to this field. Bind this Field to datagrid.

To get the PO Details the desired table is BAPIEKPOTable.

Regards,

Vishal Gupta

Former Member
0 Kudos

Thanx Vishal..

i've done everything u have suggested.But when i debug and check the return values values from the bapi,BAPIEKPOTable doesnot have any data or for that matter any retuening table doesnot have any data except the first two structures namely BAPIADDRESS.

What does this signify...

Regards

Prakash

Former Member
0 Kudos

Hi Prakash,

In this case there is not any detail of the the desired PO so BAPIEKPOTable(is NULL) does not have any data. But if u explore other two structures it also does not have any significant information,these structures have been just initialized(u can see the way these two members are passed in the method, that is 'out' parameter and i think u know the significance of 'out' keyword in c#). That is why these two structures(BAPIAddress, ...) always contain some data instead of NULL.

Regards,

Vishal

Former Member
0 Kudos

Hi Prakash,

In this case there is not any detail of the the desired PO so BAPIEKPOTable(is NULL) does not have any data. But if u explore other two structures it also does not have any significant information,these structures have been just initialized(u can see the way these two members are passed in the method, that is 'out' parameter and i think u know the significance of 'out' keyword in c#). That is why these two structures(BAPIAddress, ...) always contain some data instead of NULL.

Regards,

Vishal

Answers (0)