Bad performance on Factory.parse method
Hi all,
I have some classes created from an XML Schema.
I'm using them to load an XML from disk instead of using SAX or DOM.
The problem is that I have monitorized the performance with OptimizeIt
and every time I call the XXXXType.Factory.Parse(InputStream file)
method the number of instances in memory of the following classes:
com.bea.xbean.store.Splay$[Annotation, Attr, Begin, Comment, CopyContext, CursorGobber]
enlarges as much as the XML file in disk becomes bigger. It's a big problem for
an application that continously loads files about 1.5 MB. I force OptimizeIt to
call the Garbage Collector, but those objects are never removed.
Does anybody have noticed the same issue?
Thank you very much,
Gustavo.
Hi all,
I have some classes created from an XML Schema.
I'm using them to load an XML from disk instead of using SAX or DOM.
The problem is that I have monitorized the performance with OptimizeIt
and every time I call the XXXXType.Factory.Parse(InputStream file)
method the number of instances in memory of the following classes:
com.bea.xbean.store.Splay$[Annotation, Attr, Begin, Comment, CopyContext, CursorGobber]
enlarges as much as the XML file in disk becomes bigger. It's a big problem for
an application that continously loads files about 1.5 MB. I force OptimizeIt to
call the Garbage Collector, but those objects are never removed.
Does anybody have noticed the same issue?
Thank you very much,
Gustavo.
Similar Messages
-
CMP 6.1 Entity bad performance.
I'am using entity 1.1 EJB on WL 6.1 and facing very bad performances:
around 150ms for an insert (i have 20 columns).
When accessing an order interface to read 2 fields in a session bean method: around
90 ms.
I'am very disapointed and confused. What should I look up for
to increase the performance ? Any important tuning or parameters ? Should I use EJB
2.0 to have significant perf ?
Thanks for any advice because we are thinking to switch all the application on stored
procedures. A solution without Entity and fewer stateless session beans.
My config:
WL: 6.1 on Sun sparc
SGBD: Sybase
Entity: WebLogic 6.0.0 EJB 1.1 RDBMS (weblogic-rdbms11-persistence-600.dtd)
ThanksHistorically its hard to get good performance & scalability out of sybase
without using stored procs. Using dynamic sql on sybase just doesnt do as
well as procs. Oracle on the other hand can get very close to stored proc
speed out of well written dynamic sql.
As far as weblogic goes, my experience is the focus of their testing for db
related stuff is Oracle, then DB2, then MSSQLServer. Sybase is usually last
on the list.
As far as the 6.1 cmp, haven't used it much, but because of these other
things I would be cautious about using it with Sybase.
Joel
"Antoine Bas" <[email protected],> wrote in message
news:3cc7cdcf$[email protected]..
>
I'am using entity 1.1 EJB on WL 6.1 and facing very bad performances:
around 150ms for an insert (i have 20 columns).
When accessing an order interface to read 2 fields in a session beanmethod: around
90 ms.
I'am very disapointed and confused. What should I look up for
to increase the performance ? Any important tuning or parameters ? ShouldI use EJB
2.0 to have significant perf ?
Thanks for any advice because we are thinking to switch all theapplication on stored
procedures. A solution without Entity and fewer stateless session beans.
My config:
WL: 6.1 on Sun sparc
SGBD: Sybase
Entity: WebLogic 6.0.0 EJB 1.1 RDBMS(weblogic-rdbms11-persistence-600.dtd)
>
Thanks -
I am trying to to parse a file using DocumentBuilder. The parse() method hangs for no reason. There are no errors or exceptions thrown. I even used a StringReader but in vain. Pl see code below:
The file is read correctly and i could even print the XML string out.
System.out.println("Parsing XML file from performParsing():" +s);
Document doc = null;
DocumentBuilderFactory factory = null;
DocumentBuilder builder = null;
try{
factory = DocumentBuilderFactory.newInstance();
System.out.println("Parsing XML factory:" +factory);
builder = factory.newDocumentBuilder();
System.out.println("Parsing XML builder:" +builder);
URL url = new URL(s);
URLConnection urlConnection = url.openConnection();
InputStream in = urlConnection.getInputStream();
String XMLStr = getStringReaderFromFile(in); //private method that gives a string
StringReader stReader = new StringReader(XMLStr);
InputSource ins = new InputSource(stReader);
doc = builder.parse(ins);--->IT HANGS HERENot an expert on this but presumably you have the properties set up correctly.
From javadoc ...
DocumentBuilderFactory uses the system property javax.xml.parsers.XmlDocumentParserFactory to find the class to load. So you can change the parser by calling:
System.setProperty("javax.xml.parsers.XmlDocumentParserFactory",
"com.foo.myFactory"); -
Bad performance updating purchase order (ME22N)
Hello!
Recently, we face bad performance updating purchase orders using transaction ME22N. The problem occurs since we implemented change documents for a custom table T. T is used to store additional data to purchase order positions using BAdIs ME_PROCESS_PO_CUST and ME_GUI_PO_CUST.
I've created a change document C_T for T using transaction SCDO. The update module of the change document is triggered in the method POST of BAdI ME_PROCESS_PO_CUST.
Checking transaction SM13, I recognized that the update requests of ME22n have status INIT for several minutes before they are processed. I also tried to exclude the call of the update module for change document C_T (in Method POST) - the performance problem still occurs!
The problem only occurs with transaction ME22N, thus I assume that the reason is the new change document C_T.
Thanks for your help!
Greetings,
WolfgangI agree with vikram, we don't have enough information, even not a small hint on usage of this field, so which answer do you expect (The quality of an answer depends ...) This analysis must be executed on your system...
From a technical point of view, the BAPI_PO_CHANGE has EXTENSIONIN table parameter, fill it using structure BAPI_TE_MEPOITEM[X] alreading containing CI_EKPODB (*) and CI_EKPODBX (**)
Regards,
Raymond
(*) I guess you have used this include
(**) I guess you forgot this one (same field names but data element always BAPIUPDATE) -
Possible to overwrite parse method in DOM with SAX Handler?
Hi,
Is it possible to overwrite the parse method within DOM?
What a want to do is:
private Node parseXml( String text ) throws SAXParseException, SAXException, IOException, ParserConfigurationException
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
SAXParser parser = factory.newSAXParser();
TestHandler handler = new TestHandler();
// Parse the file
parser.parse(new InputSource(new StringReader(text)), handler);
return (Node)handler.getRoot();
} //end parseXml()The reason I want to use this is that within SAX I can write my own line counter so I keep a count of which node is on which line of text.
What I was thinking is that I could use SAX to return DOM Nodes with the line number attached, possibly using the node.setUserData() method?!
I have tried to play around with it and it doen't seem to work, can anyone help?
Cheers AlexI have managaed to re-write my SAX parser to create a JTree, this works perfectly I can move through the tree and each line of text that corresponds to the node is highlighted.
My problem is however that in my application I have used the DOM structure throughout so some of the functionality is lost.
Is I understand that JAXP uses both SAX and DOM together, so I was wondering if it is possible to combine my sax parse method within the DOM?
If anything is unclear please say and I will try and explain better. The main reason for doing this is that I want to keep a reference to which line of text each node of the dom tree represents. I have not been able to implemnet one in DOM however using SAX I have managed.
Many thanks,
Alex -
Can't perform a Factory Recovery on Thinkpad Twist
Hello.
Please excuse my bad English.
I had a few problems with my 3 mouth old Thinkpad Twist.
After a blue screen (some kernel page errors, I can't remember witch error), my PC couldn't boot at all, I was stuck at boot menu (the one you get when you press F12 on boot).
I performed some of the Lenovo test tools for hardware and memory, and had to recover about 2000 bad sectors, the operation took about 6 hours, and I also got an error at next boot (Image failed to verify with *ACCESS DENIED*), I got rid of it by disabling secure boot.
I used another windows 8 ISO on a USB key to try some repair tools, it didn't work, now I get a blue screen saying that my ntfs.sys file is corrupted, but I managed to backup my data.
Now I'd like to perform a Factory Recover, but I can't boot on the Recovery partition, I press F11, then the screens stays black for a while, and the PC restarts, just like when I wasn't able to boot on my windows. (I couldn't boot on the factory recover partition at the beginning too).
I didn't back up my Recovery partition on a USB key, maybe I can still copy it to an USB key and boot on it? I can access the partition via the command prompt on my windows 8 USB key, but I'm not sure how to copy the partition on another key.
I'm going to send my computer back to get repaired (I'm assuming I have some kind of hardware problem), but I'd like to know if there is anything left to do.
Thanks.Help us to help you by posting the following information.
1. The full Model No. and Product No. of the notebook - see This HP web document if you don't how to locate the model number and\or product number.
2. The complete version and name of the operating system you are using ( ie Windows 7 64bit ).
3. Is your notebook still covered under warranty? Check your warranty status Here.
****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
2015 Microsoft MVP - Windows Experience Consumer -
Master column tree - bad performance
Hello,
I have a table with master column that uses recursive node without Load Children event. the whole table loads at startup. I Have very bad performance : every click on the little triangle takes about 6-7 seconds, and there is even no round-trip to server because all data is already at the client!
I need to show list of products by there family (50 families, each has 10 products). How can i imporve my performance (maybe server configuration or my code or another method)
I work with ep 7 sp12.
Thanks
Roni.Hi Roni,
Yes, you have to manipulate the add element on before loading the tree. Best Practice is to use onLoadChildren event. Loading the tree at once will always have performance issues.
Refer to these tutorial for creating tree using onLoadChildren event.
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/constructing%20a%20recursive%20and%20loadable%20web%20dynpro%20tree.pdf">Recursive Loadable Tree</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/integration%20of%20a%20tree%20structure%20in%20a%20web%20dynpro%20table.pdf">Integration of Tree Structure in Table</a>
There are no limitations on this UI control, you can stay with any number of levels.
Regards
Srikanth -
How to find BADI Defination and Implemantation from Method of BADI?
HI,
can anyone tell me that how to find BADI Defination and Implemantation from Method of BADI?& Report ZPJA_PM002 (V2) &
& Text Elements: &
& P_DEVC Show user-exits from development class &
& P_LIMIT Limit submit program selection &
& P_FUNC Show function modules &
& P_SUBM Show submit programs &
& S01 Selection data (TCode takes precedence over program name) &
report zpja_pm002
no standard page heading
line-size 158.
*tables: enlfdir. "Additional Attributes for Function Modules
data: tabix like sy-tabix,
w_linnum type i,
w_off type i,
w_index like sy-tabix,
w_include like trdir-name,
w_prog like trdir-name,
w_incl like trdir-name,
w_area like rs38l-area,
w_level,
w_str(50) type c,
w_funcname like tfdir-funcname.
constants: c_fmod(40) type c value 'Function modules selected: ',
c_subm(40) type c value 'Submit programs selected: ',
c_col1(12) type c value 'Enhanmt Type',
c_col2(40) type c value 'Enhancement',
c_col3(30) type c value 'Program/Include',
c_col4(20) type c value 'Enhancement Name',
c_col5(40) type c value 'Enhancement Description'.
Work Areas: ABAP Workbench
data: begin of wa_d010inc.
data: master type d010inc-master.
data: end of wa_d010inc.
data: begin of wa_tfdir.
data: funcname type tfdir-funcname,
pname type tfdir-pname,
include type tfdir-include.
data: end of wa_tfdir.
data: begin of wa_tadir.
data: devclass type tadir-devclass.
data: end of wa_tadir.
data: begin of wa_tstc.
data: pgmna type tstc-pgmna.
data: end of wa_tstc.
data: begin of wa_tstcp.
data: param type tstcp-param.
data: end of wa_tstcp.
data: begin of wa_enlfdir.
data: area type enlfdir-area.
data: end of wa_enlfdir.
Work Areas: BADIs
data: begin of wa_sxs_attr.
data: exit_name type sxs_attr-exit_name.
data: end of wa_sxs_attr.
data: begin of wa_sxs_attrt.
data: text type sxs_attrt-text.
data: end of wa_sxs_attrt.
Work Areas: Enhancements
data: begin of wa_modsap.
data: member type modsap-member.
data: end of wa_modsap.
data: begin of wa_modsapa.
data: name type modsapa-name.
data: end of wa_modsapa.
data: begin of wa_modsapt.
data: modtext type modsapt-modtext.
data: end of wa_modsapt.
Work Areas: Business Transaction Events
data: begin of wa_tbe01t.
data: text1 type tbe01t-text1.
data: end of wa_tbe01t.
data: begin of wa_tps01t.
data: text1 type tps01t-text1.
data: end of wa_tps01t.
user-exits
types: begin of t_userexit,
type(12) type c,
pname like trdir-name,
txt(300),
level type c,
modname(30) type c,
modtext(40) type c,
end of t_userexit.
data: i_userexit type standard table of t_userexit with header line.
Function module developmnet classes
types: begin of t_devclass,
clas like trdir-clas,
end of t_devclass.
data: i_devclass type standard table of t_devclass with header line.
Submit programs
types: begin of t_submit,
pname like trdir-name,
level,
done,
end of t_submit.
data: i_submit type standard table of t_submit with header line.
Source code
types: begin of t_sourcetab, "#EC * (SLIN lügt!)
line(200), "#EC * (SLIN lügt!)
end of t_sourcetab. "#EC * (SLIN lügt!)
data: sourcetab type standard table of t_sourcetab with header line.
data c_overflow(30000) type c.
Description of an ABAP/4 source analysis token
data: i_stoken type standard table of stokex with header line.
data wa_stoken like i_stoken.
Description of an ABAP/4 source analysis statement
data: i_sstmnt type standard table of sstmnt with header line."#EC
keywords for searching ABAP code
types: begin of t_keywords,
word(30),
end of t_keywords.
data: keywords type standard table of t_keywords with header line.
function modules within program
types: begin of t_fmodule,
name like rs38l-name,
pname like trdir-name,
pname2 like trdir-name,
level,
bapi,
done,
end of t_fmodule.
data: i_fmodule type standard table of t_fmodule with header line.
& Selection Options &
selection-screen begin of block selscr1 with frame title text-s01.
parameter: p_pname like trdir-name memory id rid,
p_tcode like syst-tcode,
p_limit(4) type n default 100,
p_devc like rihea-dy_ofn default ' ',
p_func like rihea-dy_ofn default ' ',
p_subm like rihea-dy_ofn default ' '.
selection-screen end of block selscr1.
& START-OF-SELECTION &
start-of-selection.
if p_pname is initial and p_tcode is initial.
message e008(hrfpm). "Make entry on the selection screen
stop.
endif.
ensure P_LIMIT is not zero.
if p_limit = 0.
p_limit = 1.
endif.
perform data_select.
perform get_submit_data.
perform get_fm_data.
perform get_additional_data.
perform data_display.
& Form DATA_SELECT &
form data_select.
data selection message to sap gui
call function 'SAPGUI_PROGRESS_INDICATOR'
destination 'SAPGUI'
keeping logical unit of work
exporting
text = 'Get programs/includes' "#EC NOTEXT
exceptions
system_failure
communication_failure
. "#EC *
determine search words
keywords-word = 'CALL'.
append keywords.
keywords-word = 'FORM'.
append keywords.
keywords-word = 'PERFORM'.
append keywords.
keywords-word = 'SUBMIT'.
append keywords.
keywords-word = 'INCLUDE'.
append keywords.
if not p_tcode is initial.
get program name from TCode
select single pgmna from tstc into wa_tstc-pgmna
where tcode eq p_tcode.
if not wa_tstc-pgmna is initial.
p_pname = wa_tstc-pgmna.
TCode does not include program name, but does have refereve TCode
else.
select single param from tstcp into wa_tstcp-param
where tcode eq p_tcode.
if sy-subrc = 0.
check wa_tstcp-param(1) = '/'.
check wa_tstcp-param+1(1) = '*'.
if wa_tstcp-param ca ' '.
endif.
w_off = sy-fdpos + 1.
subtract 2 from sy-fdpos.
if sy-fdpos gt 0.
p_tcode = wa_tstcp-param+2(sy-fdpos).
endif.
select single pgmna from tstc into wa_tstc-pgmna
where tcode eq p_tcode.
p_pname = wa_tstc-pgmna.
if sy-subrc <> 0.
message e110(/saptrx/asc) with 'No program found for: '
p_tcode."#EC NOTEXT
stop.
endif.
else.
message e110(/saptrx/asc) with 'No program found for: ' p_tcode.
"#EC NOTEXT
stop.
endif.
endif.
endif.
Call customer-function aus Program coding
read report p_pname into sourcetab.
if sy-subrc > 0.
message e017(enhancement) with p_pname raising no_program."#EC *
endif.
scan abap-source sourcetab tokens into i_stoken
statements into i_sstmnt
keywords from keywords
overflow into c_overflow
with includes.
WITH ANALYSIS.
if sy-subrc > 0. "keine/syntakt. falsche Ablauflog./Fehler im Skanner
message e130(enhancement) raising syntax_error. "#EC *
endif.
check I_STOKEN for entries
clear w_linnum.
describe table i_stoken lines w_linnum.
if w_linnum gt 0.
w_level = '0'.
w_prog = ''.
w_incl = ''.
perform data_search tables i_stoken using w_level w_prog w_incl.
endif.
endform. "DATA_SELECT
& Form GET_FM_DATA &
form get_fm_data.
data selection message to sap gui
call function 'SAPGUI_PROGRESS_INDICATOR'
destination 'SAPGUI'
keeping logical unit of work
exporting
text = 'Get function module data' "#EC NOTEXT
exceptions
system_failure
communication_failure
. "#EC *
Function module data
sort i_fmodule by name.
delete adjacent duplicates from i_fmodule comparing name.
loop at i_fmodule where done ne 'X'.
clear: i_stoken, i_sstmnt, sourcetab, wa_tfdir, w_include .
refresh: i_stoken, i_sstmnt, sourcetab.
clear wa_tfdir.
select single funcname pname include from tfdir into wa_tfdir
where funcname = i_fmodule-name.
check sy-subrc = 0.
call function 'FUNCTION_INCLUDE_SPLIT'
exporting
program = wa_tfdir-pname
importing
group = w_area.
concatenate 'L' w_area 'U' wa_tfdir-include into w_include.
i_fmodule-pname = w_include.
i_fmodule-pname2 = wa_tfdir-pname.
modify i_fmodule.
read report i_fmodule-pname into sourcetab.
if sy-subrc = 0.
scan abap-source sourcetab tokens into i_stoken
statements into i_sstmnt
keywords from keywords
with includes.
if sy-subrc > 0.
message e130(enhancement) raising syntax_error.
endif.
check i_stoken for entries
clear w_linnum.
describe table i_stoken lines w_linnum.
if w_linnum gt 0.
w_level = '1'.
w_prog = i_fmodule-pname2.
w_incl = i_fmodule-pname.
perform data_search tables i_stoken using w_level w_prog w_incl.
endif.
endif.
endloop.
if p_devc = 'X'.
loop at i_fmodule.
clear: wa_tadir, wa_enlfdir.
select single area from enlfdir into wa_enlfdir-area
where funcname = i_fmodule-name.
check not wa_enlfdir-area is initial.
select single devclass into wa_tadir-devclass
from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name = wa_enlfdir-area.
check not wa_tadir-devclass is initial.
move wa_tadir-devclass to i_devclass-clas.
append i_devclass.
i_fmodule-done = 'X'.
modify i_fmodule.
endloop.
sort i_devclass.
delete adjacent duplicates from i_devclass.
endif.
endform. "GET_FM_DATA
& Form GET_SUBMIT_DATA &
form get_submit_data.
data selection message to sap gui
call function 'SAPGUI_PROGRESS_INDICATOR'
destination 'SAPGUI'
keeping logical unit of work
exporting
text = 'Get submit data' "#EC NOTEXT
exceptions
system_failure
communication_failure
. "#EC *
sort i_submit.
delete adjacent duplicates from i_submit comparing pname.
w_level = '0'.
loop at i_submit where done ne 'X'.
clear: i_stoken, i_sstmnt, sourcetab.
refresh: i_stoken, i_sstmnt, sourcetab.
read report i_submit-pname into sourcetab.
if sy-subrc = 0.
scan abap-source sourcetab tokens into i_stoken
statements into i_sstmnt
keywords from keywords
with includes.
if sy-subrc > 0.
message e130(enhancement) raising syntax_error.
continue.
endif.
check i_stoken for entries
clear w_linnum.
describe table i_stoken lines w_linnum.
if w_linnum gt 0.
w_prog = i_submit-pname.
w_incl = ''.
perform data_search tables i_stoken using w_level w_prog w_incl.
endif.
endif.
restrict number of submit program selected for processing
describe table i_submit lines w_linnum.
if w_linnum ge p_limit.
w_level = '1'.
endif.
i_submit-done = 'X'.
modify i_submit.
endloop.
endform. "GET_SUBMIT_DATA
& Form DATA_SEARCH &
form data_search tables p_stoken structure stoken
using p_level p_prog p_incl.
loop at p_stoken.
clear i_userexit.
tabix = sy-tabix + 1.
i_userexit-level = p_level.
if i_userexit-level = '0'.
if p_incl is initial.
i_userexit-pname = p_pname.
else.
concatenate p_pname '/' p_incl into i_userexit-pname.
endif.
else.
if p_incl is initial.
i_userexit-pname = p_prog.
else.
concatenate p_prog '/' p_incl into i_userexit-pname.
endif.
endif.
Include
if p_stoken-str eq 'INCLUDE'.
check p_level eq '0'. " do not perform for function modules
*(2nd pass)
w_index = sy-tabix + 1.
read table p_stoken index w_index into wa_stoken.
check not wa_stoken-str cs 'STRUCTURE'.
check not wa_stoken-str cs 'SYMBOL'.
read table i_submit with key pname = wa_stoken-str.
if sy-subrc <> 0.
i_submit-pname = wa_stoken-str.
i_submit-level = p_level.
append i_submit.
endif.
endif.
Enhancements
if p_stoken-str eq 'CUSTOMER-FUNCTION'.
clear w_funcname.
read table p_stoken index tabix.
translate p_stoken-str using ''' '.
condense p_stoken-str.
if p_prog is initial.
concatenate 'EXIT' p_pname p_stoken-str into w_funcname
separated by '_'.
else.
concatenate 'EXIT' p_prog p_stoken-str into w_funcname
separated by '_'.
endif.
select single member from modsap into wa_modsap-member
where member = w_funcname.
if sy-subrc = 0. " check for valid enhancement
i_userexit-type = 'Enhancement'.
i_userexit-txt = w_funcname.
append i_userexit.
else.
clear wa_d010inc.
select single master into wa_d010inc-master
from d010inc
where include = p_prog.
concatenate 'EXIT' wa_d010inc-master p_stoken-str into
w_funcname
separated by '_'.
i_userexit-type = 'Enhancement'.
i_userexit-txt = w_funcname.
endif.
endif.
BADIs
if p_stoken-str cs 'cl_exithandler='.
w_index = sy-tabix + 4.
read table p_stoken index w_index into wa_stoken.
i_userexit-txt = wa_stoken-str.
replace all occurrences of '''' in i_userexit-txt with space.
i_userexit-type = 'BADI'.
append i_userexit.
endif.
Business transaction events
if p_stoken-str cs 'OPEN_FI_PERFORM'.
i_userexit-type = 'BusTrEvent'.
i_userexit-txt = p_stoken-str.
replace all occurrences of '''' in i_userexit-txt with space.
i_userexit-modname = i_userexit-txt+16(8).
case i_userexit-txt+25(1).
when 'E'.
clear wa_tbe01t.
select single text1 into wa_tbe01t-text1 from tbe01t
where event = i_userexit-txt+16(8)
and spras = sy-langu.
if wa_tbe01t-text1 is initial.
i_userexit-modtext = ''. "#EC NOTEXT
else.
i_userexit-modtext = wa_tbe01t-text1.
endif.
i_userexit-modname+8 = '/P&S'. "#EC NOTEXT
when 'P'.
clear wa_tps01t.
select single text1 into wa_tps01t-text1 from tps01t
where procs = i_userexit-txt+16(8)
and spras = sy-langu.
i_userexit-modtext = wa_tps01t-text1.
i_userexit-modname+8 = '/Process'.
endcase.
append i_userexit.
endif.
Program exits
if p_stoken-str cs 'USEREXIT_'.
i_userexit-type = 'Program Exit'.
i_userexit-txt = p_stoken-str.
replace all occurrences of '''' in i_userexit-txt with space.
append i_userexit.
endif.
Submit programs
if p_stoken-str cs 'SUBMIT'.
check p_level eq '0'. " do not perform for function modules
*(2nd pass)
check not p_stoken-str cs '_'. " ensure not SUBMIT_XXX
w_index = sy-tabix + 1.
read table p_stoken index w_index into wa_stoken.
check not wa_stoken-str cs '_'. " ensure not SUBMIT_XXX
replace all occurrences of '''' in wa_stoken-str with space.
read table i_submit with key pname = wa_stoken-str.
if sy-subrc <> 0.
i_submit-pname = wa_stoken-str.
i_submit-level = p_level.
append i_submit.
endif.
endif.
Perform routines (which reference external programs)
if p_stoken-str cs 'PERFORM'.
check p_level eq '0'. " do not perform for function modules
*(2nd pass)
w_index = sy-tabix + 1.
read table p_stoken index w_index into wa_stoken.
if not wa_stoken-ovfl is initial.
w_off = wa_stoken-off1 + 10.
w_str = c_overflow+w_off(30).
find ')' in w_str match offset w_off.
w_off = w_off + 1.
wa_stoken-str = w_str(w_off).
endif.
check wa_stoken-str cs '('.
w_off = 0.
while sy-subrc = 0.
if wa_stoken-str+w_off(1) eq '('.
replace section offset w_off length 1 of wa_stoken-str with ''
replace all occurrences of ')' in wa_stoken-str with space.
read table i_submit with key pname = wa_stoken-str.
if sy-subrc <> 0.
i_submit-pname = wa_stoken-str.
append i_submit.
endif.
exit.
else.
replace section offset w_off length 1 of wa_stoken-str with ''
shift wa_stoken-str left deleting leading space.
endif.
endwhile.
endif.
Function modules
if p_stoken-str cs 'FUNCTION'.
clear i_fmodule.
check p_level eq '0'. " do not perform for function modules
*(2nd pass)
w_index = sy-tabix + 1.
read table p_stoken index w_index into wa_stoken.
if wa_stoken-str cs 'WF_'.
if wa_stoken-str cs 'IF_'.
break-point.
endif.
if wa_stoken-str cs 'BAPI'.
i_fmodule-bapi = 'X'.
endif.
replace first occurrence of '''' in wa_stoken-str with space.
replace first occurrence of '''' in wa_stoken-str with space.
if sy-subrc = 4. " didn't find 2nd quote (ie name truncated)
clear wa_tfdir.
concatenate wa_stoken-str '%' into wa_stoken-str.
select single funcname into wa_tfdir-funcname from tfdir
where funcname like wa_stoken-str.
if sy-subrc = 0.
i_fmodule-name = wa_tfdir-funcname.
else.
continue.
endif.
else.
i_fmodule-name = wa_stoken-str.
endif.
i_fmodule-level = p_level.
append i_fmodule.
endif.
endloop.
endform. "DATA_SEARCH
& Form GET_ADDITIONAL_DATA &
form get_additional_data.
data selection message to sap gui
call function 'SAPGUI_PROGRESS_INDICATOR'
destination 'SAPGUI'
keeping logical unit of work
exporting
text = 'Get additional data' "#EC NOTEXT
exceptions
system_failure
communication_failure
. "#EC *
loop at i_userexit.
Enhancement data
if i_userexit-type cs 'Enh'.
clear: wa_modsapa.
select single name into wa_modsapa-name from modsap
where member = i_userexit-txt.
check sy-subrc = 0.
i_userexit-modname = wa_modsapa-name.
clear wa_modsapt.
select single modtext into wa_modsapt-modtext from modsapt
where name = wa_modsapa-name
and sprsl = sy-langu.
i_userexit-modtext = wa_modsapt-modtext.
endif.
BADI data
if i_userexit-type eq 'BADI'.
clear wa_sxs_attr.
select single exit_name into wa_sxs_attr-exit_name from sxs_attr
where exit_name = i_userexit-txt.
if sy-subrc = 0.
i_userexit-modname = i_userexit-txt.
else.
i_userexit-modname = 'Dynamic call'. "#EC NOTEXT
endif.
clear wa_sxs_attrt.
select single text into wa_sxs_attrt-text from sxs_attrt
where exit_name =
wa_sxs_attr-exit_name
and sprsl = sy-langu.
i_userexit-modtext = wa_sxs_attrt-text.
endif.
modify i_userexit.
endloop.
get enhancements via program package
clear wa_tadir.
select single devclass into wa_tadir-devclass from tadir
where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = p_pname.
if sy-subrc = 0.
clear: wa_modsapa, wa_modsapt.
select name from modsapa into wa_modsapa-name
where devclass = wa_tadir-devclass.
select single modtext from modsapt into wa_modsapt-modtext
where name = wa_modsapa-name
and sprsl = sy-langu.
read table i_userexit with key modname = wa_modsapa-name.
if sy-subrc <> 0.
i_userexit-modtext = wa_modsapt-modtext.
i_userexit-type = 'Enhancement'. "#EC NOTEXT
i_userexit-modname = wa_modsapa-name.
i_userexit-txt = 'Determined from program DevClass'."#EC NOTEXT
i_userexit-pname = 'Unknown'. "#EC NOTEXT
append i_userexit.
endif.
endselect.
endif.
endform. "GET_ADDITIONAL_DATA
& Form DATA_DISPLAY &
form data_display.
data selection message to sap gui
call function 'SAPGUI_PROGRESS_INDICATOR'
destination 'SAPGUI'
keeping logical unit of work
exporting
text = 'Prepare screen for display' "#EC NOTEXT
exceptions
system_failure
communication_failure
. "#EC *
sort i_userexit by type txt modname.
delete adjacent duplicates from i_userexit comparing txt modname.
format headings
write: 'Enhancements from main program'. "#EC NOTEXT
write: /.
uline.
format color col_heading.
write: / sy-vline,
(12) c_col1, "Enhanmt Type
sy-vline,
(40) c_col2, "Enhancement
sy-vline,
(30) c_col3, "Program/Include
sy-vline,
(20) c_col4, "Enhancement name
sy-vline,
(40) c_col5, "Enhancement description
sy-vline.
format reset.
uline.
format lines
loop at i_userexit.
set line colour
case i_userexit-type.
when 'Enhancement'.
format color 3 intensified off.
when 'BADI'.
format color 4 intensified off.
when 'BusTrEvent'.
format color 5 intensified off.
when 'Program Exit'.
format color 6 intensified off.
when others.
format reset.
endcase.
write: / sy-vline,
i_userexit-type,
sy-vline,
i_userexit-txt(40),
sy-vline,
i_userexit-pname(30),
sy-vline,
i_userexit-modname(20),
sy-vline,
i_userexit-modtext(40),
sy-vline.
endloop.
format reset.
uline.
user-exits from development class of function modules
if p_devc = 'X'.
write: /.
write: / 'User-exits from function module development class'."#EC
*NOTEXT
write: 157''.
uline (90).
write: 157''.
loop at i_devclass.
clear wa_modsapa.
select name from modsapa into wa_modsapa
where devclass = i_devclass-clas.
select single name modtext into corresponding fields of wa_modsapt
from modsapt
where name = wa_modsapa-name
and sprsl = sy-langu.
format color 3 intensified off.
write: / sy-vline,
(12) 'Enhancement',
sy-vline,
wa_modsapa-name,
sy-vline,
wa_modsapt-modtext,
sy-vline.
endselect.
endloop.
uline (90).
format reset.
endif.
describe table i_fmodule lines w_linnum.
write: / c_fmod , at 35 w_linnum. "#EC NOTEXT
write: 157''.
if p_func = 'X'.
display fuction modules used in program
uline (38).
write: 157''.
loop at i_fmodule.
write: sy-vline,
i_fmodule-name,
sy-vline,
i_fmodule-bapi,
sy-vline.
write: 157''.
endloop.
uline (38).
endif.
describe table i_submit lines w_linnum.
write: / c_subm , at 35 w_linnum. "#EC NOTEXT
write: 157''.
if p_subm = 'X'.
display submit programs used in program
uline (44).
write: 157''.
loop at i_submit.
write: sy-vline,
i_submit-pname,
sy-vline.
write: 157''.
endloop.
uline (44).
endif.
issue message with number of user-exits displayed
describe table i_userexit lines w_linnum.
message s697(56) with w_linnum.
endform. "DATA_DISPLAY
reward points if it helps
gunjan -
Bad performance when open a bi publisher report in excel
We use bi publisher(xml publisher) to create a customized report. For a small report, user like it very much. But for a bigger report, users complain about the performance when they open the file.
I know it is not a native excel file, that may cause the bad performance. So I ask my user to save it to a new file as a native excel format. The new file still worse than a normal excel file when we open it.
I did a test. We try to save a bi publish report to excel format, the size shrink to 4Mb. But if we "copy all" and "Paste Special" value only to a new excel file, the size is only 1Mb.
Do I have any way to improve that, users are complaining everyday. Thanks!
I did a test today.
I create a test report
Test 1: Original file from BIP in EBS is 10Mb. We save it in my local disk, when we open the file, it takes 43 sec.
Test 2: We save the file in native excel format, the file size is 2.28Mb, it takes 7 sec. to open.
Test 3: We copy all cell and "PasteSpecial" to a new excel file with value only. The file size is 1.66Mb, it takes only 1 sec to open.
Edited by: Rex Lin on 2010/3/31 下午 11:26EBS or Standalone BIP?
If EBS see this thread for suggestions on performance tuning and hints and tips:
EBS BIP Performance Tuning - Definitive Guide?
Note also that I did end up rewriting my report as PL/SQL producing a csv file and have done with several large reports in BIP on EBS.
Cheers,
Dave -
Reporting on master data customer and bad performances : any workaround ?
Hello,
I've been asked to investiguate on bad performances encountered when performing reporting
on the specific master data zcustomer.
Basically this master data has a quite similar design that 0customer, there are 96000 entries in the master data table.
A simple query has been developed : the reporting is done on the master data zcustomer and its attributes : no key figure, no calculation, no restriction ...
Nevertheless, the query can not be executed .. the query runs around 10 minute in rsrt, then the private memory is exhausted and then a short dump is generated.
I tried to buid a very simple query on 0customer, this time, without the attributes ... and it took more than 30 sec before I get the results.
I checked the queries statistics :
3.x Analyzer Server 10 sec
OLAP: Read Texts : 20 sec
How is it that it is so long to performthe reporitng on those master data, while in the same time If i try to display the content in SAP by choosing "maintain master data", I have an immediate answer.
I there any workaround ?
Any help would be really appreciated.
thank you.
RaoulHi.
How much data have you got in the cube?
If you make no restrictions, you are asking the system to return data for all 96.000 customers. That is one thing that might take some time.
Also, using the attributes of this customer object, fx making selection or displaying several of them, means that the system has to run through the 96.000 records in masterdata to know what goes where in the report.
When you display the masterdata, you are by default displaying just the 250 or so first hits, and you are not joining against any cube or sorting the result set, so that is fast.
You should make some kind of restriction on other things than zcustomer (time, org.unit, version, etc, to limit the dataset from the cube, but also a restriction on one of the zcustomer attribs, with an index for that maybe, and performance should improve.
br
Jacob -
Bad Performance in a query into table BKPF
Hi forum i have a really problem in the second query under the table
BKPF.. some body cans help me, please
*THIS IS THE QUERY UNDER MSEG
SELECT tmsegmblnr tmkpfbudat tmsegbelnr tmsegbukrs tmseg~matnr
tmsegebelp tmsegdmbtr tmsegwaers tmsegwerks tmseg~lgort
tmsegmenge tmsegkostl
FROM mseg AS tmseg JOIN mkpf AS tmkpf ON tmsegmblnr = tmkpfmblnr
INTO CORRESPONDING FIELDS OF TABLE it_docs
WHERE
tmseg~bukrs IN se_bukrs AND
tmkpf~budat IN se_budat AND
tmseg~mjahr = d_gjahr AND
( tmsegbwart IN se_bwart AND tmsegbwart IN (201,261) ).
IF sy-dbcnt > 0.
I CREATE AWKEY FOR CONSULTING BKPF
LOOP AT it_docs.
CONCATENATE it_docs-mblnr d_gjahr INTO it_docs-d_awkey.
MODIFY it_docs.
ENDLOOP.
THIS IS THE QUERY WITH BAD BAD PERFOMANCE
I NEED KNOW "BELNR" FOR GO TO THE BSEG TABLE
SELECT belnr awkey
FROM bkpf
INTO CORRESPONDING FIELDS OF TABLE it_tmp
FOR ALL ENTRIES IN it_docs
WHERE
bukrs = it_docs-bukrs AND
awkey = it_docs-d_awkey AND
gjahr = d_gjahr AND
bstat = space .
THNKSHi Josue,
The bad performance is because you're not specifying the primary keys of the table BKPF in your WHERE condition; BKPF usually is a big table.
What you really need is to create a new index on database for table BKPF via the ABAP Dictionary on fields BUKRS, AWKEY, GJAHR & BSTAT. You'll find the performace of the program will significantly increase after the new index is activated. But I would talk to the Basis first to confirm they have no issues if you create a new index for BKPF on the database system.
Hope this helps.
Cheers,
Sougata. -
Hi folks,
I have an urgent parsing problem. I developed an app with JDK1.4 and now it needs to run on JDK1.3.1. The problem is this:
If I use the DocumentBuilder.parse() method shipped with JDK1.4 it will parse a document containing namespaces WITHOUT a namespace declaration in the root element. However, since XML support doesn't ship with JDK1.3.1 I need to use JAXP. If I try this with the DocumentBuilder.parse() version shipped with JAXP (latest version) the parse method throws a NullPointerException. If I put the namespace declaration in the document it will parse fine. I tried setting the DocumentBuilderFactory.setNamespaceAware() explicitly to false (should be the default) but no luck. Any ideas other than adding the declaration (long story why I don't want it there...)
thanksexample, with declaration of namespace:
<?xml version="1.0" encoding="UTF-8"?>
<pre:root xmlns:inn="http://blablabla/inn/version/1.0/">
<pre:metadata>
<pre:dublin-core>
<pre:title>mytitle</pre:title>
<pre:description>mydesc</pre:description>
<pre:creator>bjmann</pre:creator>
</inn:dublin-core>
</pre:root>
example, without declaration:
<?xml version="1.0" encoding="UTF-8"?>
<pre:root>
<pre:metadata>
<pre:dublin-core>
<pre:title>mytitle</pre:title>
<pre:description>mydesc</pre:description>
<pre:creator>bjmann</pre:creator>
</inn:dublin-core>
</pre:root>
this may help... -
Syntax Error with JSON.Parse method to parse SharePoint List Items
Hi All,
I want to get SharePoint List data and bind that retrived data to the JQuery Grid Control.
For this I used SPServices to get the SharePoint List data in SOAP Envelope. Now I need to parse the soap envelope and store the retrieved items in array to pass it to the Grid Control.
While using the JSON.Parse(resporseText) method, Iam consistenly getting an Syntax Error!
Could anyone help me with this ?
Please find the SOAP Envelope I received from SP List as below:
"<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"><GetListItemsResult><listitems xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
xmlns:rs='urn:schemas-microsoft-com:rowset'
xmlns:z='#RowsetSchema'>
<rs:data ItemCount="2">
<z:row ows_OBNumber='112211.000000000' ows_Project_x0020_Name='Project 1' ows_MetaInfo='11;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='Project 1' ows_ID='11' ows_UniqueId='11;#{FBBCBCF9-666D-42F9-92D7-67188C51BC9B}' ows_owshiddenversion='1' ows_FSObjType='11;#0' ows_Created='2015-01-12 10:25:06' ows_PermMask='0x7fffffffffffffff' ows_Modified='2015-01-12 10:25:06' ows_FileRef='11;#sites/Lists/Projects/11_.000' />
<z:row ows_OBNumber='1122343.00000000' ows_Project_x0020_Name='Project 2 ' ows_MetaInfo='12;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='Project 2' ows_ID='12' ows_UniqueId='12;#{0D772B76-68E4-4769-B6FF-6A269F9C7ABD}' ows_owshiddenversion='1' ows_FSObjType='12;#0' ows_Created='2015-01-12 10:33:48' ows_PermMask='0x7fffffffffffffff' ows_Modified='2015-01-12 10:33:48' ows_FileRef='12;#sites/Lists/Projects/12_.000' />
</rs:data>
</listitems></GetListItemsResult></GetListItemsResponse></soap:Body></soap:Envelope>"
Any help on this will be greatly appreciated.
Thanks In Advance.!Hi,
According to your description, there is an issue when parsing result from the data retrieved using SPServices.
By default, SPServices returns data as XML format, however, the JSON.parse() method “Throws a SyntaxError exception if the string to parse is not valid JSON”:
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
To extract the data needed from the response, you can either take the demo below for as a reference:
http://spservices.codeplex.com/wikipage?title=GetListItems
Or use the jQuery.parseXML() function:
http://api.jquery.com/jquery.parsexml/
Best regards
Patrick Liang
TechNet Community Support -
When passing Node to parse() method get NULL pointer exception.
All,
I trying to pass a Node to parse method to get the NodeType object back and getting
null pointer exception.
Example
xml
<root>
<Test>
<someData>ABC</someData>
</Test>
</root>
if pass the Test node to get Test object back I am getting null pointer exception.
Thanks for all ur help
Shoebfile 2
~~~~
import javax.swing.*;
public class ExtendedPage extends BasePage
private JTextField objJTextField = null;
private JButton objJButtonBrowse = null;
Change the line in bold to
private JTextField objJTextField;
And everything works. -
Adobe Offline Form - Parse method is not possible for this type
Hi All,
I have developed an application for the offline scenario of interactive adobe form. I tried to load the adobe form from my desktop. After pressing the button "Display form" it throws an error "Parse method is not possible for this type".
If I include wdContext.getNodeInfo().getAttribute("pdfObject").getModifiableSimpleType() in the doInit() method of the view I receive this error -
com.sap.tc.webdynpro.progmodel.context.ContextException: MappedAttributeInfo(UploadView.pdfObject): must not modify the datatype of a mapped attribute
When I comment it out and upload I receive the error enclosed -
Parse method is not possible for this type
Can someone please help me with a step by step solution to this problem?
Any help is highly appreciated.
Many thanks,
DivyaHi Divya,
Please try to do it as stated below:
IWDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute("pdfObject");
ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();
IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType)type;
Try putting the code in wdInit() or wdDoModifyView().
Let me know if you still face the issue.
Regards,
Arafat
Maybe you are looking for
-
i was updating my iphone 3gs software on my pc and it came up with an error and since then i have just had the itunes symbol and a usb cable on my screen. i cant do anything with it what can i do?
-
Anytime I try to open Flash CS5 it crashes while initializing tools. I have more than enough RAM and space on my computer to successfully run Flash but it keeps crashing and therefore I cannot open any of my .flas to edit. Can anyone help or give s
-
Yahoo home page does not display properly, while all my other web pages do display correctly. I checked View, Page Style, and it is set to Basic Page Style. What else can be wrong?
-
0FIAR_C03 Open line items
Hi, I am trying to load open items using 0FIAR_C03, i am in confuse to choose between 0FI_AR_3 AND 0FI_AR_4. Which one must i choose to pull open items from bsid table, but i needs to add SHKZG, DMBTR,WRBTR, INFAE, UMSKS,ZUDNR FIELDS TO THAT EXTRACT
-
Hi, just wanted to clarify something regarding the trace files. I am right to assume that the last field, latency, is ignore during playback or does it have a part to play? Thanks