Date Calculation in Adobe Forms using Javscript or Formcalc

Hi,
We are designing a Form where a date is used to calculate the Financial  year and Quarter.
For ex: if the document date is 9-Mar-2015 then the financial year is 2014-15 and the quater is 4th Quarter. (ie) the financial is is from July(curr.year) until June (next year)
So the form should show the data as:
For Finyear 2014-15: 3rd Quarter
In the Form design, I've the Document date as FloatingField  and  have the financial year and quarter as calculated using Javascript.
For this I want to have the below logic in the form::initialize event for the datefield as below.
But am not sure about the date functions for getting the fullyear and month.  I need some help wrt to scripting for the below logic.
var year1, year2
var Qaurter
var date1
var month
date1 = This.rawvalue
month = date1.Getfullmonth()
year1 = date1.Getfullyear()
if (month <=6)
then
     year2 = year1 -1
Txtfinyear.rawvalue = Concat (year2, "-",year1)
else
year2 = year1 +1
Txtfinyear.rawvalye = Concat(Year1, "-" year2)
endif.
If (mnth >= and mnth <=8)
  then
txtquarter.rawvalue = "1st"
Similar code for other quarters:
Am attaching the screenshot for the design.
Thanks much in advance for your help
Best Regards,
Maithili

Hi Sameer,
you cant use JavaScript here in Web Dynpro. But if you want to calculate the sum through a button click that can be done through the Action Handler method.
Suppose you have 2 fields to add whichare field1 and filed2 in the context tree and the sum will be shown in field3 of context tree - all of numeric data type - obviously. So you can do the following in the action handler method.
int sum = wdContext.currentContextElement().getField1() +
          wdContext.currentContextElement().getField2();
wdContext.currentContextElement().setFields3(sum);
Regards,
Shubhadip

