cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically increasing the rows of a table in interactive forms.

Former Member
0 Kudos

Hi All,

I am new to adobe forms.I am developing an interactive form in webdynpro abap.I have a requirement such that i have 3 columns in a table and the first 5 rows are default i.e, i will add it during design time.when we enter something in the 5th row,6th row should automatically be created which wil be empty.I also need to retrieve the data back into the webdynpro component when user enters something in it and clicks the submit button.can anyone tel me how wil i generate this table and when someone enters something into the form how wil i store the data back in the component.

my context node has hours ,minutes and call code as attributes which wil be the column names.

Thanks in advance.

Regards,

Srividya.

Accepted Solutions (1)

Accepted Solutions (1)

vaibhav_tiwari
Contributor
0 Kudos

Hi Srividya,

Go to the following folder in windows

C:\Program Files\Adobe\Designer 7.1\EN\Samples\Purchase Order\Dynamic Interactive\Forms\

There you will find a purchase order pdf form open that in form in form designer and use the scripts written to add rows to the table dynamically.

Hope it will help.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi Vaibhav,

Ur answer was really helpful but i have a few more doubts.if u have done this form using webdynpro then can u tel me how to retrieve the values back and generate an order with those values.

Can u tel me what scripting should i use to set a validation message telling that the date should not exceed the current date.

Thanks,

Srividya.

vaibhav_tiwari
Contributor
0 Kudos

Hi Srividya,

To get values from the fields of adobe form in web dynpro, do the following:

1. Take the node as data source to which you want to pass the values.

2. Now bind the fields of the form to the attributes of the node from the binding tab(in object properties) of the designer.

I don't have much experience about scripts but the following links may help you. Download the pdf from here.

http://partners.adobe.com/public/developer/en/xml/formcalc_2.0.pdf

Also your local Adobe Designer installation includes a FormCalc language reference in a PDF file.

If you have installed Adobe LiveCycle Designer on your C: drive, the FormCalc language reference is in the following location:

C:\Program Files\Adobe\Designer 7.0\Documentation\<country>\FormCalc.pdf

Hope this will help.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi Vaibhav,

Ur replies were very helpful to me.I have already rewarded the points for ur help.Now i have another requirement in which i have a date field with the calendar as the search help.if i put DATS as the data type for that field then it should provide me a calendar as a search help automatically but tat search help is not to be seen on the form.how wil i put a F4 help with the calendar to that field.And also if i enter a future date an error msg should be raised.how wil i to tat.

Former Member
0 Kudos

Hello All,

I found the solution for the date field with the calendar.But i am not able to validate it if the user selects a future date.

vaibhav_tiwari
Contributor
0 Kudos

Hi Srividya,

Write the following script at Exit event of the date field.

if(IsoDate2Num(DateTimeField1.rawValue) > Date())

then

$host.messageBox("Wrong Date Entered")

endif

Here DateTimeField1 is the date field for which the code is written.

The function IsoDate2Num Returns the number of days since the epoch began and the date function Returns the current system date as the number of days since the epoch.

the code is written comparing both the fields.

In case you need current date only then there is field named CurrentDate in the library-->custom fields.

Hope it will solve your problem.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi,

I tried using the code wat you had given but it does not raise any error message if i select a future date...is there any alternative way.

vaibhav_tiwari
Contributor
0 Kudos

Hi Srividya,

Have you written the code at the exit event of the date field and selected the script language as the form calc. This code should work as I have tried it and its working fine here.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi Vaibhav,

As u said i have written the code in the exit event of the field and using formcalc only..here ,my field name which i have dragged from the context is date_value..if i put this in the place of datetimefield1 as u said, it says date_value.rawValue is unknown..wat should i do..

vaibhav_tiwari
Contributor
0 Kudos

Hi Srividya,

Have you used the field type as date time field. if not then create a date time field from library and bind it with the field you want.

Or

Send me the form if its not confidential.

I hope i will do the needful.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi Vaibhav,

