on 09-15-2009 10:29 AM
Hi Friends,
I am a beginner in adobe forms development.
I want to create an adobe form with dynamic internal table. I.e. addition of rows and deletion of rows dynamically. I have gone through some of the threads in SDN. But still I am not able to make it.
I used following approach for the same. Kindly correct me if i am wrong.
Step1: I have created a context with the required fields in webdynpro abap with cardinality 1..1.
Step2: In the adobe form I created a table using table assistant.
Step3: a. Wrapped the table into a subform and set the content as "Flowed"
b. Selected "Repeat Table item for Each Data Item" at table level and body level with min count as '1'.
c. Selected "Repeat Table item for Each Data Item" at header row with min count and max as '1'.
Step 4: Added two Webdynpro native submit buttons by name "Add" and "Delete" and coded as follows:
For add button:
var nTableLength = Table.nodes.length;
var nNumRow = 0;
for (var nCount = 0; nCount < nTableLength; nCount ++) {
if ((Table.nodes.item(nCount).className == "subform") & (Table.nodes.item(nCount).name !== "HeaderRow")) {
nNumRow = nNumRow + 1;
}
}
if (nNumRow == 7) {
xfa.host.messageBox("The maximum allowable number of rows is 7. You cannot add any more rows.", "Warning", 3);
}
else {
Items.Table.Row1.instanceManager.addInstance(1);
}
Still dynamically rows are not getting created. But when i click on add/delete some process is happening.
Do I need to write any logic in Webdynpro abap??.
Please clarify.
Thanks in advance.
Regards,
Phani.
Hi,
Refer this Article.
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/802f0ed1-a17a-2c10-7db4-d515a5b047ed
Regards,
Runal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Runal for the document and great work.
As per your document I have added the adobe form onto webdynpro abap. But the form has become non interactive and buttons got disabled.
The same form when i triggered through program its become interactive. Then also the add/remove buttons are not working.
Is it a problem with the version of the adobe life cycle designer? I am using 7.1 Version. Please clarify.
Thanks again.
Regards,
Phani.
Hi,
If you are calling the Form through Web Dynpro ABAP then add this peice of code in the WDDOMODIFY method of the view.
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(u2018INTERACTIVE_FORM_1u2019). LR_METHOD_HANDLER ?= LR_INTERACTIVE_FORM->_METHOD_HANDLER. LR_METHOD_HANDLER->SET_LEGACY_EDITING_ENABLED( abap_true ).
When you call the Form through SE38 or from SAP GUI the interactivity is reduced to a great extent.
Well, the version of ALD you are using should not pose such problems. But if nothing works out trying upgradng to ALD 8.0
Regards,
Runal
Hi Runal,
I'm following your document, but I'm not getting the adobe forms buttons working. I try to put the code that you mention, but I got an error message in the WebDynpro View saying: "field get_element is unknown", this is the code that I'm adding in the
method WDDOMODIFYVIEW.
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(u2018ZDYN_TBL_FORMu2019).
LR_METHOD_HANDLER ?= LR_INTERACTIVE_FORM->_METHOD_HANDLER.
LR_METHOD_HANDLER->SET_LEGACY_EDITING_ENABLED( abap_true ).
If I double click in the class CL_WD_INTERACTIVE_FORM, I can't see any method GET_ELEMENT.
I don't know where the problem is, could you help me?
thanks,
Luis Lara
Hi Luis Lara,
"GET_ELEMENT" is a method of interface "IF_WD_VIEW".
And you have to write the code like:
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( 'INTERACTIVE_FORM_1' ).
LR_METHOD_HANDLER ?= LR_INTERACTIVE_FORM->_METHOD_HANDLER.
LR_METHOD_HANDLER->SET_LEGACY_EDITING_ENABLED( abap_true ).
Where 'INTERACTIVE_FORM_1' is the name of Interactive form element.
Ankur Jain
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.