About: how to abap index in abap program.
Dear expert,
I find a question that what's the meaing of these declaration "%_hints oracle 'INDEX(RESB"Z01")" in abap program.
Can you explain it to me?
Best wishes.
George shi
Hi,
this forces the oracle database to use index Z01 of table RESB when processing the select statement. If you do not add the hint, the optimizer of the database decides which index to pick. In some cases, the automatically chosen index is not the best one.
Please also refer to http://www.hotcoding.com/dbs/oracle/35430.html for a more detailed explanation.
Kind regards,
Thomas Langen
Similar Messages
-
How to copy/download all ABAP programs in a text with a single report ?
How to copy/download all ABAP programs in a text format with a single report/TC ?
How to copy/download ABAP source code with all include programs ?....
we need to search & copy all include programs everytime....Hi,
check this link
downloading programs
Regards -
How to copy wd for abap program?
Hi SAP GEARS!
I'm developing a program (wd) in Minisap when i have not a net connection. How can i copy the wd program from this minisap to a real workplace?
A solution is caching data and cofile files but in standard minisap instalation the transport layers are not configured
so, there is someone with enough goodness to help me with this thread?
Tanks!Hello,
If you want to download a Web Dynpro Component to your PC for moving between systems that aren't connected via transport, then I suggest that you look at SAPLink: http://saplink.org
SAPLink is an Open Source community project for downloading and uploading ABAP development objects in XML format via simple report instead of the transport system. There is a plug-in for SAPLink that supports Web Dynpro Components.
Hope this helps!
Regards,
Srilatha M -
How to find hardcoded in ABAP programs
Dear Experts,
Please tell me how to find hardcoded in ABAP programs.Hi Sam,
Generally in Abap program hardcoded strings are declared in single quotes ' .
for ex :
write : 'Report heading'. " search for ' in the entire program.
press FIND button in menu bar and type single quote ' . and select radio button ' IN MAIN PROGRAM '
Regards,
Aby. -
How can we delete a ABAP programe
Hi,
How can we delete a ABAP programme which is no longer in use.?
Regards,
kranthiHi
You can delete ABAP programe in tcode SE38 select the programe name and select Delete from application tool bar
But please put ABAP related threads in ABAP forum
Regards
Amiya -
How to use LDB PNP with ABAP objects in a program
Hello,
I am wondering if anybody has used the HR logical database(LDB) PNP with user defined ABAP objects in a program? I am using the FM- <b>LDB_PROCESS</b> but its not working. Also assigning PNP in the attributes section of the program -- so that I can use predefined fields from the LDB and then invoking the FM doesn't work -- throwing 'Logical database already active' error.
I suppose even with the ABAP objects and the new FM -- I should still be able to utilize the pre-defined fields of the PNP database -- and also the built in authorizations. I cannot use GET PERNR and REJECT as they give errors. I understand that the use of HR-macros (RP-PROVIDE-FROM-LAST and et al.) are not allowed as they use the table work area -- which is not allowed in ABAP-OOPS.
I would really appreciate if anyone could show me some insight regarding this. Thank you.
Kshitij R. DevreHi Kshitij
It would be really good if we could use both together. But as I know, it is not possible. "GET pernr." is an event-like loop statement and so cannot be used in OO context. And I guess, the same restriction holds for the "LDB_PROCESS" since it uses LDB-specific processing.
What I suggest you is to use standard and BAPI functions.
Sorry for giving bad news...
*--Serdar -
How to call Webservice in abap Program
Hi Guys,
How can i call a abap webservice located in another server(CRM) in Bpc BADI.Is this web service is thing is possible??Hi,
For calling a web service first you have to Create Proxy object using web service URL or WSDL file.
and create logical port for that URL.
This will generate Class and method in your system.
After that you can use this class and method to call this web service.
Regards,
Arpit -
Can u explain me how to work with OOPs ABAP
Hi,
Can u explain me how to work with OOPS Abap, If possible pls send me some sample programs regarding OOps concept used in Realtime.
Thanks.hii,
Please check this online document (starting page 1291).
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Also check this links as well.
http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.futureobjects.de/content/intro_oo_e.html
http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
/people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
What is Object Orientation?
Object orientation (OO), or to be more precise, object-oriented programming, is a problem-solving method in which the software solution reflects objects in the real world.
A comprehensive introduction to object orientation as a whole would go far beyond the limits of this introduction to ABAP Objects. This documentation introduces a selection of terms that are used universally in object orientation and also occur in ABAP Objects. In subsequent sections, it goes on to discuss in more detail how these terms are used in ABAP Objects. The end of this section contains a list of further reading, with a selection of titles about object orientation.
Objects
An object is a section of source code that contains data and provides services. The data forms the attributes of the object. The services are known as methods (also known as operations or functions). Typically, methods operate on private data (the attributes, or state of the object), which is only visible to the methods of the object. Thus the attributes of an object cannot be changed directly by the user, but only by the methods of the object. This guarantees the internal consistency of the object.
Classes
Classes describe objects. From a technical point of view, objects are runtime instances of a class. In theory, you can create any number of objects based on a single class. Each instance (object) of a class has a unique identity and its own set of values for its attributes.
Object References
In a program, you identify and address objects using unique object references. Object references allow you to access the attributes and methods of an object.
In object-oriented programming, objects usually have the following properties:
Encapsulation
Objects restrict the visibility of their resources (attributes and methods) to other users. Every object has an interface, which determines how other objects can interact with it. The implementation of the object is encapsulated, that is, invisible outside the object itself.
Polymorphism
Identical (identically-named) methods behave differently in different classes. Object-oriented programming contains constructions called interfaces. They enable you to address methods with the same name in different objects. Although the form of address is always the same, the implementation of the method is specific to a particular class.
Inheritance
You can use an existing class to derive a new class. Derived classes inherit the data and methods of the superclass. However, they can overwrite existing methods, and also add new ones.
Uses of Object Orientation
Below are some of the advantages of object-oriented programming:
Complex software systems become easier to understand, since object-oriented structuring provides a closer representation of reality than other programming techniques.
In a well-designed object-oriented system, it should be possible to implement changes at class level, without having to make alterations at other points in the system. This reduces the overall amount of maintenance required.
Through polymorphism and inheritance, object-oriented programming allows you to reuse individual components.
In an object-oriented system, the amount of work involved in revising and maintaining the system is reduced, since many problems can be detected and corrected in the design phase.
Achieving these goals requires:
Object-oriented programming languages
Object-oriented programming techniques do not necessarily depend on object-oriented programming languages. However, the efficiency of object-oriented programming depends directly on how object-oriented language techniques are implemented in the system kernel.
Object-oriented tools
Object-oriented tools allow you to create object-oriented programs in object-oriented languages. They allow you to model and store development objects and the relationships between them.
Object-oriented modeling
The object-orientation modeling of a software system is the most important, most time-consuming, and most difficult requirement for attaining the above goals. Object-oriented design involves more than just object-oriented programming, and provides logical advantages that are independent of the actual implementation
http://www.sapgenie.com/abap/OO/index.htm
http://www.geocities.com/victorav15/sapr3/abap_ood.html
http://www.brabandt.de/html/abap_oo.html
Check this cool weblog:
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
/people/sap.user72/blog/2005/05/10/a-small-tip-for-the-beginners-in-oo-abap
/people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
/people/thomas.jung3/blog/2005/09/08/oo-abap-dynpro-programming
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sapgenie.com/
http://help.sap.com
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
these links
http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
For funtion module to class
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
for classes
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
for methods
http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
for inheritance
http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
for interfaces
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
For basic stuff......
abap oops
http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/frameset.htm
ABAP Business Development and Service Provisioning/ABAP Objects
General information
What is Object Orientation?
some blogs
A small tip for the beginners in OO ABAP
Object Oriented ABAP (OO-ABAP)
and others wiki OO Abap
cheers,
sharad
Edited by: sharad narayan on Apr 29, 2008 12:19 PM -
How we can see the abap memory data
How we can see the abap-memory data
fine the code below
import lsind
report_title
table_name
report_field
change_display
show_hide
conversion_exits
table_description
form_program
select_form
update_form
line_size
line_count
records[]
fields[]
header_fields[]
select_fields[]
xrep[]
from memory id 'LZUT5U11'.
Regards
santhosh
mail-id : [email protected]Dear Santosh,
ABAP MEMORY:
A logical memory model illustrates how the main memory is distributed from the view of executable programs. A distinction is made here between external sessions and internal sessions .
An external session is usually linked to an R/3 window. You can create an external session by choosing System/Create session, or by entering /o in the command field. An external session is broken down further into internal sessions. Program data is only visible within an internal session. Each external session can include up to 20 internal sessions (stacks).
Every program you start runs in an internal session.
All "squares" with rounded "corners" displayed in the status diagram represent a set of data objects in the main memory.
The data in the main memory is only visible to the program concerned.
CALL TRANSACTION and SUBMIT AND RETURN open a new internal session that forms a new program context. The internal sessions in an external session form a memory stack. The new session is added to the top of the stack.
When a program has finished running, the top internal session in the stack is removed, and the calling program resumes processing.
The same occurs when the system processes a LEAVE PROGRAM statement.
LEAVE TO TRANSACTION removes all internal sessions from the stack and opens a new one containing the program context of the calling program.
The ABAP memory is initialized after the program is called. In other words, you cannot transfer any data to a program called with LEAVE TO TRANSACTION via the ABAP memory.
SUBMIT replaces the internal session of the program performing the call with the internal session of the program that has been called. The new internal session contains the program context of the called program with which it is performed.
When a function module is called, the following steps are executed:
A check is made to establish whether your program has called a function module of the same function group previously.
If this is not the case, the system loads the associated function group to the internal session of the calling program as an additional program group. This initializes its global data.
If your program used a function module of the same function group before the current call, the function module that you have called up at present can access the global data of the function group. The function group is not reloaded.
Within the internal session, all of the function modules that you call from the same group access the global data of that group.
If, in a new internal session, you call a function module from the same function group as in internal session 1, a new set of global data is initialized for the second internal session. This means that the data accessed by function modules called in session 2 may be different from that accessed by the function modules in session 1.
You can call function modules asynchronously as well as synchronously. To do so, you must extend the function module call using the addition STARTING NEW TASK ''. Here, '' is a symbolic name in the calling program that identifies the external session, in which the called program is executed.
Function modules that you call using the addition STARTING NEW TASK '' are executed independently of the calling program. The calling program is not interrupted.
To make function modules available for local asynchronous calls, you must identify them as executable remotely (processing type: Remote-enabled module).
There are various ways of transferring data between programs that are running in different program contexts (internal sessions). You can use:
(1) The interface of the called program (standard selection screen, or interface of a
subroutine, function module, or dialog module)
(2) ABAP memory
(3) SAP memory
(4) Database tables
(5) Local files on your presentation server.
For further information about transferring data between an ABAP program and your presentation server, refer to the documentation for the function modules WS_UPLOAD and WS_DOWNLOAD.
Function modules have an interface, which you can use to pass data between the calling program and the function module itself (there is also a comparable mechanism for ABAP subroutines). If a function module supports RFC, certain restrictions apply to its interface.
If you are calling an ABAP program that has a standard selection screen, you can pass values to the input fields. There are two options here:
By using a variant of the standard selection screen in the program call
By passing actual values for the input fields in the program call
If you want to call a report program without displaying its selection screen (default setting), but still want to pass values to its input fields, there is a variety of techniques that you can use.
The WITH addition allows you to assign values to the parameters and select-options fields on the standard selection screen.
If the selection screen is to be displayed when the program is called, use the addition: VIA SELECTION-SCREEN.
Use the pattern button in the ABAP Editor to insert a program call via SUBMIT. The structure shows you the names of data objects that you can complete with the standard selection screen.
For further information on working with variants and further syntax variants for the WITH addition, see the key word documentation in the ABAP Editor for SUBMIT.
You can use SAP memory and ABAP memory to pass data between different programs.
The SAP memory is a user-specific memory area for storing field values. It is available in all of the open sessions in a user's terminal session, and is reset when the terminal session ends. You can use its contents as default values for screen fields. All external sessions can access SAP memory. This means that it is only of limited use for passing data between internal sessions.
The ABAP memory is also user-specific, and is local to each external session. You can use it to pass any ABAP variables (fields, structures, internal tables, complex objects) between the internal sessions of a single external session.
Each external session has its own ABAP memory. When you end an external session (/i in the command field), the corresponding ABAP memory is released automatically.
To copy a set of ABAP variables and their current values (data cluster) to the ABAP memory, use the EXPORT TO MEMORY ID statement. The (up to 32 characters) is used to identify the different data clusters.
If you repeat an EXPORT TO MEMORY ID statement to an existing data cluster, the new data overwrites the old.
To copy data from ABAP memory to the corresponding fields of an ABAP program, use the IMPORT FROM MEMORY ID statement.
The fields, structures, internal tables, and complex objects in a data cluster in ABAP memory must be declared identically in both the program from which you exported the data and the program into which you import it.
To release a data cluster, use the FREE MEMORY ID statement.
You can import just parts of a data cluster with IMPORT, since the objects are named in the cluster.
In the SAP memory, you can define memory areas (SET/GET parameters, or parameter IDs), which you can then address by a name of up to 20 characters.
You can fill these memory areas either using the contents of input/output fields on screens, or using the ABAP statement:
SET PARAMETER ID '' FIELD .
The memory area with the name now has the value .
You can use the contents of a memory area to display a default value in an input field on a screen.
You can also read the memory areas from the SAP memory using the ABAP statement GET PARAMETER ID FIELD . The field then contains the value from parameter .
The link between an input/output field and a memory area in SAP memory is inherited from the data element on which the field is based. You can enable the set parameter or get parameter attributes in the input/output field attributes.
Once you have set the Set parameter attribute for an input/output field, you can fill it with default values from SAP memory. This is particularly useful for transactions that you call from another program without displaying the initial screen. For this purpose, you must activate the Set parameter functionality for the input fields of the first screen of the transaction.
You can:
(1) Copy the data that is to be used for the first screen of the transaction to be called to the parameter ID in the SAP memory. To do so, use the statement SET PARAMETER immediately before calling the transaction.
(2) Start the transaction using CALL TRANSACTION or LEAVE TO
TRANSACTION . If you do not want to display the initial screen, use the AND
SKIP FIRST SCREEN addition.
(3) The system program that starts the transaction fills the input fields that do not already have default values and for which the Get parameter attribute has been set with values from SAP memory.
The Technical information for the input fields in the transaction you want to call contains the names of the parameter IDs that you need to use.
Parameter IDs should be entered in table TPARA. This happens automatically if you create them via the Object navigator.
Programs that you call using the statements SUBMIT , LEAVE TO TRANSACTION , SUBMIT AND RETURN, or CALL TRANSACTION run in their own SAP LUW, and update requests receive their own update key.
When you use SUBMIT and LEAVE TO TRANSACTION , the SAP LUW of the calling program ends. If no COMMIT WORK statement occurred before the program call, the update requests in the log table remain incomplete and cannot be processed. They can no longer be executed. The same applies to inline changes that you make using PERFORM … ON COMMIT.
Data that you have written to the database using inline changes is committed the next time a new screen is displayed.
If you use SUBMIT AND RETURN or CALL TRANSACTION to insert a program and then return to the calling program, the SAP LUW of the calling program is resumed when the called program ends. The LUW processing of calling and called programs is independent.
In other words, inline changes are committed the next time a new screen is displayed. Update requests and calls using PERFORM ... ON COMMIT require an independent COMMIT WORK statement in the SAP LUW in which they are running.
Function modules run in the same SAP LUW as the program that calls them.
If you call transactions with nested calls, each transaction needs its own COMMIT WORK, since each transaction maps its own SAP LUW.
The same applies to calling executable programs, which are called using SUBMIT AND RETURN.
The statement CALL TRANSACTION allows you to
Shorten the user dialog when calling using CALL TRANSACTION USING .
Determine the type of update (asynchronous, local, or synchronous) for the transaction called. For this purpose, use the addition CALL TRANSACTION USING UPDATE 'update_mode', where update_mode can have the values a (asynchronous), L (local), or S (synchronous).
Combining the two options enables you to call several transactions in sequence (logical chain), to reduce their screen sequence, and to postpone processing of the SAP LUW 2 until processing of the SAP LUW 1 has been completed.
When you call a function module asynchronously using the CALL FUNCTION STARTING NEW TASK ' ' statement, it runs in its own SAP LUW.
Programs that are executed with a SUBMIT AND RETURN or CALL
TRANSACTION statement starts their own LUW processing. You can use these to perform nested (complex) LUW processing.
You can use function modules as modularization units within an SAP LUW.
Function modules that are called asynchronously are suitable for programs that allow parallel processing of some of their components.
All techniques are suitable for including programs with purely display functions.
Note that a function module called with CALL FUNCTION STARTING NEW TASK is executed as a new logon. It, therefore, sees a separate SAP memory area. You can use the interface of the function module for data transfers.
Example: In your program, you want to call a display transaction that is displayed in a separate window (amodal). To do so, you encapsulate the transaction call in a function module, which you set as to Remote-enabled module. You use the function module interface to accept values that you write to the SAP memory. You then call up the transaction in the function module using CALL TRANSACTION AND SKIP FIRST SCREEN. You call the function module itself asynchronously.
Type ‘E' locks for nested program calls may be requested more than once from the same object. This behavior can be described as follows:
Lock entries from function modules called synchronously increment the cumulative counter, And are therefore successful.
Lock entries from programs called with CALL TRANSACTION or SUBMIT
AND
RETURN is refused. The object to be locked by the called program is displayed as already Locked by another user.
Programs that you call using SUBMIT or LEAVE TO TRANSACTION cannot come into conflict with lock entries from the calling program, since the old program ends when the call is made. When a program ends, the system deletes all of the lock entries that it had set.
Lock requests belonging to the same user from different R/3 windows or logons are treated as lock requests from other users.
Regards,
Rajesh.
Please reward points if found helpful. -
How to do OOPs in ABAP.
requesting you all,
Every reply will be awarded, if answered for atleast a question in useful manner.
1) Apart from Normal abap progrmming where we use abap-oops? say some applicatons please as detail as possible.
2) How to difine and implement classes?
a. if i want to dispaly get records from a database table and display.
b. if want to do calculations on the retrived data.
3) I am not sure about this, some where i have seen implementing objects as internal table which stores couple of records. How to do this?.
4) give some sample codes with little bit descriptions please.
Regards
PraveenCheck the following example,
You can check these simple ABAP OBJECTs programs.
ABAP_OBJECTS_ENJOY_0 Template for Solutions of ABAP Object Enjoy Course
ABAP_OBJECTS_ENJOY_1 Model Solution 1: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_2 Model Solution 2: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_3 Model Solution 3: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_4 Model Solution 4: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_5 Model Solution 5: ABAP Objects Enjoy Course
DEMO_ABAP_OBJECTS Complete Demonstration for ABAP Objects
DEMO_ABAP_OBJECTS_CONTROLS GUI Controls on Screen
DEMO_ABAP_OBJECTS_EVENTS Demonstration of Events in ABAP Objects
DEMO_ABAP_OBJECTS_GENERAL ABAP Objects Demonstration
DEMO_ABAP_OBJECTS_INTERFACES Demonstration of Interfaces in ABAP Objects
DEMO_ABAP_OBJECTS_METHODS Demonstration of Methods in ABAP Objects
DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
regards -
Hi Experts, questions about abap unit test(abap oo)?
Hi Experts,
I am learning abap unit test, could you please tell me some info about how I can test the performance of some specific code in my program? can abap unit test do this kind of job? and could you please tell me what I can do using abap unit test? and some classic examples are appreciated, thanks in advance!
Kind regards
DawsonHi
Below documents will give you more information,
http://help.sap.com/saphelp_nw04/helpdata/en/a2/8a1b602e858645b8aac1559b638ea4/content.htm
ABAP Testing and Troubleshooting [original link is broken]
http://bi.offis.de/publicProject/g16cglafhqva.htm
regards
Nagaraju -
Why and how to use events in abap objects
Dear all,
Please explain me why and how to use events in abap objects with real time example
regards
pankaj giriHi Pankaj,
I will try to explain why to use events... How to use is a different topic.. which others have already answered...
This is same from your prev. post...
Events :
Technically speaking :
" Events are notifications an object receives from, or transmits to, other objects or applications. Events allow objects to perform actions whenever a specific occurrence takes place. Microsoft Windows is an event-driven operating system, events can come from other objects, applications, or user input such as mouse clicks or key presses. "
Lets say you have an ALV - An editable one ...
Lats say - Once you press some button you want some kind of validation to be done.
How to do this ?
Raise an Event - Which is handled by a method and write the validation code.
Now you might argue, that I can do it in this way : Capture the function code - and call the validate method.
Yes, in this case it can be done.. But lets say .. you change a field in the ALV and you want the validation to be done as soon as he is done with typing.
Where is the function code here ? No function code... But there is an event here - The data changed event.
So you can raise a data changed event that can be handled and will do the validation.
It is not user friendly that you ask the user to press a button (to get the function code) for validation each time he enters a data.
The events can be raised by a system, or by a program also. So in this case the data changed event is raised by a system that you can handle.
Also, Lets say on a particular action you want some code to trigger. (You can take the same example of validation code). In this case the code to trigger is in a separate class. The object of which is not available here at this moment. (This case happens very frequently).
Advantage with events : Event handlers can be in a separate class also.
e.g : In the middle of some business logic .. you encounter a error. You want to send this information to the UI (to user - in form of a pop up) and then continue with some processing.
In many cases - A direct method call to trigger the pop up is not done. Because (in ideal cases) the engine must not interact with UI directly - Because the UI could be some other application - like a windows UI but the error comes from some SAP program.
So - A event is raised from the engine that is handled in the UI and a pop up is triggered.
Here -- I would have different classes (lets say for different Operating Systems). And all these classes must register to the event ERROR raised in application.
And these different classes for different Operation systems will have different code to raise a pop-up.
Now you can imagine : If you coded a pop-up for Windows (in your application logic) .. it will not work for Mac or Linux. But of you raise a event.. that is handled separately by a different UI classes for Win, Linux or Mac they will catch this event and process accordingly.
May be I complicated this explanation .... but I couldn't think of a simpler and concrete example.
Cheers.
Varun. -
How to create popup in ABAP webdynpro.
Hi,
I found lot of examples to create a popup/ model window for java webdynpro.
Could anyone give a pointer to an example which explains how to create popup in ABAP webdynpro??
Kind Regards
ShahulHi Thomas:
It worked fine the 1st time. Second time when the user clicks on the button to open up the popup it dumps.
Here is the code in the action for popup:
data: l_cmp_api type ref to if_wd_Component,
l_window_manager type ref to if_wd_window_manager,
l_api type ref to if_wd_View_controller,
l_text type string_table.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
if wd_this->m_popup is initial.
wd_this->m_popup = l_window_manager->create_window(
window_name = 'DOCQSOW'
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_none ).
component_usage_name = 'DOCQUERY_USAGE_1'
l_api = wd_this->wd_get_api( ).
wd_this->m_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
button_text = 'Transfer'
action_name = 'POPUP_CLOSED'
action_view = l_api ) .
wd_this->m_popup->SET_REMOVE_ON_CLOSE( abap_true ).
endif.
wd_this->m_popup->open( ).
Second time when the popup tries to open, I get the following error:
Method: RENDER_WINDOW of program CL_WDR_WINDOW_RENDERER========CP
Method: RENDER_WINDOW of program CL_WDR_CLIENT_SSR=============CP
Method: RENDER_POPUP_WINDOWS of program CL_WDR_CLIENT_SSR=============CP
Method: RENDER_WINDOWS of program CL_WDR_CLIENT_SSR=============CP
Method: IF_WDR_RESPONSE_RENDERER~RENDER_VIEWS of program CL_WDR_CLIENT_SSR=============CP
Method: IF_WDR_RESPONSE_RENDERER~RENDER_USER_INTERFACE_UPDATES of program CL_WDR_CLIENT_SSR=============CP
Method: IF_WDR_CLIENT~SEND_RESPONSE of program CL_WDR_CLIENT_ABSTRACT_HTTP===CP
Method: IF_WDR_CLIENT~SEND_RESPONSE of program CL_WDR_CLIENT_SSR=============CP
Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
Is there a way to destroy the instance of the m_popup?
Any help is appreciated!
Thanks -
Missing Index there Unknown indexes in ABAP Dictionary in DB02
Dear All,
I am getting error in T-code DB02 >Missing Index there Unknown indexes in ABAP Dictionary.
Please find the following details.
Unknown indexes in ABAP Dictionary
DB indexes 11
MARA_MEINS
MARA_ZER
MCHA_VFDAT
VBRP_ARKTX
VBRP_CHARG
VBRP_FKIMG
VBRP_KZWI1
VBRP_MATKL
VBRP_MATNR
VBRP_SPART
VBRP_WERKS
Please suggest how to correct them and can caution we have to take before creating the
Index.
The process creating the index form se11 table and there index>database utility and than create .The same process can be use .
Regards,Hi,
Please use the below procdure:
- Goto transaction SE11
- Enter table name and press view
- Click button "Indexes..."
Please alse check with the below links for more information.
Index:
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb20446011d189700000e8322d00/content.htm
Creating Secondary Index
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb47446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/1c/252640632cec01e10000000a155106/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/c7/55833c4f3e092de10000000a114027/frameset.htm
Check with this also......[click here|Steps for creating a database index;.
With Regards,
Krishna. -
Work schedule: Approval field for a position - How to get it in ABAP?
Hi all,
could you please help me to find out how to get in a ABAP report the value of field Approval
(RHCSHORA-CPROZT) that is shown in the Work Schedule tab in OM (PPOSE tx), starting
from a position id? E.g. 100,00 (% of Standard value)
Thanks in advance, bye.
AngeloHi,
Are you asking about staffing Percentage?
Check Table HRP1001 with relation ship A008 .
get Weighting Percentage.
Regards,
Manoj.
Maybe you are looking for
-
How do i permanently delete the pictures in iphoto on my ipad ?
i am not able to permanently delete the picturres on y ipad, i sync my computers itunes that had all the pictures in the library already, so it will take up all my memory, i have 9000 photos, and when i sync it i c'ant delete neither from the comp, n
-
When I try to open a PDF form from a site, my screen goes black.
When I try to open a fillable PDF form from any web site my screen goes black and nothing further happens. I can use IE with success, but would prefer Firefox.
-
Ghosting problem when animating an image
I have written an animated GUI for a program a wrote a little while ago, just to make it a little bit more fancy, however I am having a few setbacks with the animation. I have a JFrame, which is divided into 3 main JPanels each having a custom animat
-
I recently created a photo stream. 2 of the 4 invitees were successful. After repeated attempts, the other 2 fail each time I invite them to join. I believe the problem is caused by the different version of IOS. The 2 that failed have opted not to up
-
im so irritated that i cant change my security questions as easily as my dang password like uggggg how do you change it i need help