Get value in UDF dynamically
Hi Gurus,
I have an importstructure which can be enhanced dynamiccaly hence not all fields are defined and available in the mapping. Now there is a field which is not defined in the importstructure that contains a value I want to read.
I'm trying to create an UDF which reads a value from a structure dynamically. The path of this field is given as an inputparameter (KVK).
public String Bepaal(Container container) throws StreamTransformationException{
Document doc = null;
String value = null;
try {
String inParam = container.getInputParameters().getString("KVK");
//Bouw document op o.b.v. intpustream
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(false);
DocumentBuilder builder = factory.newDocumentBuilder();
doc = builder.parse(<How do I get the inputstream??>);
//Bouw xpath expressie t.b.v. het ophalen van de base64 gecodeerde waarde
XPathFactory xFactory = XPathFactory.newInstance();
XPath xpathExpr = xFactory.newXPath();
XPathExpression expr = xpathExpr.compile(inParam);
Object result = expr.evaluate(doc, XPathConstants.NODESET);
//Bepaal gevonden node(s) en bepaal de waarde van de eerstgevonden waarde in de lijst
NodeList nlList = (NodeList) result;
value = nlList.item(0).getNodeValue();
catch (Exception e) {
container.getTrace().addWarning(e.toString());
return "";
return value;
return value
The problem is, how do I get the inputstream? I only have a container element.
Thanks, this is somewhat helpfull but the field I need is a but more difficult to find, it is not unique.
I need the value in field IdValue where idOwner = "KvK".
Is this possible?
<AdditionalData>
<StaffingAdditionalData>
<CustomerReportingRequirements>
<PurchaseOrderNumber>4357435</PurchaseOrderNumber>
<CustomerReferenceNumber>43545453443</CustomerReferenceNumber>
<PurchaseOrderLineItem>00001</PurchaseOrderLineItem>
</CustomerReportingRequirements>
<ReferenceInformation>
<OrderId idOwner="StaffingCustomer">
<IdValue>546576653</IdValue>
</OrderId>
<StaffingSupplierId idOwner="StaffingCustomer">
<IdValue>346554</IdValue>
</StaffingSupplierId>
<StaffingSupplierId idOwner="KvK">
<IdValue>547365737635</IdValue>
</StaffingSupplierId>
<StaffingCustomerId idOwner="StaffingCustomer">
<IdValue>FC70</IdValue>
</StaffingCustomerId>
<StaffingCustomerId idOwner="OIN">
<IdValue>57645654646</IdValue>
</StaffingCustomerId>
</ReferenceInformation>
</StaffingAdditionalData>
</AdditionalData>
Similar Messages
-
Getting values from the dynamically created textboxes
Hello,
I am developing one jsp page using struts. In the page i m
dynamically adding some rows with 2 textboxes in each row. and
after entering data into those rows , user clicks on save button
and page is submitted. I want to capture all this data of dynamically
added rows so that i can enter those rows into DB.
how can i acheive this using struts?.
Have anyone had tried doing it?. Please help.
Thanx in advance
Deepali NaikU can do something like......
class MatrixData{
public myMethod(){
Arraylist list_of_rows=new Arraylist ();
JTextBox 11=new JTextBox (); // matrix position (1,1)
JTextBox 12=new JTextBox ();// matrix position (1,2)
addRow(new RowData(11,12)
public addRow(RowData data){
list_of_rows.add(data);
class RowData{
Arraylist txtBoxList=new Arraylist ();
public JTextBox getOne(){
return txtBoxList.get(0);
public JTextBox getTwo(){
return txtBoxList.get(1);
public setOne(JTextBox comp){
txtBoxList.add(comp);
public setTwo(JTextBox comp){
txtBoxList.add(comp);
Hope it helps.
Best Regards
Mohit -
Help needed in getting values from the dynamically created text boxes
Hello,
I am developing one jsp page using struts. In the page i m
dynamically adding some rows with two text boxes in each row. and after entering data into
those textboxes , user clicks on save button and page is submitted.
I want to capture all this data of dynamically added
rows so that i can enter those rows into DB.
how can i acheive this using struts?.
Have anyone had tried doing it?. Please help.
Thanx in advance
Deepali NaikHi,
1. If you give these textBoxes the same name, then in your action you can call request.getParameterValues(paramName) - it returns String[ ] of values.
2. You can give form textBox names like "name"+index or something like this in <logic:iterate> tag
Good luck! -
How to get the list of values for a dynamic parameter using Web Services SDK?
<p>I am struggling to get the list of values for a dynamic parameter of a report.</p><p>I am using Java Web Services SDK ... I tried to use PromptInfo.getLOV().getValues() method but it does not work.</p><p>First of all ... is this possible (to get the list of values for a dynamic param) using Web Services?</p><p>Second of all, if this is possible, how should I do it ... it seems it works fine when running the report from CMC. It asks for DB logon info and after that it provides a list of values.</p><p>Thx </p>
<p>Your assumption is correct. We are trying to get the LOVs from the Crystal Report. I was not aware that this is not supported by Web Services SDK.</p><p>We used Web Services SDK to integrated the Crystal Reports in our web application. We implemented some basic actions for reports: schedule, view instances, run ad-hoc reports.</p><p>We encountered this problem when trying to run/schedule reports with dynamic parameters (a list of values from DB). We were unable to get the LOVs.</p><p>Please let me know if you can think of an alternative to look at.</p><p>Thanks a lot,</p><p>Catalin </p>
-
How to get a Header UDF value in a FMS ?
Hi !
How is it possible to get a Header UDF value from a Formatted Search in a header ? If we don't want to create as many FMS as there are marketing documents in the system, how is it possible ? Can we have a syntax like the following ?
SELECT T0.OnHand
FROM OITW T0
WHERE T0.ItemCode=$[$38.1.0]
AND T0.WhsCode=$[$U_Nwr_WH.0.1]
Thanks,
LuceHi Gordon,
oh, I'm sorry, I did a mistake...
In fact, my question is "How can we get a header UDF value in any FMS without specifying the table name?" !!!!!
Can we access it through specific syntax like $ and [ ?
thanks,
Luce -
How to set/get value in dynamically created components?
I need to create dynamically form based on definition written in database.
I created an empty panelGreed in my jsf page
<h:panelGrid columns="2" id="parseg"
binding="#{ParsegBean.uiKatparam}">
</h:panelGrid>I can�t use dataTable, because my form contains various component types (SelectOneMenu, OutputText, and InputText).
In my bean I create components dynamically:
Private UIPanel uiKatparam = null;
Iterator componentIt = myComponentList.iterator()
while(componentIt.hasNext()){
MyComponent myComponent = (MyComponent) componentIt.next();
HtmlOutputText prompt = new HtmlOutputText();
prompt.setValue(myComponent.getPrompt());
prompt.setId(myComponent.getPromptId());
uiKatparam.getChildren().add(prompt);
switch (myComponent.type) {
case 1: //InputText
HtmlInputText iText = new HtmlInputText();
iText.setId(myComponent.getId());
iText.setValue(myComponent.getDefaultValue());
uiKatparam.getChildren().add(iText);
break;
case 2: //SelectOneMenu
HtmlSelectOneMenu selectOneMenu = new HtmlSelectOneMenu();
// �
uiKatparam.getChildren().add(select);
break;
default:
break;
}When I try to get values in my Action:
Iterator it = myBean.getUiKatparam().getChildren().iterator();
while (it.hasNext()) {
Object ob = it.next();
if (ob.getClass().getName().matches(".*HtlmInputText")) {
HtmlInputText t = (HtmlIputText) ob;
String id = t.getId();
String value = (String) t.getValue();
//�
//�
}and value is still equal initial value
How can I get velue entered to my InputText created dynamically?
MichalI solved my problem creating UIData with dynamically added and dynamically rendered components (in each row is rendered another component).
-
Getting value from portal or bsp application to selection screen parameter
Daer SDNer's.
Is there any possibility of getting value from bsp application and that value to be passed to selection paramater of bw query varaiable.
concept as follows.
report is based on vendor related information. particular vendor having user id in bsp or portal for accessing reports. if he selects bw query in portal or bsp dash board. that same vendor name or id shoukd be pass to default vendor selection entry in bi... so only that particular vendor details should display.....
HarikrishnaDear Arun,
thanks for the reply. can i dynamically get the values to selection parmaters from bsp or else i need to mantain those user ids(vendor name) in bw. could you explain on it. if possible provide some sample code on it.
Thanks
Harikrishna N -
Get value of field object when I double click on any column of report
Hi,
We are converting our projects from .NET 2003 to .Net 2008 and upgrading reports10 to crystal reports 2008 and changing our Active x report viewer control to crystal report viewer.
We donu2019t use reports just to see and print the data. Our use is a bit more.
As we were using Active X Control (CRAXDDRT) to perform different operations
Following are some functions which are included in our requirements:
1- We need the columns width to be flexible which we can changed in the code dynamically according to the users wish
2- Setting text of some fields dynamically from .Net code
3- Hide and show the columns dynamically from .Net code
Upto here we are done using crystal report 2008 and .net 2008
Now we are stuck with problem
4- When we double click on fieldobject at runtime we are able to fetch the value of field object by using e.objectinfo.text.tostring, so far it is perfect
But we have different situation here and need a solution for this
I have two fields like Account ID and Account Description
I need the solution so that when user clicks either on Account ID or Account Description I should be able to fetch the Field object value of Account ID Column only so that i will be able to open different forms and reports based on that ID
As we were doing it before using Active X Control the code snippet is giving below
case "Field: Account. AccountID ", "Field: Account.Description"
GlobalCode = GiveCode(mYFields.Item(1).value) '------ Where 1 refer to Account ID, so in both cases either we click Account ID or Description Field at run time we are able to return the account ID field value.
so we need solution some thing like that please do let us know how we can do that
For Your reference we were using CrystalActivexReportViewerLib10.CRVFields obejct to fectch the report values
Thanx in Advance
Regards,
Arshad Hussain BhattHello,
I am getting value of that cell where I am clicking. But I need the value of other columns also in that particular row where I double clicked. For this I gave one example also that suppose I have a report where there are two columns. One is AccountID and other is AccountDescription. Now if I click on Account ID I get the value of AccountID and when I click on AccountDescription I get the value of AccountDescripiton This is oK n good but I want that If i double click on AccountDescription I should be able to get the value of AccountID also.Please tell me is there anyway to do so?
We did so when we were using CRAXDRT.Report Bellow is the code snippet for how I did it in that.
Dim MyField As CrystalActiveXReportViewerLIb10.CRVFields
Private Function GiveFieldIndex(ByVal As CrystalActiveXReportViewerLib10.CRVFields, ByVal FldName As String) As Integer
For i as integer = 1 To FldArry.Count
If FldArry.Item(i).name = FldName Then
GiveFieldIndex = i
End If
End Function
Private Sub CRViewer1_DoubleClick(ByVal eventSender As System.Object, ByVal eventArgs As AxCrystalActiveXReportViewerLib10._ICRViewerEvents_DblClickedEvent) Handles CRViewer1.DblClicked
If MyField.Name = "Field: AdoJV.AccountID" Or MyField.Name = "Field: AdoJV.AccountDesc" Then
/Following line will give us AccountID in anycase either we click on AccountID or Account Desc or even you can add more column by adding Or Operator. We need something like this in Crystal Report 2008/
Dim GlobeAddEditCode as String = myFields.Item(GiveFieldIndex(myFields, "Field: AdoJV.AccountID")).Value
End If
End Sub
Regards,
Arshad Hussain Bhatt
Edited by: arshhb on Oct 31, 2009 6:44 AM
Edited by: arshhb on Oct 31, 2009 7:09 AM
Edited by: arshhb on Oct 31, 2009 7:13 AM -
Hi,
I am using a UDF to take substring of my value from source (source value is of format abcd/xyz). Now I want to check if there exists any value before "/" i.e. I want to check if there is any value before "/" . I tried using the .length function, but due to some reason I am not able to get it working. So please tell me how to get the below UDF working:
public String getUser1Id(String Id, Container container) throws StreamTransformationException{
String logName = Id;
int len = logName.indexOf("/");
logName = logName.substring(0,len);
return logName;
Id is the input from the source (abcd/xyz) into the UDF.
Thanks.Hi,
your code is working if you have "/" in your ld parameter. Another point is your function returns left of '/' in your input. Is this your requirement or returning true or false depending on the existence of anything before '/'?
Kind Regards, -
How to pass selection screen value to LDB dynamic field.
Hello everybody,
In my program, I am using standard LDB(PSJ) for getting data. And there is a requirement that I have to display some dynamic fields on my selection screen like plant , person responsible ( which are mandatory also ) etc. and inside the program I have to fill those dynamic fields for which the user has entered the value in selection screen.
Could you please tell me how to pass some of selection screen values to ldb dynamic fields before GET statement.
Thanks !!!
Regards,
Mitra>
Pavan Bhamidipati wrote:
> Hi,
>
>
I have to fill those dynamic fields for which the user has entered the value in selection screen.
>
>
> This means that the user is going to enter the values in the selection screen for the dynamic field values so
>
> SET PARAMETERID 'XYZ' FIELD p_field.
>
> where p_field is a parameter on the selection screen
>
> Regards
> Pavan
You can capture the values selected through the dynamic selections using some of the functions modules below, just search the forum for the below FM's, perhaps you can find some sample code
FREE_SELECTIONS_EX_2_RANGE
FREE_SELECTIONS_EX_2_WHERE
FREE_SELECTIONS_RANGE_2_EX
FREE_SELECTIONS_RANGE_2_WHERE
FREE_SELECTIONS_WHERE_2_EX
FREE_SELECTIONS_WHERE_2_RANGE -
How to get Value of tree node without Reload Page
hi,
i worked with apex 4.2 and i created Tree and tabular form to retrieve the date according the value of tree select node the code of tree something like this
select case when connect_by_isleaf = 1 then 0
when level = 1 then 1
else -1
end as status,
level,
"ENAME" as title,
null as icon,
"EMPNO" as value,
null as tooltip,
'f?p=36648:34:5234984107903::::P40_SELECTED_NODE:'||empno as link
from "DEPT"."EMP"
start with "MGR" is null
connect by prior "EMPNO" = "MGR"
order siblings by "ENAME
and i put Selected Node Page Item: P40_SELECTED_NODE . the tree worked good and retrieve the data into tabular form according to tree node value
my Question :
1- i want to retrieve the data without submit the page where each time i select value from tree make page reload to update the tabular form with new value ,there is any way to pass the value of tree node to P40_SELECTED_NODE item and refresh tabular form without page reload .
2- i want when selected from tree run page process according to value of tree node i tray to create Dynamic action with *(jquery selector : div.tree li>a)* but the Value of node incorrect.
Regards
Ahmed;look at this link
Re: How to get Value of tree node without Reload Page ..! -
How to get the byte[] size dynamically from the StreamMessage object
Hi all,
Using JMS, I am receiving the FDF file as StreamMessage from the queue and attaching it to the PDF file which is present in the local system.
For that, I have written the code as follows:
{color:#0000ff} Message msg = jmsTemplate.receive();
if(msg !=null && msg instanceof StreamMessage)
StreamMessage message = (StreamMessage) msg;{color}
{color:#ff6600}//hardcoded the byte array size value
{color}{color:#0000ff} byte[] bytes = new byte[{color:#ff0000}856{color}];
System.out.println("read msg="+message.readBytes(bytes));{color}
{color:#0000ff}PdfReader pdfreader = new PdfReader("D:\\Managing_Workflows_No_Comment.pdf");
PdfStamper stamp = new PdfStamper(pdfreader, new FileOutputStream("D:\\12345.pdf"));
FdfReader fdfreader = new FdfReader(bytes);
stamp.addComments(fdfreader);
{color} {color:#0000ff} stamp.close();
{color}{color:#000000}The above code is working fine except with the hardcoded of {color:#ff0000}byte array{color}{color:#ff0000} size value{color} which is given in {color:#ff0000}RED{color} in color.
Can anybody know, {color:#000000}*how to get the byte[] size dynamically from the StreamMessage*{color} object ?
Any help would be highly beneficial for me !!!!
Thanks and Regards,
Ganesh Kumar{color}When you create your stream message you could add an property to your message, something like streamSize that would contain the number of bytes in your stream message. Then you could get this property from the message before declaring your array.
Tom -
Error loading Valid Values for UDF via DTW
Hi,
SB1 8.81 PL09
I´m using DTW to load Valid Values in UDF.
Template CUFD - UserFieldsMD
TableName FieldID Name Description Type Size SubType EditSize DefaultValue
TableID FieldID AliasID Descr TypeID SizeID EditType EditSize Dflt
ACRD 21 Name Description A 25 25 Default Value
Template UFD1 u2013 ValidValuesMD
ParentKey ParentKey2 LineNum Value Description
TableName FieldID LineNum FldValue Descr
ACRD 21 0 Default Value Default Value
ACRD 21 1 Value 01 Value 01
ACRD 21 2 Value 02 Value 02
ACRD 21 3 Value 03 Value 03
ACRD 21 4 Value 04 Value 04
ACRD 21 5 Value 05 Value 05
ACRD 21 6 Value 06 Value 06
I get the following error message:
Key - Reason
ACRD,21 - CServiceData::VerifyPropertyWrite failed; Property u2018FielIDu2019 of u2018UserFieldMDu2019 is read only65171
Is any solution to work around this error?
ThanksTank you Eddy, but it seems it does not work.
The error message received from DTW is:
- <BOM>
- <BOM>
- <BO>
- <AdmInfo>
<Object>66</Object>
<Version>2</Version>
</AdmInfo>
- <ProductTrees>
- <row>
<TreeCode>A00001</TreeCode>
<Quantity>1</Quantity>
<TreeType>iProductionTree</TreeType>
</row>
</ProductTrees>
- <ProductTrees_Lines>
- <row>
<Currency>USD</Currency>
<IssueMethod>im_Backflush</IssueMethod>
<ItemCode>A00006</ItemCode>
<Price>160</Price>
<PriceList>1</PriceList>
<Quantity>3</Quantity>
<Warehouse>01</Warehouse>
</row>
- <row>
<Currency>USD</Currency>
<IssueMethod>im_Backflush</IssueMethod>
<ItemCode>S10002</ItemCode>
<Price>160</Price>
<PriceList>1</PriceList>
<Quantity>3</Quantity>
<Warehouse>01</Warehouse>
</row>
</ProductTrees_Lines>
</BO>
</BOM>
<ErrorMessage>A00001 - Errore definito dall'applicazione o dall'oggetto</ErrorMessage>
</BOM> -
NOT Getting Values for LOCATION...on MultiProvider REPORT
HI All,
I have a MultiProvider on 4 cubes.All these 4 cubes having object LOCATION. I can see data in all cubes for LOCATION. I am running a report on this MultiProvider.
Problem:
I am not getting Values for LOCATION. Why?
What I did:
I checked all location objects of all 4 cubes @ MultiProvider level .
I didn't use any Infoprovider in Qry designer sections.
Please suggest. What is the reason how to solve..
THanks & Regards.
Sri.
Edited by: siri26 k on Dec 5, 2008 10:41 AM
Edited by: siri26 k on Dec 5, 2008 10:41 AMhello,
in the identification tab of the MP,make sure you have checked all four checkboxes across the 4 infoproviders.
then in Listcube T-Code, select your MP,display the records based on selection inputs and see if location is populated.
If the data is not coming in listcube, then it will not come in the Query too.
Reg,
Dhanya -
Not getting values in the variable
Hi experts,
in this program
i want VBPA-vbeln = xblnr....but there is a data length error. so I ahve declare one variavble of length 10. & i am moving this xblnr to this variable but not getting value in that variable that i am moving..& give me the possible solutions...
when '0FI_AR_4'.
data: t_DTFIAR_3 like DTFIAR_3 occurs 0 WITH HEADER LINE.
data: BEGIN OF t_DTFIAR_3 occurs 0.
include structure DTFIAR_3.
data: xblnr1(10).
data: END OF t_DTFIAR_3.
data : BEGIN OF t_partner occurs 0,
VBELN like vbpa-VBELN,
parvw like vbpa-PARVW,
kunnr like vbpa-kunnr,
END OF t_partner.
data : xblnr1(10).
t_DTFIAR_3[] = C_T_DATA[].
move t_DTFIAR_3-xblnr to t_DTFIAR_3-xblnr.
select VBELN PARVW kunnr
into table t_patner
from vbpa
FOR ALL ENTRIES IN t_DTFIAR_3
where VBELN = t_DTFIAR_3-xblnr.
SORT t_partner BY VBELN PARVW.
loop at t_DTFIAR_3.
loop at t_partner where VBELN = t_DTFIAR_3-xblnr1.
if t_partner-PARVW = 'ZA'.
t_DTFIAR_3-YPARVW1 = t_partner-PARVW.
t_DTFIAR_3-YPART1 = t_partner-kuNNR.
elseif t_partner-PARVW = 'ZR'.
t_DTFIAR_3-YPARVW2 = t_partner-PARVW.
t_DTFIAR_3-YPART2 = t_partner-kuNNR.
ELSEif t_partner-PARVW = 'ZE'.
t_DTFIAR_3-YPARVW3 = t_partner-PARVW.
t_DTFIAR_3-YPART3 = t_partner-kuNNR.
ELSEif t_partner-PARVW = 'ZS'.
t_DTFIAR_3-YPARVW4 = t_partner-PARVW.
t_DTFIAR_3-YPART4 = t_partner-kuNNR.
ENDIF.
MODIFY t_DTFIAR_3.
endloop.
ENDLOOP.
C_T_DATA[] = t_DTFIAR_3[] .
Thanks in advanceHI,
While moving use the WRITE TO option.
WRITE VBPA-vbeln TO xblnr.
Regards
Sudheer
Maybe you are looking for
-
I have a Widows 8 laptop. I cant open Itunes. I get a message "Itunes software does not install on 64 bit operating system" Can anyone tell me how to get it installed?
-
Hi, For any outbound idoc, if the parameters of export/import contain EDIDC and EDIDD along with the table. It is possible to extend the idoc and populate values? As i don't have authroizations, i need to confirm whether an wmtcid03 idoc can be exten
-
Hi All, Is it possible to link qualification screen through Self Service ? Is yes..whats are steps to do it. I would like people to update their qualification through Self Service.
-
Need CRM mobile service document
Hi, Can anybody send the <b>CRM mobile service</b> document. thanks, Vinayak
-
Change phot size to fit in a locket
How do I change a photo's physical size on iphoto to fit into a locket