Clearing values from fields
Hi Friends,
I have developed a new OAF page which will create a new request on successful submission. The fields are displaying the last submitted request details.
User has to click on Enter the request button and then enter number of days and amount. The page is displaying the previously entered request details whereas it should be displaying the empty fields for the user to enter.
The AM has the following code to initialize the record in VO
OAViewObjectImpl vo = getAdvSalVO1();
if(!vo.isPreparedForExecution()){
vo.executeQuery();
Row ro = vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
I am assuming when the rowstatus is set to STATUS_INITIALIZED the empty fields should be created.
Can someone please help.
Thanks
You have added an empty row but not made it the the current row. Move to the empty row and it should display blanks as desired. Also in your code you create a Row variable called "ro" then refer to something else "row", is this a typo?
Change code to this:
OAViewObjectImpl vo = getAdvSalVO1();
if(!vo.isPreparedForExecution()){
vo.executeQuery();
Row ro = vo.createRow();
vo.insertRow(ro);
ro.setNewRowState(Row.STATUS_INITIALIZED);
vo.setCurrentRow(ro); // Sets the new row as current row
Kristofer Cruz
Similar Messages
-
APP-FND-01242: Cannot read value from field Error in Forms
Hi,
I have a form which is having a navigation
Setup -> Codes,
as soon as the Code page has open, am pressing Cntrl + F11, and am getting the
below error.
APP-FND-01242: Cannot read value from field COMBO.ENABLED_FLAG
Cause: The field COMBO.ENABLED_FLAG could not be located or read.
Action: This error is normally the result of an incorrectly-entered field name string in a trigger, or a field name string that does not uniquely specify a field in your form. Correct your trigger logic to precisely specify a valid field.
when am clicking on the button 'Ok' am getting a value one by one.
am a newbie to forms, please let me know how to solve this error in details
steps that helps meAsk your question in an eBusiness-suite related forum, maybe here OA Framework
-
To obtain values from fields in a web page.
Hi everyone,
I am in the process of developing a web based application. I am able to
successfully convert my windows to web page documents.
I have sincerely followed the prescribed steps to be adopted in building
methods for validations and processes, so as to utilise them for my web
pages too.
But the problem that I am facing is to obtain values back from the web
page fields (user entered values) for performing validations.
Unfortunately the explanations provided in the Forte Web SDK Manual
for obtaining the values from the web page fields and load it on to the
source window through LoadParameters() method (a method in the window
converter class of HTMLWindow project) seems to be inadequate.
If some one can site the steps that Iam probably missing or some
examples, it will be of great help.
Thanks in advance.
Pamella.
Get Your Private, Free Email at http://www.hotmail.comHi Dan,
Thanks for your assistance.
But as regards to my application, I have an existing forte application
which Iam trying to web enable.
To summarize my problem let me just consider the openning window (logon
screen) which I have converted to web page using WindowConverter Class
in the HTMLWindow project (obviously, it is my supplier project). The
functionality of this window class has to just accept the user name and
validate it. If the user name is valid then proceed further else
display an error message. I have a separate validation method for the
user name, which I can utilise to validate the user name typed by the
user on the web page, if Iam browsing or on the window, if Iam directly
running the application.
The widgets on the window are <UserId> and <ProceedButton> with
window attribute names as UserId and ProceedButton respectively.
Now my handle request method goes like this :
-- This method is the entry point from the Internet to my
-- application. It is automatically called when a request
-- from the Web arrives.
response : HTTPResponse = new;
-- Find the page name.
pageName : TextData = new;
pageName.SetValue(request.PageName);
-- Generate response pages.
if pageName.IsEqual('processquery',IgnoreCase=TRUE) then
-- Please note that I have not write any HTML to build my web page.
-- Instead Iam using the WindowConverter Class to convert my existing
-- windows on the fly to web pages during run time.
w : LogonWindow = new;
-- my logon window class
Converter : WindowConverter = new(sourceWindow=w);
Converter.AssignButton(sourceField = w.<ProceedButton>,type =
'submit');
loginURL : TextData = self.CGIURL.Clone(deep=TRUE);
loginURL.Concat('?serviceName=').concat('appweb');
loginURL.Concat('&pageName=PwdPage');
w.<ProceedButton>.HTMLLink = loginURL.value;
-- Proceed button is on my window to which
-- I have associated the above HTMLLink
-- This link does not submit the User Name typed by the
-- User browsing my web page, but this User Name has to
-- come as part of the request from the browser to perform the
-- validation, as Iam not sure about obtaining the User name
-- from the web page.
-- My problem is how to get this user name????????
html : HTHtml = new;
head : HTHead = new;
body : HTBody = new;
-- Give the page a title.
head.Add(HTTitle(Text='Application For The Web'));
html.Add(head);
form : HTForm = New();
body.Add(Converter.WindowToForm(Action=self.CGIURL,HTMethod='POST'));
html.Add(body);
response.AssignResponse(html.ConvertToString());
elseif pageName.IsEqual('PwdPage',IgnoreCase=TRUE) then
w : LogonWindow = new;
Conv : WindowConverter = new(sourceWindow=w);
button : PushButton = new();
button = Conv.LoadParameters(request,w.<UserId>);
-- This will fail because the 'Request' has no user Id.
-- Here, the explanation provided in the Forte Web SDK manual for
-- LoadParameters method (method from WindowConverter Class) seems to
-- be inadequate.
If w.UserId <> Nil And w.UserId.Value <> '' And w.UserId.LengthToEnd()
0 ThenIf SQLsSO.IsValidUserId(w.UserId) Then
-- Method to validate the user Name.
w1 : PasswordWindow = new;
Converter : WindowConverter = new(sourceWindow=w1);
Converter.AssignButton(sourceField = w1.<ProceedButton>,type =
'submit');
pwdURL : TextData = self.CGIURL.Clone(deep=TRUE);
pwdURL.Concat('?serviceName=').concat('appweb');
pwdURL.Concat('&pageName=MessagesPage');
-- and here I will have to get the password typed in by the User.
-- once again my same problem?????
w1.<ProceedButton>.HTMLLink = pwdURL.value;
html : HTHtml = new;
head : HTHead = new;
body : HTBody = new;
-- Give the page a title.
head.Add(HTTitle(Text='Application For The Web'));
html.Add(head);
form : HTForm = New();
body.Add(Converter.WindowToForm(Action=self.CGIURL,HTMethod='POST'));
html.Add(body);
response.AssignResponse(html.ConvertToString());
Else
-- Generate an exception for unknown page.
.............. and etc.
In your example, you had sighted about the 'Junktxt'. How does it comes
as part of the request from the browser and what is the reference
associated with the submit button?
If you need further clarifications, please write to me. Iam also still
working on it.
Thanks in advance,
Pamella.
You Wrote :
Hi, Pamella --
It might be easier to help if you could be a little more specific about
what went wrong (ie, the problematic code snippet and the resulting error
message), or what exactly you were trying to do. In any event, it is very
easy in WebEnterprise to pass values up to Forte from web pages. You can
embed them in HTML "hidden" tags or they can accompany standard form
elements.
For instance, say you have the following HTML code ...
<form method="POST" action="$$FORTE.ExecURL">
<input type="hidden" name="ServiceName" value="TestService">
<input type="hidden" name="TemplateName" value="nextpage.htm">
<input type="hidden" name="hiddenParam" value="dog">
<div align="center"><center>
<p>
Type some junk here: <input type="text" name="junkTxt" size="20">
</p>
</center></div>
<div align="center"><center>
<p>
<input type="submit" value="Submit" name="submitBtn">
<input type="reset" value="Reset" name="resetBtn">
</p>
</center></div>
</form>
In addition to what the user types into the text box (junkTxt), say you want
to pass "dog" up to Forte as a hidden parameter (hiddenParam) (hey, done't
ask me why!). You can retrieve these values up in Forte in the HandleTag
method of your scanner service by invoking "FindNameValue" on
request:HTTPRequest, ie
firstItem:TextData = request.FindNameValue('junkTxt');
secondItem:TextData = request.FindNameValue('hiddenParam');
firstItem now contains the value of "junkTxt" and secondItem contains
"dog." You can now do whatever you like with these guys, including putting
them in a ResultSet to be displayed on "nextpage.htm"
Hope this helps,
Dan______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com -
how to obtain all values in field range of domain?
Hello,
YOu can find those values in table DD07L
Regards
Naimesh -
Re: To obtain values from fields in a web page.
Pamella --
Thank you for the detailed response. In order to solve your problem, you must do two things:
1) convert your field widgets to HTML elements via WindowConverter::FieldToElement( ... )
2) grab the information you want from the incoming request via HTTPRequest::FindNameValue( ... )
In the example I gave, "junkTxt" is the "name" part of a name-value pair corresponding to an
HTML textbox and its contents that ride in with the incoming request, along with whatever else is
between the
<form method="POST"
action="$$FORTE.ExecURL?ServiceName=SomeService&TemplateName=SomeTemplate.htm>
</form> tags.
DanPamella --
Thank you for the detailed response. In order to solve your problem, you must do two things:
1) convert your field widgets to HTML elements via WindowConverter::FieldToElement( ... )
2) grab the information you want from the incoming request via HTTPRequest::FindNameValue( ... )
In the example I gave, "junkTxt" is the "name" part of a name-value pair corresponding to an
HTML textbox and its contents that ride in with the incoming request, along with whatever else is
between the
<form method="POST"
action="$$FORTE.ExecURL?ServiceName=SomeService&TemplateName=SomeTemplate.htm>
</form> tags.
Dan -
Clearing values from request in decode method
I am using a custom table paginator. In its decode method I have the next code to control whether next link is clicked:
String pLink = (String)requestMap.get("pLink" + clientId);
if ((pLink != null) && (!pLink.equals(""))) {
if (pLink.equals("next")) {
} else if (pLink.equals("previous")) {
}But the next sequence produces some problems:
1. Initial page load.
2. Click on next link.
3. Table navigates ok to next page.
4. Reload page (push F5).
5. The previous click still remains in the request, so decode method think next link is pressed again.
6. Application abnormal behaviour arises.
So, I am trying to clear the next_link key from the request, but next code throws an UnsupportedOperationException:
String pLink = (String)requestMap.get("pLink" + clientId);
if ((pLink != null) && (!pLink.equals(""))) {
if (pLink.equals("next")) {
} else if (pLink.equals("previous")) {
requestMap.put("pLink" + clientId, "");
}Do any of you have some ideas?Hey, where are you RaymondDeCampo, rLubke, BalusC ... the masters of JSF Universe?
;-) -
Select all values from field in LOV
I need to create a LOV in Discoverer that works as follows: I have 4 values in a dimension, but I want the user could select another value, something as 'all'. This value includes the values in the dimension table and any other value in the relationed fields.
For example, I have four values, A,B,C and D. But I want to add another value, 'All' that matches this four values as any other one. How can I do that?
Thanks in advance.Hi Javier,
When you create a parameter, you have the option to let the user to enter multiple values. Therefore, if you have a LOV, the user can select one or multiple or all values.
Regards,
John -
Clearing values from a single partition
I have a cube that I load daily with a reload of the weeks data.
Data from previously loaded days may change and is brought in via a view (lets say week to date).
What I need to be able to do is clear out one or two partitions (weekly) and then reload.
I have tried load serial, load prune, load, no matter what I do it clears all periods and loads whatever is filtered though.
Is there a solution to this?Check out these old posts on clearing data using WHERE clause.
https://community.oracle.com/thread/2154852
https://community.oracle.com/thread/2458240 -
Passing value from field symbol / variable type ref to data to variable
hey ,
DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
DATA: RT_CARRID TYPE REF TO DATA.
FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE
.* Retrieve the data from the select option
RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_WEIGHT).
Assign it to a field symbol
ASSIGN RT_CARRID->* TO <FS_CARRID>.
how can i pass RT_CARRID or <FS_CARRID> to a varible with type vbap-netgrw ( net weight ) ?
thanks
ASA>
ASA MOKED wrote:
> hey ,
>
>
> DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
> DATA: RT_CARRID TYPE REF TO DATA.
> FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE
>
> .* Retrieve the data from the select option
> RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_WEIGHT).
> * Assign it to a field symbol
> ASSIGN RT_CARRID->* TO <FS_CARRID>.
create a work area of type <FS_CARRID>.
field-symbol: <fs_wa> type line of <FS_CARRID>.
loop at <FS_CARRID> into <fs_wa>.
lv_netgr = <fs_wa>-netgr. -
Get value from fields for list items using CSOM SP 2013 and C#
Hi.
I added a few columns (e.c. Column1, Column2 and ...) for the List in SP 2013. In the List there are a few records. How to get data entry and display them in a table. For example:
ClientContext ctx = new ClientContext(ServerUrl);
List lists = ctx.Web.Lists.GetByTitle(List_name);
ListItemCollection items = lists.GetItems(CamlQuery.CreateAllItemsQuery());
ctx.Load(lists);
ctx.Load(items);
ctx.ExecuteQuery();
DataTable table = new DataTable();
table.Columns.Add("ID");
table.Columns.Add("FieldValue1");
table.Columns.Add("FieldValue2");
foreach (ListItem item in items)
table.Rows.Add(item.ID, item["Column1"], item["Column2"]);
Thanks!Hi,
Thanks for your sharing. It will help others who stuck with the similiar issue.
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
How can I get values from listbox?
Hi all,
I need to get price values from Price List (Inventory -> Item Master Data screen). It's important to get values from field 'Price' BEFORE item will be added/updated.
How can I get values from Pricelist listbox?
Thanks for any suggestions or short sample code.
Best regards,
AndyHi Andy
Here is som sample code that will get the description of the price list and also the price that is displaying at the time. The item master must be open for this snippet of code
Public Sub GetItemPriceFromOpenWindow()
'this is assuming item master is open
Dim oEdit As SAPbouiCOM.EditText
oEdit = SBO_Application.Forms.GetForm("150", 1).Items.Item("34").Specific
SBO_Application.MessageBox(oEdit.Value)
Dim oCmb As SAPbouiCOM.ComboBox
oCmb = SBO_Application.Forms.GetForm("150", 1).Items.Item("24").Specific
SBO_Application.MessageBox(oCmb.Selected.Description)
End Sub
Hope it helps -
How to return values from a BSP page to Javascript
Hi All,
I want to call a BSP page which reads a single value from a table and returns that value I want the Javascript in the HTML code to get the value from the BSP page.
Can you kindly let me know how I can return the value from the BSP page to JavaScript.
Kindly please provide me a simple code of a BSP page and the Javascript
Thanks
KarenHi,
you need 3 elements to make the javascript code read the value in any field in the table: table´s name, line and column. This is how your code could look like:
script language="javascript>
var row = 0;
function display(){
row = row + 1;
campo = 'tabla1_' + row + '_4'; " <-- table, line, column
valor = document.getElementById(campo).value;
</script>
ROW works as a counter. You have in variable valor the value of the field and can do with it what you want, perhaps display it with ALERT. I am reading the values from field 1 to n in column 4 in table TABLA1. Pay attention to the '_' in the concatenation of field´s name. The table in my BSP is very simple:
<htmlb:tableView id = "tabla1"
table = "<%= mytable %>"
width = "100%"
allRowsEditable = "X"/>
and somewhere I must call function display in my javascript code:
<htmlb:button id="boton" text="Texto aqui" onClientClick="display()" />
So, give it a try. -
Changing screen feild values through field symbols
hi
I am working on SAPMF02D user exit, it requires validation of searchterm1 feild, I have successfully completed this part with the help of field symbols, but the problem i am facing is that, after performing validation checks, searchterm1 feild would be updated, this I am not able to do, so far I have done the following:
DATA: fld(30) VALUE '(SAPLSZA1)ADDR1_DATA-SORT1'.
FIELD-SYMBOLS: <f1> TYPE ANY .
* Assign screen field values to field symbol
ASSIGN (fld) TO <f1>.
* get the value from field symbol into our field
IF <f1> IS ASSIGNED.
acc1 = <f1>.
ENDIF.
.. *Perform validation and updation on 'acc1'
* get the updated values back into screen feild
<f1> = acc1.
now this last thing is not working for me,, and the data does not get updated in screen/database....
I have tried using ' comit work' statement , but no use,
I require help on this issue and its quite urgent.
Thank you all for your time.Thank you again for the reply,
I am sorry , I am not able to use to that FM either,, I just cannot understand the parameters it is taking and how to provide them.
I have already used the FM "DYNP_UPDATE_FIELDS" and "DYNP_UPDATE_FIELDS" , as:
<f1> = acc1.
scrfields-fieldname = 'ADDR1_DATA-SORT1'.
scrfields-fieldvalue = <f1>.
APPEND scrfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'SAPLSZA1'
dynumb = '0301'
TABLES
dynpfields = scrfields[]
* EXCEPTIONS
* INVALID_ABAPWORKAREA = 1
* INVALID_DYNPROFIELD = 2
* INVALID_DYNPRONAME = 3
* INVALID_DYNPRONUMMER = 4
* INVALID_REQUEST = 5
* NO_FIELDDESCRIPTION = 6
* UNDEFIND_ERROR = 7
* OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
but it did not helped my cause either..
Any help would be highly appreciated,
thank you -
Im new to Sharepoint.
I need to know , how to fetch the x1 , x2 values from one form to another form x1, x2 fields, this wants to happen when 2 forms ID fields(Drop down field) are same.
ex:
first module I have 3 fields like, "Marketing ID" , "Company name" , "Vendor name".
second module I have the same related fields like "Marketing ID" , "Company name" , "Vendor name" and some more fields.
now i need to fetch the information from 1st module to 2nd module ( "Company name" , "Vendor name" ) when I select the Marketing Id(Drop down - field)
it should be want to show in Calculated columns.
Can someone make a suggestion on how I can do this.
Thank you so much for any help you may be able to provide.
Sincerely
Ahalya BabuCalculated Columns can only generate a value from fields of the current item. And only some types of fields (for example, it can't use a lookup column).
Consider using a workflow to accomplish your goal.
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs -
How to copy value from one field to another in a Apex Form
Hello guys,
There are 2 addresses one is shipping and other is billing. I do not want the customer to re-enter all the details if it is the same address. So based upon an action, it should take the live values from one address field and populate the other address field. I know in JS you can do it, but how to implement that in Apex?
I guess using Dynamic Actions to achieve this in Version 4 but do not know how. Read quite some info but no luck.
Thanks in advance!Hi,
I have assumed that you have your shipping address at the top of the page, and then further down the page you have your billing address that you want to enable the users to copy (if this is in reverese, you will need to switch the js variables in the code following).
I would create a Select List item above the 'Billing Address' details, called PX_SAME_ADDRESSThis select list would be static, with the options Null.
I also assume you would have pairs of address page items such as:
PX_SHIPPING_ADDRESS_L1
PX_BILLING_ADDRESS_L1
PX_SHIPPING_ADDRESS_L2
PX_BILLING_ADDRESS_L2
PX_SHIPPING_POST_CODE
PX_BILLING_POST_CODEThen copy the following code into the HTML Header of the page definition:
<script language="JavaScript" type="text/javascript">
function copyAddress()
if( $x('PX_SAME_ADDRESS').value == 'YES')
$x('PX_BILLING_ADDRESS_L1').value = $x('PX_SHIPPING_ADDRESS_L1').value;
$x('PX_BILLING_ADDRESS_L2').value = $x('PX_SHIPPING_ADDRESS_L2').value;
$x('PX_BILLING_POST_CODE').value = $x('PX_SHIPPING_POST_CODE').value;
else //Clear Address Fields
$x('PX_BILLING_ADDRESS_L1').value = " ";
$x('PX_BILLING_ADDRESS_L2').value = " ";
$x('PX_BILLING_POST_CODE').value = " ";
</script>Then, in your PX_SAME_ADDRESS item, copy the code below into the Element > HTML Form Element Attributes field.
onChange="copyAddress();"Hopefully this works for you too, and should give you some basis to play around with.
Amanda.
Maybe you are looking for
-
PLS-00382: expression is of wrong type
Hi, oracle 9.2 I have to write one simple procedure to retrieve some column records from the table. In the Begin... end block...I have written select statement Now, if i include all the columns in the select query then procedure gets compile without
-
Error while installing NW for abap free trial on SLES
The error I get after entering new passwords for n4sadm etc: unpacking /root/Desktop/server/TAR/x86_64/SAPDB_I.tar.bz2 tar: /root/Desktop/server/TAR/x86_64/SAPDB_I.tar.bz2: Cannot open: No such file or directory tar: Error is not recoverable: exiting
-
Syncing to iTunes library on new iMac
Having just bought a new iMac I connected up my iPod which was immediately recognised by ITunes which opened. Unfortunately it says that it can only transfer the purchased items as the iPod is linked to another Library - presumably the one on my old
-
Links in search results do not open new tabs.
I'm missing something here and in other threads on this subject. I used to be able to search in the search bar, using google, for instance, and a new tab would open with the search results. Then if I left clicked on a link within the search results a
-
Transport Layers and sharing of transport directories
Hello Experts, We are on R/3 4.7 Enterprise extension set 1.10 with oracle 9i . In a three tier architecture in R/3 with development , quality and production , how do we assign transport layers and how many transport layers do we need at the time of