cancel
Showing results for 
Search instead for 
Did you mean: 

Adding rows dynamically

0 Kudos

I designed 1 form in trasaction SFP. I placed a button ADD, when I click it has to generate a new line. It is happening when looking in PDF preview but when I generated the PDF and click. It doesn't work. Each field in the table is bonded to an internal table. So internal table has 4 records and it displays 4 rows after generated. But when I click add button, it is not appending the row. What might be the reason.Please advice.

-Mani

Accepted Solutions (0)

Answers (3)

Answers (3)

nikhilkup
Active Participant
0 Kudos

Hi, have you written code in the javascript to add a row ? In that case it wont work in HCM forms. or else it should work.

Edited by: Nikhil Poojari on Aug 20, 2009 7:54 AM

Former Member
0 Kudos

Hi Mani,

As said earlier in the post , when you add a row in the PDF that happens locally in the PDF. To reflect that new row also in the context you will have to make a server round trip. And during the round trip append a row to the context that is bound. So when you use the method Get_static_attribute_table to read the context, you will have all the rows that are currently present in the PDF table. Use 'Submit to SAP ' button from Web-Dynpro Native Library to trigger the round trip during row addition, also in the event of this buton put your code to add a row in the PDF table.

Regards,

Runal

Former Member
0 Kudos

if you want to dynamically create rows in your PDF and submit them back to your internal table, you will have to make a roundtrip to the web dynpro to append a new element to your node to hold the row you just added.