cancel
Showing results for 
Search instead for 
Did you mean: 

only one row appendable at a time in alv

Former Member
0 Kudos

I would like to limit only one blank row at a time in my alv grid. Means, if i append a row using the standard "Append Row" Button, the user should not be able to append a second blank row till he fills out the first one.

Any hints ??

regards,

Priyank

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Priyank.

You could register for the ON_STD_FUNCTION_BEFO or

ON_STD_FUNCTION_AFTE events of the ALV component. This means to create

an event handler method in your view or component controller for this event.

For example the ON_STD_FUNCTION_AFTE should be thrown after the append

action. Then you could remove the last appended row from the node if necessary.

But this is just a guess as I never have used these events but the names and

descriptions sounds like this could be your solution.

Cheers,

Sascha

Former Member
0 Kudos

Hi Sascha,

Thanks for the reply but it does not work.

i put some code in the ...AFTER event, but it seems it is not executed on clicking the append button. I set a breakpoint there but it did not break.

any other suggestions?

my main problem is that when i append multiple rows in the alv and subsequently save the data from this alv grid, somehow one field is getting cleared and not holding the value the user has entered. for example, if i add 5 rows and then put data in these rows and save it, second row shows an initial value for a date field in the table. rest of the rows hold the correct value. i don't know if it is a webdynpro bug or my mistake...i tried redoing everything but to no avail...same problem everywhere.

thus i m trying to restrict the user to one row at a time only. it will be ideal if i can somehow solve the original problem. if not, even restricting to one row will be good enough.

regards,

Priyank

Former Member
0 Kudos

i used a work around. i retrieved the contents of alv in wddomodifyview and deleted blank rows (leaving one row only) .

for now i have restricted to only one row appendable at a time.

i leave the post still open for solving my original problem.

regards,

Priyank

Answers (0)