Dynamic inputText fields values.
Dear all,
Please suggest solution on following:
In my ADF/Trinidad project I have one view which is build dynamically by <tr:iteratior/> tag depending on amount of binding elements. Purpose of the page is to read parameter names from database and ask user to provide values for those parameters. Sample code:
<tr:iterator var="items" first="0" value="#{bindings.parameters.collectionModel}" varStatus="status" id="ip">
<tr:inputText Label="#{items.bindings.label.inputValue}" binding="#{backing_parameters.it}" id="it"/>
</iterator>Once user resubmits page I need create pairs of parameter/value in backing bean and use it further in business logic. My challenge is to how actually obtain these values, provided by user if amount of fields (inputText) is only determined during runtime?
Sorry if solution is too obvious. Please guide me to the correct way.
I think I succeeded to resolve it:
Solution:
1. Create ValueChangeEvent on backing bean and map it to the inputText field
2. Add <f:attribute/> tag to map inputText field to desirable value
3. Handle event in backing bean and obtain new values and mapping to the field from ValueChangeEvent object.
The only issue is if user does not change value of the field, then no event created and backing bean still does not know on existence of inputText field and its value
<tr:iterator var="items" first="0" value="#{bindings.parameters.collectionModel}" varStatus="status" id="ip" >
<tr:inputText valueChangeListener="#{backing_parameters.event}" label="#{items.bindings.label.inputValue}" binding="#{backing_parameters.it}" id="it">
<f:attribute name="paramName" value="#{items.bindings.name.inputValue}"/>
</inputText>
</iterator>
public void event(ValueChangeEvent actionEvent) {
actionEvent.getComponent().getAttributes().get("paramName");
actionEvent.getNewValue();
}Thank you.
Similar Messages
-
Dynamic PDF field value doesn't display XFDF value when no keyboard focus
I created a simple PDF (test.pdf) file (one text field), and saved it as a "static PDF". I created a XFDF file, and when I double-click on the XFDF file, the sample PDF opens and the field is populated.
Here's the problem: I save test.pdf as a "dynamic pdf" file. I double-click on the xfdf file and the pdf opens up, but the data is not displayed in the field. If you click on the field, the text appears. If you click out of the field, it disappears. If you update the field value, and navigate away, the value stays.
There is nothing but the field on the page, no scripts, no subforms, nothing.
Is this a bug in Adobe Reader 7.0? or is there some weird setting in Live Cycle Designer that I'm missing?
ThanksWhat is your xfdf file look like? Something like:<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /> <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"><br /> <f href="file:///C|/test3.pdf" /><br /> <fields><br /> <field name="firstName"><br /> <value>William</value><br /> </field><br /> <field name="lastName"><br /> <value>White</value><br /> </field><br /> </fields><br /></xfdf>
-
Hi,
One quick question, I have created a screen with reference to a custome table fields and it is working fine. When I enter values for the first time, the values look ok in debug but when I change the values on the screen, the new values are not updated in the screen fields in debug. Old values are shown in the debug.
I guess there is some kind of logic to do this. Like using the dynamic screen fields read or ....
Can someone help me on this?
Regards,
Roopesh Singhhi there...
when u first enter the values, they get into the work area related to the screen fields.....
but when u change the values, they dont get changed in the workarea associated with the fields. since the data does not get updated in the fields, it wont show in the debugging mode. so chk ur code and make sure u update the data in the variables associated with the fields.
do reward if helpful or get back with further queries. -
How to use table field values as dynamic parameters on selection screen
Hi,
I need help on dynamic selection parameters.
I need to display no. of parameters from the fields of a database table.
Basically i want to pass field values of a table to selection screen and we can use those values as parameter on selection screen.
If there are 10 entries in a table field( say field is field_name and entries are bukrs,kunnr etc.)
I need to display as many parameters on screen as many values are there in field_name( In this case it is 10)
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETERS:
p_bukrs(5) ,
p_kunnr(5) ,
SELECTION-SCREEN END OF BLOCK b2.
ThanxHi,
You can create it using Dynamic Program.Check this link below.
[Creating Dynamic Programs|http://help.sap.com/saphelp_46c/helpdata/en/9f/db996135c111d1829f0000e829fbfe/content.htm]
Hope this might help you.
Thanks,
Prashanth -
Dynamic field value in Sales order item table control
Hi
I need to find the VBAP-VKAUS (Usage indicator) field value in run time of the creation of sale order ...these values stored in the table TVLV.
when i debug the program SAPMV45A in the screen 4900 this VBAP-VKAUS value gets empty in structure VBAP even though i can see other values like MATNR etc...
this field is configurable (dynamic) field and not appear for all the ordertypes.
i need to pass this VBAP-VKAUS value to KOMPD-VKAUS
Thru user-exit..so please let me know if somebody knows how to find this VBAP-VKAUS value.
Thanks in advance
Madihi,
Plz Check the struc KOMP/KOMK. Let me know, if this helped.
Rgds,
Raghu. -
How to populate ADF popup fields such as inputText with values
Dear All,
I am trying to display values other than database table field data into a popup with inputtext.
this values are derived thru some methods. I have created a editpopupfetchlistener event that calls this method and then populate the field by finding it using the below code:
AttributeBinding attrValue = (AttributeBinding)bindingContainer.getControlBinding("ViewResourceValue1");
System.out.println("Before setting of attribute");
attrValue.setInputValue(a.getViewResourceListener());
System.out.println("After attribute setting");
} else {
but I got an error of
<Oct 11, 2012 1:48:10 PM SGT> <Notice> <Stdout> <BEA-000000> <<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase APPLY_REQUEST_VALUES 2
javax.el.ELException: java.lang.NullPointerException
during the setting of the attribute
attrValue.setInputValue(a.getViewResourceListener());
So here am i hoping someone could help me with this.
An advance Thanks! so much for any advice.
Using JDev 11.1.2
Rgds
DanHi,
have you checked that a.getViewResourceListener() does return a value <> null?
Can you post the error stack. Maybe there is more information why/where the error happens.
regards
Peter -
Calling Message mapping Dynamically based on a field value
Hi gurus,
I have
1 source inteface
1 target interface
3 Message mapping programs based on the 1 source and 1 Target Interfaces
I need to decide Dynamically as which message mapping program should be called based on the Input provided by the source system.
For example:
If the souce side file sends a field value=1 then message mapping 1 should be called
If the source side file sends a field value=2 then message mapping 2 should be used...
Pls provide me help on this ASAP.As ur source and target structures are always same, u should have used same mapping with multiple conditions instead of using three different mappings.
Right now for ur requirement, in ID -> standard Interface Determination, u can use multiple interface mappings based on condition.
Check heading "Specifying Conditions (for Multiple Inbound Interfaces)" here
http://help.sap.com/saphelp_nw04s/helpdata/en/42/ea20e737f33ee9e10000000a1553f7/content.htm
Regards,
Prateek -
HR - dynamic selections field name and field value in the program
HI all,
I am using dynamic selections for a HR report.
I have created a view with 20 fields and added it to HR report category ___00003(All fields suppressed).
I need to check these fields in the program. But i am not able to get the field name and value in the program for dynamic selections fields.
Please let me know how to get the field names and values in the program for dynamic selections .
Thanks,
Kranthi.You have to read the itab <i>pnpdynse</i> in your Program to obtain the Dynamic Selection values. This itab has a deep structure.. you can set a break point in one of the events before <b>get pernr</b> & in the debug mode, you will able to display the itab <i>pnpdynse</i>.. you can then identify how to get the values into your code..
~Suresh -
Dynamic field values fromstructure
Hi amit,
RMPROG01 is a standard report.i have modified it in such a way that materials can also be restricted by material group entered by the selection screen.for that I created extra select-potion for material group in selection screen and kept an option to provide the excel file name in the selection screen.
Now the requirement is like that there would be a push button in the selection screen.By pressing it the output report(containing matnr, werks, matkl, last changes ROP, SS, current ROP,SS, dynamic values of ROP SS, ) will be downloaded into excel file entered in the selection screen .
user will not press the execute button to get the output .
i have the changenr to get most last changed ROP SS for selected material.
based on that selected materials and changenr i need the dynamic field values.
I have made the required changes to get the output in excel sheet by pressing the pushbutton, only those dynamic fields are not coming.
pls reply if you have any solution or u need any clarification.
thanks
PRRHi PRR,
SELECTION SCREEN PUSHBUTTON [/]<pos(len)> <push>
USER-COMMAND <ucom> [MODIF ID <key>].
i hope this will help you.
please do reply,
Thanks and Regards,
swapnil -
Hello Experts,
I need to capture field value which is entered by the user in the dynamic selection screen in a Z report.
Please suggest best possible solution for this.
BR,
NishaHello Syed,
Thanks for your reply.
Just now i found that my transaction is a copy of standard transaction GJ93 with some additional fields.
But i am not able to find any select-options statement to be declared for plant so does that mean select option is also getting dynamically created.
Then how i will transfer value to internal table which is for reading current screen values while using FM DYNP_VALUES_READ.
To be in more detail,the issue is like when user is entering value in plant and executing,output is not getting filtered as per the plant she enters in the dynamic selection screen.
Is it like my required functionality already exists in the program which i unable to find it.
Please help.
BR,
Nisha -
When I try to access iTunes or safari, I get the following message:The procedure entry point QTCF_CFHTTP message set header field value could not be located in the dynamic link library QTCF.dll I uninstalled and reinstalled.same result HELP!
Taken at face value, you're having trouble with a QuickTime program file there.
Let's try something relatively simple first. Restart the PC. Now head into your Uninstall a program control panel, select "QuickTime" and then click "Repair".
Does the repair go through okay? If so, are you able to launch iTunes and/or Safari now? -
Dynamically set report field value
In my old classic VB project, I was able to set a report field value using the following simple line of code.
someReport.SomeField.SetText u201Cabcu201D
This was nice and simple, now with crystal reports .Net I do the following:
((TextObject)someReport.SectionX.ReportObjects["SomeField"]).Text = u201Cabcu201D;
Itu2019s simple enough but seems too elaborated compared to the good old VB6.
Not that is a big deal but is there a simpler way (Classic VB6 style) to set a field on a report without me having to create my own utility method to u201Csimplifyu201D things?
Thanks.Perhaps using a formula?
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class Form1
Inherits System.Windows.Forms.Form
Dim Report As New CrystalReport1()
Dim FormulaFields As FormulaFieldDefinitions
Dim FormulaField As FormulaFieldDefinition
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
FormulaFields = Report.DataDefinition.FormulaFields
FormulaField = FormulaFields.Item(0)
FormulaField.Text = "[formula text]"
CrystalReportViewer1.ReportSource = Report
End Sub
Other than that, InProc RAS, but if the solution you have is complicated, you ain't seen nothing yet
- Ludek -
Weblink with dynamic field value, plus wildcard
I am trying to use the weblink functionality to access a SharePoint site where images are saved. Contained within the image name is a field value in the CRM, but the name may have other characters in it as well. Plus, there might be more than one image that matches the request.
Rather than re-naming the hundreds of images on the site to work with standard weblink passing the field value, I'd like to be able to add a wildcard to the weblink so that it can pick all images containing that value. I've tried using the /*%%%FIELDNAME%%%, but that hasn't worked.
Any ideas?This can not be done with a Weblink to your sharepoint server alone because it's conceptually flawed. Weblink points to One_ specific web address or file.
Here is a test. In your IE, you could go to Files --> Open --> Navigate to the folder, which contain the images --> Put *.jpg (or whatever the format you are using) --> Click Open. Nothing is going to happen. The reason, behind it, is you didn’t specify one and only one address or file.
Another test. Try to type in the full path of the folder, which holds the image files, in your IE address field. It should take you to the folder. If you attach *.jpg behind the address, you would get an error.
The only way to do this is to have a search engine in a web page, Google image search as an good example. This is probably more work than renaming the files or updating your records.
Regards,
Shilei -
Selection screen field value capturing
Hi,
I have developed a report for displaying amendment changes in a purchse order. The input are purchase order
and plant. Now they have asked for an additional input of version field, which should also have F4 field-value help.
For version field, default there is no F4 key. So, i have written code like after entering the PO number when we press the enter key, for the corresponding PO, it brings the version no in input field. But my problem is it is displaying the values for version field, but when i select some value it is not getting updated in selection-screen version field. I have attached my code below... please help me
in the below code my problem is only between
AT SELECTION-SCREEN on value-request for P_REVNO.
and
start-of-selection event...
TABLES : ekko,
ekpo,
cdhdr,
cdpos,
MEPO1325,
t001,
t166c,
t166t,
adrc,
komp, " net rate of header
konv, " net value of purchase order
zammendpodet.
TYPES : BEGIN OF ts_cdpos,
ebeln TYPE ekbe-ebeln,
ebelp TYPE ekbe-ebelp,
matnr type ekpo-matnr,
maktx type makt-maktx,
prdat type ekpo-prdat,
belnr TYPE ekbe-belnr,
budat TYPE ekbe-budat,
tkey(70),
txz01 TYPE ekpo-txz01,
ctxnr TYPE t166c-ctxnr,
desp(20) type C,
MEINS LIKE MARA-MEINS,
chtxt TYPE t166t-chtxt.
INCLUDE STRUCTURE cdpos.
TYPES : END OF ts_cdpos.
data : begin of it_makt occurs 0,
matnr like makt-matnr,
maktx like makt-maktx,
end of it_makt.
data : begin of it_maRA occurs 0,
matnr like maRA-matnr,
mEINS like maRA-mEINS,
end of it_maRA.
*Internal table declartion
DATA : it_erev TYPE TABLE OF erev WITH HEADER LINE,
it_ekko1 type table of ekko with header line,
it_konv2 type table of konv with header line,
it_ekpo TYPE TABLE OF ekpo WITH HEADER LINE,
it_ekpo1 TYPE TABLE OF ekpo WITH HEADER LINE,
it_cdhdr TYPE TABLE OF cdhdr WITH HEADER LINE,
it_t166c TYPE TABLE OF t166c WITH HEADER LINE,
it_ekbe TYPE TABLE OF ekbe WITH HEADER LINE,
IT_AMMEND TYPE TABLE OF ZAMMENDPODET WITH HEADER LINE,
IT_AMMEND1 TYPE TABLE OF ZAMMENDPODET WITH HEADER LINE,
it_komp TYPE TABLE OF KOMP WITH HEADER LINE,
it_konv type table of konv with header line,
it_konv1 type table of konv with header line,
it_cdpos TYPE TABLE OF ts_cdpos WITH HEADER LINE.
data : BEGIN OF it_erev1 occurs 0,
revno TYPE erev-revno.
data : end of it_erev1.
data : begin of it_cdpos1 occurs 0.
include structure cdpos.
data : ebeln like ekko-ebeln,
item like ekpo-ebelp,
aedat like ekpo-aedat,
matnr like ekpo-matnr,
txz01 like ekpo-txz01,
desp(20) type C,
MEINS LIKE MARA-MEINS,
item1 like ekpo-netpr.
data : end of it_cdpos1.
types : dy_temp TYPE lips-lgort.
DATA : dyfields LIKE dynpread OCCURS 1 WITH HEADER LINE, dy_value TYPE dy_temp.
DATA: progname TYPE sy-repid,
dynnum TYPE sy-dynnr,
dynpro_values TYPE TABLE OF dynpread,
field_value LIKE LINE OF dynpro_values.
*Work variable declaration
DATA : v_revno TYPE erev-revno,
revno1 type zammendpodet-revno,
w_version TYPE erev-revno,
w_erdat TYPE erev-erdat,
w_eruhr TYPE erev-eruhr,
wv_eruhr TYPE erev-eruhr,
v_tabkey TYPE cdpos-tabkey,
v_temp(5),
v_olddate(8),
v_newdate(8),
v_value_old TYPE cdpos-value_old,
V_OLD TYPE EKPO-BRTWR, " OLD VALUE FOR PURCHASE ORDER
l_ind TYPE i,
temp value 0 type i,
temp1 type i,
temp2 type i,
temp3 type i,
wa_cdpos like line of it_cdpos,
wa_cdpos1 like line of it_cdpos1,
v_tabkey1 TYPE cdpos-tabkey.
PARAMETERS : p_ebeln TYPE ekko-ebeln,
p_ebelp TYPE ekpo-ebelp.
p_bukrs TYPE t001-bukrs,
p_revno type erev-revno.
INITIALIZATION.
AT SELECTION-SCREEN on value-request for P_REVNO.
CLEAR: dyfields[], dyfields.
dyfields-fieldname = 'P_REVNO'.
APPEND dyfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
TABLES
dynpfields = dyfields.
READ TABLE dyfields INDEX 1.
SELECT revno
FROM erev
INTO TABLE it_erev1 WHERE edokn = p_ebeln.
IF sy-subrc = 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'REVNO'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'P_REVNO'
value_org = 'S'
TABLES
value_tab = it_eREV1
EXCEPTIONS
parameter_error = 1
no_values_found = 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.
ENDIF.
ENDIF.
START-OF-SELECTION.
SELECT SINGLE *
FROM t001
WHERE bukrs EQ p_bukrs.
IF sy-subrc EQ 0.
SELECT SINGLE *
FROM adrc
WHERE addrnumber EQ t001-adrnr.
ENDIF.
SELECT SINGLE *
FROM ekko
WHERE ebeln
EQ p_ebeln
AND frgke = 2.
select * from konv into corresponding fields of table it_konv where knumv eq ekko-knumv.
useful informations will be rewarded.
thanks and regards,
subbu.,Hi ,
Use this function module
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-repid
dynumb = sy-dynnr
tables
dynpfields = t_dynpfields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
where t_dynpfields would contain name of field and value you want to update.
Please reward if useful. -
To have a field value in FileName
Hi All,
I am doing an IDOC to XML File scenario.
My requirement is to create multiple files at the target with the Filename having a field Value in it.
In the mapping i will be using RFC calls which will return multiple records and if my RFC returns 3 records, i will need to create 3 Files at the target. which will have the filename taken from a value returned from the RFC.
I tried using Dynamic configuration, since it uses PUT method i got the same name repeated again since it cannot be used for multiple targets.
I tried using variable substitution also, since my target is an XML i will end up in creating an extra node if mapped and i need the filename having timestamp in a desired format.
Could anyone help me in this.
Waiting for your reply
Regards,
Sherin Jose PHi,
You can use the 1:n mapping here. Now depending on the number of records returned by RFC, you can create those many nodes. In your case, what you could do, add a field in the target structure at the root level, set the file name in this field. Then in the file adapter, use an adapter module to set the file name in the dynamic configuration, and then delete this node from the XML in the same module. This should solve the purpose.
Thanks and Regards,
Sarath
Maybe you are looking for
-
I bought a cd and downloaded it to my itunes account. I want to burn one to keep in my car, but dont get that option. how can i burn it from my itunes account?
-
Add a preLoader to an Image.
Can any one help me? I want to add a preLoader to individual images in a flash movie. For example, all the image will be on the site, in separate category's. i.e. "photography", design, "wedding photography" and a whole lot more. I don't want to add
-
I signed up with another internet provider. BEFORE I DID THIS, I signed up to keep my VZ email and agreed to pay a $20 annual fee. After being told everything was OK by VZ, I cancelled my DSL service, and now I am getting message that my account is
-
My frirend got his iPod Touch wet.
Now the screen is very dim. Everything seems to work but the screen is too dim to use. Already tried screen brightness in settings. Any other suggestions?
-
Hi, When an user clicks on a document display link in a SAP tranasction(for example FB02),an URL has to be called in the background(by ABAP) and the details of the URL should be displayed in a browser. What are the possilbe options available in SAP4.