cancel
Showing results for 
Search instead for 
Did you mean: 

how to handle the dynamic rows in pdf table

former_member188831
Contributor
0 Kudos

Dear All,

earlier i posted one thread reagarding getting pdf table data

[;

this is working fine, i sued bind_table in wddoinit, but here i am fixing the rows count and bind_table.

for example i have initially taken row count as 3 then i want to increase the rows in pdf table.

i know we can use the formcalc to increase the rows by taking a button in pdf layout.

this also working, but the data is not picking for newly added rows, i hope the problem is because the table node in the context is not binded for this new rows.

even i tried using with webdynpro native button controlls still not working.

any one help me what exactly this bind_table is doing and how to handle this code in form calc.

since my table is pdf table.

Thanks,

Mahesh.Gattu

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member188831
Contributor
0 Kudos

not looking on it

Former Member
0 Kudos

Hi Mahesh,

The functionality of the BIND_TABLE method of the interface IF_WD_CONTEXT_NODE is as follows:

This method is used to bind your data which is present in your internal table to the context node created in your View or in the Component controller.

This method is mainly used for ALV/TABLE/DROPDOWN. For all these UI elements, you need to pass he bulk data in a table format. To enable this we go for BIND_TABLE method.

One more thing which you have to notice is, When you create a PDF layout using SFP, and then use that Form name, say, ZFORM_PDF, in your Webdynpro View under Interactive Form, the node will created with the specific definition obtained in the SFP Form at that time.

I mean to say, the node is created statically with the definition obtained in the SFP Form at a specific time.

From then onwards even if you add a new row in PDF, that wont be reflected in the WDC as the definition is predfined.

Here you need to think of the option of creating a node Dynamically based on the node changes in SFP form.

I too had this constraint earlier, but was unable to overcome this.

I hope i am clear in explaning what the BIND_TABLE does in WDC.

Good day!

Regards,

Shashikanth. D

former_member188831
Contributor
0 Kudos

Hi Shashikanth,

Thanks for your reply, but the concept is okay with me what the Bind_table is doing, i expected littile bit technically whether is it possible to use the same code in teh FORMCALC so that i shall write the script when i click on add row button on PDF(SFP Layout).

if any once can give solution for this is really aprciable and greatful.

other wise i need to take additional input field on WD view so that end user will enter how many rows he/she would like to use based on that i can fill the itab and use Bind_Table method.

but the thing is in some pdf form i have even around 4+ tables so thats what i am trying to handle it from a single add button row. even i tried using the webdynpro native controls add subform row button etc.. still not working for new rows.

Thanks,

Mahesh.Gattu

former_member188831
Contributor
0 Kudos

any updates on this is appreciable...

or help me some one from sap...

Thanks,

Mahesh.Gattu

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

It is not supported within WDA to have rows added view FORMCALC. They will not post back to the context. The only supported method is to trigger a server event from within the form or from outside the form and to add the blank rows to the context that is bound to the form table.

former_member188831
Contributor
0 Kudos

Hi Thomas,

Thanks for your reply, can you plese let me know how can i use server event within the form, i tried for out side the form to bind the table with blank rows.

in wddoinit if i use bind_table with 5 rows form table is populating with 5 rows, but when i take a button out side the form and use bind_table by incremeting the rows the pdf table rows are not adding, if i enter some thing on pdf table then click on add row button then the table rows are getting add. if i don't do any action on pdf table and click on add row button pdf is not getting update.

but as client need the button on form it self to add the rows, so please let me know how should i handle the server event to update the blank rows to context node.

may be i shall use the submit method of Interactive form element, but in case i have more than one table like 4,5 tables on pdf how to handle for all.

please do suggest me.

Thanks,

Mahesh.Gattu

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>but as client need the button on form it self to add the rows, so please let me know how should i >handle the server event to update the blank rows to context node.

>

>may be i shall use the submit method of Interactive form element, but in case i have more than one >table like 4,5 tables on pdf how to handle for all.

Yes you will need to use a submit button. You can place more than one submit button on a form. Although there is only one onSubmit event handler per interactiveForm UI element, there are some event parameters. I'm afraid my ABAP system is not connected to a Java system at the moment, so I can't test. However I suggest that you test and see if you get any differences in the onSubmit parameters based upon which of two submit buttons is pressed on the form.

The other option is to place the buttons outside of the forum in the surrounding WDA area. This way you have no problem handling the events.

former_member188831
Contributor
0 Kudos

Hi Thomas,

Thanks for your confirmation,

i have checked the paramets of submit button we have only wdevent parameters they are

CL_WD_CUSTOM_EVENT

PARAMETERS - Hashed table having 2 columns

ID ->IF_TDS (Interactive Form element Name)

CONTEXT_ELEMENT ->->

these are same in case of submit button1 and submit button 2.

NAME - Name of the Button Event i.e ON_SUBMIT ( this is also same in both the buttons).

so i think it is not possible to work with multiple buttons by assinging to multiple tables on form.

The other option is to place the buttons outside of the forum in the surrounding WDA area.
 This way you have no problem handling the events.

in wddoinit if i use bind_table with 5 rows form table is populating with 5 rows, but when i take a button

out side the form and use bind_table by incremeting the rows the pdf table rows are not adding, if i enter

some thing on pdf table then click on add row button then the table rows are getting add. if i don't do any

action on pdf table and click on add row button pdf is not getting update.

is there any issue.. if i don't keep cursor on table and type some thing.. the add button is not updating

the rows.

if i take a button on wd view i.e outside the form and use bind table i shall add the rows.. but in case of remove rows how to do.

in case of normal table we can use Remove_Element( ) but how can i know the selected row from the pdf table, please help me in this concern also.

Regards,

Mahesh.Gattu

Edited by: Maheshkumar gattu on Jan 7, 2009 3:57 PM

Edited by: Maheshkumar gattu on Jan 7, 2009 4:03 PM

Edited by: Maheshkumar gattu on Jan 7, 2009 5:21 PM