How to create values for a survey on creating an Activity
Hi,
How can i obtain the template for answers of a survey so that i can fill in my question/answer combination and attach it to a new activity?
I have been able to find the MF 'SURVEY_TEMPLATES_GET' which returns me an internal table of 'values template' which actually is an XML string. The XML however doesn't contain all the possible answers / questions.
My idea was to get the template XML, clean the values and fill in my own and finally add the survey answers to an activity using FM 'CRM_ORDER_MAINTAIN'.
Does anyone have an idea on how i can proceed?
P.S: The solution is to be implemented on CRM 4.0
Thanks in advance.
Regards,
Indradeo
Edited by: Indradeo Digumber on Sep 29, 2011 3:57 PM
Hi Marisa,
Thanks for the tip. I'v actually been able to find a solution. Luckily SAP has got some classes that does the xml answer manipulation. Here is the algo :
1. Create an instance of the class cl_crm_svy_runtime to obtain the survey template:
CREATE OBJECT go_svy_runtime
EXPORTING
i_application_id = 'CRM_SURVEY_ACTIVITY'
i_survey_id = 'MULTI-APPEL'
i_survey_version = '0000000001'
i_language = 'F'
i_media_type = svydb_mtype_screen
i_valueguid = space
EXCEPTIONS
survey_not_found = 1
values_not_found = 2
survey_outdated = 3
OTHERS = 4
2. Get the survey template (xml):
CALL METHOD go_svy_runtime->get_xml
IMPORTING
e_survey_xml = xml_content .
3. Create an instance of the class cl_crm_svy_values (to be able to manipulate the values):
CREATE OBJECT go_svy_values
EXPORTING
i_internal_values_xml = xml_content
EXCEPTIONS
error_in_generation = 1
error_in_parsing = 2
error_in_transformation = 3
OTHERS = 4.
4. Set your survey values (question, answer, values):
CALL METHOD go_svy_values->values_set
EXPORTING
i_question_id = 'q1'
i_answer_id = 'a1'
it_values = lt_values.
5. Convert the values back to xml:
CLEAR xml_content. " Important!
CALL METHOD go_svy_values->update_values_xml
IMPORTING
e_public_values_xml = xml_content
EXCEPTIONS
error_in_generation = 1
OTHERS = 2
6. Convert the xml to hexadecimal:
CALL FUNCTION 'CRM_SVY_DB_CONVERT_STRING2HEX'
EXPORTING
s = xml_content
IMPORTING
x = ls_survey-valuexml.
7. Build the survey structure and call the crm_order_maintain FM:
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_survey = lt_survey
CHANGING
ct_input_fields = lt_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
And this should enable you to add add the values dynamically to your activity. Sorry for not providing more detailed information, i'm currently completing the development. Feel free to contact me if you have questions about the solution i have found.
Regards,
Indradeo Digumber
Similar Messages
-
How to set value for radio button in sap crm survey suite
Hi ,
I created a survey in CRM Service, in which I added a question with answer as '10 Selection Button Group ('radio button'). And answer has 11 answer options (which means 11 radio buttions). Now when we test the survey, the value for the radio buttons is appearing like 'id_0050569b03091ee480a29d8ee61e953c'. But i want to set a specific value for each radion button (from 1 to 11). So, how to set value for radio button in sap crm survey suite???.
Thanks & Regards,
SeshuHi,
I found solution myself. Click on Goto -> Editing Mode -> Expert Mode. Now you can set value for radio button.
Regards,
Seshu -
How to bind values for input parameters from an adf table?
Hi,
The version I am using is
Jdev TP4 11.1.1.0.0
I need to know how to bind values for input parameters to methods.
I have created an af:table and I have a button created using a method which is outside the af:table. This method needs to take input parameter values from the column values in the table.
When I have an adf form instead of the table the binding works.
Any help?
Thanks.Hi Balaji,
you need to bind you table to a backing bean and call a method in the backing bean when you hit the button. In the method you get the selected row from the table and have access to the columns of it. Then call the the method with the parameters.
To bind the table to a bean select the properties of the table, go to behavior section and look for the advanced section 'Binding' property.
Select the small down arrow at the right side and click edit. In the dialog select or create a bean and property for the table.
Go to the button properties, look for 'Action', again select the small down arrow and click 'Edit'. Select the bean which holds the table property and create a method for the button.
The method look like public void bearbeitenQuelle(ActionEvent actionEvent)
// Add event code here...
RichTable lTable = getYourTable();
Object lData = lTable.getSelectedRowData();
FacesCtrlHierNodeBinding lNB = (FacesCtrlHierNodeBinding) lData;
YourViewRow lRow = (YourViewRow ) lNB.getCurrentRow();
}Hope the get you started
Timo -
How to populate values for a new field in target infoprovider
Hi Experts,
am new to BI. i would like to know on how to populate values for a new field in the target cube with start rotuine.In my case, i have a source infoprovider, which has 3 fields and a target infoprovider, which has 5 fields. i need to populate the new 2 fields in start routine. i dont want to populate using Field routine and am using 3.5 version. please assist with code on how to solve this issue.
Thank you,
Chitra.
Edited by: Chitra_BI on Jun 13, 2011 10:23 AMDebug the standard code and see where the other fields are getting update. you can use the similar approach and area to code for the new field.
Regards,
Lalit Mohan Gupta. -
How to set value for trim and bleed using jsx script?
I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated.
Following is the code I am trying with:
var _saveName = new File ( root_path +_strFileName+".pdf");
var _saveOpts = new PDFSaveOptions();
_saveOpts.printerResolution = 300;
var bleedarray = new Array();
bleedarray[0] =9.00;
bleedarray[1]=9.00;
bleedarray[2]=9.00;
bleedarray[3]=9.00;
_saveOpts.bleedOffsetRect = bleedarray;I would expect although I've not actually tried this for the bleed off set box to be larger than the artbaord and the first two values to be negative or 0…
var bleedarray = new Array(-9,-9,artboard.width+9,artboard.height+9);
Where 'artboard.width' & 'artboard.height' you will have calculated from your file. An Array(9,9,9,9); would not constitute any boxes bounds. -
How to assign values for more than one field
Hi,
I have written following code
constants: fieldname(30) value '(SAPMF02D)KNA1-AUFSD'.
constants: fieldname1(30) value '(SAPMF02D)KNA1-LISFD'.
constants: fieldname2(30) value '(SAPMF02D)KNA1-FAKSD'.
field-symbols: <L_FIELD> TYPE ANY.
field-symbols: <L_FIELD1> TYPE ANY.
field-symbols: <L_FIELD2> TYPE ANY.
Assign (fieldname) to <l_field>.
<L_FIELD> = 'ZB'. " value according to your requirement
Assign (fieldname1) to <l_field1>.
<L_FIELD1> = 'ZB'.
while debugging <l_field1> is not assinging (fieldname1).
Im able to assing for (fieldname).
how to assign value for (fieldname1).
plz suggest me to assign values for more than one field.
Regards,
BrahmajiHello,
Because there is no field name called LISFD in KNA1. Actually you misspelled the field name.
It is KNA1-LIFSD -
How to set value for selectOneChoice
Hello,
How to set value for selectOneChoice defined as:
<af:selectOneChoice label="Label" id="soc1" binding="#{DepositorMergingBean.socSurnameComponent}">
<f:selectItems id="si1" value="#{DepositorMergingBean.socSurnames}"/>
</af:selectOneChoice>
where socSurnames is List<SelectItem> - manually filled list of SelectItem(SomeObject, (String)text_description), so - SOC is filled manually (no binded iterators, etc..)
Neither socSurnameComponent.setValue( new Integer(0) ) nor socSurnameComponent.setValue( socSurnames.get(0) ) do not help.
Thanks in advance.this.selectOneChoice.setValue(selectItems.get(2).getValue());Try as per the following sample:
SelectOneChoiceTest.JSPX:
<af:form id="f1">
<af:selectOneChoice label="Select One Choice" id="soc1"
binding="#{SelectOneChoiceTestBean.selectOneChoice}">
<f:selectItems value="#{SelectOneChoiceTestBean.selectItems}"
id="si1"/>
</af:selectOneChoice>
<af:commandButton text="Set Selected Value" id="cb1"
actionListener="#{SelectOneChoiceTestBean.onClick}"/>
</af:form>
SelectOneChoiceTestBean.java:
import java.util.ArrayList;
import java.util.List;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
public class SelectOneChoiceTestBean {
private RichSelectOneChoice selectOneChoice;
public SelectOneChoiceTestBean() {
super();
private List<SelectItem> selectItems;
public void setSelectItems(List<SelectItem> selectItems) {
this.selectItems = selectItems;
public List<SelectItem> getSelectItems() {
selectItems = new ArrayList<SelectItem>();
selectItems.add(new SelectItem("One", "One"));
selectItems.add(new SelectItem("Two", "Two"));
selectItems.add(new SelectItem("Three", "Three"));
return selectItems;
public void setSelectOneChoice(RichSelectOneChoice selectOneChoice) {
this.selectOneChoice = selectOneChoice;
public RichSelectOneChoice getSelectOneChoice() {
return selectOneChoice;
public void onClick(ActionEvent actionEvent) {
this.selectOneChoice.setValue(selectItems.get(2).getValue());
Thanks,
Navaneeth -
How to estimate value for LogBufParallelism
how to estimate value for LogBufParallelism.
Are there any dependencies between LogBufParallelism and LogFlushMethod ?If you are going to use logbufparallelism
please make sure to use a release >= 11.2.1.7.0, as there was a bug related to using logbufparellelism in previous releases:
In previous releases, the replication agent could crash and invalidate the database when the replication agent was reading close to the end of the in-memory logs. This problem could occur when the value of the connection attribute LogBufParallelism was greater than 1. In that case, one particular log record could cause a log strand reader to block and cause other strand-readers to read records in an incorrect order. This problem has been fixed. (BugDB 10174319 and 10176689)
The suggestion is that you can set to any value up to the number of processors or cores that you have.
Most people though I usually choose to set it something slightly lower than that if they want cpu(s) to be used other processes on the machine.
There is no dependency with LogFlushMethod, but there is one for LogBufMb:
If you change the value of LogBufParallelism, you also may need to change the value of LogBufMB to
satisfy the constraint that LogBufMB/LogBufParallelism >=8
Jim -
How to create network activity
how to create network activity using bapi_network_maintain bapi
i am getting the error as incorrect object key for activity
reagrdsok
-
How to create an activity using business partner of document flow
hi guys,
Can anybody help me how to create an activity by using the business partner of document flow.
i am using the function module BAPI_ACTIVITYCRM_CREATEMULTI but it was giving some sort of error in level based.
so if anybody used above type of scenario can help me out. if you have an sample code please post it which is very much usefull..
thnaks
viswamHi Viswa,
I used this function module to create activity with the doc flow in my case successfully.
CALL FUNCTION 'CRMXIF_ORDER_SAVE'
EXPORTING
data = lt_contract
IMPORTING
return = lt_return.
Regards
Andy -
How to create an activity when system finds duplicate record!!
Hi CRM Experts,
I am working on CRM 5.0. We are uploading contact details to CRM through ELM.
Here My queries are:
1) How to create An Activity when system finds duplicate record?
2) By using ELM we can create BP with Activities and BP with Leads. But Here, my scenario is we have to Create BP with leads and Acivities. can any one help me on these areas?
Thank in Advance.
SreeHi Sree,
I can help you with your first query.
When the system finds a duplicate record then either the system stops working further or proceeds with the error free record.
So once the duplicate entry is found only the first record will be considered and not the second or the duplicate record.
Regards,
Rekha Dadwal
Kindly reward with points if usefull !!!! -
How to supply values for searchCriteria items in af:query programmatically
Hi,
Is it possible to supply the default values for search criteria items in af:query programmatically? I didn't find any of the method to set the values for the search criteria items inside the oracle.adf.view.rich.model.Criterion and oracle.adf.view.rich.model.AttributeCriterion classes.
Please let me know how can I supply DATE values by default for the search criteria items inside the view criteria.
ThanksJdev I am using is 1.5.
I've search page where I've a date field (like TransactionDate). The transactionDate is a transient variable in my VO. Created a view criteria using this transient date filed and kept the operator as 'Between'. When I load the page, I want to keep the values for Between operator as 'CurrentDate' and 'CurrentDate - 365 days' (LastYearDate as of today).
I can't use bind variables to set the currentDate and lastYearDate to the values of the 'Between' operator. If I use so, I will get an error 'Attempt to set a parameter that doesn't occur in the sql.....'.
So I thought of overriding the QueryEvent inside the bean. But I didn't find a way to set the values for the TransactionDate programmatically.
I tried below code in the queryEvent method, but in this case the response time is very hign ( I didn't see the result till 30mn).
DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
ViewCriteria vc =
JUSearchBindingCustomizer.getViewCriteria((DCBindingContainer)bc.findExecutableBinding("SupplierSearchCriteriaQuery"),"__ImplicitViewCriteria__");
Date curretYearDate = null, lastYearDate = null;
Calendar calendar = Calendar.getInstance();
curretYearDate = calendar.getTime();
calendar.add(Calendar.DAY_OF_YEAR, -365);
lastYearDate =calendar.getTime();
Object o = new Date();
ViewCriteriaRow vcr = (ViewCriteriaRow)vc.get(0);
for(int i=0;i<vcr.getAttributeNames().length;i++) {
if(vcr.getAttributeNames() == "LastTransactionDate") {
System.out.println("====================== opeartor ================== " + vcr.getOperator("LastTransactionDate"));
if( ("%".equals(vcr.getAttributeValues()[i]) || vcr.getAttributeValues()[i]==null)) {
List nameList = new ArrayList();
nameList.add("LastTransactionDate");
List valueList = new ArrayList();
valueList.add(lastYearDate);
valueList.add(curretYearDate);
vcr.setAttributeValues(nameList, valueList);
vc.addRow(vcr);
JUSearchBindingCustomizer.applyAndExecuteViewCriteria(bc, vc);
Thanks,
Lakshman -
How to Create New Activity Type for Assiged to work centre Costing in Acti
Dear Sir,
We have four activity type to assigned in workcentre Costing Activity. Details are as under
AIRJET 2010 AIRJET
DONIER 2010 DORNIER
SULTEX 2010 SULTEX
SULZER 2010 SULZER
in addition one more loom is comming in our unit and require new activity type.
How can i create new.
Please guide.
Thanks in advance
Regards
AjitDear ,
To create new Activity Type , you need to follow the below steps :
KA01 - Create Primary Cost Element for the new activities type.
KL01 - Create Activity Type tied to the primary cost element.
KP26 - Change Activity Type/Activity Price Planning - maintain the Variable price
Assign the activity type to cost center using T code KP26.
In the input screen of T code KP26 ,enter version as 0, from period 1 and to period as 12 and the Fiscal Year as 20xx.
Click on Overview tab on top and key in costing details in this screen.
After performing this ,while creating the work center ,this combination of activity type & cost center should be assigned.
At work centre level , you should have
1.Create Standrad Value Key -OP19 and Formula Key in OP49.
2.Create Formula Parameters in OP7B or u can use existing one to assing in the Standard Value Key
3.In CR02-Assing the Standard value key in Basic Data and select the Formula Key in Costing tab with cost centre assingement .Save
Try and check
Regards
JH -
SAP BPC NW 7.0 How to summarize values for past periods
Hi all,
I have a following problem. I need to make adjustments for previous periods. And to create a new adjustment I need to take into account adjustments that were made in the past periods.
I mean that I need to do smth like this u201CEVGET(Application,2009.NOV)u201D but instead of u201C2009.NOVu201D I need to use u201Cwhere time<2009.NOVu201D
The question is how can I calculate adjustments values that were made in the past? (I need values for the whole history for the same dimension values).
P.S.I had an idea to create the highest hierarchy node for time dimension and to use it in EVGET function instead of 2009.NOV but this idea was blocked by architect.Hi Boris,
I would try the following:
- cell with "Start year" (eg: cell A1 with value "2005")
- cell with "End year" (eg: cell A2 with value "2009")
- Excel button linked to a macro or VB code that reads cells A1 and A2 and populates TIME MemberSet parameter with all the years in the reange (eg: "2009.DEC, 2008.DEC,2007.DEC,2006.DEC,2005.DEC" assuming YTD measure)
- EVSUM function in AfterRange to calculate the sum of every year in the range
Best regards.
Joao -
How to pass values for compound primary keys for updating the record in db.
i have a entity bean in my ejb with two primary keys to it...eg. roleid,rolename...
when iam retriving the record i use only one primary key ...so again to modify and update he same record which i retrived is a pbm..
i cannot set the values for the compoundpk,,,
but i can do the update for the bean with single primary key..
i need to know how to pass the values/parameters for the coumpound primary key in my update method...
thanx in advance...
Arjun.GI istantiated a object for the pk class and assign the values for the primary key fields...
Arjun.G
Maybe you are looking for
-
I am trying to purchase os x lion from app store. Getting a response saying I need 2GB memory available but I have at least 40GB free space??
-
Connect Sony HDR-SR8 via USB to FCX
I have a Sony HDR-SR8, this handycam don't support firewire but only USB: it's possible to connect this device to Final Cut Express HD? it's necessary a special cable USB to Firewire? it exists? or a Componet to firewire? Final cut don't see my handy
-
Degraded quality of photo printing book in Aperture 3
Hi, I've isolated an issue in the print book function of Aperture 3 that drove me crazy in the last ten days: I've created a custom size book to deliver to a local print service via "save as pdf" function, but something gone wrong because the quality
-
I get a prompt "the computer 192.168.1.70 is attempting to access nmbd on your computer". This has happened before, different ip address, am I being hacked?
-
I just installed DW CS3 and I cannot load my data sources. I put in my RDS password and it connects but none of my sources show??? Any ideas?