Conditional Calculation in Form
I want to calculate Payee. where we where given a slab
Taxable amount = 150000
1st 30000 = 5%
2nd 30000 = 10%
3rd 50000 = 15%
4th 50000 = 20%
balance = 25%
please suggest any code how to do this .
sandy
Hi Sandy,
Use this code.
declare
taxable_amout number;
tax number := 0;
rem number := 0;
begin
rem := taxable_amount;
if rem >= 30000 then
tax := tax + 30000 * 0.05; -- first 5%
rem := taxable_amout - 30000;
end if;
if rem >= 30000 then
tax := tax + 30000 * 0.1; -- next 10%
rem := rem - 30000;
end if;
similarly extend your logic..
end;You can store your tax slabs in a table and then store these 30000 etc into variables.
Hope it helps.
Please mark answer as helpful / correct, if it helps you
Navnit
Similar Messages
-
Help tracking the condition of a form
Hi All
Thank you for viewing my post.
I am a relavtive beginner with Livecycle but have got a reasonable grasp on scripting with javascript etc.
Here's my problem.
I have created an internal order acknowledgement form.
This form is filled in by our internal sales dept, and in the form they indicate the reviews required to process the order e.g. engineering review, operations review, sales review or a combination of them.
They do this via checkboes.
Currently when they submit the form, I have background script that saves the form based on specific information in the form i.e. order number + initals of user + customer name + todays date.pdf on our server (using the trusted application method). After this operation a Mailto command is specified to mail the form to the departments that are ticked.
Each department that is selected for review then has its own comments area and submit button on the form. Once the department has reviewed the order and done whatever work is required for it they simply submit the form which in turn gets saved as order number + initals of user + customer name + todays date + departmentname review completed.pdf, and emails the form back to the order processor.
OK this all works great!!
But it now means I have up to 4 forms being saved for each order, which is OK but now I have been asked to make it more tracable for metrics.
i.e. if a department looks at the folder where the forms are stored can they view quickly the forms requiring their attention.
So I have a few options but not sure how to achieve any of them.
1. - When each file is saved it then deletes the last? - risky because if it is open at hte time on anybodys computer this process wont happen, and I am not sure if it is possible to delete files with javascript through adobe reader?
2. - export certain fields on each submit (just the order number, customer name and current status of submit buttons) to a single external file which I can then interrogate with excel or something similar). This sounds good but I have no idea how.
3. use a mysql database to collect the data from these fields but again not sure what is involved with this / or if its possible.
ANY HELP IS MUCH APPRECIATED.
THANK YOU IN ADVANCE.Hi Paul
Thankyou for your response.
Is it possible to move a file from one directory to another using
JavaScript under adobe control?
Thankyou for the invite to your seminar I will attend.
Thanks
Graham
pguerett <[email protected]>
19/03/2010 15:44
Please respond to
[email protected]
To
Graham Spaull <[email protected]>
cc
Subject
Help tracking the condition of a form
Understand your issue and typically this is handled by a Process
Management or workflow product. LiveCycle has an option for this but it
might be overkill for what you are trying to do. Anyways regarding your
points:
1. You cannot delete anything from th efile system form inside of Acrobat
(because of security)
2. You cannot export specific fields, you can export all of the data then
manipulate it using some 3rd party program. Think in terms of submitting
it to a srver then having a server program extract the bits you needd and
do the update.
3. You can have the forms communicate with a DB but that requires the need
for another LiveCycle module called Reader Extensions to allow Reader
users to access the DB, If you are using Acrobat then that is not a
requirement. I am giving a presentation on this topic next Tues (23rd of
Mar) at 12 EST. If you are interested you can register here:
http://acrobatusers.com/events/2220/tech-talk-database-connected-forms
Paul -
Is it possible to sort the list of Conditions/Calculations?
Is it possible to sort the list of Conditions/Calculations so that they display alphabetically in the list?
My list of conditions is getting quite long and haphazard now!
Cheers
SapphieI was afraid of that!. It is very disappointing because , as I am developing a set of reports for the first time, I will create conditions/calculations in quite a non-ordered way and then end up wanting to group similar ones together.
Hopefully a future version will allow this?
Lee -
Conditional Calculation/Filter in Crosstab
Hi All,
Is there a possibility to make conditional calculation in a crosstab ?
I want to filter some records, if their key figures are under a certain value.
There is a possibility to write formula for that key figure and suppress related records (e.g if key figure is < 100 etc..). But I want those records not to come to cross tab at all. In BW queries, we can create "condition" for that purpose. I wonder if there is such a functionality in CR also.
Thanks in advance
OzanHi,
1. create a formula field in the field explorer.
Example: Formulafield name is "Sales" and the formula is
IF >20000 then
2. Create Cross-tab, go to Cross tab Expert , select the previously created formula field into summarized fields.
Regards, Anil -
Put a condition on a form on table
Can I put a condition on a form on table.
I have master-detail form, but in the master I don't want to view all the row, I want to put a condition on this like where clause.......... Can I?
RegardsOne more question.
In master report (in master table) I have x_id column which is foreign key for a column in another table which has the another column I want to display instead of the x_id column,HOW?
In "Query Definition"there is "Query Join Conditions" I put the condition ..... it didn't work,
I changed the x_id attribute to change reference table and column but it didn't work too.
What should I do?
Regards. -
Report Condition - calculation using "in"
Hi,
In the conditions of a report, I would like to define a condition
A in ('abc','def',...).
Any time that I have tried it in the past it has been a problem (depending on how I wrote the condition, I would either get an error message or it would only use the first item in the list). Up until now I just used a separate condition for each item with the connection OR.
However, now I have a list of 11 items in the condition and it would be much easier if the IN statement was possible.
We have Discoverer 10.1.2.1 but in three weeks will be upgrading to 10.1.2.3.
Thank you.
LeahHi Tamir,
I cannot believe that after all the times that I tried different ways to work out using "IN", just now I realized what the problem is.
The only way that the IN can be defined is if I write the value list in the space itself in the condition statement. I CANNOT use the "Create Calculation" choice. If I do, and use parenthesis, then I get an error that it is an invalid statement. If I leave the parenthesis out, then it just accepts the first value in the list and leaves the rest out of the condition.
Just curious - is this just a problem in this version of Discoverer, or is using the "Create Calculation" an incorrect assumption on my part?
Thank you.
Leah -
hi all,
in my form 16 there is a notice pay amount which are displaying correctly, but its not getting deducted in calculation. can anyone please tell me that how would i include it for calculation?
regards saurabh.Guyz,
I belive you must have clarity which Form-16 Values you talking about.
There are two places Form -16 will come
1 Payslip
2 Form 16 (Just form)
In payslip after pay and deduction components one summary will come in the boxes As Evani said.
There is another form16 where you are getting problem
Warm Regards -
How to display the Standard Text (SO10) based on condition in adobe forms
Hi,
I have created the Standard texts (through SO10 tr.code) of 4 plant addresses. In the Layout of adobe form, i want to display any one plant address based on the plant number (as a input) and the rest 3 standard text need to be hide. i tried in Form clac to hide, but i unable to succeed. could you please help me, in this regard.
Thank you.
Regards,
MallikarjunaHi,
You can add all the 4 text in your context menu and create an condition for text.
Example: (LS_HEADER is a structure only for example, you need to decide based on your own form interface)
Text_1000 Condition -> LS_HEADER-WERKS = 1000
Text_2000 Condition -> LS_HEADER-WERKS = 2000
Text_3000 Condition -> LS_HEADER-WERKS = 3000
Text_4000 Condition -> LS_HEADER-WERKS = 4000
The text satisfyling your condition will only be printed and you can assign these text to the same block in PDF form. -
Freight condition calculated on header level , not at item level
Hi,
I am creating PO with 2 line items..
mat X qty 1 price 100 INR
mat Y qty 1 price 100 INR
Now i have given freight as 500 INR in header level...
My prob is freight is getting calculated based on number of item level...
It means if i have 2 item levels my freight is coming 1000 INR....
it is adding based on line item.....
but it shud come 500 INR....
I want my freight to be added at header level......
UtsavHI
What will u do if in case freight shud be 500 + 500 = 1000
So leave this condition as it is
Goto Tcode M/06 ... and create a new condition for freight ... by copying the present condition type and then add it in pricing procedure
But in "details "of this new condition type put a tick mark against group condition and header condition.
"To go into details of a condition type ... select the condition type and then click on lens button" -
Urgent : pROBLEM IN CONDITIONS in smart forms
Hello abapers
I am giving condition for displaying of a text in smart form . the text is in secondary window. Previously I have given 3 conditions as var1 = value or val2 = value or val3 = value.
but now when i am adding 4th condition i am getting wrong format while generating smartform.
please suggest some solution
Thanks
MadhumatiHi Venkastesh,
There are two issues. If your entry is like this....
location="microDS"
xa-location="jdbc/xa/MicroXADS"
ejb-location="MicroPool"
...then use ejb-location for database calls through ejb and location when you try to get through normal java client.
This will help you.
regards,
Vijay
null -
How to conditionally hide/show form item for multiple requests?
Ver 4.1.0
Hi There,
I have a database form where in one of the fields I need to hide /show based on if the user selects a copy row option or create a new row.
To explain in details,
1. I have a report and form application created. When the user edits a record, in that page I have added a copy button also, so when the user hits the copy button, the page is reloaded where the user can create a new record with the save button disable and the create button visible. when the user submits the form using Copy the request is set to "COPY' and in the form, one of the fields has conditional display "REQUEST =Expression1" with value "COPY" This works fine.
2. However, on the reports page, there is a "CREATE" button also, where the user can directly create a new record and the request value is "CREATE"
I wanted to add both COPY and CREATE to the conditional display something like
"REQUEST=Expression1" with value "COPY, CREATE" (without quotes)
however, the item does not display. I guess it only accepts one value since its =.
Any suggestions on how the conditional display for an item can be done based on multiple request types?
Thanks!
Sun
Edited by: ryansun on Oct 18, 2012 3:08 AMHi Sun,
Try changing your condition to a PL/SQL Expression and in expression 1 field add something similar to below and see if it works:
:REQUEST like 'CREATE' or :REQUEST like 'COPY'This is straight off the top of my head and untested.
Hope this helps
Paul -
HI All,
Please read the question carefully before responding.
We have a Z version of MEDRUCK_PO which the customer has asked us to change. Currently he can use a free text delivery address in Ariba which will then be passed to the PO in SAP ECC.
The problem is that certain POs are will default to SAP delivery addresses (managed by Plant). We then have an issue where we can have two addresses on a line item. Confusing for the Vendor!
This should be easily solved by conditioning the address at the line item. However the text-id is in another node (TEXTS) and because of this it cannot be used as a conditioning variable. The same goes for any other TEXT variables.
Does anyone have a clever way of getting around this problem?
Thanks in advance.
AlistairIt the person who filled it in probably used Preview, which corrupts PDF forms in a number of ways. To make the data visible in the fields, open the form in Acrobat, export the form data to an FDF file, and import the FDF file that you saved.
-
I have been working on an interactive flyer for days now.
Basically someone fills out the forms with packages they want for their apartment, with every selection of a check box or radio button it adds up at the bottom of the list.
I have the following;
Packages - DISPLAYS TOTALS FROM PACKAGES
Additions- DISPLAYS TOTALS FROM ADDITIONS
Housewares- DISPLAYS TOTALS FROM HOUSEWARES
Subtotal- DISPLAYS TOTAL FROM Packages, additions and housewares.
WAIVER- This is a 12% waiver to be ADDED to the rent price. This is: (.12)(Subtotal)
Monthly Base Rent- Waiver+Subtotal
The problem I am having is that I cannot get the total to show as the Waiver and Subtotal.
When someone makes a selection it shows in the total for THAT section but then it does not calculate the waiver, subtotal, and total.
When it is deselected, it shows the waiver, subtotal and total but NOT the total for that section.
I am just trying to get all the calculations to display at the same time.
HELP!Make sure your field calculation order is correct (Forms - Edit Form - Edit field calculation order).
The total should appear last in the list. -
Multiplication calculation in form
I wish to have a form field return a calculation that is a multiplication of another form field.
Example:
Field name where calculation is to take place = FieldG
Field name where base numeric is = FieldF
Field G needs to return a calculation that is 3 times the amount showing in Field F
What is the best way to accomplish this?
I have tried this in the properties simplified field notations FieldG=(FieldF*3) no result
Suggestions?Here is a link to a tutorial that should be helpful:
http://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations
In short, the simplified field notation option is for simple calculations involving addition, subtraction, multiplication, and division. For anything more complicated, you'll need to use a custom JavaScript. -
Print the quotation conditions in a form (like the cost sheet)
dear all
i want to print the pricing conditions of a quotation in a form .... is there any standard ??
if not ..could any one help me ?
thanks in advaceIf you are talking about the quotation output form, then yes you can do it and you need to work with your ABAP person to incorporate this code in the print program / smart form. He/ She should be able to do it.
Regards
Sai
Maybe you are looking for
-
How to create an enhancement in a enhancement area in MBO module
Hi experts, Can i create an enhancement under any enhancement Area in oohap_basic transaction. because when i am trying to do so it is saying me that there is no such entry in the check table T77HAP_FLT_EXI but i don't find any view or any means to m
-
External hard drive not mounting on restart
Hi I have 3 x 4TB RAID0 G-Tech EHDs. One of them only works at all when connected via the USB socket on the 'old-style' plug-in keyboard (USB2) but will not mount at all via the USB3 sockets. (This query is in another post) Today's 'problem' is that
-
Hi Guys<br>I have a problem with my volume keys on curve. They're no longer working and I've reset ma phone but seems not to be working. So I wanna know that, is there anyway of increasing/decreasing the volume with a keypad? Please guys Help!!!<br>T
-
I have a 2009 iMac, OS X 10.8.5. I just upgraded my Linksys wireless router and am wondering if it has anything to do with that. Linksys says no, Charter Cable says no. FaceTime wasn't working on my iPhone 4S either but it has since started workin
-
Unable to boot after MobileMe update
I just yesterday activated my .Mac (MobileMe) account. In the process, System Update wanted to install a recent update, as well as the .Mac --> MobileMe update. After letting it install, my system would no longer boot, even with the left-shift (safe