How to increase abap/buffersize?
Hi Gurus,
I am getting PXA problem in Version 5.0 ECC, System is displaying a message PXA is very small, increase abap/buffersize.
Kindly help me how to increase abap/buffersize?
Thanks
Chandra
raising shared memory buffers.
growing them will automatically shorten the maximum available memory for ABAP user transactions.
if you grow them to high, you might no longer be able to start the ABAP-Server.
(in case of insufficient contigious memory blocks for shared memory)
peter
Similar Messages
-
How to properly configure server in order to increase abap/buffersize to
Hello . I have an Solution manager system running on 32 bit kernel on windows 2003 server (32 bit) with 5GB of ram(Control panel->system...)
I have parameter:
PHYS_MEMSIZE 1024
abap/buffersize 450000
em/initial_size_MB is(default) 1024
in Sql Managment studio I have (minimum and maximum server memory under properties of server) set to 1024
Java has 1024
I would like to increase abap/buffersize (have some swaps there) but the system does not start(in J2EE Process table server0 does not start after startin framework fails
I tried also to decrease PHYS_MEMSIZE ,em/initial_size_MB and Heap memory size(XmX) in configtool but in any case the server does not start.
What do you propose to properly configure server
Thank you in advanceHello jan Bo,
first of all you should make sure that the /3GB option is set in the boot.ini.
The problem is that you only have a 3GB viruall address room on a Windows 32bit system. So if you want to increase a memory area in this address room you must decrease an other one.
In the most cases the default settings for the roll and page shared memories are set up very generously. Please check the maximum used values in ST02 and decrease the size of the both shared memories. After that you can add the memory you got free here to the programm buffer.
For example if you want to set the roll and page shared memoies to 64M you should set the profile parameters:
rdisp/ROLL_SHM = 8192
rdisp/PG_SHM = 8192
The unit is 8KB (8192 * 8KB = 65536K = 64M).
Regards, Klaus -
How to change abap/buffersize
Hallo!
I would like to increase Profile parameter "abap/buffersize".
I tried to do this with TCode RZ11(Maintain Profile Parameter Attributes), where I couldn't change any parameter.
I tried to log on as DDIC and SAP* but no success.
Pleas help me.
Thank you in advance.
Best regards,
MihailThis is Basis Work. If you are not a basis person, better talk to them before you change anything.
Goto RZ10
Click on the drop down button for </b>Profile</b>.
If you do not have any profile in that. Import the profile.
<b>RZ10 --> Utilities --> Import Profiles --> Of active server</b>
Then do the drop down on <b>Profile</b> again. This time pick the one with <b><sysid>_DVEBMGS<system number>_<hostname></b> which is an instance profile.
Choose Change.
In the next screen if you see ur parameter change it, otherwise, you can add one. Do not forget to save the changes. -
How to increase abaper resume weightage
Hi all,
Iam MCA 2004 passed out and undergoing ABAP now.I have 2 years of programming experience as programmer in vb and other programming languages and 2 years of team handling experience in j2ee technologies and .net.Now Iam doing ABAP,tell me your ideas of making my resume good and catchy.I hve seen few abap job postings asking for business process management topis like gap anaylsis,requirement analysis.Will it be good if i do any diploma in BPM?How to make a good weighted resume for abaper?
Regards
Gopi KUmaranHi
Its good for you that You are already well versed with J2EE, because latest ABAP deals with Netweaver platform, which consists both ABAP business and J2EE engines.
So Having J2EE mixed Java knowledge is very useful, as very few people are having expertise in both JAV and ABAP areas.
So I don't know upto what extent you have learnt core ABAP, do it faster and then start learning atleast few components of Netweaver like Enterprise Portals(EP) or Exchange Infrastructure(XI) which consists of BPM (business Process Management) as a sub components in it.
So prepare your resume with all previous program experience and with the ABAP skills by highlighting the Netweaver components which will be considered easily to get a job.
see the links of ABAP and Netweaver Course material
Start with this.Refer this
http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
http://www.****************/InterviewQ/interviewQ.htm
http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
Reports
http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
Check these step-by-step links
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
for Smartforms material
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
SAPScripts
Link for SAP Scripts (step by step procedure)
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create_A_SAPSCRIPT_Form/How_to_Create_SAPSCRIPT.html
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
SAP SCRIPT FIELDS
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
scripts easy material
http://www.allsaplinks.com/sap_script_made_easy.html
Debugging Document.
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm
http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
NETWEAVER
See the Links
JDBC Receiver: exact SQL statement
/message/527697#527697 [original link is broken]
And after you are done with the documentation probably you can go through this scenario,
JDBC Receiver: exact SQL statement
Also check the following threads which might help you a little more,
Learning XI
XI 3.0 Training
Also for more info related to XI go through these links:
XI -Starter
http://help.sap.com/saphelp_nw04/helpdata/en/e1/8e51341a06084de10000009b38f83b/frameset.htm
SAP XI - Where to Find Information
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/sap%20xi%20-%20where%20to%20find%20information.pdf
All the information you need in XI :
http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm
To understand the architecture of XI, Please go through this link:
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
You can also go through the url for Elearning :
https://www.sdn.sap.com/sdn/elearning.sdn // https://www.sdn.sap.com/irj/sdn/sdnpilot/elearning
Following is the link for 'how to guides', A step by step guide to create scenarios:
https://websmp201.sap-ag.de/nw-howtoguides
XI is all about configuration of Adapters, to learn more please go through this link:
http://help.sap.com/saphelp_nw04/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm
One of the most powerful feature of XI, Business Process Management:
http://help.sap.com/saphelp_nw04/helpdata/en/3c/831620a4f1044dba38b370f77835cc/frameset.htm
Following are the links to weblogs which will help to develop the basic scenarios.
/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters - IDoc to File
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy - ABAP Proxy to File
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 - File to JDBC
/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy - File to ABAP Proxy
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1 - File to File Part 1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 - File to File Part 2
/people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping - Any flat file to any Idoc
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] - File to Mail
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1
/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address - Dynamic Mail Address
/people/siva.maranani/blog/2005/05/25/understanding-message-flow-in-xi - Message Flow in XI
/people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm - Walk through BPM
/people/siva.maranani/blog/2005/05/22/schedule-your-bpm - Schedule BPM
/people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi - Use of Synch - Asynch bridge in ccBPM
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken] - Use of Synch - Asynch bridge in ccBPM
/people/michal.krawczyk2/blog/2005/08/22/xi-maintain-rfc-destinations-centrally - Maintain RFC destination centrally
/people/sravya.talanki2/blog/2005/08/18/triggering-e-mails-to-shared-folders-of-sap-is-u - Triggering Email from folder
/people/sravya.talanki2/blog/2005/08/17/outbound-idocs--work-around-using-party - Handling different partners for IDoc
/people/siva.maranani/blog/2005/08/27/modeling-integration-scenario146s-in-xi - Modeling Integration Scenario in XI
/people/michal.krawczyk2/blog/2005/08/25/xi-sending-a-message-without-the-use-of-an-adapter-not-possible - Testing of integration process
/people/michal.krawczyk2/blog/2005/05/25/xi-how-to-add-authorizations-to-repository-objects - Authorization in XI
http://help.sap.com/saphelp_nw04/helpdata/en/58/d22940cbf2195de10000000a1550b0/content.htm - Authorization in XI
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step - Alert Configuration
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide - Trouble shoot alert config
/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi - Call UNIX Shell Script
/people/sravya.talanki2/blog/2005/11/02/overview-of-transition-from-dev-to-qa-in-xi - Transport in XI
/people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping - Using ABAP XSLT Extensions for XI Mapping
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure - Mail Adaptor options
/people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm - Collection of IDoc to Single File
/people/sap.user72/blog/2005/11/17/xi-controlling-access-to-sensitive-interfaces - Controlling access to Sensitive Interfaces
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 - The same filename from a sender to a receiver file adapter - SP14
/people/prasad.illapani/blog/2005/11/14/payload-based-message-search-in-xi30-using-trex-engine - Payload Based Message Search in XI30 using Trex Engine
/people/sap.user72/blog/2005/11/24/xi-configuring-ccms-monitoring-for-xi-part-i - XI : Configuring CCMS Monitoring for XI- Part I
/people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter - XI: HTML e-mails from the receiver mail adapter
/people/sap.user72/blog/2005/11/22/xi-faqs-provided-by-sap-updated - XI : FAQ's Provided by SAP
1) How-to Guides for SAP NetWeaver 2004 for SAP XI:
Exchange Infrastructure How-to Guides for SAP NetWeaver 2004 [original link is broken]
Regards
Anji -
Help needed on memory parameter abap/buffersize
Hello Basis Gurus,
One of the programs in CRM system is failing with dump LOAD_PROGRAM_LOST.
I checked note "1798524 - Runtime error "LOAD_PROGRAM_LOST" when using Segmentation in CRM WEBUI" which seems to be relevant to our situation and found that the parameter 'abap/buffersize' is already on higher side i.e. > 3GB. Please let us know if we need to increase more and if yes then what is the dependency on any other memory parameters?
PS: I always have this question in general on memory parameters due to their sensitive nature (system may not start or adverse impact on other memory parameters). Functional/abap team asks to always increase it but how to check what is the impact and any possible dependency on other memory parameters...!!!
Thanks & Regards,
Kunal.Hi Kunal,
LOAD_PROGRAM_LOST can have multiple possible causes; a too-small program buffer is just one possibility. At 3 GB, yours does seem like it's probably big enough, but there's no way to tell that from the outside without a lot more information.
Does the same program always fail with this dump, or just sometimes? What else is going on in the system when the dump occurs? Are there transports going into the system around that time? Is it really busy at that time? What happens if you run the program by itself during a quiet time, with nothing else going on? Is this a PRD system? Or perhaps a DEV system?
What sort of statistics do you have on the program buffer when you look at it via ST02? Note that since it's practically impossible to buffer every program, you will inevitably have some swaps in this buffer. That's normal operation. What you might do is look at the history of swaps and get a sense of the average number per day. If you consistently get more than 1000 swaps per day (not 1000 swaps total -- that's not important), as an average, then you might want to consider increasing the size of the buffer. If you only occasionally get spikes higher than this, but typically the number of new swaps each day is less, then you probably don't need to increase the buffer.
The other thing you need to look at is available extended memory. Since the program buffer is quite large, you must make sure there is plenty of available memory for extending it, should you decide to do so. You can get a sense of this from various stats, like the ratio of MaxUse to In Mem for Extended Memory on the same ST02 page, and from OS07N (or ST06). Do you have plenty of free physical memory? Are you getting a lot of paging out? Things like that. If your free physical memory looks good, then you have room to expand.
But again, this may not even be the cause of your dumps.
Bear in mind, if you increase the parameter and have problems restarting the system, you can always fall back by decreasing it again, so other than the planned downtime for the restart you don't lose much by giving it a try. If you increase it and the system starts fine, you will need to keep an eye on those memory use statistics over the following days to ensure all is well, but likely if the system starts ok, then you'll be ok. The days of too-large program buffers causing startup problems were mostly associated with 32-bit systems.
Cheers,
Matt -
How to increase the waiting time for response in Adapter Engine not in IE
Hi Experts,
It is a SOAP to Proxy Synchronous interface. SOAP system is sending the request to PI, PI sending the same request to ECC system, After execution of some logic response back to PI in 7 minutes. In ABAP Stack(sxmb_moni) processing the response message also successfully with success flag after completion of these 7 minutes. But exactly 5 minutes later getting the error at Java Stack RWB- in communication channel monitoring i.e
com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessageExpiredException: Message bd2bf8d0-b2c2-11e0-c383-001cc4fb5cb7(OUTBOUND) expired. We have set the "runtime-HTTP_TIMEOUT" parameter as 3600. thats why in Integration engine it is processing successfully.
kindly suggest me how to increase the waiting time for response in Adapter Engine. Exactly after 5 mins getting the above error in rwb, but in Integration Engine getting successful flag after 7 mins until then it is waiting for response with status flag Log version.
Thanks & Regards,
Srihari.Hi,
Please see
How To... Investigate Timeouts In Synchronous XI/PI Scenarios
It will answer all your queries
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c059d583-a551-2c10-e095-eb5d95e03747?QuickLink=index&overridelayout=true -
How to increase the width & heigt of page in smart forms...
Dear abaper,
In smartform i have one problem,
the default page size is 20 cm ht & 20 cm width,. but i want to create 4 windows havehing
leng & width of (total 4 windows) more the 20*20cm .so an error message is displaying ''window dose not fit on page 1''.
can any one sugesst how to increase the page size (weather it is possible or not) .what is the soulution for this.
regards
veeraHi,
Open the Smartform and click on FORM PAINTER.
A graphical window will appear displaying all the windows you have created.
These windows are going beyond the paper size. Resize them so that they would fit in the page. You can also extend the page by simply clicking & dragging the edge of the window.
Best regards,
Prashant -
In a tree how to increase length of node_key ?
Hi All,
While creating a tree structure, how do we increase the size og the node_key?
I want the node_key with the same length as MATNR (i.e. >12 characters)
How to achieve this ?
Regards,
AshishHello Ashish
I am not yet sure about how to fill the List Header column yet at least the sample report ZUS_SDN_LIST_TREE_MODEL_DEMO_1 gives you a flavour of how tree models work.
*& Report ZUS_SDN_LIST_TREE_MODEL_DEMO_1
*& Thread: In a tree how to increase length of node_key ?
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1148884"></a>
*& Flow logic of screen '0100' (contains no screen elements):
** PROCESS BEFORE OUTPUT.
** MODULE STATUS_0100.
** PROCESS AFTER INPUT.
** MODULE USER_COMMAND_0100.
REPORT zus_sdn_list_tree_model_demo_1.
CLASS cl_gui_column_tree DEFINITION LOAD.
CLASS cl_gui_cfw DEFINITION LOAD.
TYPE-POOLS: abap, shlp.
DATA: gt_node_table TYPE treemlnota,
gt_item_table TYPE treemlitac.
TYPES: BEGIN OF ty_s_key.
TYPES: nkey TYPE lvc_nkey.
TYPES: parent_key TYPE lvc_nkey.
TYPES: END OF ty_s_key.
TYPES: BEGIN OF ty_s_outtab.
INCLUDE TYPE knvv AS data.
INCLUDE TYPE ty_s_key AS key.
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
DATA: gt_outtab TYPE ty_t_outtab.
DATA:
gd_okcode TYPE ui_func,
gd_repid TYPE syst-repid,
gt_fcat TYPE lvc_t_fcat,
gs_layout TYPE lvc_s_layo,
gs_variant TYPE disvariant,
go_docking TYPE REF TO cl_gui_docking_container,
go_listtree TYPE REF TO cl_list_tree_model.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_item_double_click
FOR EVENT item_double_click OF cl_list_tree_model
IMPORTING node_key
item_name,
handle_checkbox_change
FOR EVENT checkbox_change OF cl_list_tree_model
IMPORTING node_key
item_name
checked.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_item_double_click.
MESSAGE 'Event=Double-Click on Item' TYPE 'I'.
CALL TRANSACTION 'VA03'.
ENDMETHOD. "handle_item_double_click
METHOD handle_checkbox_change.
DATA: ls_outtab TYPE ty_s_outtab.
BREAK-POINT.
** IF ( fieldname = 'LOEVM' ).
** CALL METHOD go_tree->get_outtab_line
** EXPORTING
** i_node_key = node_key
** IMPORTING
** e_outtab_line = ls_outtab
*** e_node_text =
*** et_item_layout =
*** es_node_layout =
** EXCEPTIONS
** node_not_found = 1
** OTHERS = 2.
** IF sy-subrc <> 0.
*** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
** ENDIF.
** ls_outtab-loevm = checked.
** MODIFY gt_outtab FROM ls_outtab
** TRANSPORTING loevm
** WHERE ( nkey = node_key ).
** ENDIF.
" Trigger PAI
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'REFRESH'
* IMPORTING
* rc =
ENDMETHOD. "handle_checkbox_change
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
PERFORM init_controls.
gd_repid = syst-repid.
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
* container =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
lifetime_dynpro_dynpro_link = 3
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL SCREEN '0100'.
** NOTE: no elements on screen
** PROCESS BEFORE OUTPUT.
** MODULE STATUS_0100.
** PROCESS AFTER INPUT.
** MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
TRANSLATE gd_okcode TO UPPER CASE.
CASE gd_okcode.
WHEN 'BACK' OR
'EXIT' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN 'REFRESH'.
** CALL METHOD go_tree->update_calculations
*** EXPORTING
*** no_frontend_update =
WHEN 'SELECTED_NODES'.
PERFORM get_selected_nodes.
WHEN 'DISPLAY'.
PERFORM display.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form init_controls
* text
* --> p1 text
* <-- p2 text
FORM init_controls .
* define local data
DATA: ls_hierarchy_header TYPE treemhhdr,
ls_list_header TYPE treemlhdr.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ls_hierarchy_header-heading = 'Hierarchy Column'.
ls_hierarchy_header-width = 70.
ls_list_header-heading = 'List Column'.
* create tree control
CREATE OBJECT go_listtree
EXPORTING
node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
* hide_selection =
item_selection = 'X'
with_headers = 'X'
hierarchy_header = ls_hierarchy_header
list_header = ls_list_header
EXCEPTIONS
illegal_node_selection_mode = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
** PERFORM add_nodes_and_items.
CALL METHOD go_listtree->create_tree_control
EXPORTING
* lifetime =
parent = go_docking
* shellstyle =
* IMPORTING
* control =
EXCEPTIONS
lifetime_error = 1
cntl_system_error = 2
create_error = 3
failed = 4
tree_control_already_created = 5
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* create hierarchy
PERFORM create_hierarchy.
* register events
PERFORM register_events.
ENDFORM. " init_controls
*& Form BUILD_FIELDCATALOG
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog .
DATA: ls_fcat TYPE lvc_s_fcat.
REFRESH: gt_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = 'KNVV'
* I_CLIENT_NEVER_DISPLAY = 'X'
i_bypassing_buffer = 'X'
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DELETE gt_fcat FROM 10.
ls_fcat-tech = 'X'.
MODIFY gt_fcat FROM ls_fcat
TRANSPORTING tech
WHERE ( key = 'X' ).
ls_fcat-edit = 'X'.
MODIFY gt_fcat FROM ls_fcat
TRANSPORTING edit
WHERE ( key NE 'X' ).
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'LOEVM'.
IF ( syst-subrc = 0 ).
ls_fcat-checkbox = 'X'.
ls_fcat-edit = 'X'.
** ls_fcat-hotspot = 'X'.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDIF.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'ERNAM'.
IF ( syst-subrc = 0 ).
ls_fcat-hotspot = 'X'.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDIF.
ENDFORM. " BUILD_FIELDCATALOG
*& Form SET_LAYOUT_AND_VARIANT
* text
* --> p1 text
* <-- p2 text
FORM set_layout_and_variant .
CLEAR: gs_layout,
gs_variant.
gs_variant-report = syst-repid.
gs_variant-handle = 'TREE'.
ENDFORM. " SET_LAYOUT_AND_VARIANT
*& Form create_hierarchy
* text
* --> p1 text
* <-- p2 text
FORM create_hierarchy .
DATA: ls_knvv TYPE sflight,
ld_idx TYPE i,
ls_outtab TYPE ty_s_outtab,
lt_outtab TYPE ty_t_outtab.
* get data
SELECT * FROM knvv INTO CORRESPONDING FIELDS OF TABLE lt_outtab
UP TO 20 ROWS . "#EC CI_NOWHERE
SORT lt_outtab BY kunnr vkorg.
* add data to tree
DATA: ld_root_key TYPE tm_nodekey,
ld_kunnr_key TYPE tm_nodekey,
ld_vkorg_key TYPE tm_nodekey,
ld_last_key TYPE tm_nodekey.
ld_idx = 0.
LOOP AT lt_outtab INTO ls_outtab.
AT FIRST.
PERFORM add_root_line USING ls_outtab-data
CHANGING ld_root_key.
ADD 1 TO ld_idx.
ls_outtab-nkey = ld_root_key.
ls_outtab-parent_key = space.
MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
TRANSPORTING key.
ENDAT.
ON CHANGE OF ls_outtab-kunnr.
PERFORM add_customer_line USING ls_outtab-data
ld_root_key
CHANGING ld_kunnr_key.
ADD 1 TO ld_idx.
ls_outtab-nkey = ld_kunnr_key.
ls_outtab-parent_key = ld_root_key.
MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
TRANSPORTING key.
ENDON.
ON CHANGE OF ls_outtab-vkorg.
PERFORM add_salesorg_line USING ls_outtab-data
ld_kunnr_key
CHANGING ld_vkorg_key.
ADD 1 TO ld_idx.
ls_outtab-nkey = ld_vkorg_key.
ls_outtab-parent_key = ld_kunnr_key.
MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
TRANSPORTING key.
ENDON.
PERFORM add_complete_line USING ls_outtab-data
ld_vkorg_key
CHANGING ld_last_key.
ADD 1 TO ld_idx.
ls_outtab-nkey = ld_last_key.
ls_outtab-parent_key = ld_vkorg_key.
MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
TRANSPORTING key.
ENDLOOP.
* calculate totals
** CALL METHOD go_tree->update_calculations.
* this method must be called to send the data to the frontend
** CALL METHOD go_tree->frontend_update.
ENDFORM. " create_hierarchy
*& Form add_customer_line
* add hierarchy-level 1 to tree
* -->P_LS_SFLIGHT sflight
* -->P_RELEATKEY relatkey
* <-->p_node_key new node-key
FORM add_root_line USING us_data TYPE ty_s_outtab-data
ud_relat_key TYPE tm_nodekey
CHANGING cd_node_key TYPE tm_nodekey.
DATA: l_node_text TYPE lvc_value,
ls_data TYPE ty_s_outtab-data.
* set item-layout
DATA: lt_item_table TYPE treemlitab,
ls_item TYPE treemlitem.
** ls_item-t_image = '@3Q@'. " icon_overview
ls_item-item_name = '1'.
ls_item-class = cl_list_tree_model=>item_class_text.
ls_item-style = cl_list_tree_model=>style_intensifd_critical.
ls_item-text = 'Overview: Sales Areas'.
ls_item-length = 25.
APPEND ls_item TO lt_item_table.
cd_node_key = 'ROOT'.
* add node
CALL METHOD go_listtree->add_node
EXPORTING
node_key = cd_node_key
* relative_node_key =
* relationship =
isfolder = 'X'
* hidden =
* disabled =
* style =
* no_branch =
* expander =
* image =
* expanded_image =
* drag_drop_id =
* last_hitem =
* user_object =
* items_incomplete =
item_table = lt_item_table
EXCEPTIONS
node_key_exists = 1
node_key_empty = 2
illegal_relationship = 3
relative_node_not_found = 4
error_in_item_table = 5
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " add_root_line
*& Form add_customer_line
* add hierarchy-level 1 to tree
* -->P_LS_SFLIGHT sflight
* -->P_RELEATKEY relatkey
* <-->p_node_key new node-key
FORM add_customer_line USING us_data TYPE ty_s_outtab-data
ud_relat_key TYPE tm_nodekey
CHANGING cd_node_key TYPE tm_nodekey.
DATA: l_node_text TYPE lvc_value,
ls_data TYPE ty_s_outtab-data.
* set item-layout
DATA: lt_item_table TYPE treemlitab,
ls_item TYPE treemlitem.
ls_item-t_image = '@A0@'. " icon_customer
ls_item-item_name = '1'.
ls_item-class = cl_list_tree_model=>item_class_text.
ls_item-style = cl_list_tree_model=>style_intensifd_critical.
ls_item-text = us_data-kunnr.
ls_item-length = 15.
APPEND ls_item TO lt_item_table.
cd_node_key = us_data-kunnr.
* add node
CALL METHOD go_listtree->add_node
EXPORTING
node_key = cd_node_key
relative_node_key = ud_relat_key
relationship = cl_list_tree_model=>relat_last_child
isfolder = 'X'
* hidden =
* disabled =
* style =
* no_branch =
* expander =
* image =
* expanded_image =
* drag_drop_id =
* last_hitem =
* user_object =
* items_incomplete =
item_table = lt_item_table
EXCEPTIONS
node_key_exists = 1
node_key_empty = 2
illegal_relationship = 3
relative_node_not_found = 4
error_in_item_table = 5
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " add_customer_line
*& Form add_salesorg_line
* add hierarchy-level 1 to tree
* -->P_LS_SFLIGHT sflight
* -->P_RELEATKEY relatkey
* <-->p_node_key new node-key
FORM add_salesorg_line USING us_data TYPE ty_s_outtab-data
ud_relat_key TYPE tm_nodekey
CHANGING cd_node_key TYPE tm_nodekey.
DATA: l_node_text TYPE lvc_value,
ls_data TYPE ty_s_outtab-data.
* set item-layout
DATA: lt_item_table TYPE treemlitab,
ls_item TYPE treemlitem.
** ls_item-t_image = '@A0@'. " icon_customer
ls_item-item_name = '1'.
ls_item-class = cl_list_tree_model=>item_class_text.
** ls_item-style = cl_list_tree_model=>style_intensifd_critical.
CONCATENATE 'Sales Organisation:' us_data-vkorg
INTO ls_item-text
SEPARATED BY space.
ls_item-length = 25.
APPEND ls_item TO lt_item_table.
CLEAR: ls_item.
ls_item-item_name = '2'.
ls_item-class = cl_list_tree_model=>item_class_text.
ls_item-text = us_data-vtweg.
ls_item-length = 5.
APPEND ls_item TO lt_item_table.
CLEAR: ls_item.
ls_item-item_name = '3'.
ls_item-class = cl_list_tree_model=>item_class_text.
ls_item-text = us_data-spart.
ls_item-length = 3.
APPEND ls_item TO lt_item_table.
CONCATENATE ud_relat_key us_data-vkorg
INTO cd_node_key
SEPARATED BY ' : '. " > 12 char
* add node
CALL METHOD go_listtree->add_node
EXPORTING
node_key = cd_node_key
relative_node_key = ud_relat_key
relationship = cl_list_tree_model=>relat_last_child
isfolder = 'X'
* hidden =
* disabled =
* style =
* no_branch =
* expander =
* image =
* expanded_image =
* drag_drop_id =
* last_hitem =
* user_object =
* items_incomplete =
item_table = lt_item_table
EXCEPTIONS
node_key_exists = 1
node_key_empty = 2
illegal_relationship = 3
relative_node_not_found = 4
error_in_item_table = 5
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " add_salesorg_line
*& Form add_cmplete_line
* add hierarchy-level 3 to tree
* -->P_LS_SFLIGHT sflight
* -->P_RELEATKEY relatkey
* <-->p_node_key new node-key
FORM add_complete_line USING us_data TYPE ty_s_outtab-data
ud_relat_key TYPE tm_nodekey
CHANGING cd_node_key TYPE tm_nodekey.
** DATA: l_node_text TYPE lvc_value,
** ls_data TYPE ty_s_outtab-data.
*** set item-layout
** DATA: lt_item_table TYPE treemlitac,
** ls_item TYPE treemliten.
** ls_item-node_key = ud_relat_key.
**** ls_item-t_image = '@A0@'. " icon_customer
** ls_item-item_name = '3'.
** ls_item-class = cl_list_tree_model=>item_class_text.
**** ls_item-style = cl_list_tree_model=>style_intensifd_critical.
** CALL METHOD cl_abap_container_utilities=>fill_container_c
** EXPORTING
** im_value = us_data
** IMPORTING
** ex_container = ls_item-text
** EXCEPTIONS
** illegal_parameter_type = 1
** others = 2.
** IF sy-subrc <> 0.
*** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
** ENDIF.
** ls_item-length = 100.
** APPEND ls_item TO lt_item_table.
** CALL METHOD go_listtree->add_items
** EXPORTING
** item_table = lt_item_table
** EXCEPTIONS
** error_in_item_table = 1
** OTHERS = 2.
** IF sy-subrc <> 0.
*** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
** ENDIF.
ENDFORM. " add_complete_line
*& Form register_events
* text
* --> p1 text
* <-- p2 text
FORM register_events.
* define the events which will be passed to the backend
DATA: lt_events TYPE cntl_simple_events,
l_event TYPE cntl_simple_event.
* define the events which will be passed to the backend
* l_event-eventid = cl_list_tree_model=>eventid_expand_no_children.
* APPEND l_event TO lt_events.
l_event-eventid = cl_list_tree_model=>eventid_checkbox_change.
APPEND l_event TO lt_events.
** l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
** APPEND l_event TO lt_events.
** l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
** APPEND l_event TO lt_events.
** l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
** APPEND l_event TO lt_events.
** l_event-eventid = cl_gui_column_tree=>eventid_header_click.
** APPEND l_event TO lt_events.
** l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
** APPEND l_event TO lt_events.
l_event-eventid = cl_list_tree_model=>eventid_item_double_click.
APPEND l_event TO lt_events.
CALL METHOD go_listtree->set_registered_events
EXPORTING
events = lt_events
EXCEPTIONS
illegal_event_combination = 1
unknown_event = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* set Handler
SET HANDLER:
lcl_eventhandler=>handle_item_double_click FOR go_listtree,
lcl_eventhandler=>handle_checkbox_change FOR go_listtree.
ENDFORM. " register_events
*& Form DISPLAY
* text
* --> p1 text
* <-- p2 text
FORM display .
DATA: ls_outtab TYPE ty_s_outtab,
ls_line TYPE ty_s_outtab,
ld_msg TYPE bapi_msg.
BREAK-POINT.
LOOP AT gt_outtab INTO ls_outtab
WHERE ( loevm = 'X' ).
CONCATENATE 'Checkbox:'
ls_outtab-kunnr
ls_outtab-vkorg
ls_outtab-vtweg
ls_outtab-spart
ls_outtab-loevm
INTO ld_msg SEPARATED BY space.
MESSAGE ld_msg TYPE 'I'.
ENDLOOP.
IF ( syst-subrc NE 0 ).
MESSAGE 'No marked checkboxes found' TYPE 'I'.
ENDIF.
PERFORM get_selected_nodes.
ENDFORM. " DISPLAY
*& Form GET_SELECTED_NODES
* text
* --> p1 text
* <-- p2 text
FORM get_selected_nodes.
* define local data
DATA: ld_msg TYPE bapi_msg,
lt_nodes TYPE lvc_t_nkey,
ls_outtab TYPE ty_s_outtab,
ld_nkey TYPE lvc_nkey,
lt_items TYPE lvc_t_layi,
ls_item TYPE lvc_s_layi.
** CALL METHOD go_tree->get_selected_nodes
** CHANGING
** ct_selected_nodes = lt_nodes
** EXCEPTIONS
** cntl_system_error = 1
** dp_error = 2
** failed = 3
** OTHERS = 4.
** IF sy-subrc <> 0.
*** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
** ENDIF.
** CHECK ( lt_nodes IS NOT INITIAL ).
** BREAK-POINT.
** LOOP AT lt_nodes INTO ld_nkey.
** CALL METHOD go_tree->get_outtab_line
** EXPORTING
** i_node_key = ld_nkey
** IMPORTING
** e_outtab_line = ls_outtab-data
*** e_node_text =
** et_item_layout = lt_items
*** es_node_layout =
** EXCEPTIONS
** node_not_found = 1
** OTHERS = 2.
** IF sy-subrc <> 0.
*** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
** ENDIF.
** LOOP AT lt_items INTO ls_item
** WHERE ( chosen = 'X' ).
** CONCATENATE 'Item:'
** ls_outtab-kunnr
** ls_outtab-vkorg
** ls_outtab-vtweg
** ls_outtab-spart
** ls_outtab-loevm
** INTO ld_msg SEPARATED BY space.
** MESSAGE ld_msg TYPE 'I'.
** ENDLOOP.
** ENDLOOP.
ENDFORM. " GET_SELECTED_NODES
Regards
Uwe -
Hi
How to Improve ABAP logics(Programming) in all areas.
I need guidence from you all. How to start to improve them.
Regards,
MarutiHi,
Following are the performance standards need to be following in writing ABAP programs:
1. Unused/Dead code
Avoid leaving unused code in the program. Either comment out or delete the unused situation. Use program --> check --> extended program to check for the variables, which are not used statically.
2. Subroutine Usage
For good modularization, the decision of whether or not to execute a subroutine should be made before the subroutine is called. For example:
This is better:
IF f1 NE 0.
PERFORM sub1.
ENDIF.
FORM sub1.
ENDFORM.
Than this:
PERFORM sub1.
FORM sub1.
IF f1 NE 0.
ENDIF.
ENDFORM.
3. Usage of IF statements
When coding IF tests, nest the testing conditions so that the outer conditions are those which are most likely to fail. For logical expressions with AND , place the mostly likely false first and for the OR, place the mostly likely true first.
Example - nested IF's:
IF (least likely to be true).
IF (less likely to be true).
IF (most likely to be true).
ENDIF.
ENDIF.
ENDIF.
Example - IF...ELSEIF...ENDIF :
IF (most likely to be true).
ELSEIF (less likely to be true).
ELSEIF (least likely to be true).
ENDIF.
Example - AND:
IF (least likely to be true) AND
(most likely to be true).
ENDIF.
Example - OR:
IF (most likely to be true) OR
(least likely to be true).
4. CASE vs. nested Ifs
When testing fields "equal to" something, one can use either the nested IF or the CASE statement. The CASE is better for two reasons. It is easier to read and after about five nested IFs the performance of the CASE is more efficient.
5. MOVE statements
When records a and b have the exact same structure, it is more efficient to MOVE a TO b than to MOVE-CORRESPONDING a TO b.
MOVE BSEG TO *BSEG.
is better than
MOVE-CORRESPONDING BSEG TO *BSEG.
6. SELECT and SELECT SINGLE
When using the SELECT statement, study the key and always provide as much of the left-most part of the key as possible. If the entire key can be qualified, code a SELECT SINGLE not just a SELECT. If you are only interested in the first row or there is only one row to be returned, using SELECT SINGLE can increase performance by up to three times.
7. Small internal tables vs. complete internal tables
In general it is better to minimize the number of fields declared in an internal table. While it may be convenient to declare an internal table using the LIKE command, in most cases, programs will not use all fields in the SAP standard table.
For example:
Instead of this:
data: t_mara like mara occurs 0 with header line.
Use this:
data: begin of t_mara occurs 0,
matnr like mara-matnr,
end of t_mara.
8. Row-level processing and SELECT SINGLE
Similar to the processing of a SELECT-ENDSELECT loop, when calling multiple SELECT-SINGLE commands on a non-buffered table (check Data Dictionary -> Technical Info), you should do the following to improve performance:
o Use the SELECT into <itab> to buffer the necessary rows in an internal table, then
o sort the rows by the key fields, then
o use a READ TABLE WITH KEY ... BINARY SEARCH in place of the SELECT SINGLE command. Note that this only make sense when the table you are buffering is not too large (this decision must be made on a case by case basis).
9. READing single records of internal tables
When reading a single record in an internal table, the READ TABLE WITH KEY is not a direct READ. This means that if the data is not sorted according to the key, the system must sequentially read the table. Therefore, you should:
o SORT the table
o use READ TABLE WITH KEY BINARY SEARCH for better performance.
10. SORTing internal tables
When SORTing internal tables, specify the fields to SORTed.
SORT ITAB BY FLD1 FLD2.
is more efficient than
SORT ITAB.
11. Number of entries in an internal table
To find out how many entries are in an internal table use DESCRIBE.
DESCRIBE TABLE ITAB LINES CNTLNS.
is more efficient than
LOOP AT ITAB.
CNTLNS = CNTLNS + 1.
ENDLOOP.
12. Performance diagnosis
To diagnose performance problems, it is recommended to use the SAP transaction SE30, ABAP/4 Runtime Analysis. The utility allows statistical analysis of transactions and programs.
13. Nested SELECTs versus table views
Since releASE 4.0, OPEN SQL allows both inner and outer table joins. A nested SELECT loop may be used to accomplish the same concept. However, the performance of nested SELECT loops is very poor in comparison to a join. Hence, to improve performance by a factor of 25x and reduce network load, you should either create a view in the data dictionary then use this view to select data, or code the select using a join.
14. If nested SELECTs must be used
As mentioned previously, performance can be dramatically improved by using views instead of nested SELECTs, however, if this is not possible, then the following example of using an internal table in a nested SELECT can also improve performance by a factor of 5x:
Use this:
form select_good.
data: t_vbak like vbak occurs 0 with header line.
data: t_vbap like vbap occurs 0 with header line.
select * from vbak into table t_vbak up to 200 rows.
select * from vbap
for all entries in t_vbak
where vbeln = t_vbak-vbeln.
endselect.
endform.
Instead of this:
form select_bad.
select * from vbak up to 200 rows.
select * from vbap where vbeln = vbak-vbeln.
endselect.
endselect.
endform.
Although using "SELECT...FOR ALL ENTRIES IN..." is generally very fast, you should be aware of the three pitfalls of using it:
Firstly, SAP automatically removes any duplicates from the rest of the retrieved records. Therefore, if you wish to ensure that no qualifying records are discarded, the field list of the inner SELECT must be designed to ensure the retrieved records will contain no duplicates (normally, this would mean including in the list of retrieved fields all of those fields that comprise that table's primary key).
Secondly, if you were able to code "SELECT ... FROM <database table> FOR ALL ENTRIES IN TABLE <itab>" and the internal table <itab> is empty, then all rows from <database table> will be retrieved.
Thirdly, if the internal table supplying the selection criteria (i.e. internal table <itab> in the example "...FOR ALL ENTRIES IN TABLE <itab> ") contains a large number of entries, performance degradation may occur.
15. SELECT * versus SELECTing individual fields
In general, use a SELECT statement specifying a list of fields instead of a SELECT * to reduce network traffic and improve performance. For tables with only a few fields the improvements may be minor, but many SAP tables contain more than 50 fields when the program needs only a few. In the latter case, the performace gains can be substantial. For example:
Use:
select vbeln auart vbtyp from table vbak
into (vbak-vbeln, vbak-auart, vbak-vbtyp)
where ...
Instead of using:
select * from vbak where ...
16. Avoid unnecessary statements
There are a few cases where one command is better than two. For example:
Use:
append <tab_wa> to <tab>.
Instead of:
<tab> = <tab_wa>.
append <tab> (modify <tab>).
And also, use:
if not <tab>[] is initial.
Instead of:
describe table <tab> lines <line_counter>.
if <line_counter> > 0.
17. Copying or appending internal tables
Use this:
<tab2>[] = <tab1>[]. (if <tab2> is empty)
Instead of this:
loop at <tab1>.
append <tab1> to <tab2>.
endloop.
However, if <tab2> is not empty and should not be overwritten, then use:
append lines of <tab1> [from index1] [to index2] to <tab2>. -
Abap/buffersize Parameter?
Dear Friends,
why we use system profile parameter abap/buffersize ? it will increase ? what about system performance ( Process speed wise)?
Regards
keshavCheck this [SAP.Help |http://help.sap.com/saphelp_nw04/helpdata/en/bc/4a813b680c250fe10000000a114084/frameset.htm]
abap/buffersize - is responsible for Program buffer.
why we use system profile parameter abap/buffersize ?
To adjust program buffer....
it will increase ?
It will increase Program buffer within specified limit... As per document Typical Size/Number of Entries = 240,000u2013400,000 KB
what about system performance ( Process speed wise)?
Check ... Procedure if Buffer Is Full or Swap Rate Is too High on same page, as it says...
Increase the size of the program buffer if the hit rate becomes too low, or the swaps become too frequent. Development systems require a larger program buffer than normal systems. It is, however, almost impossible to avoid swapping in a development system. -
How to increase dynamically open_cursors and session_cached_cursors
how to increase dynamically open_cursors and session_cached_cursors
for Ex. alter system open_cursors = 500instane level:
alter system set session_cached_cursors=200 scope = spfile; or set init.ora file.
alter system set open_cursors=400;
More details about open_cursor and session_cached_cursor, refer the below link
http://www.orafaq.com/node/758
Regards
RajaBaskar -
How to Increase Number of Images from 500 in a LR3 Flash Gallery
I noticed people asking (and I myself needed to know) so I thought I would explain how to increase the number of images (from 500) in a Flash gallery in Light Room 3
1. I exported a Flash gallery from LR3 and it capped the gallery at 500 images.
2. Because I had roughly 600 images to put in the gallery, I exported the remaining 100 as a separate flash gallery. (Going ahead and exporting 2 galleries will save you headache in a later step)
3. I combined all the images folders (copying "large" images from one folder to the "large" folder in the gallery I want to upload to my site, etc.) so that the files are all in one location.
4. The next step is to increase the gallery maximum in the code. Access (from the exported gallery) GALLERYNAME/resources/mediaGroupData/group.xml and open the group.xml file. The line of code you will be changing is <media totalGallerySize="500"> Change the 500 to the number of photos you want in the gallery.
5. This next step isn't too complicated, but it is specific. You know have to tell that flash file to look for the images you just transferred to the images folder. The best way to do this is to open the group.xml file for the second gallery you exported. Copy all the code beginning with <item> to the bottom of the page. This code tells the gallery to look at your specific images (Note: you'll notice within each item the names of your image file)
6. Return to the (other) group.xml file of the gallery you plan to use (with all your images in it). Scroll to the bottom and erase the lines </media> and </mediagroup> becaue you will repaste them in a moment. Next, paste the copied code there.
7. Save & check your browser!
I hope this was clear...please comment back and I'll clarify if needed.
ro500 images in a single gallery is too many - think of the poor viewer!
But if you must create Flash galeries with more than 500 images, you're better off editing the underlying engine - here's one link showing how to do it -
How to increase the row height of the table in the smartform
Hi,
Can any one say,
How to increase the row height of the table in the smartform.
It is presently show the row width very small, i want to increase the row with of the table in the smartform.
Plase say how can we increase the row height in the smartform.Hi Ravi,
In Smartforms , Select the Table and you can adjust the cell hieghts in OUTPUT OPTIONs TAB.
Reward points if that Helps.
Manish -
How to increase recent call list in i phone 5s
how to increase recent call list in i phone 5s
There are apps that can jeep Track of many more calls. The iPhone native app is limited to 100. Search for those apps in the App Store.
-
How to increase the number of rows in Status Oveview iView in MSS?
Hi
We have implemented MSS and have a question regarding Status overview iview.
The standard status overview iview of the team workset has 5 rows and we have to scroll using the arrow buttons to select/view a request.
Now can anyone explain me how to increase the number of rows in this iview? Is this somthing that has to be accoplished through web dynpro customization?
I checked the options in iView property and do not see any option to increase the number of rows.
please help
Thanks
-MichaelHi Micheal,
Well, I am not really sure, if you could accomplish this using customizing, but I am sure that you can accomplish this using the JDI. Well, you can extract the application's source code using JDI and then change the required display rows property and republish it.
Am not really sure if this is suggestable method for this requirement,but it can be achieved using this JDI stuff.
Regards
<b>Raja Sekhar</b><i></i>
Maybe you are looking for
-
iTunes didn't completely download all my songs. I updated iTunes and now this message appears "iTunes has not been correctly localized for this language. Please use the english version." The only option I have at this point is to close it down becaus
-
Raw imports fail if shooting in RAW+JPG
I've got a canon Xsi and set it to record RAW+JPG for some testing. I installed 10.5.4 which claimed to support RAW for the camera. But I could never get any of the images to import. I've now figured out what is going on. I was using the USB cable to
-
I can't get Adobe Reader to install. using windows home vista. error message is: AdbeRdr1014_en_US.exe couldn't be downloaded Have tried workarounds and they don't work either.
-
TimeMachine Backup (of localhost) takes forever
I have a problem with TimeMachine on my 10.6.2 Server I don't understand. Basically, the backup takes forever, it's currently at "Stopping Backup..." since almost an hour. I have a Nehalem Mac Pro with a 640 GB "main" disk and two 1TB disks as mirror
-
Iphone camera as isight?
iphone camera as isight? this be done, in theory is there any reason this couldnt work?