Similar Messages

  • Problem with data connection in adobe forms using wsdl file....

    Hi Experts,
        I am tryning to create a adobe form in which i need to create a data connection using a WSDL file. But i am coing across the problem as cannot find the path of th url.
    i tried to create the WSDL in 2 ways and i came across the same error.:
    1) using the URL of the WSDL file generated
    2)alos saved the file as WSDL file on desktop, and used to create
    in both cases i am coming across the same error.
    Note: i am not creating using webdynpro, i am doing using ABAP.
    Regards,
    Madhu

    @ankur17
    Won't insult you by suggesting that you haven't already checked Settings > mobile network > Data connection = On, as you have confirmed already that Internet Sharing is working.
    You may need to go to Settings > about > reset your phone and see if by setting up phone afresh it reads settings and applies correctly from SIM card.
    Is Network Setup application included or available from Marketplace > Nokia Collection as might be worth running this application too?
    If this issue still remains you may need to have device software re-installed at Nokia Care Point to try to resolve this.
    Happy to have helped forum with a Support Ratio = 42.5

  • Addition of fields in Adobe forms using JavaScript or FormCalc

    Hi All,
    I have a few amount fields in my Adobe form. I want to calculate their sum and show it in another textfield. Any ideas how this is done using JavaScript or FormCalc.???
    Thanks and Regards,
    Sameer

    Hi Sameer,
    you cant use JavaScript here in Web Dynpro. But if you want to calculate the sum through a button click that can be done through the Action Handler method.
    Suppose you have 2 fields to add whichare field1 and filed2 in the context tree and the sum will be shown in field3 of context tree - all of numeric data type - obviously. So you can do the following in the action handler method.
    int sum = wdContext.currentContextElement().getField1() +
              wdContext.currentContextElement().getField2();
    wdContext.currentContextElement().setFields3(sum);
    Regards,
    Shubhadip

  • Offline adobe forms using webservices-how to print table data

    HI,
    i have created offline adobe form using webservices which call rfc to pull the data ...to get inspection lot details ...
    iam getting header data....but iam not able to get multiple line items of the table data ..here in scenario there are 4 line items but only 1 line item is getting displayed in the form...
    is there any need to handle seperately to display  tables data in offline adobe forms if we call from webservices
    Tousif
    Moderator message: please have a look in the dedicated forum for "Adobe Interactive Forms".
    Edited by: Thomas Zloch on Jan 18, 2011 3:08 PM
    << Moderator message - New question asked, so this is locked >>
    Edited by: Rob Burbank on Jan 18, 2011 10:19 AM

    This is oofline adobe form which is created throgh webservices
    Edited by: tousif_ig on Jan 18, 2011 3:19 PM

  • ADOBE FORMS using Webservice

    Hi Experts,
    I have a problem with Adobe Forms Using webservice.  I created  RFC where it saves data from Adobe Forms to a customized table and exposed it as webservice.  From the SOA manager, I copied the generated link pasted in the dataconnection in Adobe Lifecycle designer, but whenever I generate the form I keep receiving this error:
    "http:// erpwrk1.corp.com:8000/sap/bc/srt/wsdl/bndg_DFA46DE60CFOD33F19F21005056C00008/wsdl11/allinone/ws_policy/document?sap-client=001".  Check that the path is correct and that the file is a valid wsdl file.
    I already activated services from SICF in relation SOAP runtime.   What could be the cause of the problem and how to fix the problem?
    Thanks A Lot!
    Mae

    Hi Ma. Angelica A. Estacio,
    From the SOA manager, I copied the generated link pasted in the dataconnection in Adobe Lifecycle designer, but whenever I generate the form I keep receiving this error:  Check that the path is correct and that the file is a valid wsdl file and hence i cannot finish the data connection wizard.
    From the above posts, it looks like you have resolved the issue. But can you please let me know how did you resolve it ?
    Did you check any SAP transaction to find the above mentioned checkbox?
    Please revert as this has become critical now.
    You can mail me your response on [email protected]
    Regards,
    Rohit Gugale

  • Adobe Form used by more than one user simultaneously

    Friends,
    I am working on an online interactive Adobe form using Web Dynpro ABAP.
    once the user enters the data and clicks the submit button, the data is sent to ztables.
    the scenario is that more than one user can possibly use the same form simultaneously. in that case, how can i maintain synchronization ie how to avoid multiple users from using the form at the same time, when the form is already being filled by one user already.
    I am guessing i have to do something with ADS for this.
    Any thoughts or ideas would be greatly appreciated.
    Thanks and Regards.

    Hi Bertrand,
    The purpose of allowing only one user is to ensure data consistency as you have guessed.
    Is there a program name or transaction code where i can look up the lock entries and see if i can apply them to my web dynpro application or the adobe form.
    I would greatly appreciate your help.
    Thanks and Regards.

  • Making selective fields editable in adobe form [using web dynpro]

    Hi,
    I have displayed an adobe form using web dynpro application. But I have to make certain fields (not all fields) on this adobe form editable. I dont want to make this adobe form interactive because I dont have to save any data in database. The data entered in the editable fields will be saved as a pdf.
    What I did so far:
    1) The fields which I want as editable,  I have given there type as "User entered/ optional" & for rest of the fields I have given type as "Read only".
    2) In web dynpro, I have enabled the adobe
    3) This is not making the fields editable.
    4) If I write the following code in my webdynpro method WDDOMODIFYVIEW, then my data coming from adobe is not getting displayed even though the fields get selectively editable.
    *data: LR_INTERACTIVE_FORM type ref to CL_WD_INTERACTIVE_FORM,
    *LR_METHOD_HANDLER type ref to IF_WD_IACTIVE_FORM_METHOD_HNDL.
    *check first_time = abap_true.
    *LR_INTERACTIVE_FORM ?= VIEW->GET_ELEMENT('adobe').
    *LR_METHOD_HANDLER ?= LR_INTERACTIVE_FORM->_METHOD_HANDLER.
    *LR_METHOD_HANDLER->SET_LEGACY_EDITING_ENABLED( abap_true ).
    Any inputs regarding this??
    Thanks & Regards.

    Hi,
    Like I had mentioned using the following code in my webdynpro method WDDOMODIFYVIEW, my data coming from adobe form was not getting displayed even though the fields get selectively editable.
    *data: LR_INTERACTIVE_FORM type ref to CL_WD_INTERACTIVE_FORM,
    *LR_METHOD_HANDLER type ref to IF_WD_IACTIVE_FORM_METHOD_HNDL.
    *check first_time = abap_true.
    *LR_INTERACTIVE_FORM ?= VIEW->GET_ELEMENT('adobe').
    *LR_METHOD_HANDLER ?= LR_INTERACTIVE_FORM->_METHOD_HANDLER.
    *LR_METHOD_HANDLER->SET_LEGACY_EDITING_ENABLED( abap_true ).
    So I kept this code & I also kept the Interface type "ABAP Dictionary based".
    Additionally in Webdynpro, I used adobe form generated FM to get the adobe content & passed it to the "content" parameter of my adobe component in webdynpro.
    Thanks & Regards.

  • Interactive Adobe Forms using WebDynpro ABAP

    Hi,
    I could able to design and execute my interactive adobe form using webdynpro ABAP. Here what i am doing is i am creating context with my structures and table types  and pdfobject of type xstring  and passing the proper inputs in interactive form properties, in template sources i am provinding the interface and form name of my own choice and it is getting created automatically by the system, every thing works fine here and i could able to execute my form from web dynpro application.
    Here my requirement is i have already created structures and table types after that i went to transaction SFP and created an interace and by using that interface i have created form and i have designed the layout. Now what i want to do is i want to integrate this form in my webdynpro appliction and i want to execute it from webdynpro applicaton. When i try to do i am getting short dump, is my approach feasible or not . kindly suggest. If we can achieve this what is the way to achieve.
    Please do send your suggestions.
    Regards,
    Venkat

    Hi
    When u click on button..u will have to get the data from node which is existing on the Intereactive form and pass it to other view via writing logic in button event handler.
    The data can be displayed in other view as result.
    I hope u got it.
    Provide REWARD points..:-)

  • Creating adobe form using SFP

    hi experts,
    I am trying to create Adobe form using transaction SFP ,  the form creation goes on smoothly but when I try to save or activate it or press any button it displays Error message  "Error when transforming object data". Please tell me what could be the reason of this error  and how can I rectify it.
    Points will be rewarded.
    Many thanks,
    Sushant

    Hello,
    Check <a href="https://service.sap.com/sap/support/notes/962763">the SAP note 962763</a>.
    Rgds,
    Francois

  • Generating adobe form using WDABAP

    Hi,
    We have a requirement to show employee data in Adobe form for both Managers and Administrators.
    Managers can login to portal and access the Adobe form, and Administrators can see the form only in R/3.
    My query is if I develop a adobe form in WD ABAP, Managers can see it in portal....will I be able to access the same adobe form with in R/3 using a report a progarm?
    or Do i need to create a new Report program for Adobe and populate the data etc...
    I want to minimize the coding effort by developing the form in WDAbap and showing it for both Managers(portal) and Admin(R/3)
    If this is possible let me know how to proceed...
    Regards
    Srikanth KV

    Hi,
    I hope i'm not clear with my question.
    I want to access the same Adobe form using Portal and R/3 report program.
    Is this possible using WDABAP ?
    Regards
    Srikanth KV

  • ADOBE Form Using Table with dynamic number of rows

    Hi All
    First some information about our infrastructure:
    - AdobeDesigner 7.1 in the Developerstudio
    - SAP-Portal 7.0 SP15
    I have a View with tabstrips and behind the tabs i have defined an event. On one Tab I included a ADOBE-Form with Table. The Data for the PDF sould only filled in the context for the Form when i jump to this Tab. I created the Form by using this documentation [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0859ad1-53aa-2a10-78ae-99e41c407669].
    To fill the tablecontext I use the following Code:
    IPrivateAnlegenBANFView.IPositionenElement position = null;
    IPrivateAnlegenBANFView.IPositionenNode posNode = wdContext.nodePositionen();
    int NUM_5_TIMES = 5;
    for (int i = 0; i < NUM_5_TIMES; i) {
    IPrivateAnlegenBANFView.IPositionenElement posElement = wdContext.createPositionenElement();
    +posElement.setMaterial("" + i);+
    +posElement.setKurztext("Test" + i);+
    +posElement.setWarengruppe("Warengr" + i);+
    posNode.addElement(posElement);
    If i put this code in the wdDoInit method it  works fine and shows me 5 Rows. But if I put the code in the Action of the tabstrip it shows me only one row. I checked the entries of the context and there are 5 entries (showed them in a WD-Table).
    Can someone tell me what im doing wrong?
    Thanks for a answer and kind regards
    Pascal

    Hi All
    finally i found the solution for the problem.
    When you define the interactive Form in the view do not define the property "dataSource" of UI-Element Interactive Form it seems, that the binding is static and not dynamic.
    Add the following source to the viewCotroller
    Global Part of the Source:
    private static IWDInteractiveForm form = null;
    Method wdDoModify:
    if (firstTime) {
      form = (IWDInteractiveForm) view.getElement("InteractiveForm");
    When you have an Event where you fill your Contextnode which you want to display in the table of an Adobe Form Use this code:
    Action:
    public void onActionFillTab(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent ){
      //@@begin onActionFillTab(ServerEvent)
         * Code to fill the Node for AdobeForm Table
        form.bindDataSource(wdContext.nodeTabelle().getNodeInfo());
      //@@end
    If you want to clear your table and show it directly use in the action the following code:
    wdContext.nodeTabelle().invalidate();
    form.bindDataSource(wdContext.nodeTabelle().getNodeInfo());
    Kind regards
    pascal

  • How to merge data to the adobe forms

    Can any one tell me the solution to merge data to the adobe form created using adobe life cycle designer. Here i want to merge data in the server side and send the resulting forms to the users

    Hi,
    You are correct, You can load the Data from ODSA / ODSB to ODSC.
    1. Create the ODSC which are include the fileds A,B,C,D,E.
    2. Create the Transfermation from ODSA to ODSC> Give the Propermapping with A,B,C,D> Save and Activate the Transfermation.
    3. Create the another Transfermation from ODSB to ODSC--> Give the mapppings with A and E only, then save and activate the Transfermation.
    4. Create the two DTPs for indevidual loading data from ODSA>ODSC and ODSB>ODSC.
    You can see the Data from ODSC by selecting Manage.
    Regards.

  • Create Adobe Form using Design Time for Processes and Forms

    Hi all,
    I am trying to create a form that have 3 fields:
    1. pernr
    2. ename
    3. effective_date
    I done all the necessary setup of BADI ,class, interface and form.
    I need the step to step guide where you create the adobe form using the Design Time for Processes and Forms. Anyone have any idea?
    Edited by: Siong Chao on Jan 3, 2011 4:54 AM
    Edited by: Siong Chao on Jan 3, 2011 5:00 AM

    Hi,
    I couldn't get to your query..
    What do you mean by step by step procedure for a design time & process for forms.
    if you are a beginner and looking for basic examples to implement adobe forms there are lot of them in SDN, please search them.
    let me know if your query was a very specific one.
    Cheers,
    Sai

  • Drop Downs in adobe forms using Web dynpro ABAP

    Hi all,
    Im new to this adobe forms using webdynpro abap.
    In my requirement i have two drop downs on the form.
    by selecting value in one drop down i have to fill corresponding values in the other drop down.
    Using only WDA i know how to do this but with adobe i dnt know how and where i have
    to catch the drop down value and write my code. please let me know how i can achieve this.
    one more thing whatever action or events we are performing on the form where we have to place our code for this?
    Thanks,
    santosh

    hope this helps -
    [Thread: Populating one Drop-Down list from the selection of another Drop-down list |Populating one Drop-Down list from the selection of another Drop-down list;

  • Eed link to the tutorial for creating a Interactive Adobe forms using WDA

    Hi Friends,
      I need link to the tutorial for creating a Interactive Adobe forms using WD ABAP

    Hi,
    Before posting search once in sdn for Blogs or articles.You will get information.Any how please look at this video demonstartion.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20029530-54ef-2910-1b93-c41608ae0c90
    and check these blogs
    https://www.sdn.sap.com/irj/sdn/adobe?rid=/webcontent/uuid/24b9e126-0b01-0010-e098-f46384fad9f3

Maybe you are looking for

  • Applet and data base error.    java.security.AccessControlException:

    Hi All I am new to java. I am trying to access data base SQL 7.0 thru an applet but its giving an error "java.security.AccessControlException:" Can any one help me plz!!!! Thx in advance Vipin

  • How to simulate a Fatal Error ?

    Hello MDM Experts, On older version it was pretty easy to simulate Fatal Error by deleting some tables on repository. However using the 7.1.08 Version, this action can not be done anymore. Do you have any tips on how to simultate Fatal Error ? This w

  • HT1918 Error message when trying to download free App

    When trying to download a free App I am receiving a message that my pay pal payment method can not be verified.  I checked my pay pal account and my payment method is accurate and shows verified but this should not even matter because my default paym

  • Iphones and user identity certs

    successful in implementing client based authentication with the iPhone and Exchange 2003 (or 2007 for that matter)? Our current implementation requires Windows Mobile devices to obtain a client certificate on the users behalf and then upload it to th

  • Stop facetime from auto-adjusting exposure

    Hi, I've made a timelapse video of a sunrise using the Gawker software and my Macbook Pro. The result is not bad, but it seems like the exposure is constantly being adjusted to the changing lighting conditions. This results in a kind of 'flickering',