cancel
Showing results for 
Search instead for 
Did you mean: 

how to restrict append row upto 5 in ALV Webdynpro.

Former Member
0 Kudos

how to restrict append row up to 5 in ALV Webdynpro.

Accepted Solutions (0)

Answers (2)

Answers (2)

nishantbansal91
Active Contributor
0 Kudos

Dear PS,

When user click on Append button read the context node.

Loop that internal table  into WA.

and If WA is initial it means that ROW is initial.

Below is the sample code.

data i type sy-tabix.

Loop at IT_ITAB into wa_itab.

if wa_itab is initial.

      i = i + 1.

endif.

if i GT 5.

""""add the message into message handler.

endif.

endloop.

Thanks

Nishant

Gowtham
Contributor
0 Kudos

Hi,

I assume that your question is you want to build restrictions when the user is appending new rows more than 5 time in one session.

In this case you can maintain a local Counter attribute under attributes tab , Each time when the user adds a row increase the counter by 1 , when the counter reaches the count 5 then don't allow the user to add more rows and display the error message for the same.

- Gowtham