on 04-24-2007 11:23 AM
Hi SDN's,
I m having a Veiwset(Grid) like
___________________________
VIEW1
___________________________
VIEW2
___________________________
View1 is having one dropdown list(say selecting Country), view2 is having custid, custname input fields.
while executing program, i hav to select sme country frm view1,
so the cust-id in the view2 should start with country key and view1 should be in read-only mode.
can u give me sme idea.
thanks in advance
Hi Renushree,
You can achieve this using context mapping http://help.sap.com/saphelp_nw2004s/helpdata/en/44/a2384162316532e10000000a1550b0/frameset.htm
All three attibutes (country, custid, custname) shd be present in the controller context.
Map country for view1-controller.
Map customer details for view2-controller.
In view2, display the customer details depending on the country selected.
Hope this helps.
Regards,
Sangeeta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Renu,
This means that event raised in view1 should affect action in view 2.
Lets say your DDK(dropdownkey) in view1 is DDK1 and ip2 is input field from view2,
Now there are two ways to get what you want,
1: if the context attribute, which you have mapped to DDK1 is in component then map that to view2 too, here, in OnSelect action of DDK1 when the view1 navigates to view2, that attributes value can be read and then corresponding action can be performed . This action is nothing but defining proper customer id in view2.
2:
a)define a method in component controller,
b)declare an event too , in component controller
c)goto View1, in properties tab , under Required controller , define use of component controller(if it is not there) where you have defined a method and an event.
d)goto view2, define an event handler here, in its "Event Source" give name of your component controller and in "Subscribe event" give the name of event defined in component contr.(define use of controller here too, in properties tab)
e)in OnSelect action of DDK1(defien one action for this and assign it to OnSelect property), call the method defined in component contr as,
wdThis.wd<component>Controller().<method name>();
in this method of component contr write code,
wdThis.wdFireEvent<event defined in component contr>();
Since this event is subscribed in view2, this event handler will get called, in that event handler write your code of setting customer id for view2 depending upon the country of view1
2nd one is little difficult approach, 1st one is simple but there you need to map the context attribute though it is not used in view2(just to read its value for further proccessing)
hope it helps
let me know if you face any problem in this
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai,
create a context attribute of type boolean. bind this to twi input fileds property readonly.
in wdDoinit(){
wdContext.currentContextElementsetBoolValue(false);
}
wherever you need to active set true.
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.