CLOB extraction using DBLINKS
Dear All,
I am trying to extract some CLOB data from other database using DB Link.
But I got an error stating that it cant be done using DB Links.
Is there any work around for this approach.
Much Appreciate your help on this.
Thanks,
Madhu K.
No version number.
No DML.
No DDL.
No error message (just your interpretation of one).
No help is possible at this time.
Similar Messages
-
Using dblinks to access CLOB datatype
Hi ,
I am using dblink to access data data from remote database. I need to access data form a table on remote database which have fields of type VARCHAR2 and CLOB. Since I can't access CLOB data directly through dblinks, i created a view for that CLOB datatype. Now when I try to retrieve the data from remote tab1 by joining that view and tab1 ,I am getting the error
ORA-22992: cannot use LOB locators selected from remote tables .
But if I retrieve the data from view alone, I am able to retrieve the information.
And if try to access the varchar2 field alone using dblinks that also will work. But if I combine both the view and same table used in that view, it doesn't work.
I think this can be solved by puting all the required fields(CLOB and non-CLOB) in view. In real situation, the number of fileds that will not have CLOB datatype in tab1 is high.
Can someone tell some suggestion on how to resolve this?
Thanks in Advamce,
DaliaI assume that you likely do not have Metalink (Oracle Support) access. Here is the Metalink Note on this topic.
Subject: ORA-22992 When Trying To Select Lob Columns Over A Database Link
Doc ID: Note:119897.1
Type: BULLETIN
Last Revision Date: 24-JUL-2002
Status: PUBLISHED
PURPOSE
This document discusses whether or not a lob column can be selected over a
remote database link.
SCOPE & APPLICATION
This document is written for all audiences.
This information is based on the tests made in Oracle 8.1.5 and Oracle 8.1.6
and the available Oracle documentation on LOB (large Object) data and issues
logged with Development on the select of a LOB column over a remote database
link.
How to select a LOB column over a database link?
(A) You cannot actually select a lob column (i.e. CLOB column) from a table
using remote database link. This is not a supported feature.
For example,
You run the following command from the local instance to a remote database
instance called R816 over a dblink R816 created in the local instance for user
SCOTT. You have logged in as user Scott and the remote table CLOBT has 2
columns C1 and C2 as below:
$ sqlplus scott/tiger@r816utf8
SQL> create database link r816
connect to scott identified by tiger
using 'rtcsol1_r816.us.oracle.com';
SQL> desc clobt@r816
Name NUll? Type
C1 NOT NULL NUMBER
C2 CLOB
SQL> select c1, c2
from clobt@R816;
ORA-22992: cannot use LOB locators selected from remote tables
SQL> select c1, dbms_lob.getlength(c2)
from clobt@R816;
ORA-22992: cannot use LOB locators selected from remote tables
Error: ORA-22992
Text: cannot use LOB locators selected from remote tables
Cause: A remote LOB column cannot be referenced.
Action: Remove references to LOBs in remote tables.
(B) Also, these are the INVALID operations on a LOB column:
1. SELECT lobcol from table1@remote_site;
2. INSERT INTO lobtable select type1.lobattr from table1@remote_site;
3. SELECT dbms_lob.getlength(lobcol) from table1@remote_site;
In short, you cannot select a lob column using remote dblink. You have to use
DBMS_LOB package in a programming language like PL/SQL, JAVA to manipulate LOB
data.
RELATED DOCUMENTS
Oracle8i Application Developer's Guide - Large Objects (LOBs) Release 2 (8.1.6)
Chapter Managing LOBs: LOB Restrictions -
How can I access a database remote without using dblink, synonyms,aliases?
My store procedure access a remote tables using dblink, synonyms, alias, but by business company requirenments I nedd to use another data base access method. My PL/SQL statement looks like
select c.cus_id, c.cus_name, p.bankaccno
into v_cus_id, v_cus_name, v_bankaccno
from customer c, payment@finantial p
where c.cus_id = p.cus_id
Are any method else to connect to several remote databases concurrently?
If Yes, plase say me how is it, or tell me where do I obtain some examples, or any documentation.
Edited by: user518321 on Apr 21, 2009 1:58 PM
Ok, But I must not use any of these data base access method, metioned: dbliks, aliases, synonyms.
Edited by: user518321 on Apr 21, 2009 2:05 PM
Ok, It is enough for now, I am surprised for the response time and for their arguments, thanks a lot.
Edited by: user518321 on Apr 21, 2009 2:50 PMIf you want to access a table in a remote database using SQL, you will need a database link. It would be exceptionally odd for the business to require that you access a remote database and to prohibit the use of database links. What is the business reason for that combination?
If you want to look into rather more esoteric solutions, you could load a JDBC driver for the remote database, write a Java stored procedure that queries the remote table using that JDBC driver, and then cobble together some PL/SQL that joins the two result sets. You won't be able to reference the remote table in SQL and the solution won't scale well as data volumes increase and you'll be writing a whole lot of code to manually join tables together, but it does avoid database links. Of course, whatever concerns lead to the ban on database links would probably apply to loading a JDBC driver into the database and writing Java stored procedures to access the remote database, but since you haven't explained the reasoning behind the restrictions, we're just guessing.
Justin -
Oracle VPD on Remote database using DBLINk
Hi All,
How can i apply row level security on a table that is available in another database using DBlink
we have two databases PDSSM and EVTA, and i would like to apply row level security on a table in EVTA from a schema in PDSSM using dblink. MXODSADM IS A SCHEMA IN EVTA AND MXEMBARGO IS A SCHEMA IN PDSSM. there is a dblink(EVTA.GMM.COM) between mxembargo and mxodsadm.
begin
dbms_rls.add_policy (
object_schema => 'MXODSADM',
object_name => 'vehicle_retail_sale',
policy_name => ' MXEMBARGO_EVTA_POLICY',
function_schema =>'MXEMBARGO',
policy_type => dbms_rls.SHARED_CONTEXT_SENSITIVE,
--policy_type => dbms_rls.STATIC,
policy_function => ' MXEMBARGO_EVTA_POLICY.MXEMBARGO_EVTA_PREDICATE',
statement_types => 'select, insert,update,delete',
update_check => TRUE,
enable => TRUE,
static_policy => TRUE
end;
I am a complete Database person and i need to do this in my application, can anyone provide me how can i do this using dblink.wojpik wrote:
hello
I have one short question to you.
Is that possible to create view at remote database using dblink? Following syntax returns error
create view ViewName@DbLinkDame (ColumnName) as
(select 1 from dual )
"ORA-00905:missing keyword"
Is that possible at all?
And particulary - is that possible when remote database is MSSQL and I am using heterogeneous services?
I really appreciate your help
best regards
Wojtek
Edited by: wojpik on Oct 21, 2009 3:59 AMI doubt you would be able to fire any ddl through database link. You have to connect to remote database to run any ddl even if it is Oracle or some other database.
Regards
Anurag -
Executing A Procedure In a Package Using DBLink
I need to execute a procedure which is residing in a package using dblink.
The package got a execute PUBLIC grant.
When I execute the following statement, I am getting error ORA: 00904, Invalid Identifier
select PKG_NAME.PROCEDURE_NAME@dblink(null,null,null,null,null,null,null,null,null,null,null) from dual
How can I execute the above statement.
Thanks in advanceI have a database INLABNEW in that i have done this
SQL> create table temp(no number)
2 /
Table created.
SQL> create or replace package pkg
2 as
3 procedure p;
4 end;
5 /
Package created.
SQL> create or replace package body pkg
2 as
3 procedure p
4 is
5 begin
6 insert into temp values(1);
7 end;
8 end;
9 /
Package body created.
SQL> select * from temp
2 /
no rows selectedNow i executed the procedure pkg.p from another database
SQL> exec pkg.p@to_inlabnew
PL/SQL procedure successfully completed.
SQL> commit
2 /And i query the table tmp in INLABNEW
SQL> select * from temp
2 /
NO
1Now question is have you given your procedure name properly.
as your procedure is in a package it should be Your_package_name.Your_procedure_name@Your_db_link -
Code For Delta Extraction Using Function Module
Dear Experts,
I want a sample code for Delta Extraction using Function Module ( If it is customized already working code very helpful ), I have already created Function Module but Full update is happening. If I give delta update again it is retrieving all records. It is very urgent, if you have please send me to the following mail ID.
[email protected]
Best Regards,
SGK.Dear KJ,
Thank for your response. I saw the code that you sent, you have used some ztables like ZSC_DELTA_IP, ZSC_SAFETY_DELTA, ZSC_SET_EXT_TIME
What are the fields that you have created in these tables , what is use of these tables, can you send the fields that you have used in these tables.
Thanks & Regards,
SGK -
We can't create form using dblink and synonim
We have created a dblink pointing to a table in the remote database.
When we create a form based on table or view using this dblink, we get the error "page not found".
We read from
Re: I can't create form using dblink
that we must create a synonim, and this was done creating one in the same schema of the db-link using the "Database Objects" of oracle portal 10g (external db is an oracle 9.0.2).
The new synonim work (tested with reports and pl/sql page)
but if we click on "Grant Access" (of the synonim) we get the following error :
Error: The underlying object of the synonym does not exist, is a remote object or is not of type function, procedure, package, sequence, synonym, table or view. (WWV-17076)
Does form work only with table and view of the portal database (not external one)? or have we loose something in the creation of the synonim?
Have someone succesfully created a form based on a db-link towards an external database?
Thanks to all.Hei guys, has nobody created succesfully a data-driven forms based on a dblink towards an external database?
I can't believe this!!!! -
SQL LOADER: how to load CLOB column using stored function
Hi,
I am a newbie of sql loader. Everything seems to be fine until I hit a
road block - the CLOB column type. I want to load data into the clob
column using a stored function. I need to do some manipulation on the
data before it gets saved to that column. But I got this error when I
run the sql loader.
SQL*Loader-309: No SQL string allowed as part of "DATA" field
specification
DATA is my CLOB type column.
here is the content of the control file:
LOAD DATA
INFILE 'test.csv'
BADFILE 'test.bad'
DISCARDFILE 'test.dsc'
REPLACE
INTO TABLE test_table
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
codeid BOUNDFILLER,
reason BOUNDFILLER,
Checkstamp "to_date(:CHECKSTAMP, 'mm/dd/yyyy')",
"DATA" "GetContent(:codeid, :reason)"
All references are suggesting to use a file to load data on
CLOB column but I want to use a function in which it generates
the content to be saved into the column.
Any help is greatly appreciated.
Thanks,
Baldwin
MISICompany*** Duplicate Post ... Please Ignore ***
-
Can't use DBLINK in Forms 4.5!!!
Hi All,
Can i use dblink in forms 4.5..b'coz it is giving me an error..
like PL/SQL Check#20108 Pls. inofrm your Oracle represnative
Thanx in advance!!!Solutions previously posted to this sort of question include creating a synonym for the link or wrapping it in a view. If that fails then move all the code to the database.
This is an issue in later versions too, certainly in 6i and IIRC in 10g. -
Using DBLINK in PL/SQL SQL Query
Hi
is it possible to use dblink in plsql cursor query.
are there any do's or dont's in this regard or any special things to take care of?
Basically what I need to do is access data from remote tables and put them in local tables after some proessing on data.
Any help !!well, since all pl/sql does is to pass the SQL statement to the database to be run, it's not a pl/sql issue. it's a SQL question. so it's the same as running the query in sqlplus (or toad or frog or whatever you use). the fact that it's embedded in pl/sql doesn't change anything, so: yes, it's possible, and no there aren't any do/don'ts (other than what would already apply to native SQL.
-
IS-U enhancing transaction FPBW (open items extraction using table DFKKOPBW
Has anybody experiances with IS-U Accounts Receivable & payable - 'Open Items' extraction using transaction FPBW
(which fill the table DFKKOPBW).
1. I need to fill an custom included structure in this table (DFKKOPBW) and I am searching for the correct time (for performance reasons) & place in the (SAP) source (in the program flow) to do this.
2. Anybody any clues on Custum/user exits in this part?
See also function group FKKOPBW.
Jos ReithoferTry this code that can search a user exit in a transaction. I got it from previous post in this forum.
*& Report Y_SEARCH_USEREXIT *
REPORT y_search_userexit LINE-SIZE 140 NO STANDARD PAGE HEADING.
CONSTANTS
*CONSTANTS: c_user_exit(22) TYPE c VALUE 'CALL CUSTOMER-FUNCTION',
constants: c_badi(30) type c value 'CALL METHOD CL_EXITHANDLER=>',
c_funcao_1(13) TYPE c VALUE 'CALLFUNCTION''',
c_funcao_2(13) TYPE c VALUE 'CALL FUNCTION',
c_include(07) TYPE c VALUE 'INCLUDE',
c_submit(06) TYPE c VALUE 'SUBMIT',
c_comentario TYPE c VALUE '*',
c_ponto TYPE c VALUE '.',
c_aspa TYPE c VALUE '''',
c_x TYPE c VALUE 'X'.
TABELAS INTERNAS
DATA: BEGIN OF ti_programa OCCURS 0,
codigo_fonte(200) type c, " LIKE rssource-line,
END OF ti_programa.
DATA: BEGIN OF ti_includes OCCURS 0,
nome LIKE sy-repid,
nivel(2) TYPE n,
END OF ti_includes.
DATA: BEGIN OF ti_user_exit OCCURS 0,
programa LIKE sy-repid,
linha(10) TYPE n,
codigo_fonte LIKE rssource-line,
nivel(2) TYPE n,
END OF ti_user_exit.
VARIÁVEIS GLOBAIS
DATA: vg_caracter TYPE c,
vg_palavra(50) TYPE c,
vg_inicial LIKE sy-index,
vg_conta_aspa TYPE n,
vg_pname LIKE tfdir-pname,
vg_texto(50) TYPE c,
vg_contador LIKE sy-tfill,
vg_nivel(2) TYPE n,
vg_ini_contagem TYPE c, " INDICA QUE DEVE SER INICIADA A CONTAGEM
vg_conta_espaco TYPE n. " TOTAL DE ESPAÇOS ( MÁXIMO 2 )
PARAMETERS
*- DADOS OBRIGATÓRIOS.
SELECTION-SCREEN BEGIN OF BLOCK bl01 WITH FRAME TITLE tl_001 .
selection-screen begin of line.
selection-screen comment 1(25) tl_003.
PARAMETERS: p_prog LIKE sy-repid.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(25) tl_004.
parameters: p_tcode LIKE sy-tcode.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(25) tl_009.
parameters: p_exit(30) TYPE c default 'CALL CUSTOMER-FUNCTION'.
selection-screen end of line.
SELECTION-SCREEN END OF BLOCK bl01.
*- DADOS OPCIONAIS.
SELECTION-SCREEN BEGIN OF BLOCK bl02 WITH FRAME TITLE tl_002.
selection-screen begin of line.
PARAMETERS: p_incl TYPE c AS CHECKBOX.
selection-screen comment 4(25) tl_005.
selection-screen end of line.
selection-screen begin of line.
parameters: p_func TYPE c AS CHECKBOX.
selection-screen comment 4(25) tl_006.
selection-screen end of line.
selection-screen begin of line.
parameters: p_submit TYPE c AS CHECKBOX.
selection-screen comment 4(25) tl_007.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(25) tl_008.
parameters: p_nivel(2) TYPE n.
selection-screen end of line.
SELECTION-SCREEN END OF BLOCK bl02.
initialization.
tl_001 = 'Program Selection'.
tl_002 = 'Search Depth'.
tl_003 = 'Program Name'.
tl_004 = 'Transaction Code'.
tl_005 = 'Process INCLUDEs'.
tl_006 = 'Process FUNCTION MODULEs'.
tl_007 = 'Process SUBMITs'.
tl_008 = 'Depth level'.
tl_009 = 'Search string'.
INÍCIO
START-OF-SELECTION.
*- CONSISTÊNCIAS DOS PARÂMETROS.
PERFORM consisti_parametros.
*- INICIALIZA TABELA.
PERFORM inicializa_tabela.
*- VERIFICA SE NO PROGRAMA EXISTE ALGUM INCLUDE,FUNÇÃO OU SUBMIT.
PERFORM verifica_include_funcao_submit.
*- ANALISA OS INCLUDES E PROCURA POR USER EXIT.
PERFORM procura_user_exit.
*- EXIBE TODAS USER EXIT ENCONTRADAS.
PERFORM exibe_user_exit.
FIM
END-OF-SELECTION.
*& Form PROCURA_USER_EXIT
text
--> p1 text
<-- p2 text
FORM procura_user_exit.
*- VERIFICA SE NOS INCLUDES SELECIONADOS EXISTEM USER EXITS.
LOOP AT ti_includes.
*- ESVAZIA TABELA INTERNA.
REFRESH ti_programa.
*- REALIZA LEITURA DO INCLUDE ARMAZENANDO-O EM TABELA INTERNA
READ REPORT ti_includes-nome INTO ti_programa.
LOOP AT ti_programa.
*- VERIFICA SE NA LINHA DO PROGRAMA EXISTE ALGUM INCLUDE.
SEARCH ti_programa-codigo_fonte FOR p_exit.
*- SE ENCONTROU INCLUDE E SE A LINHA NÃO ESTÁ COMENTADA...
IF sy-subrc EQ 0
AND ti_programa-codigo_fonte+0(1) NE c_comentario.
CLEAR ti_user_exit.
*- REMOVE ESPAÇOS NO INÍCIO DA STRING.
SHIFT ti_programa-codigo_fonte LEFT DELETING LEADING space.
MOVE: ti_includes-nome TO ti_user_exit-programa,
sy-tabix TO ti_user_exit-linha,
ti_programa-codigo_fonte TO ti_user_exit-codigo_fonte,
ti_includes-nivel TO ti_user_exit-nivel.
APPEND ti_user_exit.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDFORM. " PROCURA_USER_EXIT
*& Form EXIBE_USER_EXIT
text
--> p1 text
<-- p2 text
FORM exibe_user_exit.
PERFORM cabecalho.
PERFORM user_exit_nao_encontrada.
PERFORM lista_user_exit_encontrada.
PERFORM rodape.
ENDFORM. " EXIBE_USER_EXIT
*& Form PROCURA_INCLUDE
text
--> p1 text
<-- p2 text
FORM procura_include.
CLEAR vg_palavra.
*- VERIFICA SE NA LINHA DO PROGRAMA EXISTE ALGUM INCLUDE.
SEARCH ti_programa-codigo_fonte FOR c_include.
*- SE ENCONTROU INCLUDE E SE A LINHA NÃO ESTÁ COMENTADA...
IF sy-subrc EQ 0
AND ti_programa-codigo_fonte+0(1) NE c_comentario.
*- VERIFICA TODOS OS 72
DO 72 TIMES.
vg_inicial = sy-index - 1.
MOVE ti_programa-codigo_fonte+vg_inicial(1) TO vg_caracter.
IF NOT vg_caracter IS INITIAL.
*- VERIFICA SE NÃO É FIM DO COMANDO.
IF vg_caracter EQ c_ponto.
EXIT.
ENDIF.
*- MONTA PALAVRA.
CONCATENATE vg_palavra vg_caracter INTO vg_palavra.
*- CONVERTE PARA MAÍUSCULA PARA FUTURA COMPARAÇÃO.
TRANSLATE vg_palavra TO UPPER CASE.
*- SE ENCONTROU ALGUM INCLUDE
IF vg_palavra EQ c_include.
CLEAR vg_palavra.
ENDIF.
ENDIF.
ENDDO.
*- SALVA NOME DO INCLUDE P
READ TABLE ti_includes WITH KEY nome = vg_palavra.
IF NOT sy-subrc IS INITIAL.
IF vg_nivel LE p_nivel.
MOVE: vg_palavra TO ti_includes-nome,
vg_nivel TO ti_includes-nivel.
APPEND ti_includes.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " PROCURA_INCLUDE
*& Form PROCURA_FUNCAO
text
--> p1 text
<-- p2 text
FORM procura_funcao.
CLEAR: vg_conta_aspa,
vg_palavra.
*- VERIFICA SE NA LINHA DO PROGRAMA EXISTE ALGUM INCLUDE.
SEARCH ti_programa-codigo_fonte FOR c_funcao_2.
*- SE ENCONTROU INCLUDE E SE A LINHA NÃO ESTÁ COMENTADA...
IF sy-subrc EQ 0
AND ti_programa-codigo_fonte+0(1) NE c_comentario.
*- VERIFICA TODOS OS 72
DO 72 TIMES.
vg_inicial = sy-index - 1.
MOVE ti_programa-codigo_fonte+vg_inicial(1)
TO vg_caracter.
IF NOT vg_caracter IS INITIAL.
*- VERIFICA SE NÃO É FIM DO COMANDO.
IF vg_caracter EQ c_aspa.
ADD 1 TO vg_conta_aspa.
IF vg_conta_aspa EQ 2.
EXIT.
ENDIF.
ENDIF.
*- MONTA PALAVRA.
CONCATENATE vg_palavra vg_caracter INTO vg_palavra.
*- CONVERTE PARA MAÍUSCULA PARA FUTURA COMPARAÇÃO.
TRANSLATE vg_palavra TO UPPER CASE.
*- SE ENCONTROU ALGUM INCLUDE
IF vg_palavra EQ c_funcao_1.
CLEAR vg_palavra.
ENDIF.
ENDIF.
ENDDO.
*- PESQUISA NOME DA FUNÇÃO PARA FUTURA PESQUISA POR USER EXIT.
CLEAR vg_pname.
SELECT SINGLE pname
INTO vg_pname
FROM tfdir
WHERE funcname EQ vg_palavra.
IF sy-subrc EQ 0.
READ TABLE ti_includes WITH KEY nome = vg_pname.
IF NOT sy-subrc IS INITIAL.
IF vg_nivel LE p_nivel.
MOVE: vg_pname TO ti_includes-nome,
vg_nivel TO ti_includes-nivel.
APPEND ti_includes.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " PROCURA_FUNCAO
*& Form VERIFICA_INCLUDE_FUNCAO_SUBMIT
text
--> p1 text
<-- p2 text
FORM verifica_include_funcao_submit.
LOOP AT ti_includes.
ADD 1 TO vg_contador.
DESCRIBE TABLE ti_includes.
PERFORM evitar_time_out USING sy-tfill.
MOVE ti_includes-nivel TO vg_nivel.
ADD 1 TO vg_nivel.
*- ESVAZIA TABELA INTERNA.
REFRESH ti_programa.
READ REPORT ti_includes-nome INTO ti_programa.
LOOP AT ti_programa.
*- PROCURA POR INCLUDES.
IF p_incl EQ c_x.
PERFORM procura_include.
ENDIF.
*- PROCURA POR FUNÇÃO.
IF p_func EQ c_x.
PERFORM procura_funcao.
ENDIF.
*- PROCURA POR SUBMIT.
IF p_submit EQ c_x.
PERFORM procura_submit.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDFORM. " VERIFICA_INCLUDE_FUNCAO_SUBMIT
*& Form EVITAR_TIME_OUT
text
-->P_SY_TFILL text
-->P_SY_SUBRC text
FORM evitar_time_out USING p_sy_tfill.
DATA: vl_total(10) TYPE n,
vl_atual(10) TYPE n.
MOVE: p_sy_tfill TO vl_total,
vg_contador TO vl_atual.
CONCATENATE 'Total:' vl_total '-' 'Atual:' vl_atual
INTO vg_texto
SEPARATED BY space.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = vg_texto.
ENDFORM. " EVITAR_TIME_OUT
*& Form PROCURA_SUBMIT
text
--> p1 text
<-- p2 text
FORM procura_submit.
CLEAR: vg_conta_espaco, vg_palavra, vg_ini_contagem.
*- VERIFICA SE NA LINHA DO PROGRAMA EXISTE ALGUM INCLUDE.
SEARCH ti_programa-codigo_fonte FOR c_submit.
*- SE ENCONTROU INCLUDE E SE A LINHA NÃO ESTÁ COMENTADA...
IF sy-subrc EQ 0
AND ti_programa-codigo_fonte+0(1) NE c_comentario.
*- VERIFICA TODOS OS 7
DO 72 TIMES.
vg_inicial = sy-index - 1.
MOVE ti_programa-codigo_fonte+vg_inicial(1) TO vg_caracter.
IF vg_ini_contagem EQ c_x AND vg_caracter IS INITIAL.
ADD 1 TO vg_conta_espaco.
ENDIF.
IF NOT vg_caracter IS INITIAL.
MOVE c_x TO vg_ini_contagem.
IF vg_caracter EQ c_ponto.
EXIT.
ENDIF.
*- MONTA PALAVRA.
IF vg_conta_espaco LT 2.
CONCATENATE vg_palavra vg_caracter INTO vg_palavra.
*- CONVERTE PARA MAÍUSCULA PARA FUTURA COMPARAÇÃO.
TRANSLATE vg_palavra TO UPPER CASE.
*- SE ENCONTROU ALGUM INCLUDE
IF vg_palavra EQ c_submit.
CLEAR vg_palavra.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDIF.
ENDDO.
*- PESQUISA NOME DA FUNÇÃO
READ TABLE ti_includes WITH KEY nome = vg_palavra.
IF NOT sy-subrc IS INITIAL.
IF vg_nivel LE p_nivel.
MOVE: vg_palavra TO ti_includes-nome,
vg_nivel TO ti_includes-nivel.
APPEND ti_includes.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " PROCURA_SUBMIT
*& Form CONSISTI_PARAMETROS
text
--> p1 text
<-- p2 text
FORM consisti_parametros.
IF p_nivel IS INITIAL.
MOVE 1 TO p_nivel.
ENDIF.
IF p_prog IS INITIAL AND p_tcode IS INITIAL.
*- NOME DO PROGRAMA E NOM
*- DEVE SER INFORMADO.
MESSAGE ID 'ZF' TYPE 'I' NUMBER '000' WITH text-003.
STOP.
ENDIF.
IF NOT p_prog IS INITIAL AND NOT p_tcode IS INITIAL.
*- SOLICITA AO U
MESSAGE ID 'ZF' TYPE 'I' NUMBER '000' WITH text-004.
STOP.
ENDIF.
ENDFORM. " CONSISTI_PARAMETROS
*& Form INICIALIZA_TABELA
text
--> p1 text
<-- p2 text
FORM inicializa_tabela.
DATA vl_pgmna LIKE tstc-pgmna.
REFRESH ti_includes.
IF NOT p_prog IS INITIAL.
MOVE: p_prog TO ti_includes-nome,
'0' TO ti_includes-nivel.
APPEND ti_includes.
ELSEIF NOT p_tcode IS INITIAL.
SELECT SINGLE pgmna
FROM tstc
INTO vl_pgmna
WHERE tcode EQ p_tcode.
IF sy-subrc EQ 0.
MOVE: vl_pgmna TO ti_includes-nome,
'0' TO ti_includes-nivel.
APPEND ti_includes.
ENDIF.
ENDIF.
ENDFORM. " INICIALIZA_TABELA
*& Form CABECALHO
text
--> p1 text
<-- p2 text
FORM cabecalho.
DATA vl_complemento(50) TYPE c.
IF p_tcode IS INITIAL.
CONCATENATE '(Program)' p_prog
into vl_complemento
SEPARATED BY space.
ELSE.
CONCATENATE '(Transaction)' p_tcode
INTO vl_complemento
SEPARATED BY space.
ENDIF.
FORMAT COLOR COL_KEY.
WRITE: /001 sy-uline,
/001 sy-vline,
040 'User Exits in a Program',
vl_complemento,
140 sy-vline,
/001 sy-uline.
WRITE: /001 sy-vline,
003 'Program Name',
044 sy-vline,
046 'Level',
052 sy-vline,
054 'Lineno',
065 sy-vline,
067 'UserExit',
140 sy-vline,
/001 sy-uline.
ENDFORM. " CABECALHO
*& Form USER_EXIT_NAO_ENCONTRADA
text
--> p1 text
<-- p2 text
FORM user_exit_nao_encontrada.
DESCRIBE TABLE ti_user_exit.
CHECK sy-tfill IS INITIAL.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
WRITE: /003 'Userexit does not exist',
139 ' '.
FORMAT RESET.
ENDFORM. " USER_EXIT_NAO_ENCONTRADA
*& Form LISTA_USER_EXIT_ENCONTRADA
text
--> p1 text
<-- p2 text
FORM lista_user_exit_encontrada.
DATA vl_cor TYPE c.
LOOP AT ti_user_exit.
IF vl_cor EQ c_x.
CLEAR vl_cor.
ELSE.
MOVE c_x TO vl_cor.
ENDIF.
*- AJUSTA COR NA TELA.
IF vl_cor EQ c_x.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
ELSE.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
ENDIF.
*- INÍCIO DA IMPRESSÃO.
WRITE: /003 ti_user_exit-programa,
046 ti_user_exit-nivel,
054 ti_user_exit-linha,
067 ti_user_exit-codigo_fonte,
139 ' '.
ENDLOOP.
ENDFORM. " LISTA_USER_EXIT_ENCONTRADA
*& Form RODAPE
text
--> p1 text
<-- p2 text
FORM rodape.
DESCRIBE TABLE ti_includes.
FORMAT COLOR COL_TOTAL.
WRITE: /001 sy-uline,
/001 sy-vline,
003 'Total include searched:', sy-tfill,
' - with level:', p_nivel,
140 sy-vline,
/001 sy-uline.
ENDFORM. " RODAPE -
Generic Extraction - Using Function Modules
Hi Friends,
Can you pl let me know the step by step process for creating generic extraction using function module?
Thanks in Advance.
Regards,
Ari.
Please search the forum before posting a thread
Edited by: Pravender on Aug 5, 2010 7:31 PMHi,
Plz find this doc.
http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33.
And go this link...
http://www.sdn.sap.com/irj/scn/advancedsearch?query=genericextractionwithfunctionmadule
Regards.....KP
Edited by: kundan.sap on Aug 5, 2010 4:35 PM -
Generic extraction using table
Hello friends,
We have three methods in Generic extraction, as we know.
1. Using view/Table
2. Using FM
3. Using Infoset Query
I know pretty well the extraction using View, but when do we use "Table"?
Is there a specific method to perform generic extraction using TABLE?
Please clarifyThanks for the replies.
In case of a generic extraction with view, i've followed the below procedure.
1. RSO2.
2.create a generic datasource by giving a view name and selecting the fields for selection criteria, save and generate.
3. replicate data sources in BW.
4. create an infosource and assign the data source, mapping and create an infopackage to load data.
Now ,
1. how do we enable Delta for this method?
2. Is this possible at all? if yes, how?
3. How do we proceed after the replication of DataSources in BI? specifically, procedure in BI?
Pls clarify. -
When to go for generic extraction using view and infoset query?
Hi,
Can anyone clarify me when we should go for generic extraction using view and when we should go for generic extraction using infoset query....
Also what is the difference between view and infoset?
I tried but could not find out....
Regards,
Kalyani.Hi Kalyani,
We normally go for View or infoset when the data to be fetched in BW is distributed in different tables in SAP R/3.
Had the data been available in one table we can easily build our datasource on that table but if there are more tables then its not possible to do it without Views or Infosets. You can use Function Modules to build your datasource in case it involves complex logic to figure out the data from various tables.
Depending upon the table relationships we create view and include various fields from these tables in that view. Same is with the Infosets, you can have more flexible options like Outer Join, left outer Join etc.
Regards,
Pratap Sone -
Can we pass Reference cursor using dblink
Can we pass reference cursor from one DB to another DB using DBlink?
I feel like it is not possible because the memory structure of same will be available in other DB.
Could you please let me know whether we can give a work around which will solve the issue.
Regards,
BaluBalu, cursor is a memory area which contains parsed SQL statement and everything needed for
the execution of the SQL command. That, of course, is instance specific and carrying it over to another DB using db-link would make no sense whatsoever.
Maybe you are looking for
-
Hi, I have created alv which display sales order header details. Now if user clicks on sales order number then his item details has to be printed. Here when he clicks item details should not be displayed but it should be printed. Thanks, Shravan G.
-
How can I get my desktop page to open when I close the browser and then re open it?
when I click the red x to close the browser, when I come back to open the browser later, the last page I was viewing. last session opens, even all other tabs behind it, instead of my google page (my home page)? can this be fixed) I know I can just cl
-
From monitoring report I can find complete peer to peer audio calls details but I would like to get a report of only PSTN calls. How can I get that report.
-
Sound Blaster Not Compatible With Windows 7
I recently installed w7 over my xp system. All was fine except it didn'y support my sb li've 5.1 digital card. Any ideas apart from trying updates (i have the lates already), what product my work with an older system
-
Calling RFC gives some retained old values as output!!!!
The scenario is that a technician inputs submits part numbers in his PDA. along with other necessary details to create a Purchase Order in SAP. RFC is called through PDA. The problem is that with the desired output, some other part number's PO is als