Quantcast
Viewing all 4552 articles
Browse latest View live

Working of Outbound plug for Links in UI component

Hi Experts,

 

I have newly started to learn SAP CRM Webclient. In which I have started using the component workbench BSP_WD_CMPWB tcode in CRM.

 

I wanted to understand a specific scenario related to UI component ERP_H. In which their is a view called ERP/HeaderDetails inside which we have a field called Sold to party as link.

 

When I click on the Sold to party link, it triggers an outbound plug NAVIGATE_DISPLAY of the main window and navigates to BP_HEAD component and view BP_HEAD/CorpAccountDetailsOV.

 

I am not able to get the navigation between ERP_H and BP_HEAD component. I checked in Runtime Repository Editor to get the navigation link.But no success.

 

I am not sure as to how the navigation is happening. Can someone help me in this regard.


Disable or Hide the One Click Action Icon from Table View based on data

Hi All,

 

The below is useful to disable  or Hide the One Click Action Icons from Table view Based on data.

 

Go to the View  context node class -> redefine the method GET_OCA_T_TABLE.

 

Add the below code in above method.

 

 

 

DATA: ls_one_click_action TYPE crmt_thtmlb_one_click_action,

         lr_entity           TYPE REF TO cl_crm_bol_entity,

         lr_iterator         TYPE REF TO if_bol_bo_col_iterator,

         lv_winner           TYPE string.

 

CONSTANTS :lc_delete  TYPE char6 VALUE 'DELETE'.

 

   ls_one_click_action-id      = 'DELETE'.                   "#EC NOTEXT

   ls_one_click_action-icon    = 'delete.gif'.     

   ls_one_click_action-text    = ''.

   ls_one_click_action-active  = 'X'.

 

   APPEND ls_one_click_action TO rt_actions.

 

*--Check the winner is checked or not

   lr_iterator = me->collection_wrapper->get_iterator( ).

   CHECK lr_iterator IS BOUND.

 

   lr_entity ?= lr_iterator->get_by_index( iv_index ).

   CHECK lr_entity IS BOUND.

 

   lr_entity->get_property_as_value( EXPORTING iv_attr_name = 'WINNER'  " here Winner is table Attribute field which is having data

                                                   IMPORTING ev_result    = lv_winner ).

   IF lv_winner is NOT INITIAL.

    DELETE rt_actions WHERE id = lc_delete.

   ENDIF.



regards

rama

changing text in class cl_crm_bt_t_searchview_impl

Hi gurus, I am trying to change the text-001 and text-002 in method EH_ONSEARCH at CL_CRM_BT_T_SEARCHVIEW_IMPL.

 

I've amplied the component, but I could do it, because, Do you know any nice way to change these texts ..

 

Thanks in advance.

 

Regards

Handling POPUP in ERP with LORD API

Hi All,

 

We are creating a Quotation in CRM which in turn communcates with ERP with Lord API.

For certain Materials there were some POPUP comming up in ERP beacuse of which it dumps in CRM.

 

Do we have an way where we get the information of the POPUP from ERP to CRM via a message,beacuse there are many popup and which are conditionally we are not sure how to handle it with one solution.

 

Regards,

Thanks,

Rajesh.

Mass assignment of "Employee Responsible" for Activites/Opportunities

Hi,

 

We would like to  to mass change of "Employee Responsible" for Activities (Appointments/Interaction Records) and Opportunities.Would be great if someone can provide the FM/BAPI that we can use for this usecase ?

 

I see BAPI 'BAPI_BUSPROCESSND_CHANGEMULTI' but not sure what table we need to fill to update "Employee Responsible"

 

Thanks & Regards, Anil

Issue regarding Planning layout is not getting rendered and is dumping at : CL_RSDRC_TREX_QUERY_LAYER ~ _GET_PARTPROVS_WITH_TREX_PART in SAP TPM IP

Gurus,

 

I am facing an issue regarding SAP TPM IP ( HANA)

 

I have 3 Infoproviders

 

Planning infocube, Planning DSO1, Planning DSO2 and i created multiprovider and added these 3 infoproviders into it. I have created Aggregation level on multiprovider. Created Bex Input ready query on Aggregation level.

 

Issue is  Planning layout is not getting rendered and is dumping at : CL_RSDRC_TREX_QUERY_LAYER ~ _GET_PARTPROVS_WITH_TREX_PART.


I tried debugging it and found it is trying to read   i_r_pro -> n_ts_part. It is populated with only 3 values (i.e. 2DSOs and 1 Cube), whereas <l_partprov>-partprov is referring to Aggergation level, hence read statement isn't successful, it is dumping.


The class CL_RSD_INFOPROV_CACHE->GET() method is trying to populate the N_TS_PART.N_TS_PART uses P_R_INFOPROV table which seems to be already populated.  So, I debugged all the below methods to find out how the P_R_INFOPROV but couldn't find any clue.


Can any one help,it would be really help.


Thanks

Ashok

