on 05-20-2014 11:14 AM
Hello Friends,
We all know that the std button Append/Insert , can insert only one row on a single click.
My specific requirement is :
1) that when User clicks on this button(single click), we need to see 'n' rows( n will be provided as a input box for th user to provide like 5,10,12 etc) appended/inserted at the end of the ALV list .
2) In all the new rows, some of the columns should be defaulted to some data.
Is there any approach to achieve this requirement?
Regards
Vinay.
Hi,
With standard 'Insert Row' , you need to select the n records( using CTRL) and click on 'Insert Row' , then n number of rows will be inserted before the selected records. And you can use ON_DATA_CHECK method to set the default data by looping the r_param->t_inserted_rows.
hope this helps,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
'Append Row' function adds a single row at the end of the ALV regardless of the selected row(s). You could create a custom button and on action of that, just append initial lines (or with default values) to the internal table and bind the context node using bind_table( ) method.
hope this helps,
Regards,
Kiran
Hello Kiran,
As i mentioned earlier, I already implemented the above said approach. Its working..
But just wanted to check if there is any facility as these new rows will not be captured centrally in the
r_param->t_inserted_rows (in data check event). So that i can move on with other processing .
FYI... there is a method in the class CL_SALV_WD_CONFIG_TABLE - IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_APPEND_ROWS_ALLOWED( which is obsolete now).
I dont know why this facility is not provided.
May be we need to check this faciltiy as well with Thomas Jung to re-add this in future.
Anyways..i continue with my approach...
Regards
Vinay.
Hi Vinay,
Instead of Standard Append/Insert ALV button, Create Custom button on Alv toolbar then will do this requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jack,
Yes, I have already included a custom button. My approach was stick to standard way.. which will decrease my coding efforts significantly and maintain consistency with Modify and delete buttons.
Just checking with the forum , if ever someone did it before.
Pls refer to this on saphelp.
Adding and Deleting Rows - Web Dynpro for ABAP - SAP Library
I tried it , but couldn't succeed.
Regards
Vinay.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.