How to create secondry index on database table
how to create secondry index on database table
Hi
By trx SE11:
- Choose your table and press CHANGE ICON, so INDEX
When you create an index you should consider if your index is contained in another index.
If the fields of your index are:
- FIELD1, FLIED2, FIELD3
...it'll be triggered only if the select is:
SELECT * FROM <TABLE> WHERE FIELD1
AND FIELD2
AND FIELD3
A select like this
SELECT * FROM <TABLE> WHERE FIELD1
AND FIELD3
AND FIELD2
doesn't use your index.
Max
Similar Messages
-
Any body help me.please tell me how to create secondry index.
Thanks & Regards,
RakeshHi
Goto SE11 and give the table name
then click on Indexes which is in application toolbar
then on that dialog box click on CREATE
then give a name for ur index starting with Y or Z
then select the fields from that table for indexes.
then save in package
then activate it
thats all
follw the above steps for creating.
If helpful reward points
Regards
Navneet -
How to create better index on a table--
Hi
I have table called CS_LM_CUST.Every day I am getting 1,50,00
records every day.And all the records I am inserting.And every
two months data I am doing purging.My requirement is to load
chaged data between 2 days i.e current day feed minus previous
day feed difference data only I need to do.
For taking the differrence data I have given the sql statement
like this.
SELECT
CUST_NO,ORIG_BR_COD,LANG_COD,NATL_CTRY_COD,CUST_NAM,DMCL_CTRY_COD
,CUST_GFCID,CUST_GFPID,STD_INDS_COD FROM CS_LM_CUST WHERE
ORIG_BR_COD = p_Branch AND REC_EXTRC_DT = CurrentDate
MINUS
SELECT
CUST_NO,ORIG_BR_COD,LANG_COD,NATL_CTRY_COD,CUST_NAM,DMCL_CTRY_COD
,CUST_GFCID,CUST_GFPID,STD_INDS_COD FROM CS_LM_CUST WHERE
ORIG_BR_COD = p_Branch AND REC_EXTRC_DT = PreviousDate
And for updating the differed data sql statement is given like
this.
UPDATE CS_LM_CUST
SET newrec_flg = 'Y'
WHERE cust_no = g_CSLMCUST.cust_no AND
orig_br_cod = g_CSLMCUST.ORIG_BR_COD AND
rec_extrc_dt = g_CSLMCUST.rec_extrc_dt;
Index has been created on cust_no,orig_br_cod,rec_extn_dt.But
the updating part is taking lot of time.Nearly 45mts.Could any
one suggest better indexing on this table which will satisfy
DML statement like SELECT,UPDATE.
The table below fields
CUST_NO
REC_TYP
LANG_COD
NATL_CTRY_COD
REC_EXTRC_DT
CUST_NAM
DMCL_CTRY_COD
CUST_GFCID
CUST_GFPID
ORIG_BR_COD
SYS_NAM
DATA_TYP
STD_INDS_COD
ACTN_TYP
EVENT_TYP
MSG_DT_TM_STMP
FORMAT_OK_FLG
MSG_ID
NEWREC_FLG
I have tried alot for creating all the possible ways.But it
satisfy either SELECT or UPDATE at a time.
Thanks & Regards
Srinivas NimishakaviHi, General practice is clustered index would be created by Primary key if one created. That would identify the row ie., no duplicate rows. You can create composite key (combination of more than one column) as primary key. Other widely used practice
is to use surrogate key like identity key which assigned unique number. Please note that you only got one clustered index .
" Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition. There can be only one clustered index per table, because the data rows themselves can be sorted in only
one order. "
Since you already got quite few non-clustered indexes, you have to rebuild/reorganize once you create clustered index. -
HOW TO CREATE LOCAL INDEX ON BIG PARTITION TABLE
Dear All,
I have one big table 450GB stored on 9 partitions and same partitions I have created for the index. Now the problem is when i am trying to create local index it took one and half day and is still going on...
is there any shortest way to create local index on this table easily.
Database version is 11.2.0.1.0
INDEX SCRIPT IS
CREATE INDEX INDEX_SPACE0_IX_LOCAL ON FINANCE (END_TIME)
INITRANS 2 MAXTRANS
255
LOCAL ( PARTITION INDEX_SPACE01
LOGGING
NOCOMPRESS
TABLESPACE INDEX_SPACE01
PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
2147483645 BUFFER_POOL
DEFAULT), PARTITION INDEX_SPACE02
LOGGING
NOCOMPRESS
TABLESPACE INDEX_SPACE02 PCTFREE
5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
2147483645 BUFFER_POOL DEFAULT),
PARTITION INDEX_SPACE03
LOGGING
NOCOMPRESS
TABLESPACE
INDEX_SPACE03
PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
2147483645 BUFFER_POOL DEFAULT),
PARTITION INDEX_SPACE04
LOGGING
NOCOMPRESS
TABLESPACE
INDEX_SPACE04 PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS
1 MAXEXTENTS
2147483645 BUFFER_POOL DEFAULT),
PARTITION INDEX_SPACE05
LOGGING
NOCOMPRESS
TABLESPACE
INDEX_SPACE05 PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS
1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT),
PARTITION INDEX_SPACE06
LOGGING
NOCOMPRESS
TABLESPACE INDEX_SPACE06 PCTFREE 5 INITRANS 2
MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL
DEFAULT),
PARTITION INDEX_SPACE07
LOGGING
NOCOMPRESS
TABLESPACE INDEX_SPACE07 PCTFREE
5 INITRANS 2
MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL
DEFAULT),
PARTITION INDEX_SPACE08
LOGGING
NOCOMPRESS
TABLESPACE INDEX_SPACE08 PCTFREE
5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
2147483645
BUFFER_POOL DEFAULT),
PARTITION INDEX_SPACE09
LOGGING
NOCOMPRESS
TABLESPACE
INDEX_SPACE09 PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS
1 MAXEXTENTS 2147483645 BUFFER_POOL
DEFAULT))
NOPARALLEL;
Thanks in advance......
Thanks,
Edited by: sherkhan on Aug 24, 2011 3:36 AM
Edited by: sherkhan on Aug 24, 2011 3:49 AMHave you verified that 'n' Index partition segments have got created so far ? (they would apepar as TEMPORARY segments only till the full index creation is completed). Have you monitored the session statistics and waits and confirmed that it is not waiting on something horrible ?
A CREATE INDEX can well be NOLOGGING instead of LOGGING. It could also use PARALLEL but I always recommend setting it back to NOPARALLEL immediately after the CREATE is completed.
You can also "quickly" build an empty index and then gradually create (i.e. build) each partition
CREATE INDEX INDEX_SPACE0_IX_LOCAL ......... UNUSABLE ;
ALTER INDEX INDEX_SPACE0_IX_LOCAL REBUILD PARTITION PARTITION INDEX_SPACE01;
ALTER INDEX INDEX_SPACE0_IX_LOCAL REBUILD PARTITION PARTITION INDEX_SPACE02;
...Hemant K Chitale -
How to create a index for solution database - CRM5.0
Hello Experts,
We want to have knowledge search in our IC web client
Trex 7.0 is alreasy installed.
I have done configuration in SAF.Also have created problem/solution in IS01-tcode
When I tried to compile SDB, I am getting error " 2007 - Index does not exist.
Can any one tell me how to create a index and how to assign a problem to SDB.
Regards,
Indhra.EHi,
Please ensure the following are correctly configured.
At IMG location CRM > Enterprise Intelligence > Software Agent Framework
1. The knowledge base has been configured - "Name and Configure Search Engine".
2. The knowledge base has been included in application - "Configure Application". The knowledge base should be in both application "ALL" and "ICWEBClient". (SAP note - 1091759 refers to similar error)
Then, as you might have executed the BSP application, CRM_EI_CMP_ADMN->default page, and select some language & click on Full index.
You might want to monitor the indexing process in TREX with the help of TREX admin. If nothing is shown in the index queue after the detail compilation shows status as finished, then the problem is in the CRM side and the documents are not flowing to TREX. So you might want to put breakpoint at CL_CRM_SAF_SE_TREX_ABAP classes' FULL_COMPILE method and analyse.
Kindly get back with any more details that you find if the problem doesn't gets solved.
Regards,
Uma. -
Dear sir
I have find some missing indexes is there in T code db02
can anyone tell me how to create missing indexes and how to manage that thing frequentely
regards
krishnaHi,
in SE12 you can activate the index. (display the index and activate it)
Alternatively in SE14 the index can be created with the database utilty.
(display the table, click indexes, choose your index, then create it).
In case you have a big database table you should prefer SE14 and use
the background option in order to avoid timeouts.
I'm not aware of an automatism for manage this frequently. This is a
task carried out by SAP system or database administrators.
Kind regards,
Hermann -
Hi Experts,
I have a requirement to improve the performance of report,So i got some select querys there non primery keys are used for table VBAK,VBAP,LIKP,LIPS so i want to create secondry index for that,Any one can help me for that means after create secondry index how to use that index in report and for create secondry index required any MANDT field or Not.
Thanks.Hello Ram,
Before creating secondary index you need to know the below points.
1) Do not create more indices on table
2) What is the frequency of table access
3) You should not create too much columns(should be less than 120 characters)
4) Cant you use existing indices?
5) DML operation will be delayed if you create index
Before moving to Production system please consider below the points.
1) Ask BASIS to create index in DB level then move your DDIC transport which will be faster
2) While creating index if the DB size is like more than 500 GB then downtime is required
Regards,
Vadamalai A -
How to create a sql server database in SQL DEVELOPER.
I installed the SQL DEVELOPER 1.5.5, but i can't found where to create the sql server database in it. please kindly tell me if you feel free.
Thanks so much in advance.Hi,
Take a look at the main [ SQL Developer page on OTN|http://www.oracle.com/technology/products/database/sql_developer/index.html]. There is a link you should find useful, it's the Getting Started link under the Migration section. This explains how to download and setup the drivers you need to correct to non-Oracle databases. There are also links to online demonstrations on how to create connections to these databases. See how you go with that material.
It should help.
Sue -
Creating spatial index on spatial table
Hi there. Just a quick query on creating spatial indexes on spatial tables. I have a table called System_Sessions which has the following four fields and types:
USER_ID NUMBER(10)
SESSION_ID NUMBER(10)
SESSION_BOUNDARY MDSYS.SDO_GEOMETRY (polygon)
START_POINT MDSYS.SDO_GEOMETRY (point)
I am inserting one row per user session into this table. I also need to retrieve the session ids of previous sessions involving a particular user based on the session's start point. The query i am running is an sdo_within_distance query which looks as follows:
Select session_id from joeweaker.system_sessions where user_id = 1003 and SDO_WITHIN_DISTANCE(start_point,
(MDSYS.SDO_GEOMETRY(2001, 8265, MDSYS.SDO_POINT_TYPE
(-105.0,40.0, NULL),NULL, NULL)), 'DISTANCE = 10000')='TRUE';
However I encounter the following error whenever I attempt to execute this query:
ORA-13226: interface not supported without a spatial index
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 8
ORA-06512: at "MDSYS.SDO_3GL", line 255
I know I haven't built the spatial index on the table so I was hoping that somebody might show me how to do this. Thnaks a lot, JoeThnaks a lot Dan for the prompt reply. I have done as you advised and everything appears to be fine. However I have a second table called Session_Interest_Areas which appears as follows:
USER_ID----NUMBER(10)
SESSION_ID----NUMBER(10)
AREA_ID----NUMBER(10)
AREA_BOUNDARY----MDSYS.SDO_GEOMETRY
I inserted the necessary detail into the user_sdo_geom_metadata table and then attempted to create the index as follows (exactly the same format as my other spatial tables:
create index session_interest_areas_idx on
session_interest_areas (area_boundary)
indextype is mdsys.spatial_index;
When I execute this query I get the following stream of error messages:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13249: internal error in Spatial index: [mdidxrbd]
ORA-13249: Error in Spatial index: index build failed
ORA-13249: Error in spatial index: [mdrcrtxfergm]
ORA-13249: Error in spatial index: [mdpridxtxfergm]
ORA-13200: internal error [ROWID:AAAHocAAJAAAAC8AAA] in spatial indexing.
ORA-13206: internal error [] while creating the spatial index
ORA-13373: Element of type Extent is not supported for Geodetic data
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
ORA-06512: at line 1
Why does this give me an error when the same approach worked fine for my other spatial tables? Is it something to do with the SRID? Also the index appears to have been created so I presume it has been created incorrectly. Thanks for your time, Joe -
How to find global index in partition table
Hi guys ,
need one help
How to find global index on partition table
How to find local index on partition table
Need query
Thanks in advance
Edited by: nav on Feb 17, 2012 6:51 AMnav wrote:
Hi Solomon,
so I have to identify partition & index are created or not,
also I have check the status of index ( both global and local)So what's the problem? Table/index partition is an object, so you can query DBA_OBJECTS:
SELECT SUBOBJECT_NAME,
CREATED
FROM DBA_OBJECTS
WHERE OWNER = partitioned-table-owner
AND OBJECT_NAME = partitioned-table-name
AND CREATED >= TRUNC(SYSDATE)
/This will give you partitions created today. So if you run this right after your job (I hope your job doen't run too close to midnight), you'll get table partition name your job created. Same logic can be applied to indexes.
SY. -
How to create Secondary Index?
Hello All
Can anyone let me know how to create secondary indexes?
I hope Primary Indexes are being created automatically?V can'nt able to create this.
regards
baljiHi,
1) Go to Se11 select table /BI0/A<ODS>00 > Utilities> Data bse Object --> Check.
2) If you are using ODS Active table in any Start routine ,Make sure that the order of objects to be seleccted (select statement) should be in same order of index fields.
In Query, Use RSRT to know the SQL statement of the Query .and follow same logic explained above.
3) No need to create Secondary Index for Cube.
4) IT recreates the Index.
With rgds,
Anil Kumar Sharma .P -
How to create an arrow in a table
How to create an arrow in a table in numbers.
If you have plus or minus numbers, I want to know a green arrow on the increase is positively or a red arrow if it is negative numberMaybe something like this?
-
How to create t-code for a table and how to create transaction variant???
Hi,
I have created a custom table zsark.
Now my requirement is : I have to create a transaction variant zsark_var for sm30 and table zsark. I have to disable the output of the first screen. I have to assign the transaction variant to the transaction code of table zsark.
Now,
1. how to create transaction code to a table. Can any one give me the
staps??
2. how to create transaction variant for the above requirement???
Thanks & Regards,
SarkarHi
1 Goto SE93 transaction
2 Choose 5th option Transaction with parameters
3 Give transaction : SM30, Check Skip Initial Screen Press Enter
4 Goto Bottom left corner, click F4 select viewname, on right hand side give table name
5 Press one more time F4, choose update , mark it X on right side.
6 save the transaction.
Thanks
sandeep
reward if helpful -
How to create a Index for KM documents
Hi Experts.......
I have two queries .
1,How to create a Index for the KM Server documents so that when ever i am in need of particular document,i can be able to retrive the exact document within short time......
2,What Is TREX? Need of TREX ?
If any one have documents for the above said queries kindly send it to [email protected]
Thanks in Advance,
JasmineHi Jasmine,
1.In the EP 6.0 you can create index System Administration -> System Configuration -> Knowledge Management -> Index Administration
2.TREX is search engine that will proccess the documents that you have specified in the index Data sources when you have created the index.
The status of TREX you can see in System Administration -> Monitoring -> Knowledge Management -> TREX Monitor or Index Monitor for indexing monitoring.
If you don't have connected any TREX engine to J2EE, just start the visual administrator and configure the TREX service.
To install the TREX you can follow the instguides for TREX service.sap.com/instguides SAP Netweaver->Release 04 or 2004s -> Installation -> Cross-NW
I hope that it helps.
Bye
Dan -
How to create screen resolution in bdc table control
hi gurus
can anyone suggest me
how to create screen resolution in bdc table control
thanks®ards
mark.Hi ,
Using CTU_PARAMS table for screen resolution .
For this sample code.
This is for Transation FB60.
report ZZFB60
no standard page heading line-size 255.
tables t100.
PARAMETERS : p_file1 like rlgrap-filename,
p_doctyp like RF05A-BUSCS,
p_invdat like INVFO-BLDAT,
p_posdat like INVFO-BUDAT.
CONSTANTS : C_TRANS_FB60(4) VALUE 'FB60'.
*Parameter string for runtime of CALL TRANSACTION
data : l_option type ctu_params,
l_subrc type sysubrc.
DATA : l_mstring(150).
data accnt type char17.
data : day type char2,
month type char2,
year type char4,
date1 type char10,
date2 type char10.
data : cnt(2) TYPE n,
cnt1 type i,
fld(25) TYPE c.
data : begin of excel occurs 0,
fieldname(255) type c,
end of excel.
DATA:BEGIN OF it_mess OCCURS 0,
msgtyp(5),
lms(200),
msgv1(50),
END OF it_mess.
data: begin of t_record occurs 0,
BUKRS(004),
ACCNT(017),
XBLNR(016),
WRBTR1(016),
WAERS(005),
SECCO(004) ,
SGTXT(050),
HKONT(010),
WRBTR2(017),
MWSKZ(002),
GSBER(004),
KOSTL(010),
end of t_record.
*Internal Table for Header Data
DATA : BEGIN OF t_head OCCURS 0,
BUKRS(004), "Company Code
ACCNT(017), "Account or Vendor
XBLNR(016), "Reference
WRBTR1(017), "Amount in document currency
WAERS(005), "Currency
SECCO(004), "Section Code
SGTXT(050), "Text
END OF t_head.
*Internal table for Item Data
DATA : BEGIN OF t_item OCCURS 0,
ACCNT(017), "Account
HKONT(010), "GL Account
WRBTR2(017), "Line item Amount in document currency
MWSKZ(002), "Tax Code
GSBER(004), " Business Area
KOSTL(010), "Cost centre
END OF t_item.
DATA: IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_BDC_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
*include bdcrecx1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
PERFORM file_selection.
PERFORM data_upload.
PERFORM table_control.
start-of-selection.
l_option-defsize = 'X'.
l_option-dismode = 'A'.
l_option-updmode = 'S'.
day = p_invdat+6(2).
month = p_invdat+4(2).
year = p_invdat+0(4).
concatenate day month year into date1 SEPARATED BY '.'.
day = p_posdat+6(2).
month = p_posdat+4(2).
year = p_posdat+0(4).
concatenate day month year into date2 SEPARATED BY '.'.
*perform open_group.
loop at t_head.
CLEAR IT_BDCDATA.
REFRESH IT_BDCDATA.
perform bdc_dynpro using 'SAPLACHD' '1000'.
perform bdc_field using 'BDC_OKCODE' '=ENTR'.
perform bdc_field using 'BKPF-BUKRS' t_head-bukrs.
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'RF05A-BUSCS' p_doctyp.
perform bdc_field using 'INVFO-ACCNT' t_head-accnt.
perform bdc_field using 'INVFO-BLDAT' date1.
perform bdc_field using 'INVFO-BUDAT' date2.
perform bdc_field using 'INVFO-XBLNR' t_head-xblnr.
perform bdc_field using 'INVFO-WRBTR' t_head-wrbtr1.
perform bdc_field using 'INVFO-WAERS' t_head-waers.
perform bdc_field using 'INVFO-SECCO' t_head-secco.
perform bdc_field using 'INVFO-SGTXT' t_head-sgtxt.
cnt = 1.
cnt1 = 1.
loop at t_item where accnt = t_head-accnt.
*if cnt > 4.
*cnt = 4.
*endif.
if cnt1 gt 1.
CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
perform bdc_field using fld 'X'.
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE' '=0005'.
endif.
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE' '/00'.
CONCATENATE 'ACGL_ITEM-HKONT(' cnt ')' INTO fld.
perform bdc_field using fld t_item-hkont.
CONCATENATE 'ACGL_ITEM-WRBTR(' cnt ')' INTO fld.
perform bdc_field using fld t_item-wrbtr2.
CONCATENATE 'ACGL_ITEM-MWSKZ(' cnt ')' INTO fld.
perform bdc_field using fld t_item-mwskz.
CONCATENATE 'ACGL_ITEM-GSBER(' cnt ')' INTO fld.
perform bdc_field using fld t_item-gsber.
CONCATENATE 'ACGL_ITEM-KOSTL(' cnt ')' INTO fld.
perform bdc_field using fld t_item-kostl.
perform bdc_field using 'BDC_CURSOR' fld.
*CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
*perform bdc_field using fld 'X'.
cnt1 = cnt1 + 1.
*cnt = cnt + 1.
*if cnt > 1.
*perform bdc_dynpro using 'SAPMF05A' '1100'.
*perform bdc_field using 'BDC_OKCODE' '=0005'.
**perform bdc_field using 'BDC_OKCODE' '=0006'.
*endif.
endloop.
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE'
'=BS'.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
*perform bdc_transaction using 'FB60'.
CALL TRANSACTION C_TRANS_FB60 USING IT_BDCDATA options from l_option
MESSAGES INTO IT_BDC_MESSAGES.
perform error.
perform errordownload.
endloop.
*perform close_group.
*Form data_upload
FORM data_upload .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = p_file1
FILETYPE = 'DAT'
TABLES
DATA_TAB = t_record.
ENDFORM. " data_upload
*Form file_selection
FORM file_selection .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'p_file1'
IMPORTING
file_name = p_file1.
ENDFORM. " file_selection
Form BDC_DYNPRO
FORM BDC_DYNPRO using program dynpro.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROGRAM.
IT_BDCDATA-DYNPRO = DYNPRO.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
endform.
*Form BDC_FIELD
FORM bdc_field using fnam fval.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA.
ENDFORM.
Table Control
FORM table_control .
LOOP AT t_record.
ON CHANGE OF t_record-accnt.
MOVE-CORRESPONDING t_record TO t_head.
APPEND t_head.
ENDON.
loop at t_head.
t_item-accnt = t_head-accnt.
t_item-hkont = t_record-hkont.
t_item-wrbtr2 = t_record-wrbtr2 .
t_item-mwskz = t_record-mwskz .
t_item-gsber = t_record-gsber .
t_item-kostl = t_record-kostl.
APPEND t_item.
endloop.
If t_record-level = 'H'.
t_head-bukrs = t_record-text1.
t_head-accnt = t_record-text2.
t_head-xblnr = t_record-text3.
t_head-wrbtr1 = t_record-text4.
t_head-waers = t_record-text5.
t_head-secco = t_record-text6.
t_head-sgtxt = t_record-text7.
APPEND t_head.
else.
t_item-accnt = t_head-accnt.
t_item-hkont = t_record-text1.
t_item-wrbtr2 = t_record-text2.
t_item-mwskz = t_record-text3.
t_item-gsber = t_record-text4.
t_item-kostl = t_record-text5.
APPEND t_item.
endif.
ENDLOOP.
ENDFORM.
FORM error .
LOOP AT IT_BDC_MESSAGES.
IF IT_BDC_MESSAGES-msgtyp = 'E'.
SELECT single * FROM t100 WHERE
sprsl = it_BDC_MESSAGES-msgspra
AND arbgb = IT_BDC_MESSAGES-msgid
AND msgnr = IT_BDC_MESSAGES-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
REPLACE '&2' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
REPLACE '&3' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
REPLACE '&4' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
ELSE.
REPLACE '&' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
REPLACE '&' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
REPLACE '&' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
REPLACE '&' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
ENDIF.
CONDENSE l_mstring.
it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
it_mess-lms = l_mstring.
it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
APPEND it_mess.
ELSE.
it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
it_mess-lms = l_mstring.
it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
APPEND it_mess.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM.
form errordownload.
*down the internal table to excel file.
call function 'EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = 'c:/Error.xls'
TABLES
data_tab = it_mess
fieldnames = excel
EXCEPTIONS
file_not_exist = 1
filename_expected = 2
communication_error = 3
ole_object_method_error = 4
ole_object_property_error = 5
invalid_filename = 6
invalid_pivot_fields = 7
download_problem = 8
others = 9.
endform.
Reward if useful
Regards,
Narasimha
Edited by: narasimha marella on May 13, 2008 12:12 PM
Maybe you are looking for
-
I recently tried to use a Firewire to share files with a friend (my computer is from 2007 and hers is new). I discovered that she has no place where I can put the firewire, or at least the one that fits into mine. My question is this: I am about to b
-
Email with excel attachment...strange....
My mother is trying to send me an Excel file that she received in another email (she can't open it-doesn't have Excel). She's tried forwarding the whole email to me, dragging just the wanted file to a new email and also saving the file to her desktop
-
Hello ! I created 2 text entry fields on a form. Both contains a numeric value of the same LOV (a "from" field and an "to" field). Putting the focus in one of them results the selected value filled into the relevant field in Forms 6i. Now I want ot m
-
Uninstall previous versions?
Should I uninstall all previous versions of Lightroom after installing the CC version. I use a new catalog for every session, so I don't have one huge catalog in each version.
-
Files and/or folders becoming locked on Mac Server 10.3.9
Files and folders cannot be reopened on the respective server share when the creator or inclusive user tries to reopen a folder or file, they see the file / folder as being locked. The server is set to inherit permissions. All of our students go to a