SAP CRM Web UI Simple Objects - Creating custom 1...n Bol entities

This document shows how to create custom 1...n entities in sap crm via bol browser, which can be linked to any other crm objects by
keeping the guid of that object in our simple object.There are multiple simple object genil classes provided by sap which provided the basic CRUD operations by default, we don't have to modify these genil classes for create/read/update/delete (CRUD) operations. In this e.g we had a requirement to create ZFORECAST as a table view which will be embebded in Sales opportunity page as a new assignment block.This table will store multiple Forecast data aginast opportunity header guid.


To start with...

 

  1. Created new table :

Image may be NSFW.
Clik here to view.
1.png

 

  2. Create a lock object "EZFORECAST" for our table ZFOREACT. (Lock mode E)

Image may be NSFW.
Clik here to view.
2.png

 

3. Define the customizing entry for simple objects  in :

 

"spro->crm->cross appl. comp->genil->comp. spe. Setting->define SO"

Image may be NSFW.
Clik here to view.
3.png

 

4 . Create a SO entry in the object definition.

Object Name  - 'ZFORECAST'

Implementation
Class  - 'CL_CRM_GENIL_GEN_TABLE_OBJ'

 

 

Att str --  ' ZFORECAST'  "Define attribute
structure of your SO, usually it would be similar to the DB table which will
store data"

Structure of mand.Field at create: ' ZFORECAST' -

 

