"Unsupported LOB type" error occurs when executing DBMS_LOB.FRAGMENT_INSERT
Dear all,
I try to run DBMS_LOB.FRAGMENT_INSERT, but got error saying:
ORA-43856: Unsupported LOB type for SECUREFILE LOB operationSuppose I have the following code:
declare
note_clob clob;
note_clob2 clob;
note_bfile bfile;
buffer varchar2(10000);
note_var varchar2(10000);
warning int;
dest_off int:=1;
src_off int:=1;
lang_ctx int:=0;
amount int:=1500;
begin
--Create temp
dbms_lob.createtemporary(note_clob,true);
--Initialize BFILE
note_bfile:=bfilename('TEMP_DIR','note.txt');
--Open bfile
dbms_lob.fileopen(note_bfile);
dbms_lob.loadclobfromfile(note_clob,note_bfile,dbms_lob.lobmaxsize,dest_off,src_off,0,lang_ctx,warning);
dbms_lob.fileclose(note_bfile);
--Fragement Insert
amount:=3;
dest_off:=10;
buffer:='end';
dbms_lob.fragment_insert(note_clob,amount,dest_off,buffer); <==LINE 30
--Read
amount:=50;
dbms_lob.read(note_clob,amount,1,note_var);
dbms_output.put_line(note_var);
end;
/and I got:
ERROR at line 1:
ORA-43856: Unsupported LOB type for SECUREFILE LOB operation
ORA-06512: at "SYS.DBMS_LOB", line 1076
ORA-06512: at line 30What did I miss?
Best regard,
Val
Just a wrap-up (mostly for my own benefit :-) ) :
<li>As I understand the docs, SECUREFILE/BASICFILE is a matter of how the LOB is stored in the table.
<li>SECUREFILE/BASICFILE therefore does not apply to temporary LOBs - they are not stored in a table.
<li>The new FRAGMENT procedures in DBMS_LOB only works on SECUREFILE.
<li>Therefore the FRAGMENT procedures can only work on permanent LOBs in tables in columns defined as SECUREFILE.
<li>And so FRAGMENT procedures cannot work on temporary LOBs at all.
Just loading data into a LOB does not make it permant - it is still temporary until stored in a table.
A workaround would be to create a table with a LOB column defined as SECUREFILE and insert a record into this table.
Then in your code replace the CREATETEMPORARY with selecting that LOB locator from that table.
That way you work on a permanent SECUREFILE LOB in a table rather than a temporary LOB.
Or if the goal of your procedure at some point is to take the LOB and insert into a table, then reverse your logic:
Start with inserting your record with an EMPTY_LOB() (assuming your column is defined SECUREFILE) and use RETURNING clause to retrieve the LOB locator of that inserted LOB.
Then load that LOB from your BFILE and continue from there.
(Or the third workaround is to write the code avoiding use of FRAGMENT procedures ;-) )
Similar Messages
-
An error occurred when executing a REMOTE FUNCTION CALL.
Dear all,
We have two syetms called DXD and GRD , we have a remote enabled function module in the DXD system , when i am trying to call this Function module from
GRD system it is going for the short dump, and giving the follwing error,
<b>Error analysis
An error occurred when executing a REMOTE FUNCTION CALL.
It was logged under the name "RFC_NO_AUTHORITY"
on the called page.</b>
But i do have the access for the DXD system also, i am really struggling to solve this problem, if any lights are there to help me , i will be thank full for then,
some body suggested for me that we need to maintain the Trusted system tables in the target system.
Thanks & regards
Satya.first u( user id ) have to get the Authorizations to use RFC ?
object will be like S_RFC or some thing like this.
when u get this kind of error just call /NSU53 then u will come to know which Authorization Object is missing from ur User Profile.
Regards
Prabhu -
ORA-04052: Error occurs when execute the block
I'm trying to run one block and his query definition uses an active public database link. When I ran the script to block I get the following message:
ERROR in line 1:
ORA-04052: error occurred when looking up remote object
SQ_DSV.temp_tipo_contr@SQ_DSV tc
ORA-00604: error occurred at recursive SQL level 1
But when I execute his definition query all is ok, the query works fine.
I mean, I'm using the following sentence to block:
declare
Cursor Tipo_Contr is
Select tc.rec_id, tc.tipo_contr from SQ_DSV.temp_tipo_contr@SQ_DSV tc;
begin
For Reg_Tipo_Contr in Tipo_Contr Loop
Begin
Update recursos Set tpcontr_id = Reg_Tipo_Contr.tipo_contr
where rec_id = Reg_Tipo_Contr.rec_id;
exception when others then
dbms_output.put_line(Reg_Tipo_Contr.rec_id || ' Not find');
end;
end loop;
-- Commit;
end;
I checked for the GLOBAL_NAMES parameter and it is set to FALSE. Please help me, How can I fix this problem ?
I'm using Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production running over Win XP for run block.
Thanks you, Paulo.ORA-04052 error occurred when looking up remote object stringstringstringstringstring
Cause: An error has occurred when trying to look up a remote object.
Action: Fix the error. Make sure the remote database system has run KGLR.SQL to create necessary views used for querying/looking up objects stored in the database.
Regards
Marcio Paiva -
Hi All,
My scenario is RFC to Proxy synchronous scenario and data is sent from 4.6C to ECC system and responds back to 4.6C with the data fetched from ECC.
All the development and mappings in XI are working fine.
The Program dumps often in 4.6C system, When the program is executed initially, it is working fine but the subsequent execution fails with the dump u201CRFC_EXTERNAL_ABORTu201D , As a work around we had to stop and start the RFC sender Channel for it to work fine.
Kindly let me know if the issue is with the RFC destination ?
Dump:
Call to messaging system failed
Error Analysis:
An error occured when exectuing a REMOTE FUNCTION CALL
It was logged under the name "RFC_EXTERNAL_ABORT" on the called page
Internal Notes:
The termination occured in the function "ab_rfcrecieve" of the SAP Basis System.......
Kindly need you valuable inputs to solve this issue
Thank you ,
Regards,
PavithraHi Rangarajan,
Thanks for your reply
I had went through this thread and checked the RFC destination in SM59 of 4.6C system . I am able to do Remote Logon and the test connection works fine and also the function module is remote enabled, but still the program dumps
Kindly suggest me what are the other check areas .
Thank you,
Pavithra
Edited by: Pavithra L on Mar 17, 2011 8:07 AM -
Error occurs when executing a procedure
I have queried a package and procedure.But when executing it shows an error.
Here is the query
CREATE OR REPLACE PACKAGE refcursor_pkg AS
TYPE SYS_REF_CURSOR IS REF CURSOR RETURN EMP%ROWTYPE;
end refcursor_pkg;
CREATE OR REPLACE PROCEDURE mem_select(pMem_name VARCHAR2,
pAge NUMBER,
pDivision VARCHAR2,
pOut_cur out refcursor_pkg.SYS_REF_CURSOR)IS
BEGIN
IF pMem_name IS NOT NULL THEN
IF pDivision IS NOT NULL THEN
OPEN pOut_cur FOR SELECT
m.mem_name,m.nic,m.mar_state,u.division
FROM members m,upf_kgl u
WHERE m.member_id=u.member_id;
END IF ;
ELSE
OPEN pOut_cur FOR SELECT
u.mem_name,m.nic,m.mar_state
FROM members m,upf_kgl u
WHERE U.MEMBER_ID = M.MEMBER_ID;
END IF;
END mem_select;
Here is the error.
Error(6,1): PLS-00103: Encountered the symbol "CREATE"
Can someone help me to correct it please?You can use sys_refcursor type:
CREATE OR REPLACE PROCEDURE mem_select(pMem_name VARCHAR2,
pAge NUMBER,
pDivision VARCHAR2,
pOut_cur out sys_refcursor)IS
BEGIN
IF pMem_name IS NOT NULL THEN
IF pDivision IS NOT NULL THEN
OPEN pOut_cur FOR SELECT
m.mem_name,m.nic,m.mar_state,u.division
FROM members m,upf_kgl u
WHERE m.member_id=u.member_id;
END IF ;
ELSE
OPEN pOut_cur FOR SELECT
u.mem_name,m.nic,m.mar_state
FROM members m,upf_kgl u
WHERE U.MEMBER_ID = M.MEMBER_ID;
END IF;
END mem_select;Regards,
Malakshinov Sayan -
Error occured:when execute "SYNCHRONIZE ALL" on target
(I added the "SYNCHRONIZE ALL" command on the IKM at last,the transaction must be committed)
My target datastore is xml when ODI execute "SYNCHRONIZE ALL" on target the following error occured,
it's wonder that I can execute with no error sometimes,
Error Info:
0 : null : java.sql.SQLException: Error synchronizing automatically the schema HJYEMP
java.sql.SQLException: Error synchronizing automatically the schema HJYEMP
at com.sunopsis.jdbc.driver.xml.SnpsXmlConnection.b(SnpsXmlConnection.java)
at com.sunopsis.jdbc.driver.xml.br.executeUpdate(br.java)
at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Thread.java:595)
Topology Configuration:
com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
jdbc:snps:xml?f=D:\ODI\hjyemp.xml&d=D:\ODI\hjyemp.dtd&s=HJYEMP&dod=yes
Anyone can tell me why ODI sometimes execute error and sometimes right?
He
tksHi MS,
We have checked the HANA DB connection with report ADBC_TEST_CONNECTION in T code SE38. We are getting the below
Connection <connection name> Successfully opened
Connection <connection name> closed
Kindly advise us on this.
Thanks
Arun R -
My code javascript script is
objConnection = new ActiveXObject("ADODB.Connection");
objConnection.Provider="ADsDSOObject";
objConnection.Open("ADs Provider");
objCommand = new ActiveXObject("ADODB.Command");
objCommand.ActiveConnection = objConnection;
objCommand.CommandText = "SELECT sAMAccountName,displayName, givenName, SN,CN, mail,distinguishedName,primaryGroupToken,member,ADsPath,MemberOf FROM 'LDAP://"+GrpDomain+".corp.com' WHERE objectCategory='group'
and objectClass='group' and sAMAccountName='"+GrpName+"'";
objRecordSet = objCommand.Execute();
This code executes successfully on window 2008 server machine,
but gives "Operations error occurred" on windows 8 operating system
on line of code highlighted aboveHi,
In regard to scripts related issue, I suggest you refer to The Official Scripting Guys Forum to get professional support:
The Official Scripting Guys Forum
http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
Thank you for your understanding and support.
Best Regards,
Amy Wang -
Error occurs when executing an item in an inbox with more than 1000 entries
Hi Everyone,
One of our approvers in SRM experienced an error when his inbox contained more than 1000 entries . Further execution on any inbox item produces errors.
Would you know where to set the maximum allowable entries in a user's inbox? Can this be set thru SRM config or Basis functionality?
We also searched for existing SAP Notes but found nothing.
Your inputs and help are greatly appreciated.
Thanks and Regards,
VhongHello,
The user has sent me the screen shot. But this has no error messages. The approval transaction shows an ITS screen/code with template 'bbpapproval/99/saplbw02_1200.html'
However, we have a user in Quality where the page displays with no problem and with 1675 Entries.
Do you think this is more of an ITS setting or any Template/JavaScript issues?
I got this code (view source code) earlier today and the topmost header of the code is:
<!--
This page was created by the
SAP Internet Transaction Server (ITS, Version 6200.1025.7214.5, Build 908978, Virtual Server Q36, Add. service info none, WGate-AGate Host esetnmw028, WGate-Instance Q36)
All rights reserved.
Creation time: Mon Mar 15 07:21:39 2010
Charset: iso-8859-1
Template: bbpapproval/99/saplbw02_1200.html
-->
Regarding the not-so-good practice of approvers to have more than 1000 entries in their inbox, we are still in the process of planning on how to divide the task to different approvers since there is only one approver (Project Manager) for the related network.
Thanks and Redards,
Vhong -
Error occurred when executing query involving cross join or outer join
Hi,
I tried to execute the following query:
select count(*)
from
po,
invoice,
table(xmlsequence(extract(invoice.content, '/CommercialInvoice/Body/LineItemDetails/LineItem'))) invoice_line_item
where
extractValue(po.content, '/PurchaseOrder/Header/DocumentID/RID') =
extractValue(value(invoice_line_item), '/LineItem/Product/PurchaseOrderIdentifier/documentCreatorIdentifier')(+)
It produced the following error:
Error: ORA-00936: missing expression
Then I change the query to:
select count(*)
from
po left outer join
invoice cross join
table(xmlsequence(extract(invoice.content, '/CommercialInvoice/Body/LineItemDetails/LineItem'))) invoice_line_item
on
extractValue(po.content, '/PurchaseOrder/Header/DocumentID/RID')
= extractValue(value(invoice_line_item), '/LineItem/Product/PurchaseOrderIdentifier/documentCreatorIdentifier')
It produced the following error:
Error: ORA-00904: "INVOICE"."SYS_NC0012900130$": invalid identifier
If I simply the query to:
select 1
from
invoice cross join
table(xmlsequence(extract(invoice.content, '/CommercialInvoice/Body/LineItemDetails/LineItem'))) invoice_line_item
It also produced the following error:
Error: ORA-00904: "INVOICE"."SYS_NC0012900130$": invalid identifier
What is the cause of the problem? How to resolve it?
The version I am using is 10.1.0.2.0 on Windows. Any help would be much appreciated.Hi,
Recently we went for BW upgradatiaon (BI7.0) , the error you are facing could be due to the following issue,
If infoobjects are used in infoset as infoprovider ( in BW3.5) after upgrade this infoobjects will not be selected automatically as infoproviders. So it will not be available for Infoset.
Please check whether any infoobjects are used as infoprovider, if so manually change them as infoprovider ( In BI7) and activate.
Since, few reports are working on the infoset , this could be those reports are not using the fields from the infoobjects. so it is working it seems.
Please check and let me know.
Thanks,
V.Senthil -
SQL error 3113 occurred when executing EXEC SQL.
Hi,
We are facing one typical problem, One background is failing regularly with
below dump. as we now got all notes giving information, if database restarted
taking backup, these type of failures occur, but our database is only down for backup once in a week, but it is failing with frequenly.
in this two servers are located in different place, in this job tries to connect
another server to get material statistics.
It is giving some error message in sm21 with
SQL error 3113 occurred when executing EXEC SQL.
work procees in reconnect mode.
all notes saying these types of dump occur when database restared, but this dump
even though database is up.
below is short dump, please can anyone help me from this problem.
ABAP runtime errors DBIF_DSQL2_SQL_ERROR
Occurred on 08.01.2007 at 00:30:28
>> Short dump has not been completely stored. It is too big.
SQL error 3113 occurred when executing EXEC SQL.
What happened?
The error occurred in the current database connection "AZ1".
What can you do?
Note the actions and input that caused the error.
Inform your SAP system administrator.
You can print out this message by choosing "Print". Transaction ST22
allows you to display and manage termination messages, including keeping
them beyond their normal deletion date.
Error analysis
How to correct the error
Database error text........: "ORA-03113: end-of-file on communication channel#"
Triggering SQL statement...: "select mara.groes, mara.brgew, mara.ntgew,
mara.gewei, mara.volum, mara.voleh, mara.mstae, mara.mstde, mara.prdha,
marc.matnr, marc.werks, marc.mmsta, marc.mmstd from sapr3.mara, sapr3.m
where sapr3.mara.mandt = sapr3.marc.mandt and sapr3.mara.matnr =
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
If the error occurred in a non-modified SAP program, you may be
able to find a solution in the SAP note system.
If you have access to the note system yourself, use the following
search criteria:
"DBIF_DSQL2_SQL_ERROR"
"ZM2431216 " or "ZM2431216 "
"EXTRACT_GENERAL_DATA"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in th
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error o
or which actions and input led to the error.
System environment
SAP Release.............. "46C"
Application server....... "essceu3"
Network address.......... "172.19.119.198"
Operating system......... "AIX"
Release.................. "5.3"
Hardware type............ "00C7ADBD4C00"
Database server.......... "ukblx176"
Database type............ "ORACLE"
Database name............ "EU3"
Database owner........... "SAPR3"
Character set............ "es_ES.ISO8859-1"
SAP kernel............... "46D"
Created on............... "Jul 9 2006 20:26:33"
Created in............... "AIX 1 5 00447C4A4C00"
Database version......... "OCI_920__OCI_7_API "
Patch level.............. "2257"
Patch text............... " "
Supported environment....
Database................. "ORACLE 8.0.5.., ORACLE 8.0.6.., ORACLE
8.1.6.., ORACLE 8.1.7.., ORACLE 9.2.0.., ORACLE 10.2.0.."
SAP database version..... "46D"
Operating system......... "AIX 1 4, AIX 2 4, AIX 3 4, AIX 1 5, AIX 2 5, AIX 3
5, , System build information:, , LCHN :
841480"
User, transaction...
Client.............. 600
User................ "MPZMMES"
Language key........ "S"
Transaction......... " "
Program............. "ZM2431216 "
Screen.............. "SAPMSSY0 1000"
Screen line......... 6
Information on where termination occurred
The termination occurred in the ABAP/4 program "ZM2431216 " in
"EXTRACT_GENERAL_DATA".
The main program was "ZM2431216 ".
The termination occurred in line 980
of the source code of program "ZM2431216 " (when callin
The program "ZM2431216 " was started as a background jo
Source code extract
009500 mara.ntgew,
009510 mara.gewei,
009520 mara.volum,
009530 mara.voleh,
009540 mara.mstae,
009550 mara.mstde,
009560 mara.prdha,
009570 marc.matnr,
009580 marc.werks,
009590 marc.mmsta,
009600 marc.mmstd
009610 into :w_ops-groes,
009620 :w_ops-brgew,
009630 :w_ops-ntgew,
009640 :w_ops-gewei,
009650 :w_ops-volum,
009660 :w_ops-voleh,
009670 :w_ops-mstae,
009680 :w_ops-mstde,
009690 :w_ops-prdha,
009700 :w_ops-matnr,
009710 :w_ops-werks,
009720 :w_ops-mmsta,
009730 :w_ops-mmstd
009740 from sapr3.mara, sapr3.marc
009750 where sapr3.mara.mandt = sapr3.marc.mandt
009760 and sapr3.mara.matnr = sapr3.marc.matnr
009770 and sapr3.mara.mandt = :p_mandt
009780 and sapr3.mara.matnr = :w_ebs-matnr
009790 and sapr3.marc.werks = :p_owerks
> ENDEXEC.
009810 endform. " extract_general_data
009820 *&
009830 *& Form append_i_ops
009840 *&
009850 * Appends W_OPS to I_OPS
009860 *
009870 form append_i_ops.
009880 append w_ops to i_ops.
009890 endform. " append_i_ops
009900 *&
009910 *& Form extract_material_description
009920 *&
009930 * Extracts a Material Description from the remote database an
009940 * modifies the current record in I_OPS.
009950 *
009960 * >P_SPRAS Language Key
009970 *
009980 form extract_material_description using p_spras.
009990 EXEC sql performing set_langauge.
Contents of system fields
SY field contents..................... SY field contents............
SY-SUBRC 0 SY-INDEX 0
SY-TABIX 1 SY-DBCNT 1
SY-FDPOS 18 SY-LSIND 0
SY-PAGNO 0 SY-LINNO 1
SY-COLNO 1
Chosen variables
Name.......................... Contents.1........2........3....+..
W_EBS-PRAT4
2
0
W_OPS-GROES
22222222222222222222222222222222
00000000000000000000000000000000
W_OPS-BRGEW #######
0000000
000000C
W_OPS-NTGEW #######
0000000
000000C
regards,
krishnaiah.Hi,
This is usually a SERVER SIDE DATABASE PROBLEM or SQLNET LISTENER (server side) PROBLEM. The client side should initially be ignored and instead the server should be investigated. In rare cases, this can be caused by client
side memory or other resource problem, or a DLL version mismatch, but this is
unlikely.
Enlist the assistance of your DBA. Then reproduce the ORA-3113 error on your
client application. Ask your DBA to look at the database side Alert.log and
trace files and look for ANY activity. Any activity that coincides with your
ORA-3113 will be a clue.
REgards
Vinod -
Error in executing ABAP program. Error occurred when creating dataset
hi,
when I use LKM SAP ERP to Oracle (SQLLDR) to extract data from SAP ERP server. I execute my interface, and it's stop at extract data step.
This is message:
java.lang.RuntimeException: Error occured in open tool execute method...Error in executing ABAP program...Error in executing ABAP program...Error occurred when creating dataset/abc/ZODI_13001_6001_GLOBAL.txt
I tried others path name, tried slash or backslash. This is content in code tab
OdiSAPAbapExecute "-UPLOAD=1" "-EXECUTE=1" "-EXECUTEBASE_RKM=0" "-ZRFC_RUN_INSTALL=1" "-ABAP_PROGRAM_NAME=ZODI_13001_6001" "-HOST=10.86.87.24" "-USER=sv_hoa" "-PASSWORD=<@=snpRef.getInfo("SRC_PASS") @>" "-SAP_CLIENT=800" "-SAP_LANGUAGE=EN" "-SAP_SYSTEM_NUMBER=02" "-SAP_FUNCTION_GROUP_NAME=ZODI_FGR_13001" "-CONNECTION_POOL_NAME=SAP_ODI_ERP_POOL_10.86.87.24" "-CONNECTION_POOL_SIZE=10" "-FILE_DELIMITER=<@=""+(char)8@>" "-FILE_NAME=ZODI_13001_6001_GLOBAL.txt" "-FTP_HOST=10.86.82.108" "-FTP_USER=anh" "-FTP_PASSWORD=<@=sFtpPassword@>" "-FTP_PASSIVE_MODE=1" "-FTP_TRANSFER_TIMEOUT=100000" "-ODI_VARIABLE_NAMES=" "-ODI_VARIABLE_VALUES=" "-USER_ABAP_PARAMETER_NAMES=IV_DELIMITER,CHAR3;IV_FILENAME,CHAR255;IV_USER,CHAR35;IV_PWD,CHAR35;IV_HOST,CHAR35;IV_HASHVALUE,CHAR35;IV_PATH,CHAR35;IV_MAX_ROW_CNT,SYTABIX;IV_FETCH_BATCH_SIZE,SYTABIX;" "-USER_ABAP_PARAMETER_VALUES=<Value>" "-USER_ABAP_PARAMETER_SEPARATOR=<Value>" "-ABAP_TABLE_PARAMETERS=RETURN,BAPIRETURN;ET_FILE_RETURN,BAPIRET2" "-ABAP_EXPORT_PARAMETERS=ERRORMESSAGE;SY-MSGV1" "-LOG_FILE_NAME=C:\Users\anh\AppData\Local\Temp\SapAbapExecuteOpenTool_13001.log" "-FTP_PATH=/abc/" "-DEV_CLASS=ZODI_DEVCLASS" "-MAX_ROW_COUNT=" "-FETCH_BATCH_SIZE=100000" "-HASH_VALUE_MARKER=HVM" "-ABAP_PROGRAM_BODY=
*Final Type declarations
TYPES : BEGIN OF ty_final,
Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_final.
*Final Temp Type Declarations
TYPES : BEGIN OF ty_final_tmp,
Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID ,
Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH ,
Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH ,
Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH ,
Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI ,
Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU ,
END OF ty_final_tmp.
*Final Target Type Declarations
TYPES : BEGIN OF ty_final_target,
C0_Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
C5_Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_final_target.
* Table type for Y03HOCSINH
TYPES : BEGIN OF ty_Y03HOCSINH,
HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_Y03HOCSINH.
TYPES: BEGIN OF gs_text,
line(843) TYPE c,
END OF gs_text.
*Structure Declarations
DATA: wa_final_string TYPE string,
wa_final TYPE ty_final,
wa_final_target TYPE ty_final_target,
wa_Y03HOCSINH TYPE ty_Y03HOCSINH,
*Table Declarations
tt_final TYPE STANDARD TABLE OF ty_final,
tt_Y03HOCSINH TYPE STANDARD TABLE OF ty_Y03HOCSINH,
tt_final_target TYPE STANDARD TABLE
OF ty_final_target,
tt_final_tmp TYPE STANDARD TABLE OF ty_final_tmp,
tt_final_tmp1 TYPE STANDARD TABLE OF ty_final,
gt_result TYPE STANDARD TABLE OF gs_text,
*Variable Declarations
lv_path TYPE string,
lv_flag TYPE char1,
C0_Y03HOCSINH_HOCSINH_ID TYPE
STRING,
C1_Y03HOCSINH_MA_HOC_SINH TYPE
STRING,
C2_Y03HOCSINH_TEN_HOC_SINH TYPE
STRING,
C3_Y03HOCSINH_GIOI_TINH TYPE
STRING,
C4_Y03HOCSINH_DIA_CHI TYPE
STRING,
C5_Y03HOCSINH_GHI_CHU TYPE
STRING,
wa_final_tmp TYPE ty_final_tmp,
lv_file TYPE string,
lv_datum TYPE sy-datum,
lv_date TYPE char10,
wa_result TYPE string,
lv_delimiter type string,
lv_cnt TYPE sytabix,
*-Cursor Declaration
lv_Y03HOCSINH_dbcur TYPE cursor,
lv_tabix_frm TYPE sy-tabix.
lv_delimiter = iv_delimiter.
IF iv_hashvalue = 'HVM'.
*Open/delete output file
CONCATENATE iv_path iv_filename INTO lv_path.
*Check for file existence, if found, delete it
OPEN DATASET lv_path FOR INPUT
IN TEXT MODE
ENCODING DEFAULT.
IF sy-subrc EQ 0.
DELETE DATASET lv_path.
ENDIF.
*Open/create output file
OPEN DATASET lv_path FOR APPENDING
IN TEXT MODE
ENCODING DEFAULT.
IF sy-subrc EQ 0.
*Batch Processing
OPEN CURSOR WITH HOLD lv_Y03HOCSINH_dbcur FOR
SELECT HOCSINH_ID
MA_HOC_SINH
TEN_HOC_SINH
GIOI_TINH
DIA_CHI
GHI_CHU
FROM Y03HOCSINH.
DO.
*Check for the counter, only for first batch
*process new line is required...
lv_cnt = lv_cnt + 1.
REFRESH tt_Y03HOCSINH.
FETCH NEXT CURSOR lv_Y03HOCSINH_dbcur
APPENDING TABLE tt_Y03HOCSINH
PACKAGE SIZE IV_FETCH_BATCH_SIZE.
IF NOT tt_Y03HOCSINH IS INITIAL.
ELSE.
EXIT.
ENDIF.
LOOP AT tt_Y03HOCSINH INTO wa_Y03HOCSINH.
MOVE wa_Y03HOCSINH-HOCSINH_ID
TO wa_final_tmp-Y03HOCSINH_HOCSINH_ID.
MOVE wa_Y03HOCSINH-MA_HOC_SINH
TO wa_final_tmp-Y03HOCSINH_MA_HOC_SINH.
MOVE wa_Y03HOCSINH-TEN_HOC_SINH
TO wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_Y03HOCSINH-GIOI_TINH
TO wa_final_tmp-Y03HOCSINH_GIOI_TINH.
MOVE wa_Y03HOCSINH-DIA_CHI
TO wa_final_tmp-Y03HOCSINH_DIA_CHI.
MOVE wa_Y03HOCSINH-GHI_CHU
TO wa_final_tmp-Y03HOCSINH_GHI_CHU.
APPEND wa_final_tmp TO tt_final_tmp.
ENDLOOP.
free : tt_Y03HOCSINH.
LOOP AT tt_final_tmp INTO wa_final_tmp.
MOVE wa_final_tmp-Y03HOCSINH_HOCSINH_ID
TO wa_final_target-C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_tmp-Y03HOCSINH_MA_HOC_SINH
TO wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH
TO wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_tmp-Y03HOCSINH_GIOI_TINH
TO wa_final_target-C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_tmp-Y03HOCSINH_DIA_CHI
TO wa_final_target-C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_tmp-Y03HOCSINH_GHI_CHU
TO wa_final_target-C5_Y03HOCSINH_GHI_CHU.
Append wa_final_target to tt_final_target.
ENDLOOP.
free : tt_final_tmp.
Clear wa_final_target.
IF NOT iv_max_row_cnt IS INITIAL.
Loop at tt_final_target into
wa_final_target TO iv_max_row_cnt.
MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
TO C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
TO C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
TO C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
TO C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
TO C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
TO C5_Y03HOCSINH_GHI_CHU.
CONCATENATE
C0_Y03HOCSINH_HOCSINH_ID
C1_Y03HOCSINH_MA_HOC_SINH
C2_Y03HOCSINH_TEN_HOC_SINH
C3_Y03HOCSINH_GIOI_TINH
C4_Y03HOCSINH_DIA_CHI
C5_Y03HOCSINH_GHI_CHU
INTO wa_final_string
SEPARATED BY lv_delimiter.
IF sy-tabix EQ 1 AND lv_cnt EQ 1.
CONCATENATE wa_final_string
lv_delimiter INTO wa_final_string.
ELSE.
CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
lv_delimiter INTO wa_final_string.
ENDIF.
APPEND wa_final_string TO gt_result.
CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI,
C5_Y03HOCSINH_GHI_CHU.
ENDLOOP.
ELSE.
Loop at tt_final_target into wa_final_target.
MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
TO C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
TO C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
TO C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
TO C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
TO C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
TO C5_Y03HOCSINH_GHI_CHU.
CONCATENATE
C0_Y03HOCSINH_HOCSINH_ID
C1_Y03HOCSINH_MA_HOC_SINH
C2_Y03HOCSINH_TEN_HOC_SINH
C3_Y03HOCSINH_GIOI_TINH
C4_Y03HOCSINH_DIA_CHI
C5_Y03HOCSINH_GHI_CHU
INTO wa_final_string
SEPARATED BY lv_delimiter.
IF sy-tabix EQ 1 AND lv_cnt EQ 1.
CONCATENATE wa_final_string
lv_delimiter INTO wa_final_string.
ELSE.
CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
lv_delimiter INTO wa_final_string.
ENDIF.
APPEND wa_final_string TO gt_result.
CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI,
C5_Y03HOCSINH_GHI_CHU.
ENDLOOP.
ENDIF.
free : tt_final_target.
IF NOT gt_result IS INITIAL.
CLEAR wa_result.
LOOP AT gt_result INTO wa_result.
TRANSFER wa_result TO lv_path.
ENDLOOP.
ENDIF.
REFRESH gt_result.
*End of main loop for batching
ENDDO.
*Close dataset
CLOSE DATASET lv_path.
CLOSE CURSOR lv_Y03HOCSINH_dbcur.
ELSE.
DATA: lv_mesg TYPE string.
CLEAR et_file_return.
et_file_return-type = 'E'.
CONCATENATE
'Error occurred when creating dataset' lv_path
INTO lv_mesg.
et_file_return-message = lv_mesg.
Append et_file_return.
ENDIF.
ELSE.
CLEAR et_file_return.
et_file_return-type = 'E'.
et_file_return-message =
'Installed ABAP program does not match interface definition'.
APPEND et_file_return.
ENDIF.
Thanks for helpr u able to figure it out..........i got the same error .......can someone help me fix this issue
-
Failed to execute with the error Error occurred when starting the parser: t
Dear All
I am getting this error
""A database error occurred. The database error text is: The MDX query SELECT { [DASKA1EDEL2DMLXTQ62S595QV].[DB7BP4A8AMQTUD3DPEEPS4J87] } ON COLUMNS , NON EMPTY CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( [0CALMONTH].[LEVEL01].MEMBERS, [DASKFZ1TRFOLNTG78G0HH2B87].MEMBERS ), [0MATERIAL].[LEVEL01].MEMBERS ), [0PLANT].[LEVEL01].MEMBERS ), [0COMP_CODE].[LEVEL01].MEMBERS ), [0ACTDELDATE].[LEVEL01].MEMBERS ) DIMENSION PROPERTIES MEMBER_NAME, MEMBER_CAPTION ON ROWS FROM [0IC_C03/ZMATSTOCK] failed to execute with the error Error occurred when starting the parser: timeout during allocate / CPIC-CALL: 'ThSAPCMRCV'. (WIS 10901)""
I already went to similar kind of error solution in forum,but this error is coming for one web I query,all other reports are working fine.
I already implemented note 1032461Hi,
Under normal circumstances it should be enough to restart the connection service.
As far as we know there is no formal solution to this problem from SAP yet but restarting the connection service is much less of an interuption compared to restarting the the SIA.
Re-starting the connection service should resolve this issue. since, Connection service is only related to DeskI and Rich Client re-statrng wonu2019t impact other business objects components including java report panel.
All the Best,
Madhu.... -
BDC to assign MIC -:Error occurred when checking type $ group $.
Hi
We have developed a BDC program to assign MIC`s in routing operations,at the end of assigning the MIC`s in the operations the system is giving the below message .
Error occurred when checking type $ group $.
Please note that 100% sampling procedure is assigned in MIC`s.
Please advise how to recfity the same .
PS :- while creating it manually there are no errors.
Regards
Trishna NambiarThere was some problem with Sampling unit of the MICs assigned in the operations. This caused the error. Error log was in Tasklist checklist in the Inspection plan.
-
After I upgraded iTunes, iTunes doesn't recognize CD in the drive, apparently isn't the default player. It won't let me set iTunes as the default player, I get the error message "An error occurred when updating the default player for audio files types." I tried Whitesides' remedy (changing Read Only status in folder in Windows) but it didn't solve the problem. Any suggestions? Thanks.
JOddly enough. I think I just solved it. It looks like, for some reason, my computer has about 8 different "iTunes music" folders, and I've been saving my music to the wrong one. Neat. Music now imports and plays as it should. Copying things over is going to be so fun tonight!
-
Error occured when checking type group
Hi Gurus,
I am getting an error during change of routing through BDC
I want to update the MIC against operation ,but in the last step I am getting the error
like "Error occurred when checking type 5xxxxxxxx"
Please suggest me why this error is coming.
Regards
ArabindHi Arabind,
Please check below posts. They talk about similar issue & I think they have the answer to your question.
BDC - Error occurred when checking type $ group $. | SCN
Error occurred in checking type group in qm
Thanks to the original contributers.
Regards,
Ragahva
Maybe you are looking for
-
How to get Contract Account Number in Service Ticket
Hi Experts, How to get Contract account number in Service Ticket, we are working in ISU environment. when i create the service ticket the contract account number is there in Business agreement number field in service tiket. Can anyone tell me how to
-
Spry photo album displays in Safari not in IE
I used the article http://www.adobe.com/devnet/dreamweaver/articles/spry_photo_album.html as a guide to build a spry photo album for a pool & spa web site. The photo album displays perfectly in IE when I preview it locally. However, when viewing the
-
I have an int that I would like to make to a String. How? Why dos'nt this work? int a = 5; String t = toString(a);
-
Hi I am creating a complaint with reference to the billing document. I want to copy the items from the billing document into the complaint document. For this I created a complaint transation type But I am not able to select the billing item to compla
-
I can't find the mirror icon when I double click the home button and scroll left or right