Create interface method in standard component.
Hi Experts,i want to enhance standard component.in that i created one attribute and i used in my component.For that attribute the value is passing from some other component.i try to create interface method in standard component.but it is not possible.so please help me out this issue.
Regards
prasad
Hi,
No, You cannot create Interface Methods/Nodes in Standard Component by Enhancing. I would suggest to create a Singleton class and create your method in that class and can access across components.
Regards,
Kiran
Similar Messages
-
Best Practice : Creating Custom Renderer for Standard Component
I've been reading the docs and a few threads about Custom Renderers. The best practice seems to be to create a Custom Component where you need a Custom Renderer. Is this the case?
See [this post|http://forums.sun.com/thread.jspa?forumID=427&threadID=520422]
I've created several Custom Renderers to override the HTML provided by the Standard Components, however I can't see the benefit in also creating a Custom Component when the behaviour of the standard component is just fine.
Thanks,
Damian.It all depends on what you are trying to accomplish. Generally speaking if all you need is for the user interface output to be changed then a renderer will work just fine. A new component is usually made in order to provide some fundamental change in server side functionality not related to the user interface. - Ponderator
-
Created A view in standard Component.
Hi All,
I have created few view and view set In a standard component As per my requirement . This view and view set is created successfully .
But when I want to add the view or view set In Runtime Resportiory it is not visible.
For E.g. I want to add the view in Overview page but the view is not showing.
Some where We have to append.
Any pointer can help me.
Thanks in Advance
Thanks & Regards
Rasmi Ranjan PradhanHi Rasmi,
Are you searching the view in the enhanced component itself?. Usually people do a mistake that they give the standard component name and the view won't be visible. While giving the component name, give with Z.
Thanks,
Faisal -
Populate data into standard component alv from Zcomponent popup data selected
HI All
I have to call Zcomponent in standard component and need to pass value into Zcomponent (table) and from Zcomponent select row and pass back to standard component.
Steps
1) Created Zcomponent with interface node
2) Enhanced the standard component and create used components for Zcomponent and make it available at component controllers and view controllers.
When I click on Button in standard component I am calling this Zcomponent as popup window.
My problem I when I select data in Zcomponent I need to populate the data in ALV of standard component.
I thought of 2 methods to take my selected back and populate data into standard component ALV.
1) Create event: EVENT1 and Interface method Method1 and link to EVENT1
So that I can raise this event in Zcomponent and populate the data into standard component ALV
Problem: Under events interface checkbox is visible, when I select my enhancement implementation the interface checkbox not visible under events tab?.
2) Create Interface method Method1 write logic to populate data into standard component ALV
But here to when I select my enhancement implementation the interface checkbox not visible under?
Can anyone please help me why interface checkbox is not visible or any better solution to populate the data back to standard component alv?
Thanks
GopalHi Gopal,
You can achieve your requirement by using EVENTS as below
Create an event SET_DATA in component controller of zcomponent and mark it as interface and also include the parameters like context_element( type ref to if_wd_context_element), etc as below
Now, create an action for the event onLeadSelect of your zcomp Table and write the below code
DATA lo_ctx_element TYPE REF TO if_wd_context_element.
"get the selected row
lo_ctx_element = wdevent->get_context_element( name =
'NEW_ROW_ELEMENT' ).
"Raise the event with parameter
wd_comp_controller->fire_set_data_evt( context_element = lo_ctx_element ).
Use the Zcomponent in your standard component and make available in std. view's properties
Create an event handler SET_DATA method for your Zcomp's event as below
Now, inside this method, you get the parameter CONTEXT_ELEMENT and get the data from this context element as below
context_element->get_attrribute( ) or
context_element->get_static_attributes( )
You can populate the data into standard component based on the obtained value from Zcomponent.
Hope this helps you.
Regards,
Rama -
View not copied or enhanced with wizard Error while creating Event Handler method in Z Component
Hello Friends,
In one Z Component (Custom Component), in one of the views, while creating event handler, it gave me error message that view not copied or enhanced with wizard.
I am aware that in Standard Component, if we want to create the event handler method then we need to first Enhance the Component and then we need to enhance the view.
But, in the Z Component (Custom Component), how to create event handler method in one of the views as while creating event handler method i am getting view not copied or enhanced with wizard error.Hi,
Add a method in views impl class with naming convention eh_on__* with htmt and html_ex parameters. I dont have have the system right now. Please check any existing event import export parameters.
Check out do handle event method in the same class.
Redefine that method. Call that event method in this handle method. See existing code for reference.
Attach that event to the button on click event in .htm page.
Regards,
Bhushan -
How to create a method in Interface Controller
Hi Guys,
I am working with webdynpro ABAP sample application "Component usage" . There i got a issue like i am not able to create a method in Interface controller. There i am not able to edit anything. Can anybody please let me know how to do that.
Thanks In Advance
Regards
RavikumarHi Ravi,
Check This
If one Web Dynpro component (parent component) needs access to another Web
Dynpro component (child component) the parent component can declare the use
of the child component. A specific component usage instance is then created and
the parent component accesses the functionality of the child component via its
component interface controller.
The only parts of a Web Dynpro component that are visible to the user, are the
interface controller and the interface view(s).
All Web Dynpro components have only one interface controller. Via the
interface controller, data, methods, and event handlers can be exposed to
other components.
Interface views represent the visual interface of a Web Dynpro component.
There is a one-to-one relationship between a Window and an interface view.
Each time a window is defined, a related interface view is automatically
generated, which makes the window accessible from outside the component.
The interface view only exposes those inbound and outbound plugs to the
component user that have the interface property checked. Methods and
context data of the window are not accessible via the related interface view.
If the component has no views, there is no need to have Windows. In this
case, the component will not implement an interface view. Such components
having no visual interface are known as faceless components.
Regards
Sarath -
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 -
How to create a method with an interface parameter?
Hi there.
I would create a method with an interface parameter. I mean this:
public interface MyInt {
public void method(int i);
public class SubClass implements MyInt {
public void method(int i) {
System.out.println("The number is: " + i);
public class MainClass {
public MainClass(MyInt inter) {
inter.method(10);
public static void main(String[] args) {
(*) new MainClass(new SubClass());
}I tried to compile this but do not work (incompatible types on (*)) . Is it possible to do something like that or not?I compiled and runned this code on my machine and it works fine.
How did you did to compile and run this code ?
Did you put each code on its own file or all codes in the same file ?
I did like this:
I put each code in its own file and put all in the same dir, after I did:
javac -classpath . MainClass.java
After that, I did:
java -classpath . MainClass
I hope this help you
Lucas -
How to refer standard component to create customize component?
Dear experts,
Can any one guide me how to refer a standard component to understand the flow of the event of with in the views and there are various methods are present to change properties of a field property. How can we refer the standard code for changing our field property?
with regards
crmfresher.Hi,
The CRM 2007 Webclient cookbook is available if you have a marketplace ID.
Refer to this thread.
[CRM 2007 WebClient Cookcook available!;
Regards,
Arun Prakash -
To fetch data from a standard component through Component Controller
Hi,
I have a requirement in which i have to access and display a standard view of a standard component in a Custom Component.
I am able to display or configure that view on Custom Component by using Component Usage and Component Interface. But unable to populate the data in that view. Although i have exposed a context node in the standard component and created the same context node in my custom component in the Component Controller and using its method WD_USAGE_INITIALIZE to bind them.Please, provide some pointers on it.
Cheers,
SharadHi Sharad,
The data will show up only if you put them there. May be the standard component itself gets the data from some where else. Usually, these data are provided by the component controller. For example, the component controller contains the header entity and the used component has access to the header entity via binding and shows all item entries fetched via relations(usually this is done in on_new_focus method). If the binding is there, but no data ia available, it will stay empty.
Check a standard main component which uses the standard component that you are using and look at how they are establishing the connections.( component/custom controller bindings, on_new_focus methods,,)
Regards,
Arun Prakash -
Interface method in enhancement mode
Hello Experts,
I need to enhance a standard web dynpro component. I have created a new method in the component controller using enhancement implementation. This method has to be called from another component. Therefore I need to make this as an interface method. But in enhancement mode I do not see an option to make this method as an interface mathod. Kindly let me know if this is poosible.
Thanks,
PoojaHi Pooja,
Please check this threads.. Hope you understand.
Add an interface Method/Event via enhancement??
How to make Interface node in an Enhancement Implementation
Cheers,
Kris. -
Error while enhancing standard component CRMCMP_CND
Hi,
We have one requirement that Phase Id and Offer Id needs to added in the /SAPCND/GCM transaction and the same needs to be disaplay in the web ui. So we added two fields in field catalog after that we made two implementation in /SAPCND/ROLLNAME and CRM_COND_COM_BADI.
Now the funtionality is working fine in the GUI and in WEBUI the field is added but the F4 value is not visible in the new web ui screen.
So I tried to enhance the standard component CRMCMP_CND, in order to retreive the F4 value help. While selecting the context node in the standard view CondRecEditView we are getting the status message u201CError during analysis of method REATE_CONDRECORD of class L_CRMCMP_C_CONDRECEDITV0_CTXT. Message no. BSP_WD_TOOLS031u201D
In standard view itself I am getting this error and while enhancing the component the context node is not converted in to Zclass.
If we try to add attribute from the context node its giving error create_condrecord does not exist error.
So I am unable to proceed further. If any one aware how to solve this issue kindly let me know.Hi,
While enhancing a view of a component only the controller (xx_IMPL) and the context class (xx_CTXT) are extended into Z classes. Context nodes (xx_CNXX) are not automatically extended. You have to do it manually only for the context node(s) you would like to modify. Indeed there is a message that appears when you select the context node but this is not the reason why the CN class is not extended.
What you have to do is to redefine the method CREATE_CONDRECORD in class ZL_CRMCMP_C_CONDRECEDITV0_CTXT and create a new class ZL_CRMCMP_C_CONDRECEDITV0_CN00 that extends CL_CRMCMP_C_CONDRECEDITV0_CN00
In ZL_CRMCMP_C_CONDRECEDITV0_CN00 implement method GET_V_xx for the field you want a search help on
Regards,
Fabian -
Entity created by method create_related_entity losing attribute referenz
Hi all,
I created a new Z-relation between the IS-U connection object an an own object (inherited from CL_CRM_GENIL_ABSTR_SO_HANDLER2) to handle customer specific data. It works fine except for one point. Existing data are handled well, I can modify and delete them. But if I add a new dataset with the method create_related_entity (in a event handler EH_ONNEW) to the connection object, there is a problem.
The created entity seems to be ok, the attribute reference is filled and in the collection wrapper of the connection object, I could find the new entity as related. But in the getter-methods of the context node in view the attribute reference of the entity is initial (not bound). It is the same instance of entity class, but I don't know why and where the attribute reference is lost. In consequence, I'm able to create and save an initial entity (that I could modify in another session smoothly), but I'm unable to modify its values in the session in which it was created.
Can anyone help me?
Regards,
MartinHi Lisha,
All you need to do it make sure that the parent entity is locked before creating the child entities through create_related_entity method.
You can take a look at EH_ONCREATE method in BT111H_OPPT/ContactsOV view of component BT111H_OPPT.
(Alternatively just do a where-used list of the create_related_entity method and you will find many instances of the method in standard code in your system. Typically, it would be called in the event handlers for INSERT/CREATE or in the on_new_focus methods).
* Lock the parent entity
IF lr_entity->is_locked( ) = abap_false.
IF lr_entity->lock( ) = abap_false.
RETURN.
ENDIF.
ENDIF.
* If lock is successful
IF lr_entity->is_changeable( ) = abap_true.
TRY.
* Create the related entity
lr_entity = lr_entity->create_related_entity( iv_relation_name = 'BTPartnerBuyingCenter' ).
CATCH cx_crm_genil_model_error cx_crm_genil_duplicate_rel.
ENDTRY.
ENDIF.
Regards
Nisha -
Create interface on Business Object BUS2052
Hi Experts,
I need to create IFACRCH21 Interface into BUS2052 Business Object for use Archivelink.
I need that appear the "Store Business Document" option into create on GOS bottom selector into ME31K transaction.
Can i create this interface for any process?? Or i only can create this interface register the object.
Too much thanks.
Best Regards.
Edited by: Alberto Ruiz on Nov 5, 2008 4:18 PMHi RS,
hope you have delegated your ZBUS2096 to proper supertype,
when you created the method, hope you have released component at the sub-object (that is method) first and then object level,
after which hope you have clicked the generate icon for your BOR.
Hope it helps.
Aditya -
Where to create root BOL in custom component - best practice
Hi Experts,
I have created a BOL class to insert values into a ZTable.
I have created a custom component/views for the BOL. Now how will the create method in the BOL will be called. In which method of the component controller or view controller do I create the BOL root..
I want to use the following code.
CALL METHOD SUPER->WD_CREATE_CONTEXT
DATA:
lref_substitute TYPE REF TO if_bol_bo_property_access,
lv_index TYPE i,
lref_bol_entity TYPE REF TO cl_crm_bol_entity,
lrf_cuco TYPE REF TO cl_gs_mcat_mcat_impl,
lref_bol_core TYPE REF TO cl_crm_bol_core,
lv_object_name TYPE crmt_ext_obj_name VALUE cl_crm_catego_genil=>gc_ob_schema,
lv_create_param TYPE crmt_name_value_pair_tab,
lv_number TYPE int4 VALUE 1,
lref_new_substitute TYPE REF TO if_bol_entity_col,
lr_tx TYPE REF TO if_bol_transaction_context
lref_bol_core = cl_crm_bol_core=>Get_instance( abap_true ).
lv_object_name = 'ZHRUS_D2'.
TRY.
CALL METHOD lref_bol_core->root_create
EXPORTING
iv_object_name = lv_object_name
iv_create_param = lv_create_param
iv_number = lv_number
RECEIVING
rv_result = lref_new_substitute.
CATCH cx_crm_unsupported_object .
ENDTRY.
CHECK lref_new_substitute IS BOUND.
lref_substitute ?= lref_new_substitute->get_first( ).
CHECK lref_substitute IS BOUND.
me->typed_context->zhrus->collection_wrapper->clear( ).
me->typed_context->zhrus->collection_wrapper->add( iv_entity = lref_substitute ).
I give the code in various methods and it all works fine. But what is the best way to create the root node.
Regards,
Abdullah IsmailHi Abdullah,
I use something like this to create a root entity in the BOL Core. In this case, a standard entity: BTOrder.
*- Data dictionary
DATA lr_core TYPE REF TO cl_crm_bol_core.
DATA lr_fac TYPE REF TO cl_crm_bol_entity_factory.
DATA lt_params TYPE crmt_name_value_pair_tab.
DATA lr_ent TYPE REF TO cl_crm_bol_entity.
FIELD-SYMBOLS <line> TYPE crmt_name_value_pair.
*- Get the core instance and factory
lr_core = cl_crm_bol_core=>get_instance( ).
lr_fac = lr_core->get_entity_factory( 'BTOrder' ).
*- get supported parameters for this object
lt_params = lr_fac->get_parameter_table( ).
*- Set the process Type
READ TABLE lt_params ASSIGNING <line> WITH KEY name = 'PROCESS_TYPE'.
<line>-value = '0010'.
*- Create the BOL entity, based on parameters
lr_ent = lr_fac->create( lt_params ).
lr_ent = lr_ent->get_related_entity( 'BTOrderHeader' ).
*- Lock order
CHECK lr_ent->lock( ) = abap_true.
It is an alternative way. Check if it helps you creating your Z-Object in the BOL root
Kind regards,
Garcia
Edited by: Bruno Garcia on May 12, 2011 12:15 PM
Maybe you are looking for
-
Finder window scroll bar behaviour
Hi folks, In a finder window in icon view normally I can scroll down to the end, go up to the enclosing folder and then back into the starting window and the scroll bar will be at the bottom, where I left it, which is perfect. Just recently it will a
-
while performing automatic payment transaction, there's a message in the payment run log "payment method "S" not permitted for the vendor". I have double checked these points : the payment methods in the payment transaction accounting tab of the
-
Exporting tiff and jpg together problems Lightroom 3.1 w/ Adobe Leopard
When both are exported w/ writing a CD: makes corrupt file some do not open and some no thumbnails...on Mac Powerbook and Macbook
-
Kernel panic problem, nothing will fix it
I've had about a dozen issues today with that gray screen telling me I need to restart my computer. I researched it and found out it's a kernel panic. I called Apple Support and I was instructed to verify my hard drive and then fix it via Utilities a
-
I have Photoshop CS3 which I have used successfully for a number of years. I now shoot pics with a Nikon DSLR D7100. When I try to open NEF files the following flag appears: "Could not complete your request because PS does not recognize this file".