on 12-29-2006 4:07 AM
Dear SDN's,
Is it possible to call the R/3 Table Directly with out the intervention of RFC or BAPI.i.e., from ABAP Data dictionary to Visual Composer.
Aim of the appliation:
Developing a screen to maintain ABAP tables using Visual Composer.
Your help will be appreciated.
Regards,
sireesha.B
First: why would you want that? If you have multiple tables you can run into real problems, if you do this?
Second: no, you always need an RFC. An R/3 System is not like a database. In my book from SAP Press about Visual Composer, we have a function module, that allows to access any specified table. You would need to extend it for write functionality.
BUT: you must be aware that using such an RFC you might destroy data consistency and allow unauthorized access to your data.
function z_dynamic_rfc.
*"----
""Local Interface:
*" IMPORTING
*" VALUE(I_CODE) TYPE STRING
*" VALUE(I_DEBUG) TYPE CHAR1
*" EXPORTING
*" VALUE(E_TEXT) TYPE STRING
*"----
data:
ls_code(72),
lt_code(72) occurs 10,
l_prog(8),
l_mess type string,
l_numb type num03,
lt_table type table of z_table,
ls_table type z_table,
l_sid type string,
l_lng type i,
l_take type i,
l_left type i,
l_cnt type i,
l_tmp_cnt type i,
l_tmp,
l_off type i.
check not i_code is initial.
if i_debug = 'X'.
select * from z_table into table lt_table.
sort lt_table descending by counter.
read table lt_table into ls_table index 1.
l_numb = ls_table-counter.
endif.
append 'PROGRAM SUBPOOL.' to lt_code.
append 'FORM TABLE CHANGING L_OUTPUT TYPE STRING.' to
lt_code.
l_lng = strlen( i_code ).
l_left = l_lng.
do.
find '.' in section offset l_cnt of i_code
match offset l_off.
if sy-subrc = 0.
099.book Seite 503 Mittwoch, 27. September 2006 4:53 16
504
B Coding for Integration Examples
l_take = ( l_off + 1 ) - l_cnt.
if l_take > 72.
clear: l_tmp_cnt, l_tmp.
l_take = 71.
do.
l_tmp_cnt = l_cnt + l_take.
l_tmp = i_code+l_tmp_cnt(1).
if l_tmp is initial.
exit.
else.
l_take = l_take - 1.
endif.
enddo.
endif.
ls_code = i_code+l_cnt(l_take).
append ls_code to lt_code.
clear ls_code.
l_cnt = l_cnt + l_take.
l_left = l_lng - l_cnt.
if l_left <= 0.
exit.
endif.
endif.
enddo.
append 'ENDFORM.' to lt_code.
if i_debug = 'X'.
loop at lt_code into ls_code.
l_numb = l_numb + 1.
clear ls_table.
ls_table-counter = l_numb.
ls_table-text = ls_code.
insert z_table from ls_table.
endloop.
endif.
generate subroutine pool lt_code name l_prog
message l_mess
shortdump-id l_sid.
if l_mess <> space or l_sid <> space.
break-point.
else.
perform ('TABLE') in program (l_prog)
changing e_text.
endif.
endfunction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mario,
I have tried to retrieve the tables from sql server using JDBC Connector.
But it is not retrieving the tables created. It is giving me some functions but not the tables.
Is it possible to get the tables directly for table maintainance.
If So, shall i get the tables created in R/3 via ABAP Engine, since all the database tables should be under the same DAtabase instance right!
So my aim here is to get the tables created in R/3 via JDBC complaint object.
Is this possible.
Pls shed a light on this forum.
Thanks in advance,
Sireesha.B
Hi Mario,
I created a system in portal using "JDBC system" with following details:
URL: jdbc:sap:sqlserver://<Machine_Name>:<Port>;DatabaseName=SurveyDB1
Driver: com.sap.portals.jdbc.sqlserver.SQLServerDriver
"SurveyDB1" is the database that i created.In that database i have tables and Procedures.
But by that i am able to access only procedures not the tables in VC.
So please kindly suggest what to do in order to access the table directly.
Do i need to change the "URL" ?
Regards
Paresh
1) You need to use the BI JDBC Connector, not the Portal JDBC connector.
2) I would discourage the access of tables created with R/3 from JDBC. I guess your R/3 admin will not even give you access to the database behind the SAP system.
You might also want to check out the Connectivity part of the Visual Composer WIKI:
With user mapping to the backend, the backend knows what user is accessing it. So your RFC knows who's the user and can request this information with sy-user.
Another way is perhaps to use in the VC the User Data Connector to retrieve more information about the current VC user/role/department. I don't know too much about it but here is a WIKI entry:
https://wiki.sdn.sap.com/wiki/display/VC/Usingrolestoinfluenceapplication
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.