Creating a new method in an enhanced component class implemetation
Hello Experts,
I am trying to create a new method in the enhanced component(BT115IT_SLSO) implementation class ( ZL_BT115IT__ITEMS_IMPL)to run our custom functionality. But somehow when I put a breakpoint and debug while I add a product to the sales order the method doesnt get trigerred.
Is there some thing which I have to do get this trigerred ? I just added a ned method and placed some custom code in it. Do I have to invoke it anywhere ?
Pls help me out. I am new to Web UI.
Thanks
Hi Mavrick,
As you are performing some action like item addition , there you need a method called as " event handler " to handle the event and perform the required actions.
Place a break point in DO_HANDLE_EVENT method , and you will know the exact event handler method which is getting triggered . or if you are defining a new event ( by adding any new button) you should create a event handler method using wizard giving the same name which is defined on_click field of the button as it is case sensitive.
Regards,
Nithish
Similar Messages
-
Create a new view in a enhance component
Hi All,
I want to create a new view for sales order and quatation in a component BP_factsheet.When i craete new view ,it is asking about some value like model node, bol entity, higher level, bol realtion.after that is is asking context node ,bsp application ,custome controller and view type.How can i get these value .when i create a new view then have to add these view in run time repositry under a window or not?
Thanks in advance....
VishwasHello Vishwas,
You might be interested in knowing how to customise the new UI to add a new view using the enhancement concept.
Please refer to the published document on the service marketplace:
http://help.sap.com/saphelp_crm60/helpdata/en/1a/023d63b8387c4a8dfea6592f3a23a7/frameset.htm
refers to the link at
service.sap.com/okp
Inside this go to:
SAP CRM 2006s: Learning Map for Technology Consultants
wherein you can find the cookbook to perform similar operation in detail.
SAP CRM UI Cookbook
I hope this helps. -
Creating a new DC in existing software component
Hi,
I am trying to create new DC in a software component that is custom developed.
You can consider this as a totally build product and I want to extend the features implementing new DC.
I am able to import the development components, and when I try to create a new DC in the configuraition pool, I am anot able to select the vendor from the Vendor dropdown.
Can some one explain how to do this?
Is it possible to keep the software component as is, but copy the same to a custom namespace (with new vendor name newvendor.com) and create a dc in it. This way i can change the sc as is and make changes on new SC.
Please suggest.
Thanks and regards,
ChinnuHi Satya,
Thankyou for quick response.
I did not create any namespace prefixes in SLD.
Can you give me some clarity about name spaces? I am not very clear about the same.
About the SC i am trying to modify, it is not SAP deliverd SC, instead created under custom vendor name and I am able to import the DCs and hopefully check in the same.
Also, after seeing your reply, I checked for any available namespaces in SLD, and all I can see is sap.com/home etc., which are owned by SAP.
Do I have to create a new namespace with the vendor name to create new DCs?
Also, I get this error message when trying to create a new DC:
Syntax of 'sap.com/home/NewDC' is not valid: Name suffix must be spelled lower case: home/NewDC
Please suggest.
Thanks and regards,
Chinnu
Edited by: Chinnu on Aug 14, 2009 10:06 AM -
Can i create a new method in existing calss
Hi Everybody,
Actually i need to modify some standered layoutset, for that they have used method RULER_WRITE in class CL_DOPR_WRITER. Now i need to modify this method.Can create any ZRULER_WRITE under same class, if yes how can i create new method.
Plese any one can help me on this issue.
Thanks & Regards
Venkatrami Reddy BHello Venkat
In this case you can use a workaround:
(1) Create your own class and define an public read-only instance attribute of TYPE REF TO cl_dopr_writer (e.g. mo_writer)
(2) Copy all methods from CL_DOPR WRITER to your own class (to get the signature) and replace the standard coding with your own coding.
Within your application you create an instance of your own class (e.g. go_mywriter).
When the standard method coding is sufficient simply call the corresponding method of CL_DOPR_WRITER, e.g.
DATA: go_mywriter TYPE REF TO zcl_dopr_writer.
CREATE OBJECT go_mywriter.
CALL METHOD go_mywriter->mo_writer->'method_name'.
If you need a "redefined" method call it from your class, e.g.:
CALL METHOD go_mywriter->set_my_layout.
Regards,
Uwe -
Creating a static method returning Logger Object inside class
Hello,
Instead of creating Logger Instance in every class , can i do like this way by creating a static method in some class returning a Logger object , and using that method for getting instance of Logger in another class through that method
Regards
Mayur MitkariOn a related note, if you want to make it simpler, never do this:
if (a == true)Instead, just do if (a)It's pointless and cluttersome to use == or != with true or false.
// wrong
if (a == true)
if (a != false)
// right
if (a)
// wrong
if (a == false)
if (a != true)
// right
if (!a)Also, note that
if (x) {
return true;
else {
return false;
}can be simplified to return x;If you do that and change your variable to something a bit more meaningful, like trueCount or numTrue or something, your code would be
int trueCount = 0;
if (a) trueCount++;
if (b) trueCount++;
if (c) trueCount++;
return trueCount >= 2;which is about as simple and clear as it can get, IMHO. Using less code doesn't necessarily make the code simpler or clearer. The idea is that someone reading the code can easily understand what it does.
And note that the above can be easily generalized to "Are there at least M true values in this array/list of N booleans?" and still be concise and clear. -
Why addcomponent and removecomponent method are not in component class,
Hi,
why addcomponent and removecomponent method are not in component oand component class,
Thank youjava.awt.Container has the appropriate add and remove methods:
http://java.sun.com/javase/6/docs/api/java/awt/Container.html
If that seems odd to you, you need to think about the Composite Pattern:
http://en.wikipedia.org/wiki/Composite_pattern
[url #" style="display: block; background-image: url('http://upload.wikimedia.org/wikipedia/en/1/13/Compositepattern.png'); width: 406px; height: 271px] -
How do I create a new method?
My application has the following code in one class:
private void updateSexField() {
String chosen = textChoice.getSelectedItem(); String theSex = theData.lookupSex(chosen);
sexField.setText(theSex);
private void updateAgeField() {
String chosen = textChoice.getSelectedItem();
String theAge = theData.lookupAge(chosen);
ageField.setText(theAge);
and this code in the other class:
public String lookupSex(String text) {
for (int i = 0; i <= top; i++)
if (text.equals(person.getSurname()))
return person[i].getSex();
return ("error");
public String lookupAge(String text) {
for (int i = 0; i <= top; i++)
if (text.equals(person[i].getSurname()))
return person[i].getAge();
return ("error");
The idea is that the correct sex and age, corresponding to a particular person (with a particular 'Surname') are returned back (or 'got'). Thes items are then placed in a text field in my program. There is actually several things being 'got' (only two are listed here but the code is identical). The big question is - How can I adjust the program so that a single method (or two) can perform each of these functions without having to write out the code over and over for each thing I want 'got', if you know what I mean.
Any advice, based on this limited description, would be much appreciated.
Cheers,
DJPestoclass Person {
private final Hashtable attributes = new Hashtable();
Person(String age, String sex) {
attributes.put(PersonAttributes.AGE, age);
attributes.put(PersonAttributes.SEX, sex);
public Object getAttribute(PersonAttributes key) {
return attributes.get(key);
class PersonAttributes {
// this class implements a typesafe enum pattern
// that can be used as keys in a Hashtable
private final String attribute;
private PersonAttributes(String atribute) {
this.attribute = attribute;
public String toString( ) {
return attribute.name;
public boolean eqauls( ) {
return attribute.equals();
public int hashCode( ) {
return attribute.hashCode();
public static final PersonAttributes AGE =
new PersonAttributes("AGEATTRIB");
public static final PersonAttributes SEX =
new PersonAttributes("SEXATTRIB");
} -
Apple should create a new method to verify ourselves.
I think its 'bad' how we must answer security questions to varify ourselves. I'm sure most of us took granted of answering the security questions, without knowing how important it is later on. So I suggest we get another method to varify ourselves:
» Picture identification. Apple will provide us several pictures for us to identify. Pictures should be less than 100KB, so it does not a lot of storage in Apple's database
» More suitable questions for younger account owners (Seriously people under 16 are asked: When did you meet your wife? etc.)
» Send the answers to our email when we first answered it. That way we can use it as refrence when we forgot it.
» Atleast provide clues when we're trying to answer.
» People without credit card do not need to add verification (Unless we want to, add it as an option)
» Verification without cutomer service, I don't see why we have to contact customer service when we forgot the answers, when we can verify ourself here and now using a bot or something
» Varification Option (an option whether apple should prompt us to varify ourselves or not)
I know a lot of you will disagree with some of my opinions, but leave your suggestion below.apple.com/feedback
We are just users with no control, and Apple does not use suggestions posted in this forum. -
Set prefix to enhanced component classes
Hello folks,
in our project we need to enhance several components in CRM Web-UI.
Currently the system set a Z per default as prefix to the enhanced controller, context and context-node classes.
We want to set our own prefix. for example /abcd/.....
I know that a Badi exists to set the own prefix but I can't find it at all. Does anybody know the Badi?
regards
J.
Edited by: Juergen Klein on Jul 21, 2011 10:26 AMHello Juergen,
it's BSP_WD_APPL_WB BadI. And there is a method GET_CUST_CLASSNAME_PROPOSAL. Also there is a default implementation class CL_DEF_IM_BSP_WD_APPL_WB for your reference with 'Z' proposal. -
Hi,
I am creating a new method METHOD2 in an existing class.
I am using an internal table which is populated in other method METHOD1.
But when I tried to call the METHOD2 in main program,it is saying that METHOD2 is not defined.while I have activated the method.
it is to be noted that I have not given any exporting,importing,changing parameter to this method.Do I need to give it compulsarily>if yes,then can I give the internal table as changing parameter,the one which is being populated in METHOD1.?
Thanks in advance!!Hi ,
Here is a sample code that accesses an internal table in a method to display the list of employees
Super class LCL_CompanyEmployees
CLASS lcl_company_employees DEFINITION.
PUBLIC SECTION.
TYPES:
BEGIN OF t_employee,
no TYPE i,
name TYPE string,
wage TYPE i,
END OF t_employee.
METHODS:
constructor,
add_employee
IMPORTING im_no TYPE i
im_name TYPE string
im_wage TYPE i,
display_employee_list,
display_no_of_employees.
PRIVATE SECTION.
CLASS-DATA: i_employee_list TYPE TABLE OF t_employee,
no_of_employees TYPE i.
ENDCLASS.
*-- CLASS LCL_CompanyEmployees IMPLEMENTATION
CLASS lcl_company_employees IMPLEMENTATION.
METHOD constructor.
no_of_employees = no_of_employees + 1.
ENDMETHOD.
METHOD add_employee.
Adds a new employee to the list of employees
DATA: l_employee TYPE t_employee.
l_employee-no = im_no.
l_employee-name = im_name.
l_employee-wage = im_wage.
APPEND l_employee TO i_employee_list.
ENDMETHOD.
METHOD display_employee_list.
Displays all employees and there wage
DATA: l_employee TYPE t_employee.
WRITE: / 'List of Employees'.
LOOP AT i_employee_list INTO l_employee.
WRITE: / l_employee-no, l_employee-name, l_employee-wage.
ENDLOOP.
ENDMETHOD.
METHOD display_no_of_employees.
Displays total number of employees
SKIP 3.
WRITE: / 'Total number of employees:', no_of_employees.
ENDMETHOD.
ENDCLASS.
Sub class LCL_BlueCollar_Employee
CLASS lcl_bluecollar_employee DEFINITION
INHERITING FROM lcl_company_employees.
PUBLIC SECTION.
METHODS:
constructor
IMPORTING im_no TYPE i
im_name TYPE string
im_hours TYPE i
im_hourly_payment TYPE i,
add_employee REDEFINITION.
PRIVATE SECTION.
DATA:no TYPE i,
name TYPE string,
hours TYPE i,
hourly_payment TYPE i.
ENDCLASS.
*---- CLASS LCL_BlueCollar_Employee IMPLEMENTATION
CLASS lcl_bluecollar_employee IMPLEMENTATION.
METHOD constructor.
The superclass constructor method must be called from the subclass
constructor method
CALL METHOD super->constructor.
no = im_no.
name = im_name.
hours = im_hours.
hourly_payment = im_hourly_payment.
ENDMETHOD.
METHOD add_employee.
Calculate wage an call the superclass method add_employee to add
the employee to the employee list
DATA: l_wage TYPE i.
l_wage = hours * hourly_payment.
CALL METHOD super->add_employee
EXPORTING im_no = no
im_name = name
im_wage = l_wage.
ENDMETHOD.
ENDCLASS.
Sub class LCL_WhiteCollar_Employee
CLASS lcl_whitecollar_employee DEFINITION
INHERITING FROM lcl_company_employees.
PUBLIC SECTION.
METHODS:
constructor
IMPORTING im_no TYPE i
im_name TYPE string
im_monthly_salary TYPE i
im_monthly_deducations TYPE i,
add_employee REDEFINITION.
PRIVATE SECTION.
DATA:
no TYPE i,
name TYPE string,
monthly_salary TYPE i,
monthly_deducations TYPE i.
ENDCLASS.
*---- CLASS LCL_WhiteCollar_Employee IMPLEMENTATION
CLASS lcl_whitecollar_employee IMPLEMENTATION.
METHOD constructor.
The superclass constructor method must be called from the subclass
constructor method
CALL METHOD super->constructor.
no = im_no.
name = im_name.
monthly_salary = im_monthly_salary.
monthly_deducations = im_monthly_deducations.
ENDMETHOD.
METHOD add_employee.
Calculate wage an call the superclass method add_employee to add
the employee to the employee list
DATA: l_wage TYPE i.
l_wage = monthly_salary - monthly_deducations.
CALL METHOD super->add_employee
EXPORTING im_no = no
im_name = name
im_wage = l_wage.
ENDMETHOD.
ENDCLASS.
R E P O R T
DATA:
Object references
o_bluecollar_employee1 TYPE REF TO lcl_bluecollar_employee,
o_whitecollar_employee1 TYPE REF TO lcl_whitecollar_employee.
START-OF-SELECTION.
Create bluecollar employee obeject
CREATE OBJECT o_bluecollar_employee1
EXPORTING im_no = 1
im_name = 'Gylle Karen'
im_hours = 38
im_hourly_payment = 75.
Add bluecollar employee to employee list
CALL METHOD o_bluecollar_employee1->add_employee
EXPORTING im_no = 1
im_name = 'Gylle Karen'
im_wage = 0.
Create whitecollar employee obeject
CREATE OBJECT o_whitecollar_employee1
EXPORTING im_no = 2
im_name = 'John Dickens'
im_monthly_salary = 10000
im_monthly_deducations = 2500.
Add bluecollar employee to employee list
CALL METHOD o_whitecollar_employee1->add_employee
EXPORTING im_no = 1
im_name = 'Karen Johnson'
im_wage = 0.
Display employee list and number of employees. Note that the result
will be the same when called from o_whitecollar_employee1 or
o_bluecolarcollar_employee1, because the methods are defined
as static (CLASS-METHODS)
CALL METHOD o_whitecollar_employee1->display_employee_list.
CALL METHOD o_whitecollar_employee1->display_no_of_employees. -
Creating a new view in a component
HI,
I am trying to create a new view in a BSP component using the wizard. But the context nodes are not getting created. Its throwing up an error - "View not copied with wizard; processing not possible".
What could be the problem ? Pls help.
Regards,
Aravind.Hi Arvind,
Before posting error, please search for it.
Here is what i found here in 2007 forum itself.
I guess you have not enhanced your component and your view.
Without enhancing the component it is not possible to add a new context node.
Here is a very helpful, follow it and the the other link within this thread,
both are very useful in this regard.
Web Client Context Node Enhancement
Thanks & Regards
Shiven -
Create a new button in a sap-standard-view WD4A
In webdynpro for ABAP
I have changed the text on an existing button in a sap-standard-view using configuration (change application configuration/go to component configurator/implicit configuration and then on the view-component change the text) it works perfect.....
my next step is to create a new button beside the old one with a new text on it, I created a new button by using "enhance view" (I copied the existing button) the new button appears (so far so good) but when I go into the configuration to change the text on the new button (using configuration the same way I did when I changed the text on the existing button) I cant find my new button in the view-component list....why can't I find it there so I can change the text?
Can anyone help me this one?I don't believe that the Configuration tool picks up Enhancement Objects because of the way they are linked to the original component at Runtime. Why set the text using configuration? You can control the text within the enhancement object. Do you want different texts based upon multiple configurations?
-
How to create in the Interface controller of a component
Hi Gurus............
Could any one tel How to create a method in the interface controller of component
and use that componet into other comoponent as Used Contoller .
I Found following Tutorial but it was not cleared Description.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2e71ce83-0b01-0010-11a4-98c28a33195f
Thanks in Advance.Hi all,
My actual requirement is as follows..
I have implemented some functionality in One component .
Here I want to create a new method in the interface controller, so that I should be able to access this method in another component by declaring this component as used component in another one.
My problem is, I am unable to create new method in interface controller of my component,
It is appearing i n 'disabled' mode.
Can any one please suggest me the appropriate solution?
Thanks in advance
SivaKumar -
Problem while creating a new track
Hi,
When we create a new track, we get the following exception:
Unexpected error; inform your system administrator: com.sap.cms.util.exception.CMSUnexpectedException: com.tssap.dtr.client.lib.cms.DTR.connect(Ljava/lang/String;Lcom/tssap/dtr/client/lib/protocol/ISessionContext;)V
We have created a new product and a software component and defined the dependencies for the software component (SAP_BUILDT, SAP_JTECHS & SAP-JEE). In the CMS, we have done Update CMS. We are able to see the software component and have added the same in the 'Software Components for Development'. All the usage dependencies are clearly visible.
When we save the track, we get the above exception. Can any one of you please respond this query?
Thanks in advance.
Regards,
RaviHi Ravi,
We enocounted a similar problem once. For our situation it was a missing DTR url in the lanscape configurator. To check/fix this do the following:
1) login to CMS
2) click on the Landscape Configurator link
3) if not already selected, choose the track in the list of tracks on the left
4) click on the Track Data tab for the selected track
5) verify that the Design Time Repository URL is specified and correct (e.g. http://<server>:<port>/dtr
Save the configuration.
Hope this helps. -
Creating Properties and Methods for an exe built in LabVIEW
Hi all,
How do we create properties and methods for an executable built in LabVIEW.
I know when building an exe, the "Enable ActiveX server" option in advanced has to be enabled.
But after that how do we create Properties and methods for the activeX component.
Your help is greatly appreciated.
Regards,
Muthuraman S
Regards,
MuthuramanYou cannot build your own COM specific properties and methods for the ActiveX interface in LabVIEW, the only thing exposed are the normal VI server properties and methods.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!
Maybe you are looking for
-
Hi, i am newely to use FTP adapter,i got an error when deploying the proces
So,pls help me immediately any one knows this problem, A problem occured while connecting to server "ajdsu-mt55.oracle.com" using port "11545": org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. /tmp/
-
Hi All, When ever capital 'w' (i.e W, plain,Dialog and size 11) is first character in a text field left upper portion is not visible.But if I change any of these properties( i.e plain,Dialog, size 12) there is no problem. Can any body suggest me how
-
Same old question on the European iPod's volume?
Hello everyone! I'm the proud owner of a lovely Black Sixth Generation Classic, 160 GBs, purchased in May/June 2012. I don't have any hardware problems with it, but something that incredibly frustrates me is the volume limit. It was purchased in Ital
-
Using Project Builder, I have made an appleScript application that selects photos with a browser then tells Photoshop to make a series of changes to them using actions. I would like to have an NSImageView as part of the interface window but it seems
-
i have a 1st generation ipad and wish to move my photos to a new ipod can it be done using icloud or is there another way??