Thank you very much for the code.I was getting the error as i entered date_value in lowercase.Now i entered it as it is in the context(uppercase) and it is working fine.

Thanks and Regards,

Srividya.

Former Member
0 Kudos

Hi Vaibhav,

I tried using the script what u had used to increase the rows of a table dynamically but it is not working.Can u tel me how did u create that table? is it using the insert table from the tab or did u put the elements in a subform.i tried both the ways but it is not working.Can u help me on this.

vaibhav_tiwari
Contributor
0 Kudos

Hi Srividya,

Are you using the following script at click event of the add row button

(Script language is java script)

xfa.resolveNode("Table.item").instanceManager.addInstance(1);

here table is the table name and item is the row name.

To delete a row use the following script:

xfa.resolveNode("Table.item").instanceManager.removeInstance(this.parent.index);

I think it should work as its working fine for me.

I have created the form in webdynpro ABAP and i think it should work in SFP transaction and webdynpro java also. As all use the same designer.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi vaibhav,

I am also working on the same scenario in creating dynamic tables. I couldn't get the dynamic table working when i test the project rather it is working fine in the preview of Adobe livecycle designer. can u please tell me anything to be done specific to WD ABAP reg the same.

please refer to the link below where i have posted the same issue. hope that meets your solution

Thanks in advance,

Karthikeyan.R

Former Member
0 Kudos

Hi Vaibhav,

Now i am able to increase the rows dynamically.Thank you very much for the help.Now i am closing this thread.I have few more requirements for which i need ur help.I wil post threads for that.Please do help me.And can you give me ur mail id so that i can take ur help if it is too urgent.

Thanks and Regards,

Srividya.

vaibhav_tiwari
Contributor
0 Kudos

Hi Srividya,

Its my pleasure to help you. I would like to help you in future also. You can contact me on my gmail account. Its vaibhav dot tiwari19 at gmail dot com.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi Vaibhav,

Can u please tel me how did u retrieve data back to webdynpro.i have created the context in WD choosing the fields from the table wat i have created.now after my form is designed i put in a submit button from library-webdynpro native which wil send the data from the form back to my application.but after i enter somethin in the form and click the submit button nothing is reflected into the table.

I also tried puttin in an input field on the view of the component and binding it to the same field of the context but the data is not reflecting after submit.Can u please guide me on this.

Thanks and Regards,

Srividya

vaibhav_tiwari
Contributor
0 Kudos

Hi Srividya,

For flow of data from the form to webdynpro. Do the follwing:

Suppose you have a table on the form and you want to pass data from this form to web dynpro.

1. Create a node of cardinality 0...n or 1.....n. Add attributes to this. Now this node is as a internal table and the attributes are like intenal table fields.

2. When creating the form. Use This node as the data source for the form.

3. Now its easy in webdynpro ABAP to create a table on the Adobe form. Just drag and drop the Data node(from which you want to create table) from the data view on the designer on to the form.

4. Now its already bound to the node you have created and whatever data you will enter in the table that will be reflected to the node. and you can check it by creating a table on the view from the same node.

5. After you will click on submit button the data will reflect to table on webdynpro view.

If its not works then problem could be that the ACF is not installed on your system due to which button is not processing and fields are not reflecting data.

For ACF you can search it on SAP service market place.

Hope it will help.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi Vaibhav,

Now i have installed ACF .But still the data is not reflecting back....I removed the button and tried adding it again but still it is not working.wat should i do.In the properties when i set the layout type to A (acf) it is not allowing me to set it. so i am using the layout type as Z only.

vaibhav_tiwari
Contributor
0 Kudos

Hi Srividya,

Refer to SAP Note 1104060. Perhaps its the last hope.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi Vaibhav,

I have a requirement such tat i have 3 fields namely chain,store and account number in my form.Now when the user enters the chain and store number it should give the account number on the form based on the chain and store.I have a standard function module which gives the account number when i enter the chain and the store.But my problem is i don't know on wat event should i write this to get the account number.Where should i call this function module.wil i be able to get it if i code in the webdynpro component.but i think i need to code it on the form itself.Can u guide me on this.

