on 04-12-2007 9:20 PM
I am a Visual Studio .NET developer and will be starting on a new project in about a month. Part of that project will entail some SAP transactions: retrieving equipment changes, retrieving functional location changes, creating work orders and retrieving work order changes.
In the past, we have paid a lot of $$ to have custom interfaces created in SAP to meet our needs, but this time, we were hoping to be able to use the .NET Connector and do this work ourselves. So, I have been 'playing with' the connector in Visual Studio. I have gotten some things to work and it looks like a viable tool IF you know which BAPIs to call and IF you can find a BAPI that does what you want it to do.
I have not been able to find a BAPI that will retrieve equipment or functional location changes; nothing seems to allow you to input a date range and search for those records that satisfy that query...except for the RFC_READ_TABLE. I have read many posts about RFC_READ_TABLE and how it shouldn't be used for production purposes. Are there any BAPIs out there that might do what I need so that I don't feel forced to consider the RFC_READ_TABLE ? If there are, how would I find out what those BAPIs are and what they specifically do?
My only source seems to be using the connector through Visual Studio to enter a filter and list the BAPIs that match. I can look at some of the names and speculate about what function they perform, but guessing isn't a good way to develop an application.
I have access to log into our SAP system. And I know what screens have the data that I am looking for. Is there a BAPI behind those screens and if so, how do I find out what they are?
I would appreciate any feedback that might steer me in the right direction on this.
Hi Sylvia,
how are you doing ?
>>My only source seems to be using the connector through Visual Studio to
>>enter a filter and list the BAPIs that match. I can look at some of the names
>>and speculate about what function they perform, but guessing isn't a good way
>>to develop an application.
1> have you tried the alphabetical / hirearchial views of objects available in the server explorer itself ?
they are very useful when looking for specific bapi's
2> as mentioned by Andre, you could use transaction BAPI on the SAP side
3> or the brute force way of se37 and using '*': eg. : to find purchase related bapi's bapipur*
>>I have access to log into our SAP system. And I know what screens have the
>>data that I am looking for. Is there a BAPI behind those screens and if so, how
>>do I find out what they are?
if you go to your targeted screen, you could then :
System >> Status >> SAP Data >> Repository Data
Double click on the value for Program (GUI) and then if you can undestand ABAP, read on to find all the invoked BAPI's
)
with respect,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Amit. I appreciate your response.
Yes,I have looked at the views of objects in server explorer, however, I know nothing about SAP so these views help a little in knowing the BAPIs that are available, but I'm having trouble finding what I need because I can find no reference on these BAPIs to tell me what specifically I need to pass in and what I can expect in return. Its all just trial and error and very time consuming.
I did use the BAPI transaction and it was somewhat useful. I tried the SE37 as well. This didn't seem to list all of the BAPIs that I know are out there...it was a very limited set that seemed to deal with only employee and bank data.
I looked at the repository data like you suggested. I used the transaction IH08 and I see that it lists RIEQUI20 as the program. I am assuming this is the program that displays the IH08 screen. Is there anyway for me (thru the .NET Connector) to mimick this screen (i.e., plug in a change date range and tell it to search) and then pass back the output to my program? I'm sure there's not, but thought I would ask...
Is there a book out there or reference anywhere that lists the different bapi's that are available and how to call them from a VB or C# type program?
Again, thanks for your help!
Hi sylvia,
how are you doing ?
>> Is there anyway for me (thru the .NET Connector) to mimick this screen (i.e.,
>> plug in a change date range and tell it to search) and then pass back the
>> output to my program? I'm sure there's not, but thought I would ask...
abap screens cannot be directly imported using NCo (SAP .NET Connector)
do you use EP ?
if you do , you could use a SAP transactional iView that could be embedded into a SAP .NET Portal application [using NPDK , SAP .NET PDK]
>>Is there a book out there or reference anywhere that lists the different bapi's
>>that are available and how to call them from a VB or C# type program?
the bapi's them selves vary from version to version of SAP system
almost 80% remain constant though across all SAP systems
so finding a BAPI comes down to either functional knowledge, or ABAP profeciency, usually if you post a question in the particular forum on SDN, you should get an answer by an expert quite quickly
there are many books covering BAPI's available on amazon
i have not come across one which details your specific requirement
but by far the most efficient way i learn is :
1> debugging the screen in ABAP(method in previous post) to see which bapi's were used in the code
2> learn about those BAPI's using transaction 'bapi'
with respect,
amit
Thanks, Amit.
I do not know what EP is. but this will not be a web app so I don't think this is an option for me.
thanks for the book references and your continued help on this! Sounds like I just need to get a book, maybe try a class and play around with this a bit to see what will work for us.
Many thanks for your support!
Hi Sylvia,
how are you doing today ?
glad to help out
EP = SAP NetWeaver Portal [formerly Enterprise Portal]
https://www.sdn.sap.com/irj/sdn/portal
thank you for the 'helpful answer' reward points.
with respect,
amit
I'm a .net guy and new to sap and I found it near impenetrable. What seems to happen is that some BAPI's allow for filters and some don't and where they don't you have to get all the data and filter it after the fact. Generally if there is no filter its still pretty fast.
However, what you might consider is to write a function in ABAP that does the query you want then call that function from tyhe .NET connector.
This does mean learning a bit of ABAP but its a lot like cobol/informix4gl/c and badly thrown together (thats the c# person in me having a dig).
To see your function you have to add it as a filter in the .Net connectors explorer window it will not appear as a BOR function.
(For the following speak to your SAP people)
To write a function ask about SE80 transaction.
Create a function group, create a function module
Return your data in tables and enter these in the TABLES tab
enter the code.
here is an example I wrote
FUNCTION ZA01EXTTEST.
*"----
""Local Interface:
*" TABLES
*" CUSTOMER STRUCTURE ZAO_CUSTOMER_01
*" RETURN STRUCTURE BAPIRETURN
*"----
data wa_bapireturn like bapireturn.
SELECT * FROM ZAO_CUSTOMER_01 into TABLE customer .
IF sy-subrc = 0.
wa_bapireturn-TYPE = 'S'.
ELSE.
wa_bapireturn-TYPE = 'E'.
wa_bapireturn-MESSAGE = 'S''Busted'.
ENDIF.
insert wa_bapireturn into table RETURN .
ENDFUNCTION.
Really simple stuff and Im sure the SAP guys can pick fault but from what I have read on this forum about permissions and return sizes etc, this is probably your best bet.
I just re-read your post and notice that you are well aware of this RFC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We've never used it as a solution. In our environment we always team up the .NET developer with a custom ABAP RFC. This saves us the trouble of having to get our .NET developers up to speed on relationships of all the SAP tables. We create custom RFC's like "Z_LOOKUP_ORDER_STATUS", etc. We also simplify the interface and return records for our .NET developers as to not give them all the fields that a BAPI would which may or may not be pertinant.
If you use RFC_READ_TABLE keep in mind the following
- any issues with the RFC, SAP will not support
- during upgrades there is no guarantee that it will work (tho I imagine it will unless SAP purposely removes it).
- you have a limit of return record sizes of 512 characters
Also from the web I would want to be careful on the size of the queries executed from RFC_READ_TABLE. You could bring your SAP production environment to it's knees if you run several of these queries at 1 time and it eats up all of the dialog processes depending on how many users you have running concurrently and how many dialog processes you have in your PRD environment.
These are the considerations that I see before I would use it. I'm curious if anyone has heard of others.
You can try using 'RFC_READ_TABLE'. This is a Remote-Enabled Module (RFC), it's not a BAPI but you should still be able to connect to it via .NET. May need to use .NET connector to generate an object to communicate with. I'm not a .NET programmer but we've done quite a bit with generateing RFC's for our website (C# .NET).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sylvia,
the first question I have is whether you need the SAP .NET connector.
If your SAP system is based on SAP Web application server (6.20) or SAP NetWeaver 2004 or 2004s each BAPI can be published as a Web service and thus be consumed using Visual Studio without the need of a connector.
If you need additional information how a specific BAPI does work you should use the transaction BAPI to find out those people how really need a vaction.
Best regards,
André
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Andre,
Thanks for your response.
Based on what I have read, we do need the .NET Connector. We are on version 4.6c of SAP. Do you agree that the connector is our only avenue?
I used the BAPI transaction you mentioned. It is helpful, but I don't see a transaction that would allow me to search against the change date of Equipment or Functional Location. Again, RFC_READ_TABLE is about the only thing I have seen mentioned in postings that might accomplish this function for me. Do you know of anything else?
Let me ask a dumb question (and now you'll see that I really know NOTHING about SAP). When log into SAP and enter the IH08 transaction, I see a screen where I can enter a beginning and ending change date and find the equipment that has been changed between those two dates. Is there a BAPI behind that screen that finds the information? Is whatever searches for this data accessible to me from the .NET Connector?
Thanks so much for your help!
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.