Key Struc. - GUID (key structure would be "GUID" only as the genil class CL_CRM_GENIL_GEN_TABLE_OBJ

Image may be NSFW.
Clik here to view.
4.png

Create  entry in the search object definition under
simple object...Search Object name -- 'ZFORECAST_SRC'

 

Structure
name - '
ZFORECAST' 

 

Image may be NSFW.
Clik here to view.
4.1.png

4.1 .  Add the SO2 object to our ONEORDER Component
Image may be NSFW.
Clik here to view.
4.2.png
Image may be NSFW.
Clik here to view.
4.3.png

 

Image may be NSFW.
Clik here to view.
4.4.png

 

5. Create a mapping entry for our "Simple object - 'ZFORECAST', table name - 'ZFORECAST'  and lock object - 'EZFORECAST " in the table "CRMC_TBLOBJ_MAP"

Image may be NSFW.
Clik here to view.
5.png

6 . Execute Genil_bol_browser
Image may be NSFW.
Clik here to view.
6.png


Create new root object... select 'ZFORECAST_SRC'-->'ZFORECAST'

Image may be NSFW.
Clik here to view.
6.1.png

Check the new entries in Table 'ZFORECAST':

Image may be NSFW.
Clik here to view.
6.2.png


So up till now we created the SO object for ZFORECAST table which is now
part of BOL in SO2 component and in the below steps now in below steps we will create
Table View In Web UI


7. Let's start with creating new view "ZFOREC" under "BT111H_OPPT" bsp component in BSP Workbench.

 

Image may be NSFW.
Clik here to view.
7.png

 

Specify Context node name "ZFOREC" and Bol entity as the simple object created from the previous "ZFORECAST".Click
next till last step, in the last screen select view type as "Table view", tick the Configurable and Change/Display check boxes

Image may be NSFW.
Clik here to view.
7.1.png

After adding ZFOREC node also add BTADMINH which will be needed further to read the opportunity header Guid

8. Declare these Button attributes in the attribute section of the ZFOREC view's implementation class.
Image may be NSFW.
Clik here to view.
8.png


9. Modify the code of "ZFOREC.htm" BSP page code with the below code.

<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<%@extension name="crm_bsp_ic" prefix="crmic" %>
<%@extension name="bsp" prefix="bsp" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="thtmlb" prefix="thtmlb" %>

<%
data lv_xml type string.

lv_xml =  controller->configuration_descr->get_config_data( ).
%>

<thtmlb:areaFrameSetter toolbarButtons =
"<%= controller->tb_button %>"

                        maxButtonNumber =
"2"

                        displayMode  =
"<%= controller->view_group_context->is_view_in_display_mode( controller ) %>"/>

<chtmlb:tableExtension tableId =
"Table1"

                        layout  =
"FIXED">

<chtmlb:configTable
xml              = "<%= lv_xml %>"

                   
id                    = "Table1"

                    navigationMode        =
"BYPAGE"

                    onRowSelection        =
"select"

                   
table                = "//ZFOREC/Table"

                   
width                = "100%"

                    displayMode          =
"<%= controller->view_group_context->is_view_in_display_mode( controller ) %>"

                    headerVisible        =
"FALSE"

                    hasLeadSelection      =
"TRUE"

                    usage                =
"ASSIGNMENTBLOCK"

                    personalizable        =
"FALSE"

                    actions              =
"<%= controller->gt_button %>"

                    allRowsEditable      =
"TRUE"

                    actionsMaxInRow      =
"3"

                    downloadToExcel      =
"TRUE"

                    selectedRowIndex      =
"<%= ZFOREC->SELECTED_INDEX %>"

                    selectedRowIndexTable =
"<%= ZFOREC->SELECTION_TAB %>"

                    selectionMode        =
"<%= ZFOREC->SELECTION_MODE %>"

                    visibleFirstRow      =
"<%= ZFOREC->VISIBLE_FIRST_ROW_INDEX %>"

                    visibleRowCount      =
"6"

                    />



</chtmlb:tableExtension>


10.Click on Configuration tab of  "ZFOREC" view move required field to be shown on the right side under displayed field.

Image may be NSFW.
Clik here to view.
10.png


11. Define three buttons Create, Delete, Edit List in do_prepare_output method of the implementation class.

Image may be NSFW.
Clik here to view.
11.png

DATA:  ls_button    TYPE crmt_thtmlb_button.

 
DATA : lr_entity    TYPEREFTO cl_crm_bol_entity,

        lv_locked   
TYPE char1,

        lv_enabled 
TYPE crmt_boolean VALUE abap_true,

        lr_coll     
TYPEREFTO if_bol_bo_col,

        lv_coll_size
TYPE sytabix,

        lv_display 
TYPE boolean.


*me->view_group_context->set_view_editable( me ).



  lv_display = me->view_group_context->is_view_in_display_mode( me ).
*lv_display = me->view_group_context->set_view_editable.



 
IF lv_display EQ abap_true.

    typed_context->zforec->set_selection_mode( iv_selection_mode = cl_bsp_wd_context_node_tv=>selmode_none ).

 
ELSE.

    typed_context->zforec->set_selection_mode( iv_selection_mode = cl_bsp_wd_context_node_tv=>selmode_lineedit ).

 
ENDIF.



 
CALLMETHOD super->do_prepare_output.



  lr_coll =  me->typed_context->zforec->collection_wrapper->get_marked( ).

 
IF lr_coll ISBOUND.

    lv_coll_size = lr_coll->size( ).

   
IF lv_coll_size = 0.

      lv_enabled = abap_false.

   
ELSE.

      lv_enabled = abap_true.

   
ENDIF.

 
ENDIF.
************************



 
CLEAR : tb_button, ls_button.

  ls_button-
text    = 'Edit List'.

  ls_button-on_click =
'EDIT'.                              "#EC NOTEXT

  ls_button-enabled  = me->view_group_context->is_view_in_display_mode( me ).

 
APPEND ls_button TO tb_button.



 
CLEAR gt_button.

  ls_button-
text    = 'Insert'.

  ls_button-on_click =
'CREATE'.                            "#EC NOTEXT

  ls_button-enabled  = abap_true.

 
APPEND ls_button TO gt_button.

 
CLEAR ls_button.



  ls_button-
type    = cl_thtmlb_util=>gc_icon_delete.

  ls_button-on_click =
'DELETE'.                            "#EC NOTEXT

  ls_button-enabled  = abap_true.     
"lv_enabled.

 
APPEND ls_button TO gt_button.

 
CLEAR ls_button.


12.Create three event's "CREATE","DELETE","EDIT" in "ZFOREC" view via wizard & add the required logic in each event method as per below.
Image may be NSFW.
Clik here to view.
12.png

 

 

method EH_ONCREATE.

   
DATA :  lr_entity TYPEREFTO cl_crm_bol_entity,

          lv_collection
TYPEREFTO if_bol_bo_col,

          lr_comp
TYPEREFTO cl_bt111h_o_bspwdcomponen_impl.
*          cl_bt111h_o_bspwdcompone0_impl.



 
DATA : lr_core    TYPEREFTO cl_crm_bol_core,

        lr_fac     
TYPEREFTO cl_crm_bol_entity_factory,

        lt_params 
TYPE        crmt_name_value_pair_tab,

        ls_params 
TYPE        crmt_name_value_pair,

        lr_ent     
TYPEREFTO cl_crm_bol_entity,

        lv_objid
TYPE crmd_orderadm_h-object_id,

        lv_quot_id
TYPE crmd_orderadm_h-object_id,

        lv_pred_guid 
TYPE        crmt_object_guid,

        lv_cmp_guid 
TYPE        crmt_object_guid,

        ls_borident 
TYPE borident,

        it_neighbor_objects
TYPETABLEOF relroles,

        is_neighbor_objects
TYPE relroles,

        lt_zforecast
TYPETABLEOF zforecast,

        lv_new_month
TYPE zforecast-z_month,

        lv_cur_zvalue
TYPE zforecast-z_value,

        lv_new_zvalue
TYPE zforecast-z_value,

        lr_coco
TYPEREFTO zl_bt111h_o_bspwdcomponen_impl,

        lr_entity_so 
TYPEREFTO cl_crm_bol_entity,

        lr_entity_cur 
TYPEREFTO cl_crm_bol_entity,

        ls_zforecast
TYPE zforecast.



  lr_comp ?= me->comp_controller.

 
CHECK lr_comp ISBOUND.

  lr_entity ?= lr_comp->typed_context->btadminh->collection_wrapper->get_current( ).
*"Reading the btadminh entity, which is bound to component controller's
*  btadminh context node.

  me->typed_context->zforec->deselect_all( ).
*    me->typed_context->ZFOREC->select_all( ).



 
IF lr_entity->is_changeable( ) = abap_true.

    lr_core = cl_crm_bol_core=>get_instance( ).

    lr_fac = lr_core->get_entity_factory(
'ZFORECAST' ).

    lt_params = lr_fac->get_parameter_table( ).

   
TRY.

        lr_ent = lr_fac->create( lt_params ).

       
IF lr_ent ISBOUND.

         
CHECK lr_ent->lock( ) = abap_true.
*****************

         
CLEAR:lv_cmp_guid,lv_objid,

                lv_pred_guid,lv_quot_id.
* Read the parent entity BTADMINH guid
* " Copy BtAdminh Guid to Forecast table Opportunity Guid

          lr_entity->get_property_as_value(
EXPORTING iv_attr_name = 'GUID'

                                           
IMPORTING ev_result = lv_cmp_guid ).

          lr_ent->set_property( iv_attr_name =
'Z_HD_OPPT_GUID'

                                iv_value = lv_cmp_guid ).


** Objectid/ Doc no is genearted only after save , so may be blank while in create mode.

          lr_entity->get_property_as_value(
EXPORTING iv_attr_name = 'OBJECT_ID'

                                           
IMPORTING ev_result = lv_objid ).

          lr_ent->set_property( iv_attr_name =
'Z_HDR_OPPT_NO'

                                iv_value = lv_objid ).


******************  Default the values for quot  no *******************************
*PREDECESSOR_GUID Quot Guid when create follow up doc is selected

          lr_entity->get_property_as_value(
EXPORTING iv_attr_name = 'PREDECESSOR_GUID'

                                           
IMPORTING ev_result = lv_pred_guid ).

          lr_ent->set_property( iv_attr_name =
'Z_HDR_QUOT_GUID'

                                iv_value = lv_pred_guid ).


** SOMETIMES PREDECESSOR_GUID is empty then get it from transaction history

         
IF lv_pred_guid ISINITIAL.

            ls_borident-objkey  = lv_cmp_guid.

            ls_borident-objtype =
'BUS2000111'.

            ls_borident-logsys  =
''.



           
CALLFUNCTION'Z_DISPLAY_LIST_OF_RELATIONS'

             
EXPORTING

                object              = ls_borident

                max_hops            =
'99'

             
TABLES

                it_neighbor_objects = it_neighbor_objects

             
EXCEPTIONS

                no_logsys          =
1

                internal_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.

             
LOOPAT it_neighbor_objects INTO is_neighbor_objects

               
WHERE roletype = 'VORGAENGER'"Preceding doc

               
AND objtype = 'BUS2000115'"quotes

                lv_pred_guid = is_neighbor_objects-objkey.

             
ENDLOOP.

           
ENDIF.



         
ENDIF.
*Get PREDECESSOR Quot no when create follow up doc is selected

         
IF lv_pred_guid ISNOTINITIAL.

           
SELECTSINGLE object_id INTO lv_quot_id

             
FROM crmd_orderadm_h WHERE guid = lv_pred_guid.
*          lr_entity->get_property_as_value( EXPORTING iv_attr_name = 'PREDECESSOR_GUID'
*                                            IMPORTING ev_result = lv_pred_guid ).

            lr_ent->set_property( iv_attr_name =
'Z_HDR_QUOT_NO'

                                  iv_value = lv_quot_id ).

         
ENDIF.
*****************************************************************************
*Read the last record from collection wrapper

          lr_coco ?= me->comp_controller.

         
IF lr_coco ISBOUND.

           
CLEAR: lv_new_month,lv_new_zvalue.
* Get the Last entity

            lr_entity_so ?= lr_coco->ztyped_context->zforecast->collection_wrapper->get_last( ).



           
IF lr_entity_so ISBOUND.
**Get prev month

              lr_entity_so->get_property_as_value(
EXPORTING iv_attr_name = 'Z_MONTH'

                                               
IMPORTING ev_result = lv_new_month ).
*** Add 1 month for new entry

             
IF lv_new_month+4(2) = '12'"if december that add new yr

                lv_new_month+
0(4) = lv_new_month+0(4) + 1 .

                lv_new_month+
4(2) = '1'.

                lv_new_month = lv_new_month.

             
ELSE.

                lv_new_month = lv_new_month +
1" add 1 month

             
ENDIF.



              lr_ent->set_property( iv_attr_name =
'Z_MONTH'

                                                iv_value =  lv_new_month ).
**********
**** Get the current zvalue
*              lr_entity_cur ?= lr_coco->ztyped_context->zforecast->collection_wrapper->get_current( ).
*              IF lr_entity_cur IS BOUND.
*                lr_entity_cur->get_property_as_value( EXPORTING iv_attr_name = 'Z_VALUE'
*                                                IMPORTING ev_result = lv_cur_zvalue ).
*              ENDIF.
***

              lr_entity_so->get_property_as_value(
EXPORTING iv_attr_name = 'Z_VALUE'

                                               
IMPORTING ev_result = lv_new_zvalue ).
**new value =  curr qty  * ????
*              lr_ent->set_property( iv_attr_name = 'Z_VALUE'
*                                                iv_value =  lv_new_zvalue ).



              lr_entity_so->get_property_as_value(
EXPORTING iv_attr_name = 'Z_CUR_QTY'

                                               
IMPORTING ev_result = ls_zforecast-z_cur_qty ).

              lr_ent->set_property( iv_attr_name =
'Z_PREV_QTY'

                                            iv_value =  ls_zforecast-z_cur_qty ).



              lr_entity_so ?= lr_coco->ztyped_context->zforecast->collection_wrapper->get_next( ).



           
ENDIF.

         
ENDIF.
*****************************





          me->typed_context->zforec->collection_wrapper->add( iv_entity = lr_ent ).

          me->typed_context->zforec->visible_first_row_index = me->typed_context->zforec->collection_wrapper->size( ).

       
ENDIF.

     
CATCH cx_crm_genil_model_error.

       
EXIT.

     
CATCH cx_sy_ref_is_initial.

   
ENDTRY.

 
ENDIF.


endmethod.




 

 

 

 

 

 

 

method EH_ONDELETE.

 
DATA :    lr_entity TYPEREFTO cl_crm_bol_entity,

          lr_current
TYPEREFTO if_bol_bo_property_access,

          lr_col
TYPEREFTO if_bol_bo_col,

          lr_core
TYPEREFTO cl_crm_bol_core,

          lv_size
TYPEi.



  lr_col ?= typed_context->ZFOREC->collection_wrapper->get_marked( ).

  lv_size = lr_col->size( ).

 
IF lv_size > 0.

   
DO lv_size TIMES.

     
IF sy-index = 1.

        lr_current = lr_col->get_first( ).

     
ELSE.

        lr_current = lr_col->get_next( ).

     
ENDIF.

      lr_entity ?= lr_current.

      typed_context->ZFOREC->collection_wrapper->remove( lr_current ).

      lr_entity->delete( ).

   
ENDDO.

    lr_core = cl_crm_bol_core=>get_instance( ).

    lr_core->modify( ).

    typed_context->ZFOREC->deselect_all( ).



 
ENDIF.
endmethod.








method EH_ONEDIT.

   
DATA:    lr_tx          TYPEREFTO if_bol_transaction_context,

          lr_entity     
TYPEREFTO cl_crm_bol_entity,

          lr_comp
typeREFTO CL_BT111H_O_BSPWDCOMPONEN_IMPL.
*          cl_bt111h_o_bspwdcompone0_impl.


*lr_entity ?= me->typed_context->ZFOREC->collection_wrapper->get_first( ).
*lr_entity ?= me->typed_context->ZFOREC->collection_wrapper->get_next( ).


*me->view_group_context->set_view_editable( me ).





  lr_comp ?= me->comp_controller.

 
Check lr_comp isBOUND.

  lr_entity ?= lr_comp->typed_context->btadminh->collection_wrapper->get_current( ).

 
CHECK lr_entity ISBOUND.

 
IF lr_entity->lock( ) = abap_true.

    me->view_group_context->set_view_editable( me ).

 
ENDIF.



  lr_entity ?= me->typed_context->ZFOREC->collection_wrapper->get_first( ).

 
WHILE lr_entity ISBOUND.

    lr_entity->lock( ).

    lr_entity ?= me->typed_context->ZFOREC->collection_wrapper->get_next( ).

 
ENDWHILE.
endmethod.

 

 

Create On_new_focus method in the "ZFOREC" context node, specify it as a event handler for collection wrapper new_focus event.
Image may be NSFW.
Clik here to view.
12.1.png

Image may be NSFW.
Clik here to view.
12.2.png

Create the  event parameter
Image may be NSFW.
Clik here to view.
12.3.png

 

13. Set handler in Connect nodes method of the CTXT class.

Image may be NSFW.
Clik here to view.
13.png

  method CONNECT_NODES.
DATA: coll_wrapper TYPEREFTO cl_bsp_wd_collection_wrapper,         

      comp_controller TYPEREFTO ZL_BT111H_O_BSPWDCOMPONEN_IMPL.

coll_wrapper = me->BTADMINH->get_collection_wrapper( ).

setHANDLER me->ZFOREC->on_new_focus for coll_wrapper ACTIVATION iv_activate.
endmethod.

 

14. As Save event is handled in different view (BT111H_OPPT/OpportunityOVViewSet), ZFOREC data has to be bind to custom/component controller to access it in other views.

Image may be NSFW.
Clik here to view.
14.png


15. Now create new Custom controller "ZFORECAST" with ZFORECAST and BTADMINH node and perform the binding as shown below using the binding wizard.

Image may be NSFW.
Clik here to view.
15.png

Image may be NSFW.
Clik here to view.
15.1.png

 

 

 

So with this binding now ZFORECAST can be called in any page view in this component

16 .Further now also add the ZFOREC node to BT111H_OPPT/OpptDetailsCuCo custom component as per  below, so that ZFOREC can be now displayed in the opportunity details page.

 

 

 

 

Image may be NSFW.
Clik here to view.
16.png

 

17 . Redefine eh_onsave event of the save method in  "BT111H_OPPT/OpportunityOVViewSet" component/view.

Image may be NSFW.
Clik here to view.
17.png

method EH_ONSAVE.
*CALL METHOD SUPER->EH_ONSAVE
**  EXPORTING
**    htmlb_event    =
**    htmlb_event_ex =
*    .
 
DATA: lv_items TYPEREFTO cl_bt111h_o_itemslistov_impl.

 
DATA: lv_success TYPE crmt_boolean.

 
DATA: lv_success_save TYPE crmt_boolean.

 
DATA:lr_ent              TYPEREFTO      cl_crm_bol_entity,

      lr_tx             
TYPEREFTO      if_bol_transaction_context.

 
data: lr_controller TYPEREFTO cl_bsp_wd_appl_controller,

        lr_msg_srv
TYPEREFTO cl_bsp_wd_message_service.

 
data:lr_tx_ctxt TYPEREFTO if_bol_transaction_context, "lr_tx

      lr_coll_wr
TYPEREFTO cl_bsp_wd_collection_wrapper,

      my_tx_context 
TYPEREFTO cl_crm_bol_custom_tx_ctxt, " Z cntx

      lr_entity_so 
TYPEREFTO cl_crm_bol_entity,

      rv_success   
TYPE        abap_bool,

      lr_tx_manager
TYPEREFTO if_crm_uiu_bt_channel_aspects,"cl_crm_uiu_bt_channel_asp_fac,
*    lr_tx_manager TYPE REF TO cl_mktprj_transaction_mgr.

      lr_coco
TYPEREFTO ZL_BT111H_O_BSPWDCOMPONEN_IMPL.
* cancel save because of mandatory fiels

  lr_controller ?= comp_controller->m_parent.

  lr_msg_srv ?= me->view_manager->get_message_service( ).

 
IF cl_crm_uiu_bt_tools=>mandatory_flds_no_save_allowed( ir_controller = lr_controller

                                                          ir_msg_srv    = lr_msg_srv ) = abap_true.

   
EXIT.

 
ENDIF.

 
IF cl_crm_uiu_bt_partner_popup=>get_quick_create_status( ) = abap_true OR gc_abc EQ abap_true.
*Save business partner-accounts and related objects (contacts, conditions,..)

    lv_success = cl_crm_uiu_bp_tools=>save( ).

    cl_crm_uiu_bt_partner_popup=>set_quick_create_status(
EXPORTING iv_quick_create = abap_false ).

    gc_abc = abap_false.

 
ELSE.

    lv_success = abap_true.

 
ENDIF.



 
CALLMETHOD cl_crm_uiu_bt_tools=>save( EXPORTING ir_node = me->typed_context->btorder ).

 
CLEAR:lr_tx_ctxt,my_tx_context.



 
CREATE OBJECT my_tx_context.
  lr_coco ?= me->comp_controller.

 
IF lr_coco ISBOUND.
* Get the First entity

    lr_entity_so ?= lr_coco->ztyped_context->ZFORECAST->collection_wrapper->get_first( ).
* Loop on the collection

   
WHILE lr_entity_so ISBOUND.

      lr_tx_ctxt = lr_entity_so->get_transaction( ).

      my_tx_context->add_tx_context( lr_tx_ctxt ).

      my_tx_context->if_bol_transaction_context~save( ).

      my_tx_context->if_bol_transaction_context~
commit( ).
*      * Get the next entity

      lr_entity_so ?= lr_coco->ztyped_context->ZFORECAST->collection_wrapper->get_next( ).

   
ENDWHILE.
 
ENDIF.
  rv_success = cl_crm_uiu_bp_tools=>save( ).


 
IF rv_success = abap_true AND me->view_group_context ISNOTINITIAL.
*    eh_oncancel( ).

 
ENDIF.
****************


* remove and add entity in order to refresh all context nodes (selections, etc.)
* and lock registration is done

  lr_ent ?= me->typed_context->btorder->collection_wrapper->get_current( ).

  me->typed_context->btorder->collection_wrapper->clear( ).

 
IF lr_ent ISBOUND.

    me->typed_context->btorder->collection_wrapper->add( iv_entity    = lr_ent

                                                        iv_set_focus = abap_true ).

 
ENDIF.


*  ** get current

  lr_entity_so ?= lr_coco->ztyped_context->ZFORECAST->collection_wrapper->get_current( ).

  me->ztyped_context->ZFOREC->collection_wrapper->clear( ).
endmethod.

 

Add the following code in on_new_focus method,here logic is to retrieve the order entities collection related to Order only if parent entity opportinity changes

Image may be NSFW.
Clik here to view.
18.png

 

18.Add the ZFOREC view to runtime repository..

 

Image may be NSFW.
Clik here to view.
18.png


19. Expose "ZFOREC" view on BT111H_OPPT/OpportunityOVViewSet Configuration
page, maintain view title and save...
Image may be NSFW.
Clik here to view.
19.png

20. That's it ...this is how it appears within WebUi page of opportunity with Create/Edit/Delete functionality.



 

Issue on deleting error message in WebUI

Hi Experts,

    

I have deleted one standard error message in DO_PREPARE_OUTPUT  with some condition in header level but I am having below issues.

 

Issue one :

Now error is not showing in webui  at header overview screen but  allocated space for that error message is showing in output screen with white space.

 

Please help me how to remove that space.

 

Issue two:

When I open Item overview screen, again that message is showing in Item overview screen.

    

I am using the below code to delete the message and its successfully deleting the message but when I switch to other screen its again showing.
Please help me how to delete it completely on one go.

 

Code:

   

zcl_crm_ic_tools=>delete_message( iv_number = '419' iv_id = 'CRM_PRODUCT_I' ).

 

 

Method: delete_message

 

ls_message-number = iv_number.

ls_message-id     = iv_id.

ls_message-type   = iv_type.

APPEND ls_message TO zcl_static_reference=>gt_delete_msg.

 

endmethod.

 

 

Appreciate your help.

 

 

Kind Regards,

Shaik


Hide Message "Required entry field not filled. Click here to continue anyway"

Using a BOL Programming on an API level?

Hi Experts,

 

For the time being I was pretty sure that SAP CRM developers shouldn't combine layers when developing some enhancement.

However recently I had a problem to convince my colleagues and myself as well - why not?

I understand all the architecture and layers logic, but what is exactly wrong when someone uses BOL programming when creating own programs or when enhancing system via BADI. BOL programming in SAP CRM is much simplier, efficient and convenient. Using BOL programming to update some data instead of CRM_ORDER_MAINTAIN (I hate it Image may be NSFW.
Clik here to view.
) is luring, so what the arguments are against using it, in example in a BAdI like ORDER_SAVE?

 

I am looking forward your opinions Image may be NSFW.
Clik here to view.

 

Kind regards

Lukasz

What is the Function module for creating Individual Object

Dear Experts,

         Is there any Function Module for creating Individual Object.It is very Urgent.Please help me.

Thanks & Regards,

Ashok.

Outbound plug not visible in F4 help in component usasge in another component

Hi Experts,

 

In component BT125H_TASk , I have created a outbound plug . I am using this component in my customen component in component usage.

I want to use my outbound plug but when I am press F4 help to select , my outbound plug is not visible so I am not able to add this in navigation link.

 

Please suggest me how to make my outbound plug visble so that I can use this.

 

Thanks & Regards,

Akhilesh Bhagat.

Trigger Javascript

Hello Experts,

 

I have some fields on the view corresponding to a value node. One of the fields is Phone number. When the user enters the phone number and moves to next field, I want to trigger a JavaScript function that formats the phone number.

 

I tired like this:

 

<script for="//CONTEXTNODE/ATTRIBUTE" event=onblur type="text/javascript" >

function()

{

-- code;

}

</script>

But, it's not getting triggered. Can someone please help me with this?

 

Thank you.

 

-Ezhno.

Radhakrishna

hai gurus I am not getting group links as per customization..

 

Image may be NSFW.
Clik here to view.

 

 

                                                                                                                                 In Above web ui screen I Customized own Navigation bar profile, Logical links, Groplinks, I got proper out put after assing to particular Business role but not got a Group links. I got standard group links such as Create, search instead of my own group links.


I am expecting effective answer from Gurus

Remove "New" icon in CRM Web Client Search Results

Hi

 

In CRM Web Client UI, I have setup various searches (see below image for example).

 

Image may be NSFW.
Clik here to view.
New button.JPG

In the Results List, you will see a "New" icon...which will allow users to create a new transaction type.

 

I want to hide or deactive this button.  I only want ZMHF and ZMMJ to be created from a ZMCR and not directly (hence the reason for hiding this).

 

How do I hide this?

 

Thanks!!!!!!!!!!!!!!

 

Shaun


Generic Stop set

Hi,

We are trying to Replicate Transaction data SAP SD to SAP CRM.Our integration went till yesterday.Today we faced problem Outbound Queue in SAP not getting processed ultimately the Sales document not transpoted in CRM.When trying to process the queue it says that Generic stop set.Can anyone give more information on this?

 

Regards,

Muki

 

 

Message was edited by: muki

 

SAP CRM: When create and save opportunity stays editable

Hi experts,

 

I createda copy of thestandardopportunityto createa personalizedopportunityto be calledfrom aroleZ.This new opportunityis called from acopy of standard roleIC_AGENT (ZIC_AGENT).

 

When we createthe opportunity and save the opportunityremainseditable and not locked. If we execute the creation of the opportunity from a Z role copy of sales standard role works fine.

 

We have seen that when the eventSAVE (EH_ONSAVE) runs and execute the method save inside the class cl_crm_uiu_bt_tools at line 49 execute the following code:

 

** document is not a service confirmation
    lr_access = cl_crm_uiu_bt_channel_asp_fac=>get_instance( ).
    lv_edit_after_save = lr_access->if_crm_uiu_channel_aspects~keep_edit_mode_after_save( ).

 

 

This code causes the opportunity is not locked and remaining editable. What means the message "document is not a service confirmation"?

 

 

Can anybody help us?

 

 

Thanks and kind regards,

David

Access via 'NULL' object reference not possible.

Hi Experts,

 

I created one value node and added one attribute in component ICCMP_BP_CP , but when tested from webui side I got below exception :

 

Note

 

  • The following error occurred in system DC4 : Access via 'NULL' object reference not possible.
  • The error occurred on application server cidc405_DC4_05 and in work process 2 .
  • The termination type was: RABAX_STATE
  • The ABAP call stack was:
    Method: SET_MODELS of program ZL_CRMCMP_B_BUPACONTACTPE_IMPLCP
    Method: SET_MODELS of program ZL_CRMCMP_B_BUPACONTACTPE_IMPLCP
    Method: DO_REQUEST of program CL_BSP_WD_VIEW_CONTROLLER=====CP
    Method: DO_REQUEST of program CL_BSP_CTRL_ADAPTER===========CP
    Method: CALL_CONTROLLER of program CL_BSP_PAGE_BASE==============CP
    Method: IF_BSP_ELEMENT~DO_AT_END of program CL_BSP_CALL_ELEMENT===========CP
    Method: _ONLAYOUT of program CL_O241IRDSNT0FX6OG9H63VLVRLE8CP
    Method: %_ONLAYOUT of program CL_O241IRDSNT0FX6OG9H63VLVRLE8CP
    Method: DO_REQUEST of program CL_BSP_PAGE===================CP
    Method: CALL_VIEW of program CL_BSP_PAGE_BASE==============CP

 

 

PLease help why it is comming .

 

Thanks & Regards,

Akhilesh Bhagat.

Copying the CRM Web UI configurations from one CRM release to another

Hi All,

 

This is a question valid only for development within SAP Labs. I just hope that someone might give some idea on how to solve my issue.

 

Issue :

I have created about 50+ CRM web UI view configurations( object type DLCS ) for different views in CRM 714 release. Now I need to copy these configurations into CRM release 713. The standard copying tools like SCWB, UDO do not support copying of the DLCS objects. I am left with the option of manually recreating these 50 configurations in 713 release again.

 

When we do a transport of the request that contains DLCS objects from a dev system to a test system, the configurations are automatically copied into the test system. Which means there is a way in which the configurations are moved from one system to another without any manual activity. So there must be a way that allows me to copy the configurations from the 714 release to 713 release system without manual recreation of configurations. Note - there is no transport path from the 714 release to 713 release.

 

If you have any ideas about how this can be achieved do let me know.

 

Thanks,

Karthik

Problem with Personalizaton in WebUI.

Hello All,

 

I am having a problem while making changes to the number of "rows before paging" in the some of the BOL Tree Views of CRM IC WebUI.

 

Here are the details :

 

In our CRM interaction center the BOL Trees have been used in multiple workcenters including the Factsheet Workcenter.

 

We are able to change the "number of rows before paging" by clicking on the Personalize Icon on any of the BOL Trees of "Non-Factsheet" workcenters. But for 3 BOL Tree views configured inside the Factsheet  workcenter, the number of rows before paging were fixed to 11, and changing the number of rows in Personalization doesn't have any effect.

 

Now, I looked in the view IUBOTREE/IsuBolTree which is the BOL Tree view  . Here we have multiple configurations created, and one Configuaration created specifically for "Factsheet" and the number of rows before paging were fixed as 11. So, it seems the problem was this. So, in config of the View, I changed the number of rows to 15 in 110 Client (which is for Development) and did SCC1 of the corresponding TR to 150 client (which is for Testing).

 

But it didn't solve the problem. So I removed the number of rows and made it blank in Config of IUBOTREE/IsuBolTree view and did SCC1 again. But now the number of rows have become fixed to 15!! And changing this number of rows in Personaliztion still won't have any effect.

 

The SCC1 of the TR from 110 to 150 client has been successful both times, but I am not sure why the changes are not reflecting in Web UI. And also, the personalisation just won't work.

 

For Non-Facsheet workcenter BOL Trees, some other config might be loading and the number of rows before paging has been set to blank for all of the other configs. So, I am not having any such problem  in these Non-Factsheet Workcenters.

 

Could you please help me figure out what could be the problem?

 

Please let me know if any other info is needed or something is not clear.

 

Thanks,
Ravi

Viewing all 4552 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>