Thanks and Regards,

Srividya.

vaibhav_tiwari
Contributor
0 Kudos

Hi Srividya,

According to my knowledge its not possible to execute a function module in middle of filling the form using a script at any event of any field on the form. So it seems impossible to have account number based on chain and store using the FM. However for small amount of values(Say less than 10) it could be done by writing script at the exit event of any of these two fields. The script is as following:

if (<field1.rawvalue> == value1 and <field2.rawvalue>== value2)

field3.rawvalue = value3;

else if.............

....

.....

.....

and so on.

Sorry, if it not helps as my knowledge limits me only to this solution.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi Vaibhav,

The scripting wat u gave is not working for my requirement.I am still trying to find solution for that.Now as i told you earlier i have created a table on my webdypro view as well as in the form with the same node.when the cardinality of the table is 1:1 i am able to retrieve data.But when i change the cardinality of the table to 0:n or 1:n then i am not able to retrieve the values.Can u guide me on this.wat exactly might be the prob.

vaibhav_tiwari
Contributor
0 Kudos

Hi Srividya,

We are also having the same problem in getting data from tables. We are still working on this area and hope to find a solution. For cardinality related query refer to following link:

[http://help.sap.com/saphelp_erp2005/helpdata/en/7a/787e40417c6d1de10000000a1550b0/content.htm]

Hope I will give you a solution regarding the table related problem.

Please let me know if you find a solution for it.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi Srividya,

I have an issue in adobe interactive forms while adding the rows dynamically in WD ABAP. The form works fine in Live cycle designer preview. But the same does not work at runtime. Reg this i have also posted a thread in the forum. As u mentioned that you got the form working fine, please tell me if you have faced any issue as mine. Please tell me if you have a solution for the same.

Thanks and regards,

Karthik

Former Member
0 Kudos

Hi Karthik,

I dint face this kind of issue..But i can suggest u few things.

  • The row which u want to increase dynamically must be in a subform.

  • Have you installed ACF?? even that is needed for event handlers like submit.

  • In your webdynpro view on the UI element (interactive form) select the displaytype as activeX and not native.

  • check out the threads which i have posted and use tat code which vaibhav has given in the post. try adding tat code in at exit event n other events and check.It might work sometimes.

  • And as u know the UI element on the view should have the enabled option clicked in the properties.I know u wud have done tat but try checkin it once.

Try out all these.If anything else flashes me i wil let u know.

Do let me know if it is working or not..

Former Member
0 Kudos

Hi Vaibhav,

Even i am trying hard to find a solution to it.Wil surely let u know once i find it.If u find it before me do let me know.

Thanks and Regards,

Srividya.

Former Member
0 Kudos

HI Vaibhav,

I want to populate values for a dropdown on the interactive form.For this i need to send the values from a table which i have created in se11 which is having fixed value range.I need to pass the values from the component itself.I have seen tat in ur application u have populated the values using scripting in ur form.But i want it from a table.I am using webdynpro native elements for this.buttons n rest r working fine in it.Can u guide me on this.

Thanks and Regards,

Srividya.

0 Kudos

Hi vaibhav,

You had given me the scripting to raise an error message if i select a future date. The scripting what you had given me is

if (IsoDate2Num(DATE_VALUE.rawValue) > Date())

then

$host.messageBox("Do not enter a future date")

endif

Now i have a requirement such tat i should not select a past date 6 months older than the current date.Can u please help me in this.its very urgent.

Will reward points for helpful answer

Regards,

Srividya.

Former Member
0 Kudos

Hi Srividya,

I created the adobe form in but in the layout type it's not accepting the put ZCL.

The submit button action is not trigerring..

What is ACF? how to install it can you please help me in the same.... where did i get that s/w in service market place?

can you please me step by step procedure

please help me in the same and also how to add dynamic row in the table and dropdown vaues adding in the form from in the table.Please send me above mentioned

Thanks

Rams

Answers (0)