Get_property_as_string
Hi All,
I am trying to debug an issue with attaching Followup(activity) to a case in ICWC.I am having problem with attaching activities from activity clipboard to a case.On debugging I found that the method ,
get_property_as_string( iv_attr_name = 'SPS_ID' ) , class cl_crm_bol_entity
is used to obtain the value of the SPS_ID from
ME->CONTAINER_PROXY->DATA_REF->ATTRIBUTE_REF->*
but there is no value for some of the attributes like GUID,SPS_ID etc in the attribute_ref structure . I am not sure why these value are not populated or how they are populated.I need to know how the values are populated for the attribute structure or anything I might be overlooking.Any help would be greatly appeciated as I am on strict deadline.
Thanks in advance.
Murthy
Hi Nisha,
I tried the code that you've given but didn't work. But I found the reason why it isn't working. LCSTATUS is part of the related entities of context node BTADMINH so I tried the below code and it's working now.
DATA: coll TYPE REF TO if_bol_entity_col.
DATA: entity TYPE REF TO cl_crm_bol_entity,
current TYPE REF TO if_bol_bo_property_access,
lv_adminh TYPE REF TO cl_crm_bol_entity.
Get ADMINIH instance
lv_adminh ?= me->typed_context->btadminh->collection_wrapper->get_current( ).
CHECK lv_adminh IS BOUND.
lv_name = lv_adminh->get_property_as_string( iv_attr_name = 'PROCESS_TYPE' ).
CHECK lv_name IS NOT INITIAL.
TRY.
coll = lv_adminh->get_related_entities( iv_relation_name = 'BTHeaderStatusSet' ).
current = coll->get_current( ).
IF current IS BOUND.
entity ?= current.
coll = entity->get_related_entities( iv_relation_name = 'BTStatusHCurrent' ).
current = coll->get_current( ).
IF current IS BOUND.
TRY.
lv_status = current->get_property_as_string( 'ACT_STATUS' ). "#EC NOTEXT
CATCH cx_crm_cic_parameter_error.
ENDTRY.
ENDIF.
ENDIF.
ENDTRY.
Regards,
Bhanu
Similar Messages
-
Issue in creating a dropdown for Industry sector field
Hello Gurus,
Am trying to create a dropdown for Indusry field. 3 dropdown should come up for Industry sector field namely primary,secondary and tertiary.Corresponding to the value selected in primary,data should come up in Secondary and corresponding to value selected in secondary ,data should up in tertiary.Am only able to fetch the value at first instance but corresponding values are not coming up secondary and tertiary.I have followed the procedure that had to be followed in order to make a field as dropdown.Can anyone Please help.
In get_v , i have added this code.
DATA: lt_ddlb TYPE bsp_wd_dropdown_table,
wa_ddlb LIKE LINE OF lt_ddlb.
DATA:
lr_entity1 TYPE REF TO if_bol_bo_property_access,
lv_index TYPE sytabix,
lr_collection TYPE REF TO cl_bsp_wd_collection_wrapper,
lv_high_ind_sector TYPE string,
lv_istype TYPE string.
CLEAR: wa_ddlb, lt_ddlb
lr_collection = me->GET_COLLECTION_WRAPPER( ).
lv_index = lr_collection->get_current_index( ).
IF lv_index = 1.
lr_entity1 ?= lr_collection->find( iv_index = lv_index ).
lv_high_ind_sector = lr_entity1->get_property_as_string( iv_attr_name = 'INDUSTRYSECTOR' ).
lv_istype = lr_entity1->get_property_as_string( iv_attr_name = 'INDUSTRYSECTORKEYSYSTEM ' ).
CLEAR: lv_high_ind_sector.
ELSE.
lv_index = lv_index - 1.
lr_entity1 ?= lr_collection->find( iv_index = lv_index ).
lv_high_ind_sector = lr_entity1->get_property_as_string( iv_attr_name = 'INDUSTRYSECTOR' ).
lv_istype = lr_entity1->get_property_as_string( iv_attr_name = 'INDUSTRYSECTORKEYSYSTEM ' ).
ENDIF.
SELECT aspras aind_sector atext INTO CORRESPONDING FIELDS OF TABLE GT_IND_SECTOR FROM tb038b AS a INNER JOIN tb038a AS b ON bistype = a~istype
AND bind_sector = aind_sector
AND b~istype = lv_istype*
AND b~father_sec = lv_high_ind_sector.
Loop at GT_IND_SECTOR into wa_ind_sector.
wa_ddlb-key = wa_ind_sector-ind_sector.
wa_ddlb-value = wa_ind_sector-text.
Append wa_ddlb to lt_ddlb.
endloop.
IF lt_ddlb IS NOT INITIAL.
INSERT INITIAL LINE INTO lt_ddlb INDEX 1.
ENDIF.
IF GR_DDLB_INDUSTRY_SEC IS NOT BOUND.
CREATE OBJECT GR_DDLB_INDUSTRY_SEC
EXPORTING
iv_source_type = 'T'.
IF sy-subrc = 0.
GR_DDLB_INDUSTRY_SEC->set_selection_table( it_selection_table = lt_ddlb ).
ENDIF.
ENDIF.
rv_valuehelp_descriptor = GR_DDLB_INDUSTRY_SEC.Hello,
Not sure I understood your requirement 100%, but kindly check the following thread where a question on How-to make dropdown list values dependent has already been answered:
How to link the first Drop down values witht the second Drop down Values
Regards,
Nicolas Busson.
PS: also it would be good to know your CRM version... because I thought this thread was posted in the WebClient forum, but it's not. -
Can any one help on this error in CRM ui 7.0
Dear Experts,
here i have problem with component : bp_head_serach - view: mainsearchresult.
my intention is add one field to customer. IDNUMBER from but0id.
i have done the configuration part and already added the IDnumber in UI screen using cinfig.
and (ZL_BP_HEAD__MAINSEARCHRES_IMPL)append the structure also. please help me guys.
structed from past 5days.
data: lv_bpid type BU_ID_NUMBER.
data: lv_bp_str type string.
data: lv_bp type BU_PARTNER.
if value is initial.
lv_bp_str = current->get_property_as_string( 'BP_NUMBER' ).
if lv_bp is not initial.
lv_bp = lv_bp_str.
select single IDNUMBER from but0id into lv_bpid
where partner = lv_bp.
if sy-subrc = 0.
value = lv_bpid.
endif.
endif.
endif.
this is the code am using in get_zzbp_id.Hi,
If your select query fails then its because of the missing conversion exit, since you are reading bp number as a string.
Use get_property_As_value instead of reading as string.
Try this,
data: lv_bpid type BU_ID_NUMBER.
data: lv_bp type BU_PARTNER.
if value is initial.
current->get_property_as_value( exporting iv_attr_name = 'BP_NUMBER'
importing ev_result = lv_bp ).
if lv_bp is not initial.
select single IDNUMBER from but0id into lv_bpid
where partner = lv_bp.
if sy-subrc is initial.
value = lv_bpid.
endif.
endif.
endif.
Regards,
Arun -
New field data not passed from BupaSearch to BupaCreate
Hi,
We have 2 new fields on BupaSearch. When we hit the create button to create a new BP, any data entered in the 2 new fields is not then passed through to the BupaCreate view. I've debugged in method 'CREATE_ACCOUNT' in BupaSearch, where it sets up parameters but the fields are not available to use at this point for some reason. So, for example, the following will fail:
lv_nickname = lv_query->get_property_as_string( 'NICKNAME' ).
Can anyone point me in the right direction ?
thanks,
Malcolm.Hi,
I need your help. Im trying to create a new field "identification type" in a view. This field is existing as a attribute of "BuilIdNumber" object. Im able to add this as context node. But when i include this field in view, and launch webclient, this field is disabled, Can you help me on this. I have used the wizard for creating a context node.
Can you plz tell all the steps in detail that are to be carried to add new field to a view.
Thanks in advance,
chandan -
Fact Sheet - Passing parameter to BI report
Hello,
I've created my own BI report which I want to use in the account fact sheet. I have managed to open the report in the fact sheet by creating a customer configuration of the BP_FACTSHEET/BIREPORTProxy view in component designer. In the view I have maintained attributes for the biproxy:
REPID (BI Report ID): Z_TEST_JOHAN_ZCUSTOMER_CARD_1101
BISYSTEM (RFC Destination of BI System): GYBCLNT100
ADDPARAMETER (Addtional Parameter for a BI Report URL): &FILTER_IOBJNM_1=0CUSTOMER&FILTER_VALUE_1=715
My question is how ADDPARAMETER works. I want to filter the data based on the customer number for which the account fact sheet is viewed. In my example, I've just tried to hard code that only data for customer 715 is displayed. This is not working, so all data is displayed.
How should the parameters in ADDPARAMETER be entered? How do I dynamically pass the correct customer number?
Kind regards,
Johan WigertHere is an example code for this badi implementation:
METHOD if_ex_bsp_dlc_fs~get_bi_rep_parameter.
DATA: lr_bol_entity TYPE REF TO cl_crm_bol_entity,
lr_value_node TYPE REF TO cl_bsp_wd_value_node,
lr_collection TYPE REF TO if_bol_bo_col,
lv_repid TYPE string.
**this is only a example
TRY.
lr_bol_entity ?= iv_data_collection->get_first( ).
lr_value_node ?= iv_data_collection->get_next( ).
IF lr_value_node IS BOUND AND lr_bol_entity IS BOUND.
lv_repid = lr_value_node->get_property_as_string( 'REPID' ).
IF lv_repid = 'SAMPLE7'.
REPLACE '&1' IN cv_addparameter WITH '0CRM_SOLDTO'.
REPLACE '&2' IN cv_addparameter WITH '156'.
ENDIF.
ENDIF.
CATCH cx_sy_move_cast_error.
ENDTRY.
ENDMETHOD. -
Z-Button - How to call a Action Profile to Open a PDF-Doc. within an Event?
Hi Experts,
we have created a Z-Button that afterwards creates an event. In the coding for the event an Action Profile should be called and a PDF-Document should be opened. We have copied the coding from the standard button 'Print Preview' which is calling the standard event: EH_ONPRINT_PREVIEW.
We have also defined a Z Action Profile which is a copie of SERVICE_CONFIRMATION. Our problem is we don't know how why our Z-Action Prodile is not called? What is the class lr_actioncontext (TYPE REF TO cl_crm_bol_entity)?
DATA: lr_cn TYPE REF TO cl_bsp_wd_context_node,
lr_adminh TYPE REF TO cl_crm_bol_entity,
lr_actioncontext TYPE REF TO cl_crm_bol_entity,
lv_adminh_guid TYPE string,
lv_url TYPE string,
lc_head_context TYPE REF TO cl_doc_context_crm_order,
lt_item_context TYPE ppftctxpos,
iv_header_guid TYPE crmt_object_guid,
lif_decision_pop TYPE REF TO if_bsp_wd_popup,
lv_string TYPE string.
CHECK gv_print_preview_enabled = abap_true.
lr_cn = me->get_context_node( gc_cn_btadminh ).
CHECK lr_cn IS BOUND.
lr_adminh ?= lr_cn->collection_wrapper->get_current( ).
CHECK lr_adminh IS BOUND.
lv_adminh_guid = lr_adminh->get_property_as_string( iv_attr_name = 'GUID' ).
lr_actioncontext = lr_adminh->get_related_entity( iv_relation_name = 'BTHeaderAction' ). "#EC NOTEXT
CLEAR gt_print_actions.
CLEAR gr_action_popup.
iv_header_guid = lv_adminh_guid.
CALL METHOD cl_crm_uiu_actions_tools=>get_action_definition
RECEIVING
rv_action_def = lv_string.
CALL METHOD cl_crm_uiu_actions_tools=>show_print_actions_popup
EXPORTING
ir_action_context = lr_actioncontext
ir_parent_node = lr_adminh
ir_view_controller = me
ir_component_controller = comp_controller
iv_event_name = gc_ev_print_preview_closed
iv_for_preview = abap_true
iv_appl_guid = lv_adminh_guid
IMPORTING
et_actions = gt_print_actions
ev_url = lv_url
CHANGING
cr_decision_popup = gr_action_popup.
IF lv_url IS NOT INITIAL.
call_print_preview_popup( lv_url ).
ENDIF.
Best RegardsClosed. No answers.
-
Reading Attributes from different context nodes in the same view
Hi,
I have added a new field as part of an enhancement for Trade Promotions. This field is a checkbox and part of the context node TRADE in the view TPMOE/HeaderEOF. This field will be checked or unchecked using a logic in the background.
The logic will be based on an attribute (Fund Plan ID) which is part of another context node FUNDPLAN in the same view.
How can I read the attribute of FUNDPLAN context node in TRADE context node?
A sample code will be quite helpful as I am new to CRM 2007.
Thanks,
Abhishek
Edited by: Abhishek Periwal on Oct 16, 2008 2:35 PMHi Abhishek,
If I understand your question correctly, you would like to access the Fund plan ID (in a different context node) in the getter setter methods of the check box attribute which you have added.
The code snippet mentioend by sudeep works perfectly fine when you are making any checks in the view implementation class. But since you are in the getter setter methods of the context class, this doesnot work as "me" always refers to the class instance in which you are present.
Now in this case what you need to do is :
1) create an attribute <view_controller> in your context class. Here the context is TRADE. The type of this attribute wud be same as the view controller class CL_TPMOE_HEADEREOF0_IMPL
2) Go to the view controller class and redefine the method
DO_VIEW_INIT_ON_ACTIVATION. This method is called only once when the view is loaded for the first time.
3) In this method, put the following code
me->typed_context->(Trade)->[view_controller] = me.
by the above code, you are setting the newly created attribute to the view controller instance.
4) The next step would be, go back to your getter setter methods or what ever it may be, try referring to the Fund plan ID by the code snippet mentioned below
data: lr_entity type ref to cl_crm_bol_entity.
lr_entity ?= me->[view_controller]->typed_context->[the context node in which the fund plan id is present]->get_current().
lv_field_value = lr_entity->get_property_as_String( **pass the field name here ).
This should definitely resolve the problem.
Thanks,
Vinay -
I want the read the value of a field,'LCSTATUS' belonging to context node 'BTADMINH' in the GET_I method of the field, 'ZZFLD000008' belonging to context node,'ZBTACTIVITYH'.
In the context node class of context node 'ZBTACTIVITYH',I have created an instance attribute,GR_OWNER type ref to context class.
I get the following error in the line - lv_act_status = Lr_entity->if_bol_bo_property_access~GET_PROPERTY_AS_STRING( 'LCSTATUS' ).
'An exception (CX_CRM_CIC_PARAMETER_ERROR) occurred Message no. TPDA430'
I have used the below code.
method GET_I_ZZFLD000008.
DATA: current TYPE REF TO if_bol_bo_property_access,
lv_act_status TYPE string.
DATA:lr_entity TYPE REF TO cl_crm_bol_entity,
lr_current TYPE REF TO if_bol_bo_property_access,
lr_parent TYPE REF TO cl_crm_bol_entity.
rv_disabled = 'TRUE'.
if iterator is bound.
current = iterator->get_current( ).
else.
current = collection_wrapper->get_current( ).
endif.
CHECK gr_owner IS BOUND.
lr_entity ?= gr_owner->btadminh->collection_wrapper->get_current( ).
CHECK lr_entity IS BOUND.
lv_act_status = Lr_entity->if_bol_bo_property_access~GET_PROPERTY_AS_STRING( 'LCSTATUS' ). "error states that lcstatus can't be used here.
TRY.
IF current->is_property_readonly(
'ZZFLD000008' ) = abap_false. "#EC NOTEXT
rv_disabled = 'FALSE'.
ENDIF.
CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
cx_crm_genil_model_error.
RETURN.
ENDTRY.
endmethod.Hi,
LCSTATUS is not an attribute of the BTADMINH structure. It is read using the relation to the status object
BTADMINH-> BTHeaderStatusSet-> BTStatusHCurrent-> ACT_STATUS.
Try reading the ACT_STATUS of object BTStatus as given below.
data: coll type ref to if_bol_entity_col.
data: entity type ref to cl_crm_bol_entity,
lv_act_status TYPE string.
entity ?= current. "BTADMINH entity.
coll = entity->get_related_entities(
iv_relation_name = 'BTHeaderStatusSet' ). "#EC NOTEXT
current = coll->get_current( ).
entity ?= current.
coll = entity->get_related_entities(
iv_relation_name = 'BTStatusHCurrent' ). "#EC NOTEXT
current = coll->get_current( ).
try.
lv_act_status = current->if_bol_bo_property_access~GET_PROPERTY_AS_STRING( 'ACT_STATUS' ).
catch cx_crm_cic_parameter_error.
endtry.
Regards JP -
How to read the attribute in another context node from setter method
Hi,
As part of the requirement
i need to read the STRUCT.E_MAIL ( attribute ) present in INDEPENDANTEMAIL context node from the SET_S_SRUCT method of the context node HEADER.
I tried th following but it didnt work out....
Get the Custom Controller Path
*lr_cuco ?= controller->get_custom_controller( controller_id = 'BP_HEAD/IndComm').
*IF lr_cuco IS BOUND.
Get the Entity
*lr_entity ?= lr_cuco->typed_context->independantemail->collection_wrapper->get_current( ).
*ENDIF.
*CHECK lr_entity IS BOUND.
Get the Trade Event Type.
*lv_email = lr_entity->get_property_as_string( 'E_MAIL' ).
also i tried ...
data:
*lv_value type string,
*lr_property type ref to if_bol_bo_property_access.
*lr_property = collection_wrapper->get_current( ).
*lv_value = lr_property->GET_PROPERTY_AS_STRING( importing iv_attr_name = 'E_MAIL'
returining ev_result = lv_email ).
but it didnt workout ......
Any suggestions ...................
Regards,
Sijo...Hi,
Both Context node are available in view then refer this link.
Reading Attributes from different context nodes in the same view
Relationship name for context node INDEPENDENTMAIL is 'BuilIndependantEmailRel'
Regards
Gaurav -
How to create custom component in CRM 2007
Hi.
I am new for the CRM 2007 Web UI.
Here we have CRM_UI_FRAME.
Like this so many Components are there.
I want how to create our own component.
I created it as follows.
Open the Transaction code bsp_wd_cmpwb.
Provide Z Name in the Component.
Zcomponent
Press Create button.
Go to Run Time Repository.
Press Change Mode.
Create a MODEL as ALL.
GO to Browser Component Structre.
Select View.
Provide View name.
Create the View.
Go to view Layout.
Provide the code like this.
<%@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"%>
<cthmlb:overviewFormConfig/>
Create the context under the context.
Go to Configuration tab.
Assigne the Attributes to the Screen.
GO to the Run Time Repository.
press change mode.
Assigne the view name to the Window.
Save it.
Test the Componet. But it is not diaply anything on the screen.
How i will get the data into the web UI.
Can anybody expalin about this one to me with screen shorts if possible.
I want add some fields into the web UI. Provide some values into that. Capture the values.
Navigate the data from one screen to another screen. How it is possible. I did not understand.
If i am changing any screens in the pre define component it shows dump.
So, now i need Custom component with adding of the fields.
Please give me proper information regarding this one.
Thank You.
Krishna. B.Hi,
Try put the htmlb to show a field:
<thtmlb:label design="LABEL" for="//<context>/<field>" text="<field>"/>
<thtmlb:inputField id="<field>" maxlength="31" size="20" value="//<context>/<field>"/>
In order to get value, you can write a simple code in the event_handler:
LR_BOL type ref to IF_BOL_BO_PROPERTY_ACCESS
LR_BOL = ME->TYPED_CONTEXT-><context>->COLLECTION_WRAPPER->get_current()
var1 = LR_BOL->GET_PROPERTY_AS_STRING('FIELD').
take a look at lr_bol methods so that you can see the set and get methods.
Regards,
Renato. -
Can I call a .htm page of view1 from another .htm page of view 2?
Hi,
I have a viewset QuestionnaireTabVS with a view area TABS which has two views QuestionCondnsVS (default) and View QuestionRisksVS.
When a variable say GV_TAB is set as 'Questions' it navigates to the QuestionCondnsVS view and when the variable GV_TAB is set as 'Risks' it navigates to the QuestionnaireRisksVS.
This view set QuestionnaireTabVS is contained in an overview page which has two Radiobuttons. It works fine when the first radiobutton is selected, i.e, when I click on the Questions it renders the QuestionCondnsVS view and when I click on the Risks it renders me the QuestionRisksVS view .
Problem is when I had clicked the RISK tab first and then selected the another radiobutton the rendered view QuestionRisksVS doesnt get removed
but is present there by default which I dont want.I want the QuestionCondnsVS view to be present there by default after the second radiobutton is selected. I tried to refresh all the controllers but somehow it navigates to the QuestionRisksVS only .
So i thought to call the .htm page of QuestionCondnsVS forcefully from the QuestionnaireTabVS .htm page as soon as I select the another radiobutton.
Can I call a .htm page of QuestionCondnsVS from another .htm page of QuestionnaireTabVS? If yes then how or any other suggestion is welcomeHi Dharmakasi,
The Radiobuttons code is not added in the same HTML page but lies in a different component where the coding is on event handler.
METHOD eh_onchecked.
DATA: lv_option TYPE REF TO if_bol_bo_property_access,
lv_check TYPE char1.
lv_option ?= typed_context->switch->collection_wrapper->get_current( ).
lv_check = lv_option->get_property_as_string( iv_attr_name = 'OPTION' ).
IF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_old.
zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_old.
ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_new.
zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_new.
ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_scaf.
zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_scaf.
ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_scaf_anz.
zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_scaf_anz.
ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_sow.
zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_sow.
ENDIF.
ENDMETHOD.
Here the LV_CHECK = old is the first radiobutton whereas LV_CHECk = new is the second radiobutton. I have tried to set the value of gv_tab ='Question' here but again no success.
The .HTM coding of QuestionanireTABVS is
<%@page language="abap" %>
<%@extension name="thtmlb" prefix="thtmlb" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<% data: ls_line type CRMT_THTMLB_LINK,
lv_flag type ABAP_BOOL.
data: lv_xml type string.
if zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_old.
REFRESH controller->gt_navlink_tab[].
* if controller->gt_navlink_tab[] is initial.
ls_line-id = 'Questions'.
ls_line-onclick = 'QUEST'.
ls_line-text = page->otr_trim( 'ZGAF_CRM_70/QUESTIONS' ).
insert ls_line into table controller->gt_navlink_tab.
ls_line-id = 'Risks'.
ls_line-onclick = 'RISK'.
ls_line-text = page->otr_trim( 'ZGAF_CRM_70/GLOBAL_RISK' ).
insert ls_line into table controller->gt_navlink_tab.
%>
<%-- endif. %>--%>
<thtmlb:tray id = "HeaderExt"
indent = 'FALSE'
design = 'STANDARD'>
<thtmlb:trayHeader>
<thtmlb:grid cellSpacing = "0"
columnSize = "1"
height = "100%"
rowSize = "1"
width = "100%" >
<thtmlb:gridCell colSpan = "1"
columnIndex = "1"
rowIndex = "1"
rowSpan = "1"
>
<thtmlb:navLink links = "<%= controller->gt_navlink_tab %>"
selectedLinkId = "<%= controller->gv_tab %>" />
<bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'TABS' ) %>"
url = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'TABS' ) %>" />
</thtmlb:gridCell>
</thtmlb:grid>
</thtmlb:trayHeader>
<thtmlb:trayBody>
<%
* data: lv_xml type string.
lv_xml = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
%>
<chtmlb:config xml = "<%= lv_xml %>"
mode = "RUNTIME" />
</thtmlb:trayBody>
</thtmlb:tray>
<% elseif zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_new.
REFRESH controller->gt_navlink_tab[].
* if controller->gt_navlink_tab[] is initial.
ls_line-id = 'Questions'.
ls_line-onclick = 'QUEST'.
ls_line-text = page->otr_trim( 'ZGAF_CRM_70/QUESTIONS' ).
insert ls_line into table controller->gt_navlink_tab.
* ls_line-id = 'Risks'.
* ls_line-onclick = 'RISK'.
* ls_line-text = page->otr_trim( 'ZGAF_CRM_70/GLOBAL_RISK' ).
* insert ls_line into table controller->gt_navlink_tab.
%>
<%-- endif. %>--%>
<thtmlb:tray id = "HeaderExt"
indent = 'FALSE'
design = 'STANDARD'>
<thtmlb:trayHeader>
<thtmlb:grid cellSpacing = "0"
columnSize = "1"
height = "100%"
rowSize = "1"
width = "100%" >
<thtmlb:gridCell colSpan = "1"
columnIndex = "1"
rowIndex = "1"
rowSpan = "1"
>
<thtmlb:navLink links = "<%= controller->gt_navlink_tab %>"
selectedLinkId = "<%= controller->gv_tab %>" />
<bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'TABS' ) %>"
url = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'TABS' ) %>" />
</thtmlb:gridCell>
</thtmlb:grid>
</thtmlb:trayHeader>
<thtmlb:trayBody>
<%
* data: lv_xml type string.
lv_xml = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
%>
<chtmlb:config xml = "<%= lv_xml %>"
mode = "RUNTIME" />
</thtmlb:trayBody>
</thtmlb:tray>
<% elseif zcl_gaf_adm_toolbox=>gv_matrix_mnt_type EQ zcl_gaf_adm_toolbox=>GV_MATRIX_MNT_TYPE_SCAF or
zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_scaf_anz or
zcl_gaf_adm_toolbox=>gv_matrix_mnt_type EQ zcl_gaf_adm_toolbox=>GV_MATRIX_MNT_TYPE_SOW.
REFRESH controller->gt_navlink_tab[].
* if controller->gt_navlink_tab[] is initial.
ls_line-id = 'Questions'.
ls_line-onclick = 'QUEST'.
ls_line-text = page->otr_trim( 'ZGAF_CRM_70/QUESTIONS' ).
insert ls_line into table controller->gt_navlink_tab.
* ls_line-id = 'Risks'.
* ls_line-onclick = 'RISK'.
* ls_line-text = page->otr_trim( 'ZGAF_CRM_70/GLOBAL_RISK' ).
* insert ls_line into table controller->gt_navlink_tab.
%>
<%-- endif. %>--%>
<thtmlb:tray id = "HeaderExt"
indent = 'FALSE'
design = 'STANDARD'>
<thtmlb:trayHeader>
<thtmlb:grid cellSpacing = "0"
columnSize = "1"
height = "100%"
rowSize = "1"
width = "100%" >
<thtmlb:gridCell colSpan = "1"
columnIndex = "1"
rowIndex = "1"
rowSpan = "1"
>
<thtmlb:navLink links = "<%= controller->gt_navlink_tab %>"
selectedLinkId = "<%= controller->gv_tab %>" />
<bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'TABS' ) %>"
url = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'TABS' ) %>" />
</thtmlb:gridCell>
</thtmlb:grid>
</thtmlb:trayHeader>
<thtmlb:trayBody>
<%
* data: lv_xml type string.
lv_xml = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
%>
<chtmlb:config xml = "<%= lv_xml %>"
mode = "RUNTIME" />
</thtmlb:trayBody>
</thtmlb:tray>
<% endif.
%> -
How to call a custom controller method in a view
Hi ,
I am getting the partner no in the custom controller method . I want to call that method in the view.How is it possible......?Hi Masood,
now i dont want cross compnent navigation ....
Requirement : Account Identification number in ZVIEW
My component is CRMCMP_BPIDENT
In the custom controller CRMCMP_BPIDENT/CuCoBuPa under context node SEARCHCUSTOMER
the attribute struct.partner is available
in this component im navigating from
CRMCMP_BPIDENT/ObjectCompVs to ZCRMCMP_BPIDENT/ZProducts
in the layout of ZCRMCMP_BPIDENT/ZProducts
TRY .
lr_cuco ?= controller->get_custom_controller( 'CRMCMP_BPIDENT/CuCoBuPa' ).
CATCH cx_sy_move_cast_error.
RETURN.
ENDTRY.
check lr_cuco is bound.
lr_entity ?= lr_cuco->typed_context->SEARCHCUSTOMER->collection_wrapper->get_current( ).
check lr_entity is bound.
lv_account_name = lr_entity->get_property_as_string( iv_attr_name = 'BP_NUMBER' ).
this code is written to get the account identification number but still the same problem
lr_entity not getting populated .......
i checked IF_BSP_WD_HISTORY_STATE_DESCR~IS_RESTORABLE
hr rv_result is set to x.....
any suggestions....
Regards,
Sijo... -
Read value from a view in the same component
Hi Experts,
I have an issue. As I m new to CRM, I am unable to solve this. I am working on component SRQM_INCIDENT_H.
There are two views in this - IncidentHeader and IncidentOV. IncidentHeader has a context CUSTOMERH in which we have a field (attribute ) zzcomptyp. I need to check this field value to enable / disable a button . The button (followup) is in the view
IncidentOV. So I need to read the field value in the method if_bsp_wd_toolbar_callback~get_buttons. but I dont know how I can read from a different view. Please let me know the syntax.
Thank you,
GSKHi ,
Try with the below code in if_bsp_wd_toolbar_callback~get_buttons
data: lr_btcust TYPE REF TO cl_crm_bol_entity.
lr_cn = me->get_context_node( gc_cn_btadminh ).
IF lr_cn IS BOUND.
lr_entity ? = lr_cn->collection_wrapper->get_current( ).
lr_btcust ? = lr_entity->get_related_entity( iv_relation_name = 'BTHeaderCustExt' ).
CALL METHOD lr_btcust->if_bol_bo_property_access~get_property_as_string
EXPORTING
iv_attr_name = 'zzcomptyp'
RECEIVING
rv_result = l_value.
endif.
endif.
Regards,
Gangadhar.S -
Reading the data from one component view into another component view
Hi All,
I have requirement to read the data from one component into another component while creating the service order. Here are the details.
Main View for Service order: BT116H_SRVO in that we have two assignment blocks like Organizational data(BTORGSET) and amount allocation(BTAMNTALL).This two blocks are two different component which are associated with main component(BT116H_SRVO).
I need to read the sales org data from component/View(BTORGSET/Orgsetdata) into Component/View(BTAMNTALL(HdrBillPlanDet) method DO_VALIDATE_INPUT.
I searched in SDN but all the posts are related to the data exchange between two views in same component. But My scenario is different as explained above.
Refer the attachments for the component link..
Please let me know how we can achieve this one..
Thanks,
Sapsar.Finally I was able to fix my code...My Mistakes were need to read the parent node above three levels and need to use the relation entity name while reading the data..
Below is the correction code
IF iv_index IS NOT INITIAL.
lr_iterator ?= collection_wrapper->get_iterator( ).
lr_current ?= lr_iterator->get_by_index( iv_index ).
lr_entity ?= lr_iterator->get_by_index( iv_index ).
ELSE.
lr_current = collection_wrapper->get_current( ).
ENDIF.
*loop back to root entity
WHILE lr_entity->get_name( ) NE 'BTAdminH'.
lr_entity = lr_entity->get_parent( ).
ENDWHILE.
*Get the related entity
IF lr_entity IS BOUND.
lr_collection ?= lr_entity->get_related_entities( iv_relation_name = 'BTHeaderOrgmanSet' ) .
IF lr_collection IS BOUND.
lr_orgset_m = lr_collection->get_current( ).
* lr_orgset = lr_orgset_m->get_related_entity( iv_relation_name = 'BTOrgSet' ).
lr_orgset = lr_orgset_m->get_property_as_string( 'SALES_ORG' ).
ENDIF.
ENDIF.
Thanks,
Sapsar. -
How to get the data from a configtable ?
hi, expert
i have created a configtable,
then add a button 'SENDMS',
How can i get all the data of the config table in the method 'EH_ONSENDMSG' ?
use the code
lr_col_wrap = me->typed_context->result->get_collection_wrapper( ).
lr_query_values ?= lr_col_wrap->get_current( ).
value = lr_query_values->get_property_as_string( iv_attr_name = 'PARTNER' ).
i can only get the data of the first line.
thanks
oliver.Hi,
get_current() will return only selected or active row in the table. If you want all values you need to loop the collection.
see below code.
DATA: lr_iterator TYPE REF TO if_bol_bo_col_iterator.
IF lr_col_wrap IS BOUND AND lr_col_wrap->size( ) > 0.
TRY.
lr_iterator = lr_col_wrap->get_iterator( ).
lr_query_values ?= lr_iterator->get_first( ).
WHILE lr_query_values IS BOUND.
value = lr_query_values->get_property_as_string ( 'PARTNER' ).
lr_query_values ?= lr_iterator->get_next( ).
ENDWHILE.
CATCH cx_root.
ENDTRY.
ENDIF.
regards
Ismail
Maybe you are looking for
-
Applications can't locate music/photo files
My photo/music files live on external drive - La Cie. I am trying to create a photo page in JAlbum but unable to locate my photo directory. Similar problem finding music. Every time I open Itunes, there are songs that require locating file before pla
-
How can i get help with an online sale?
i thought i was downloading PS6 upgrade for mac, but got a windows version instead. also, i've never had a problem with adobe before, but finding help on this site is not easy.
-
IPhoto Slideshows in iDVD?
Does anyone know if this is possible to import an iPhoto Slideshow into iDVD?
-
I have not a clue what is going on. The body of my text is ignoring all of the tables on the right. I have tried all I can think of. Does anyone have ideas as to what may be the issue? Thank you!!
-
Traffic Shaping at 10ms sustained burst
Hello, I noticed that on the 881 router, the lowest sustained burst value is only 25ms. However, on the 871, the lowest value is 10ms. The issue is that 10ms is the recommended value for voice traffic. So far, I haven't had any luck with finding any