Interactive form -Dynamic input fields

Hi,
I am working with an interactive form.
After Userinputs a InputField1 it should populate Inputfield2 dynamically.
Lets Say if I enter a 01/01/2009 in input field1, second input field should be a week after date 01/07/2009.
How do we handle this ?
rgds
Vara

Hi,
Select the InputField1 and goto Script Editor and select the Event type: "Change" and Language as "FormCalc" and in editor write the below code:
InputField2.rawValue = Num2Date(IsoDate2Num($.rawValue)+7,"DD/MM/YYYY")
Based on your requirement change the display pattern of both the date fields in the object pallette.
Note: Make both the fields as Date/Time Fields and not TextFields.
Regards
Pradeep Goli

Similar Messages

  • Add Dynamic Input field

    Hi...Experts am new in ABAP Webdynpro. Actually my application is Add Dynamic Input Field in webdynpro. Already One lable, one Input field is there and I add one more button. When I click that button Dynamically Adding same like existing lable and inputfield.Can anyone tel me how to resolve my problem.

    Hi..Yugesh
    U will try this,Definitly Ul get Answer.
    For Dynamically creating Attribute
    DATA : rootnode_info TYPE REF TO if_wd_context_node_info,
    dyn_node_info TYPE REF TO if_wd_context_node_info,
    dyn_node TYPE REF TO if_wd_context_node.
    DATA : dyn_attr_info TYPE wdr_context_attribute_info.
    dyn_attr_info-name = 'NAME'. Attribute Name
    dyn_attr_info-DEFAULT_VALUE = 'Prakash'. +Iam Setting Default value of attribute,u can change as per ur requirement +
    dyn_attr_info-type_name = 'ZDE_NAME' . Data Element(CHAR20) ( Type Of Attribute )
    rootnode_info = wd_context->get_node_info( ).
    CALL METHOD rootnode_info->add_attribute
    EXPORTING
    attribute_info = dyn_attr_info.
    This will create a attribute at run time...
    For Dynamically creating Input Field
    DATA lr_container TYPE REF TO cl_wd_uielement_container.
    DATA lr_input TYPE REF TO cl_wd_input_field.
    DATA lr_table TYPE REF TO cl_wd_table.
    DATA lo_nd_sflight TYPE REF TO if_wd_context_node.
    DATA lr_button TYPE REF TO cl_wd_button.
    DATA lr_grid_data TYPE REF TO cl_wd_grid_data.
    DATA lr_flow_data TYPE REF TO cl_wd_flow_data.
    DATA lr_matrix TYPE REF TO cl_wd_matrix_head_data.
    +Note : Before that change the Layout of ROOTUIELEMENTCONTAINER to MATRIX LAYOUT +
    navigate from <CONTEXT> to <SFLIGHT> via lead selection
    lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    CALL METHOD cl_wd_input_field=>new_input_field
    EXPORTING
    bind_value = 'NAME' + attribute which i created above+
    id = 'INPUT1'
    RECEIVING
    control = lr_input.
    lr_matrix = cl_wd_matrix_head_data=>new_matrix_head_data( lr_input ).
    lr_input->set_layout_data( lr_matrix ).
    CALL METHOD lr_container->add_child
    EXPORTING
    index = 1
    the_child = lr_input.
    ENDIF.
    Code it in WDDOMODIFYVIEW...

  • How to make Offline Interactive form Dynamic in nature?

    Hi,
    I am using SFP to create Interactive forms. In Form properties -> Defaults, I have set "Interactive Form" and "Dynamic Form" in Preview box... Data is read from XML and in the preview tab of SFP, form works just fine.
    In the function module call, I have set Fillable = 'X' and also Dynamic = 'X' for docparams.
    When I run the program and create the form, drop down list is not displayed properly.. when I had not set dynamic = 'X', I could not see any value at all in the drop-down field.. after setting dynamic = 'X', I just see one (first) value populated in the drop-down field, but the field does not show any drop-down to choose other values from..
    am i missing any setting or doing anything wrong?
    thanks.

    Hi,
    I am using SFP to create Interactive forms. In Form properties -> Defaults, I have set "Interactive Form" and "Dynamic Form" in Preview box... Data is read from XML and in the preview tab of SFP, form works just fine.
    In the function module call, I have set Fillable = 'X' and also Dynamic = 'X' for docparams.
    When I run the program and create the form, drop down list is not displayed properly.. when I had not set dynamic = 'X', I could not see any value at all in the drop-down field.. after setting dynamic = 'X', I just see one (first) value populated in the drop-down field, but the field does not show any drop-down to choose other values from..
    am i missing any setting or doing anything wrong?
    thanks.

  • Applaying Online interactive form tutorial -Image field problem

    h1Assalam alikom
    hi all
    i faceing a problem with creating image field in adobe intercative form
    i followed the steps included in the online interactive from for image field but there is an error
    after rendering the form
    knowing  that it worked for the sample given with the tutorialh1
    The error is as follows
    script failed (language is formcalc; context is xfa[0].form[0].ReportData[0].#subform[5].imageField[0])
    script=this .value.image.href=xfa.resolveNode(this.value.image.href).value;
    Error:An attempt was made to reference property 'Value' of non-object in SOM expression
    xfa.resolveNode("http://amercet:51500/webdynpro/resource/xccre.cic.com/contract_print/Components/com.cic.xccre.enquiry.com_cn_print.com_Cn_print/villasZone.jpg").value

    Dear Engineer Naguib,
    Please refer to the following post:
    [Adobe Forms and Dynamic Images]
    this.value.image.href = xfa.record.Images.URL;
    Replace "xfa.record.Images.URL" by "xfa.record." + path to URL attribute in data hierarchy.
    Regards,
    Motaz

  • Interactive Form - Dynamic Table - OVS

    Hi,
    I have an interactive form with dynamic table. I have few other fields which are not part of the table, but do participate in Object Value Selection. The table fields are bound to context variables. I am able to add more rows to the table. However, the moment I use OVS on the other fields, my table rows are getting lost.
    I tried with both "Generate PDF" and "Update PDF" mode. Both have the same behaviour. Why are my table rows getting lost when I am using OVS?
    Any idea?
    Thanks
    Ram

    Hi,
    Select the InputField1 and goto Script Editor and select the Event type: "Change" and Language as "FormCalc" and in editor write the below code:
    InputField2.rawValue = Num2Date(IsoDate2Num($.rawValue)+7,"DD/MM/YYYY")
    Based on your requirement change the display pattern of both the date fields in the object pallette.
    Note: Make both the fields as Date/Time Fields and not TextFields.
    Regards
    Pradeep Goli

  • F4 Help for a dynamic input field( class CL_DD_INPUT_ELEMENT)

    Hi all,
    I am programming a dynamic document which has several input fields on it. I want to program F4 helps for these fields, does anyone have an idea how I can do that?
    I have the idea to program a button(class CL_DD_BUTTON_ELEMENT) next to the input field and manually program an F4 help in the event handler of the button. But I do not know how I can handle pattern entries with '*' etc. in the input field. Is there a function module which could give me an F4 list(F4IF_INT_TABLE_VALUE_REQUEST could not be used, because it needs a dynpro field as a return field, which we do not have in this case).
    Kind Regards,
    Sükrü

    hi
    good
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE node.
    allows you to define further nodes for dynamic selections. If the node has type T, you can use TABLE instead of NODE. The user can then decide at runtime the components of the node for which he or she wants to enter selections. Dynamic selections require special handling in the database program
    F4 HELP->
    AT SELECTION SCREEN ON VALUE REQUEST FOR P_SACHA.
        PERFORM VALUES_SACHA.
    THANKS
    MRUTYUN^

  • Dynamic input fields

    I need to dynamically generate the input fields based on the results returned from the query. How do I name each input fields differently.
    Eg:-)
    Say I have 5 rows returned from EMP table. I need to generate 5 input fields to change their names??
    How does the XSL script looks like??
    null

    First one - javascript good.
    Second one - take user to another page.
    [JavaBean and Servlet are not interchangable, JSP and Servlet are]

  • Upload interactive form and access field values in WD component

    Hi Experts,
    I want to upload a prefilled  interactive adobe form in my webdynpro component and then I want to read the values filled in the form in my webdynpro component.
    I don't want to display the interactive form in the WD component. Just need to read the values.
    Please let me know how can I do it.
    Warm regards,
    Sushant Singh

    You can use the fileupload and filedownload uielements.
    Check these links:
    [File Upload|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm]
    [File Download|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/09/a5884121a41c09e10000000a155106/content.htm]
    When you upload a file and save in SAP, are you saving it as xstring.
    If yes follow these steps for filedownload.
    Follow these steps for file download:
    1 Create FileDownload uielement in your View
    2.Create an Attribute of type xstring.
    3.Bind this attribute to the data property of your Filedownload uielement.
    4. during fileuplaod as you are saving the document in xstring format, fetch the same from your database table and pass the value to filedownload i.e set the attribute bound to data property of filedownload uielement with the xstring content.

  • Dynamic Input field creation - issue with bindValue in loop

    Hello,
    I am creating context node elements at runtime. My node looks like this -
    LocalNode
      Question
      Answer
    for(int i;i<wdContext.nodeLocalNode.size();i++)
    wdContext.nodeLocalNode().setLeadSelection(i);
      IWDTextView TV1 = (IWDTextView)view.createElement(IWDTextView.class,"TV"+i);
      TV1.setText(wdContext.currentLocalNodeElement().getQuestion());
       mainGrp.addChild(TV1);
       IWDInputField IP1 = (IWDInputField)view.createElement(IWDInputField.class,"TE"+i);                             
      IP1.bindValue("LocalNode.Answer");
       IP1.setValue(wdContext..currentLocalNodeElement().getAnswer());
       mainGrp.addChild(IP1);
    Please note: Question column is the textView and Answer column is the input field
    The output should be as follows-
    Question               Answer
    Header                  None
    How Many             7
    Comments             Maybe valid
    Do you agree        Yes
    Although the text view displays correctly, the input field only shows the last record value and the output currently displays as follows-
    Question               Answer
    Header                   Yes
    How Many             Yes
    Comments              Yes
    Do you agree         Yes
    What am I doing wrong here?
    How can I bind the corresponding values to the input field in a loop?
    Regards,
    Nisha

    Hi,
    Could you please provide the code .
    Regards,
    Sunil.

  • Dynamic input fields for Doc Props in Batch Mode; Acrobat Pro 9

    I'm using Acrobat Pro 9.  I'm looking for a way for Acrobat to automatically fill/replace the Title and Subject fields of the document properties with the file name of the PDF it is processing during batch mode.  Currently I have this step set to interactive and must type the name in for each file as it is processed.  Is there a script I can use? A macro? Heck! A Hack? It would literally take weeks off of my monotonous work load as the file names are long and there are thousnds of them to be processed.
    Thanks,
    Photonogon

    If you want the file name with the path, you could add the following JavaScript:
    title = path;
    subject = path;
    If you just want the file name:
    var filename = path.split("/").pop();
    title = filename;
    subject = filename;

  • Using Adobe interactive forms in CAF

    Dear,
    We're setting up the following flow :
    1/ Adobe Interactive Form -> Enter data, press button, triggers webservice, starts GP.
    2/ GP -> Does RFC call with values from form, returns different values
    These steps pose no problem at the moment, but we're unsure how to proceed with the next steps. A new interactive form needs to be sent with the new data, which should then trigger the next step in the GP upon completion.
    Is this possible, to do this and still stay in the same GP?
    We can generate a form with an RFC call if necessary, I'd even prefer this, but then how do we know what to send back to the GP to stay in the same GP? Can we call a specific step in an existing GP to trigger the next one?
    Thanks in advance,
    Frederik-Jan

    Basically this example described by SAP itself :
    http://help.sap.com/saphelp_nw04s/helpdata/en/c4/8d4a4273bb3830e10000000a155106/frameset.htm
    The problem is, I haven't found the description of how to do this. Only that it's possible, which is little help sadly enough.
    Example 1: Offline Form for In-Process Use
    You can use such form to execute certain process steps offline and get data required for the next steps in the process.
    For example, you can create a form that is sent to the processor by e-mail. The recipient enters the required data in the form offline, and submits it back to Guided Procedures (GP). The input data is then passed to the relevant parameters of the next action in the process.
    To implement this scenario, you must:
    ·        Design an appropriate interactive form with input fields for all required data, and a Submit button that sends the information back to the GP framework.
    ·        Create an interactive form callable object with the following configuration parameters selected:
    ¡        Enable Use in Guided Procedures
    ¡        Create an Offline Interactive Form and Send it by E-Mail
    ·        Add the callable object to an action, and insert the action into the relevant block and process.
    ·        Consolidate the parameters, so that the output of the interactive form is mapped to the input of the next action in the process.
    The predefined Check User block implements this scenario.

  • Changing the background of a text field in adobe interactive forms

    Hello All,
    Is there any way to change the background colour of text field in interactive form dynamically.??
    Thanks,

    Naresh,
    Change the language to JavaScipt in Script Editor of LiveCycle Designer and use the following code to highlight the area of TextField where R,G,B means that you have to give the RGB values of the color you want.
    <YourTextFieldName>.border.edge.color.value = "R,G,B";
    For eg:- If you have a textfield with name TextField1 then this will highlight the TextField1 area in red color.
    if ((TextField1.rawValue==null) || (TextField1.rawValue==""))
      TextField1.border.edge.color.value = "255,0,0";
    You can use this on exit event of Textfield1 or at the submit button where you check the form data.
    Chintan

  • Dynamic table in webdynpro interactive form not working. Urgent

    Hi guys,
    I am facing a problem when trying to retreive data entered in interactive form dynamic table.i can get the data entered in non dynamic fields no problem.
    I have a node structure like this
    Root
       Data 1...1 singleton and non tried both
           Table 1...n singleton and non tried both
    In my adobe form i tried adding rows using add instance, and also using add button in webdynpro native. In the same method that adds row i simulated the submit button to create row in WD context! It adds rows but any data entered later is lost. One more thing i have noticed is it sometimes works after adding just one row! Data is passed to context but from next row it doesnt work! What am i missing?
    I also tried adding a button in webdynpro tray and adding the row directly to the context. new row is created in form but any data entered in new rows is lost!
    I am unable to obtain the data entered in Dynamic fields. I thought i would try the xml reading method but the problem is after crating a couple of rows dynamically if i go save pdf locally the new rows are not showing up in the pdf!
    I have seen a post which said using the if_wd_iactive handler to set the form as dynamic but that method is not available in our system! Sorry i am not in front of an SAP system so i cant type exact names!
    I tried using zci update program/ etc etc but i am still struggling at the moment. Any help would be much appreciated! Pls ask if you need more info.
    Regards
    Naresh
    Edited by: naresh dwadasi on Oct 7, 2011 9:05 PM

    problem solved! I had to recreate the form. not sure if i corrupted the webdynpro scripts etc by mistake.

  • HCM interactive Forms - hide fields and backend connection

    Hello,
    we plan to implement a personnel transfer workflow based on interactive forms. Because in one step the user should not be able to see a couple of fields, it is possible in interactive forms zu hide fields based on the users role?
    I read a lot the last days but what I still havent found out and I hope you can push me in the right direction is, how the connection between backend and Form is working.
    Inside of an example form and in the documentation is descriped to use this below code to implement a bushbutton and the send message to create a server round trip. But if I create 2 pushbuttons with the same code, how do I know which button was pressed? Or do I have to create my own events somewhere? Or is there only this one event and I have to set a hidden field with some value via javascript or formcalc to find out whats going on in the form?
    $record.CONTROL_PARAM.ISR_EVENT = "USER_EVENT_CHECK"
    ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
    best regards,
    Kai

    Hey Rajesh
    I'm not sure it will work - but its worth a try.
    Every time i wont to hide some subforms or UI elements - I determine them as "invisible" by default - and when the conditions are right - I turn them to "visible" (negatively way).
    Hopefully it will help you.
    Eyal

  • Fields Disabled in ADOBE Interactive Form

    Hi Guys,
    While developing a WebDynpro application which have ADOBE form into it. We want to make this form as an interactive form, but the fields remain disabled and is not allowing for entering any value.
    Please not that we do not have SAP Portal into the landscape, and we are developing the Web Dynpro application using SE80.
    Thanks & Regards,
    Sandip

    We don't need any file on the system, it will automatically be generated....
    A sample would be:
    <?xml version="1.0" encoding="utf-8" ?>
    - <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xfa="http://www.xfa.org/schema/xfa-template/2.1/" xmlns:xfadata="http://www.xfa.org/schema/xfa-data/1.0/" xmlns:xhtml="http://www.w3.org/1999/xhtml">
      <xsd:import namespace="http://www.xfa.org/schema/xfa-data/1.0/" />
    - <xsd:element name="NODE" version="2" fromWDContext="true">
    - <xsd:complexType>
    - <xsd:sequence>
    - <xsd:element name="NODE1_1" minOccurs="0" maxOccurs="1">
    - <xsd:complexType>
    - <xsd:sequence>
    - <xsd:element name="EMP_NAME" type="ZDE_NAME">
    - <xsd:annotation>
      <xsd:documentation>Name</xsd:documentation>
      </xsd:annotation>
      </xsd:element>
    - <xsd:element name="COMPANY_NAME" type="NAME1_GP">
    - <xsd:annotation>
      <xsd:documentation>Company Name</xsd:documentation>
      </xsd:annotation>
      </xsd:element>
    - <xsd:element name="CURRENT_DATE" type="DATUM">
    - <xsd:annotation>
      <xsd:documentation>Date</xsd:documentation>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
    - <xsd:simpleType name="ZDE_NAME">
    - <xsd:annotation>
      <xsd:documentation>Name</xsd:documentation>
      </xsd:annotation>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="50" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="NAME1_GP">
    - <xsd:annotation>
      <xsd:documentation>Name 1</xsd:documentation>
      </xsd:annotation>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="35" />
      </xsd:restriction>
      </xsd:simpleType>
    - <xsd:simpleType name="DATUM">
    - <xsd:annotation>
      <xsd:documentation>Date</xsd:documentation>
      </xsd:annotation>
      <xsd:restriction base="xsd:date" />
      </xsd:simpleType>
    Regards,
    Reema.

Maybe you are looking for