on 04-27-2010 10:58 AM
Hi Expert,
In SAP interactive form OFFLINE Scneario.
I have a deep structure. In which i am using other structures like kna1, knb1, knvv.
Now in KNVV is again a deep structure in which i have a table type.
Now a draged and droped this table type to my layout so i got a table.
I Need to have two buttons ADD and Delete, To add and delete a row in table repectvily.
I saw other threads also but get not do it.
My table type attribute's name in KNVV structure is VLACT.
I write following code on click action of ADD button
-
data.#subform[0].Button1::click: - (FormCalc, client) -
VLACT.row.instanceManager.addInstance(1);
xfa.form.recalculate(1);
but it shows error msg
accessor "VLACT.row.instanceManager.addInstance(1);"
is unknown.
Also i am not able to see tabel itself wich i draged and droped. Only two buttons are there.
Plz help
Thanks ? Regards,
Arvind
Hello,
I am not 111% sure, but I think this doesn´t work with tables. In fact that would definitely work if your "table" would be built from subforms. But I have never used it this way the table (the MS Word-like table). At least this is the type of table you get after drag and drop from data view.
Regards Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check this one: http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_ba...
For example page 113:
if (advanced.Subform3.instanceManager.count ==
advanced.Subform3.instanceManager.max) {
xfa.host.messageBox("You have reached the maximum number of items
allowed.","Combining Instance Manager Concepts", 1);
}
else {
advanced.Subform3.instanceManager.addInstance(1);
xfa.form.recalculate(1);
}
I am not sure but a) your naming convetion is a little crazy or b) you´re not working with the right object.
Regards Otto
That could be anything. Does your subform expand? (auto-fit height = checked).
addInstance(1); the 1 is important here, do you use it?
xfa.form.recalculate(1); also this one looks useful, probably the alternative (??) is to make the new row visible explicitely. But I don´t have the exact code here with me. But you can search for something like visible(1) or something like that.
Otto
Hi Otto,
This is the code i am using to add new row.
Also all the settings in form are correct like "Repeat row for each data item" etc.
I want to have at most 7 rows.
________________________________________________________
var nTableLength = Table1.nodes.length;
var nNumRow = 0;
for (var nCount = 0; nCount < nTableLength; nCount ++)
{
if ((Table1.nodes.item(nCount).className == "subform") & (Table1.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 {
Table1.Row1.instanceManager.addInstance(1);
xfa.form.recalculate(1);
xfa.host.messageBox("row added" );
}
__________________________________________________________________
I get the msg form the statment xfa.host.messageBox("row added" );
But i can not see the newly added row
Plz help
Thansks & Regards,
Arvind
What about these?:
http://groups.google.com/group/livecycle/browse_thread/thread/46c9b9d26fb824fd/fe141c6da715c808
Means: is your form dynamic? (explicitely set to dynamic)
Otto
Hi Otto,
I created form from SFP. so i can not insert web Dynpro code to make it dynamic.
When Save As the form there is no Dynamic pdf option in ht edrop down
How to make this offline form Dynamic??
i have checked all the form properties, and found thses correct as per m understanding.
I am doing very silly mistake but not able to get it..
What else i can try.
Plz sugess,
Thaanks & Regards,
Arvind
You´re kidding me, right? You didn´t search for a minute right? Well, next time search first, ask later. I can also recommend you to get some SDN points to prove you have helped anybody as well and you thus are worth helping.
DATA lv_sfpdocparams TYPE sfpdocparams.
lv_sfpdocparams-dynamic = 'X'.
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams = lv_sfpdocparams
Regards Otto
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.