Change item value by process in DML Form: best practice?
Hi,
i have a working DML Form and would like to build an option for choosing values in a popup window and refreshing the page items after closing the popup window.
the DML Form has a button which opens the popup window with
javascript:popUp2('f?p=&APP_ID.:210:&SESSION.', 600, 580)
the popup window has a javascript function under HTML Header
<script language="JavaScript">
function passBack2()
doSubmit();window.opener.doSubmit();window.close();
</script>
and a button which called the javascript function
javascript:passBack2();
while the user chooses a new value and closed the popup window an application item holds the selected value.
the following page rendering of my DML Form use the application item in before header computations to get the new values.
from the developer toolbar's session link i found the values changed by the computation correctly and signed with 'I' but they will not displayed in the page and will not used in the Automatic Row Processing update.
how to accomplish this?
Michael
Michael,
while the user chooses a new value and closed the popup window an application item holds the selected value.
How does that happen, with an after-submit process on page 210?
the following page rendering of my DML Form use the application item in before header computations to get the new values.
All your popup page does is submit itself and then submit the calling page. There is no invocation of the before-header computation on the calling page in this sequence. You should use an after-submit computation.
Scott
Similar Messages
-
Process modelling : Design patterns & Best Practices
Hi
Could some one please suggest/share any technical information or documents tha's related to 'Process modelling - Design Patterns & Best Practices'
Thanks in Advance
Santosh K.
Edited by: Santosh539 on Jul 29, 2010 4:07 PMHi Santosh,
There is no specific site with all the information you asked for.
But I think these links would be helpful...
on Work Flow Patterns: http://www.workflowpatterns.com/
on BPM Service Pattern: http://enterprisearchitecture.nih.gov/ArchLib/AT/TA/WorkflowServicePattern.htm
HTH
Sharma -
Change item value when a specific item has changed... how can i do that?
Hi guys, i need to ask something...
Is it possible to have a process or a computation, that gives value to an item, only when one specific item has changed.
I have other items on my page too, but this two are related, and i need to give a specific value to the first one, only when the value of the second has changed...
Help please
tsveti:)Hey Farhan, i guess i need some help on that easy javascript...
i havent done much thing with it so i have almost none experience with js....
So in 'HTML Form Element Attributes' for the second item I m trying this :
onchange="javascript:{document.getElementById('P1_SUBPROJECT').value = '-1';}"
but when i change the value of this second item, the first one (P1_SUBPROJECT) dont get -1
what am i doing wrong? -
Developer 10g Capture All CHANGED Item Values
Still learning this application one module at a time so be kind :)
What is the most efficient way to capture all the data block item values that have changed on the form at say the pre-update trigger?
I'm thinking of testing for:
RECORD_STATUS = 'CHANGED'
and if true then assign the first item to v_item using:
v_item := 'block_name' || '.' || get_block_property('block_name',first_item)
Then loop through each item in the block and test the DATABASE_VALUE against the form value and if they are not equal the assign the DB value to a variable and the form value to a variable and build a string of text to be displayed to the user by using:
IF GET_ITEM_PROPERTY(v_item,DATABASE_VALUE) <> :BLOCK_NAME.ITEM_NAME THEN
v_dbvalue := GET_ITEM_PROPERTY(v_item,DATABASE_VALUE);
v_frmvalue := :BLOCK_NAME.GET_ITEM_PROPERTY(v_item,ITEM_NAME);
v_string := v_string || 'Old value was ' || v_dbvalue || ' and new value is ' || v_form value;
Then advance to the next item by resetting the v_item variable to the next item using:
v_item := 'BLOCK_NAME' || '.' || GET_ITEM_PROPERTY(v_item,NEXTITEM);
And repeat the process until there are no more items in the block:
EXIT WHEN 'BLOCK_NAME' || '.' || NULL;
So what would be the most efficient way to do this?The form holds information that is inserted by a technician then the manager of the technician has to approve the info and submit it to the director for final approval.
So what I do is capture any of the changes that the technician makes and put that sting into an email and send it to the manager so they know that changes were made to the record and they can approve or decline the changes before submitting it on to the director.
My successful POST-UPDATE trigger at the form level ended up like:
<<
p_html := 'Catalog item ' || :ITEMS.MANUFACTURER || ' - ' || :ITEMS.MODEL_DESC || ' ' || :ITEMS.MODEL || ' has been modified and the results are as follows: <br> ';
v_item := 'ITEMS' || '.' || get_block_property('ITEMS',first_item);
<<item_loop>>
loop
exit when v_item = 'ITEMS' || '.' || null;
v_dbvalue := GET_ITEM_PROPERTY(v_item,DATABASE_VALUE);
v_itemname := GET_ITEM_PROPERTY(v_item,ITEM_NAME);
v_block := 'ITEMS';
v_name := v_block || '.' || v_itemname;
v_frmvalue := NAME_IN(v_name);
IF v_dbvalue <> v_frmvalue THEN
p_html := p_html || 'OLD VALUE WAS: ' || v_dbvalue || '<br>AND NEW VALUE IS: ' || v_frmvalue || '<br>';
END IF;
v_item := 'ITEMS' || '.' || get_item_property(v_item,nextitem );
>>
The p_html variable is the string that I send to the email package to send out via our mail service.
Maybe this will help someone with a similar need.
Cheers,
Max -
Change item value before commit
Hello,
I have a form in which I issue an execute_query from a mouse click to retrieve database values from a data block onto a form. The user is then able to change the values of these items on the form and commit them via a button on the form. What I want to do is make sure that some of the values, based on another item in the block, are negative and if not, change them to a negative value. before the changes are commited. I can't seem to find the right trigger to accomplish this-- has anyone have an idea on how to do this?
Thanks in advance.
JeffHi,
How about putting your code in :
1. Pre-Update or
2. When-Database-Record
[Block Level trigger]
The trigger text could be something like :
If (:block.col is > 0 ) Then
:block.col := :block.col * -1;
End If;
-- Shailender Mehta -- -
Changing Item Values before saving Purchase Requisition in me51n, set_data function
Hello,
I have written a user exit, which is called whenever changes are made to a purchase requisition. User Exit is MEREQ001 , function module EXIT_SAPLMEREQ_010 . My requirement here is that the Requisitioner should be 135 for every PR item under certain conditions. Therefore whenever there is any change made to the PR, before saving the PR item, I need to set the Requisitioner to 135, give a status message saying that the Requisitioner is set to 135 and save the Pr with the changed values. Following is the code I have written in EXIT_SAPLMEREQ_010. However, the set_data function called below does not change the PR values. Pls help
data: lt_item type mmpur_requisition_items,
wa_item type mmpur_requisition_item,
wa_itemdet type mereq_item,
wa_itemref type ref to if_purchase_requisition_item,
w_message type i.
constants: c_135 type afnam value '135'.
call method im_req_header->get_items
receiving
re_items = lt_item.
loop at lt_item into wa_item.
wa_itemref = wa_item-item.
wa_itemdet = wa_itemref->get_data( ).
if wa_itemdet-afnam ne c_135.
w_message = 1.
wa_itemdet-afnam = c_135.
call method wa_itemref->set_data( wa_itemdet ).
endif.
endloop.
IF w_message = 1.
MESSAGE 'Requisitioner defaulted to 135 for all items' TYPE 'I'.
ENDIF.Hi Sachin,
I am able to get a reference to if_purchase_requisition_item in my code (wa_itemref ) and am also able to access each of the line items in the PR in the work area wa_itemdet.
At this point in the code ( wa_itemdet-afnam = c_135 ) , the work area value is set to '135', However, call method wa_itemref->set_data( wa_itemdet ), does not change the values of the work area wa_itemdet . Pls help -
Change ITEM value: VARAD
Hi,
My question is:
When page is populated the project_id is equal to 8, when I change project_id to 5 and click Submit button it updates the record with project_id 8 and not 5.
Is there a way to change this so that it gets the current value....
Thank You for your help and suggestions
Jesh
Edited by: user11095252 on Jul 24, 2009 12:35 PMVarad,
I tried using the javascript popup found in this script, but still no luck
Re: open popup window and passing parameter to the popup
When I look at the session on the popup page, the value is still not passed and
when i change the value of project_id (in the main page, which is page 1) from 8 to 5 and I click on sessions at the bottom of the screen, it still shows 8
Also have a similar case posted on this Thread: Add Insert & Update
Add Insert & Update
I might need some help with this
Thank You for your time
Jesh -
(Swing) Reading fields from other forms - Best practice
Hi All,
I have been learning Java and Swing through NetBeans (quite a cool way to do it). I would like some 'best-practice' advice please. Google and search on this forum are normally my friends, can't find anything relevant for this though. I have created an application that seems to be functional, all my navigation is through tabs.
To make my app portable I have created a ?Settings? part. To save having another tab, I have basically copied the way NetBeans deals with opening the ?About Box? in its example, and have set-up fields in here. This essentially opens a JDialog with fields through an option in the menu.
I figure the best way to store the data is in a simple text file, and have the application read the values on start-up? Then when somebody changes the fields and saves it just overwrites the text file with the new values. I am not sure how to best read these in though, I can?t find a way of reading direct from the JDialog (i.e. var.getText()) which makes sense as the JDialog will be closed.
Will my best practice simply be writing a class which reads the file, then whenever I need a value just calling the class?
Thanks a lotYou should not be using preference files unless you really know what you are doing. This is one area of the very few areas of Java programming that can have lasting nasty negative affects on a computer that runs the code if done wrong.
If you want the user to save preferences it is better to just use xml. The advantage of preference files is they can be used by multiple programs and are permanent even after the program is done running/deleted/writen-over/forgotten. The disadvantages of preference files is they can be used by multiple programs, are permanent even after the program is done running/deleted/writen-over/forgotten, can cause damage to your OS, may be seen as harmfull by add blockers and/or anti-virus software, may lead to conflicts with other software that uses similar naming schemes, and are pretty much unportable.
You are going to be much better off in the long run learning XML and just saving them there, an added benefit of XML is if you screw something up and it causes your program to no longer run you can easily edit the xml by hand.
JSG -
Arranging fields in a table-like form: best-Practice-Solution wanted
Hello Experts,
I´m wondering if there exists a 'best practice' considering how to arrange fields in a table-like form.
I know about cross-tables, but that´s not what we need. Most of the requirements that I have come to known are just that certain fields should be put in a certain order in a table-like outfit.
We have tried to do this using the drawing functions (e.g. putting a square around the fields and certain border styles), but it often happens that the lines overlap or there are breaks between the lines, so that you have to do a lot of manual configuration with the 'table'.
Since this is a requirement I´ve come upon with many reports, I can´t believe that this is supposed to be the best solution for this.
I don´t understand why there isn´t a table-like element in Crystal Reports to use for this. E.g. put a table with x rows and y columns in the header or group head section section and then just put the fields in it.
Many thanks in advance for your help !Hi Frank,
You can use build in templates available in Template expert.
Click on Report menu-> Template Expert.
Select the desired template. ( Table grid template would suite best here) and click OK.
There is no facility of inserting a table directly as you said. You will have to do it manually by using lines and boxes.
Hope this is helpful.
Regards -
Where is Forms Best Practices guide?
I'm looking for
Best practices when Developing Applications with Forms 10gR2
which is listed on the documentation tab, here:
http://www.oracle.com/technetwork/developer-tools/forms/documentation/techlisting10gr2-087608.html
But the link:
http://www.oracle.com/technetwork/developer-tools/forms/documentation/ssLINK/164049
gets a 404 error.
Looking through the forums threads and googling, I find references to its being located here:
http://www.oracle.com/technology/products/forms/pdf/BESTPRACTICES10GR2.pdf
but that redirects back to the home page.
Anyone know where I can find it?
Thanks,
RebeccahI believe the doc for which you are search is here:
http://www.oracle.com/technetwork/developer-tools/developer-suite/bestpractices10gr2-164049-fi.pdf
I have requested that the Forms OTN page be corrected to point to this url. Thank you for bringing it to our attention. -
Adobe LiveCycle Process Management Overview and Best Practices
To get familiar with the best practices of process management watch this recording of a webinar hosted by Avoka Technologies.
To get familiar with the best practices of process management watch this recording of a webinar hosted by Avoka Technologies.
-
Change item value at Sales Invoice form before create a document
HI,
I am trying to change value for "TrackNo" item on the sales invoice form just before create a sales invoice,
I have the following code:
Dim oForm As SAPbouiCOM.Form
Dim oItem As SAPbouiCOM.Item
Dim oEdit As SAPbouiCOM.EditText
Dim periodo As String
Dim sf As String
Try
oForm = Nothing
oForm = entorno.Forms.Item(FormUID)
oItem = oForm.Items.Item("251")
oEdit = oItem.Specific
oEdit.String = "Y"
Catch
End Try
It seems to work only If i have selected the logistics folder ( the folder where the "TrackNo" Item is located)
If I have selected another folder as "contents" or "Accouting" when I create the document it fails.
Can you help me with this problem?
Many ThanksBuenas Sergio,
Try forcing a click event on the logistic folder. I don´t think there is another option. You are only able to asign the value if the control is visible(and editable).
Regards,
Ibai Peñ -
How to change item value after re-loading the page.
Hi all,
I have two pages 1,2. From page 1 I am calling page2 (like LOV) by using callMyPopup and in page2 i am setting some variables and returns/refreshes to page1 refreshes using window.opener.window.location=new_url java script, at same time it pass few parameters to page1. How can I write some pl/sql code to show some message to user on page1. I mean I am returning some numbers so i want change into meaning full text. I tried processes no luck. Please help me.
ThanksHey James.
Please share with everyone,
Which version of Oracle Apex are you using?
What is the Database version.
and what is the Browser version and type? -
Passback the report item value?
how to passback the report item value?
below is passback form item value...
function passBack(Val1)
opener.document.getElementById("P2_FID").value = Val1;
opener.document.getElementById("P2_FID").focus();
close();
then what would be javascript fuction for passback report item value?Hey Skud,
I am trying to implement something similar and definitely need assistance. Were you able to resolve this issue? -
Item Master Data Best Practice
hello all
we are now using SBO for more than a year, and yet we still always add new items in our item master data. what is the best practice on maintaining the item master data. for you to understand this is the scenario. since in the Factory/Mill there are a lot of spare parts and equipments there, if some of this equipments is damage, we have to buy a new one, here the problem occur because if it only differ in Part Numbers we use another item code for it. with this practice, at later part we found out that we have more than 1 item code for only one item because of the naming convention. so we have to hold the other item code and use the other one coz we cant delete it anymore. sometimes 1 itemcode occurrs only once in the in the item history.
please suggest what is the best Practice on this matter.
1. Item Grouping
2. Naming Convention
etc..
NOTE:
our goal is minimize adding of items in item master data.
FIDELFIDEL,
From what I understand, you have to replace broken / damaged component of an item like Bulldozer, Payloader and mill turbines. This is the reason why you defined the parts as a new item.
From your Item code examples, I am not clear why you have 2 different names for the same item. and also what you mean by "this two item codes are actually the same,
If you are just buying parts to replace components and if you do not need to track them then I would suggest you create generic itemcodes in the Item master and simply change the description when you buy / sell them.
Example: Same Item different description.
REPL101 OIL FILTER
REPL101 FUEL FILTER
REPL101 xxxxx
This way you are not going to keep creating items in the database and also you can see the description and know what it was.
Simply change the ItemName in the marketing document and instead of pressing Tab to move to the next column Press CTRL+Tab so that SAP does not auto check then ewly typed name against the item master.
Let me know if your scnenario is otherwise
Suda
Maybe you are looking for
-
When I download and install Adobe Reader 8.1.2 the final installation messages says it was a successful installation. All looks good, but when I try to open it I get the error message: Adobe Reader 8.1 has encountered a problem and needs to close. I
-
macbook froze while online. hard shutdown. when it restarted, an error message appeared saying finder shut down unexpectedly containing a message box with a long list of technical jibberish. after clicking OK that it would send an error report to Ap
-
Want to real time copy database
hello i use oracle 10g release 2 with windows server 2003 standart edition(who don't work with cluster) i a beginner with oracle and i want just know if i can do a real time hot copy of database to another database(other pc) without use oracle cluste
-
Delete DSO data for current month on a daily basis.
Hi Gurus, We have a requirement where we have to delete the data in the BW DSO's for the Current Month every day before loading data into it. The reason for this is that in R3 they delete data for the current month in addition to adding new records a
-
I have a very complex music video edit. Hundreds of cuts. I'm not a colorist by trade, so I don't really know how much I like the idea of using speedgrade right now... having to export to dpx format, not being able to conveniently make changes after