‎2010 Oct 26 3:09 PM
Hi
I have to get data from maintemence view and use it in a .NET program. I want to be able to get data from a maintenence view the same way as rfc_read_table gives me data from a r/3 table.
I think it is possible to create an abap function that takes a parameter <viewname> and calls the function Viewproc_<viewname> and then returns the TOAL table form Viewproc.
As far as i can see, foreach view, there is an abap function Viewproc_<viewname> that can give me the data i need.
Any comments or ideas? Or even better an abap problem that can solve my problem.
Im a university student with very little SAP experience, so i appreciate all the help i can get.
Thanks
‎2010 Oct 26 3:34 PM
Hi,
You can use BAPI function modules for non-SAP environments, just invoke a SAP BAPI (RFC) function from .net application. by connecting thru SAP.Connector.dll to SAP.
Check the tcode BAPI, search for the object type methods
or
use search help by typng BAPI* in SE37, function builder field.
Hope this help you, if it is wrong, pls post the answer here. ThanQ
‎2010 Oct 26 3:41 PM
‎2010 Nov 02 8:01 AM
Hi
The rfc_read_table does not allow me to read from a maintenance view
‎2010 Nov 02 10:46 AM
‎2010 Nov 04 9:06 AM
Hi
Maybe i just have a hard time understanding SAP. To my knowledge, mainteneance views are generated on the fly and the data is not stored in a single table. Thats why rfc_read_table cannot be used. Right?
But - the FM view_maintenance_call can give me the relevant data in the SAP userinterface. Why cant i just enable RFC on that module?
Or perhaps one could build a module that gets the data form view_Maintenance_Call and returns it in some kind of temporary table. Please notice that i only need to read data, and not alter it. I therefor only need to pass the 2 non optional parameters to the function. Action (Display) and VIEW_NAME
‎2010 Nov 04 9:16 AM
Hi
Keshav is right, the maintenance view can't be used for data selection, if you need to use it for the join you can try to define a new view, but a DATABASE VIEW but arranged as maintenance.
Then u can try to use RFC_READ_TABLE to read the database view
Max
Edited by: max bianchi on Nov 4, 2010 10:17 AM
‎2010 Nov 04 10:28 AM
Thanks for the reply.
The problem is that i need to extract configuration data the same way as it is presented in the IMG.
For example the PP-PI "Process order types" that are maintained in the view "V_T003O_40".
All i want is a table with that data returned through an rfc function.
I have to extract large amounts of data, and manually creating database views for all views are unfortunately not an option.
‎2010 Nov 04 10:40 AM
Hello,
As mentioned you can't SELECT data from Maintenance View using Open SQL statements. Alternatively you can access the data via the FM 'VIEW_GET_DATA'.
The FM 'VIEW_GET_DATA' is not remote enabled. You can wrap this FM in a custom FM & try.
BR,
Suhas
‎2010 Nov 04 11:21 AM
Hi
If it's so u can try the solution suggested by Suhas: it seems to sound good
Max
‎2010 Dec 16 1:46 PM
Hi
Thats sounds like the way to go. I have absolutely no ABAP expreience, and therefor no chance of coding a FM wrapper to expose the "VIEW_GET_DATA" method. How long time would you estimate that a such module would take to develop for a pro ABAP programmer?
Thanks in advance
Kristian
‎2010 Oct 26 3:46 PM
Hello Kris,
You can make use of the standard SAP Vie maintenance FM "VIEW_MAINTENANCE_CALL". But the only pre-requisties is that you need to create the table maintenence view for your custom tables.
Let me know if you have any questions.
Thanks,
Greetson
‎2010 Nov 02 8:06 AM
Hi
I have asked a SAP technician to enable RFC for the VIEW_MAINTENANCE_CALL. It was not possible: Here is his explanation why:
"unfortunately i cannot acrivate rfc for the module. I have tried to activate it, but then most datadefinitions must be corrected, since LIKE and TYPE are not valid definitions to RFC calls."
So it seems like im back to square one:(