Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP development using .Net connector 3.0

Former Member
0 Likes
1,373

Im assuming this is the right place for this question if not then please dont beat me.

I know how to get from RfcTable information once the function is Invoke()ED. What I dont know is how to pass a RfcTable to a function before function.Invoke().

FYI, I am using VisualStudio 2005 and SAP .Net connector 3.0.

Any place in SAP or web or any pointer will help.

Thanks

Abbas

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,318

hii,

go through this links

1,

2 http://help.sap.com/saphelp_nw04/helpdata/EN/0c/c59f7cd9648f408fe4943fc9dab264/content.htm

3.http://www.codeproject.com/KB/database/SapDBReader.aspx

4.http://www.codeproject.com/KB/dotnet/SAP_NET_RFC_Server.aspx

5.http://help.sap.com/saphelp_NW04/helpdata/en/7a/4a6083e0f3bf44aa87cc8e03a49ff8/content.htm

6.

7.

regards,

Sri

Im assuming this is the right place for this question if not then please dont beat me.

I know how to get from RfcTable information once the function is Invoke()ED. What I dont know is how to pass a RfcTable to a function before function.Invoke().

FYI, I am using VisualStudio 2005 and SAP .Net connector 3.0.

Any place in SAP or web or any pointer will help.

Thanks

Abbas

9 REPLIES 9
Read only

Former Member
0 Likes
1,319

hii,

go through this links

1,

2 http://help.sap.com/saphelp_nw04/helpdata/EN/0c/c59f7cd9648f408fe4943fc9dab264/content.htm

3.http://www.codeproject.com/KB/database/SapDBReader.aspx

4.http://www.codeproject.com/KB/dotnet/SAP_NET_RFC_Server.aspx

5.http://help.sap.com/saphelp_NW04/helpdata/en/7a/4a6083e0f3bf44aa87cc8e03a49ff8/content.htm

6.

7.

regards,

Sri

Read only

0 Likes
1,318

Thanks Sri,

It helped me quite a bit but Im still there.

I am calling BAPI function BAPI_SALESORDER_GETLIST from inside SAP and it is returning me 780 rows. But if I call the same function from my .net code then it is giving no exception but return structure is saying I have nothing for you.

In ReturnStructure, TYPE is E, CODE is V4213, MESSAGE is "No data found", LOG_NO is "", LOG_MSG_NO is 000000

My code is following

IRfcFunction companyBapi = repository.CreateFunction("BAPI_SALESORDER_GETLIST");

companyBapi.SetValue("CUSTOMER_NUMBER", "1360");

companyBapi.SetValue("SALES_ORGANIZATION", "1000");

companyBapi.Invoke(prd);

rCode = companyBapi.GetStructure("RETURN");

s = rCode.GetString("TYPE"); // E

s = rCode.GetString("CODE");// V4213

s = rCode.GetString("MESSAGE");// No data found

s = rCode.GetString("LOG_NO"); // ""

s = rCode.GetString("LOG_MSG_NO"); // 000000

Any help please. I am really stuck at this for quite some time.

Help please. Thanks

Abbas

Read only

0 Likes
1,318

Hi Abbas,

Give the leading zeros in that customer. That will solve your issue. Post if you need more help in this. Here you given 1360 instead of that given 0000001360 give you will get. This is because of conversion. In sap directly system will give but in non sap you have to pass.

Regards,

madhu.

Edited by: madhurao123 on Mar 28, 2011 7:19 AM

Read only

0 Likes
1,318

Dear Madhu,

You cant imagine the inner happiness when I saw it working. I was struggling for almost a month. It worked like charm.

I see you edited your email mentioning leading six zeros but how you find the exact length of some field? Is it in data dictionary? And I think for data dictionary the T code is SE12?

Also, how did you find out that it was the length of the field? Was this information in some error code?

I got the answer what I was looking for but anyone can tell that how one can find the size of the field then that will be bonus.

Thank you so much.

Abbas

Edited by: FazalAbbas on Mar 28, 2011 6:45 PM

Read only

0 Likes
1,318

hii,

1.se11 (table name) check the feild.

2.se16 select the feild name.

3.you can click on the feild directly.

regards,

sri

Read only

0 Likes
1,318

Thanks Sri

Here's whats happeniing.

When I write /nSE11,

Screen heading is "Data Browser:Initial Screen"

Table Name : an_edit_box

When I write SALES_ORDERS in that edit box and press ENTER, it says "Table SALES_ORDERS is not active in the Dictionary".

How I got this word SALES_ORDERS? I am running a function BAPI_SALESORDERS_GETLIST. In the BAPI EXPLORER, it says that on success, I will receive SALES_ORDERS table.

I am assuming that once I get to the table definition, I will dig deep for the individual field.

Thank you so much.

Abbas

Read only

0 Likes
1,318

Hi Abbas,

That structures you ca not get in that. I struggled in the same way when i am trying to create a sales order. For most of the cases it will happen . If you do directly in sap it will adjust the leading zeros. Any it is good to hear that it is working. Close the thread if it is answered. Post if you need more help in this.

The way to find the length is just click in the parameter and double click on the filed value you will get the length.

Regards,

Madhu.

Edited by: madhurao123 on Mar 29, 2011 6:10 AM

Read only

0 Likes
1,318

Thanks everyone. It really helped.

Abbas

Read only

0 Likes
1,318

Hi,

I am trying to upload data into Ztables using a BAPI provided by the client, using C#.

I am using .Net Connector3.0.

If you have any e.g on this, it will be helpful.

Regards,