on 11-22-2007 6:52 AM
Hi all,
I have created an application in WD4A, where i added an INSERT button which creates a new row every time it is inserted. I want to put a check on it that if the rows exceed 30, it should stop inserting further rows.
being a new programmer to Dynpro, i dont have much idea about that. Please tell me how to do that & what code do i need to put to stop inserting the next row & displaying an error or Information message on the screen.
Regards
Parteek.
Hi Parteek,
u can use the method get_elemet count of interface if_wd_context_node to get the no of elements. Then in modify view fet focus to the alv and make the insert button hide.
eg:
in the mofify view check if the no of elements in more than u expexted
then
l_ref_interfacecontroller = wd_this->wd_cpifc_alv_name ( ).
l_reference = l_ref_interfacecontroller->get_model(
).
Data: lr_std tYPE REF TO if_salv_wd_std_functions.
lr_std ?= l_reference.
lr_std->set_edit_insert_row_allowed( abap_false ).
Regards
Sarath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi yashpal
I am already using that method but i need that after inserting 30 rows, i should display an error message that user can not insert more than 30 rows, what do i need to do for that? so which condition (IF...ENDIF) i need to put & what should i write to stop the transaction after the count is 30.
plz help.
thanx for the reply.
Rgds.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
use the method GET_ELEMENT_COUNT of the interface IF_WD_CONTEXT_NODE to get the no of elements in ur node in which u r adding the row..
Regards
Yashpal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.