on 08-31-2010 9:11 PM
Hello,
I am trying to make enhancements to the travel ABAP Web Dynpro and I am having some problems. I have made an enhancement to web dynpro component FITE_VC_REVIEW. I have added some custom fields to this component. This all works fine. The problem is I need to access these custom fields in another component and I am not sure how to do that. I need to access the custom fields in component FITV_FPM in the LAYOUT_VIEW view to do some validation on these fields before the expense report is submitted. I know that I can use SET/GET parameters but I don't think that setting a bunch of SET/GET parameters in memory is the way to go. I was thinking that I could use the classes but the components each use different classes.
Does anyone have any ideas how I can access custom fields from component FITE_VC_REVIEW in component FITV_FPM?
Any help is much appreciated!
Thanks!
Abra
The simplest way would be to define your own class, give it some static variable - in your first enhancement set these static variables, in the second enhancement read them.
The application should be running in the same memory space so static variables would be the easiest way to do this.
e.g.
if first enhancement, get value of enhanced UI element which is a checkbox and set the static variable of your own class.
zmy_class=>prior_authorisation_needed = l_prior_auth_checkbox
in second enhancement, read this value and do some logic based on it.
if zmy_class=>prior_authorisation_needed = abap_true.
...
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have a similar requirement, where I need to pass some attributes or context node from one abap web dynpro component (FITE_VC_GENERAL_DATA) to another (FITV_VC_ADVANCES). I am trying to create a custom class containing some static attributes to be passed across but I am not sure how to go about doing this. Could you please explain how this is done or if there is a better way of passing data between FITE_VC_GENERAL_DATA and FITV_VC_ADVANCES?
Many thanks and kind regards,
Nkonzo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nevermind I got it to work. I should have did what you did exactly in your sample code because once I did that I got it to work.
Thanks again! Points have been awarded.
Thanks!
Abra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have problems for hide fileds in Travel
Can please help me with suggestions.
>Email removed by moderator. You are not allowed to post your email address in the forums. If you want someone to discuss your question with you, they can do so via the forums.
Edited by: Thomas Jung on Nov 21, 2010 10:56 AM
Thanks for your response. I am new to classes so I am having some trouble. When you say static variable I am assuming you mean static attribute is that correct? I have created my own class with a static attribute that I want to pass between the two web dynpro components. In my first enhancement I create the object and set this static attribute in the object. This works fine. The problem is when I try to access this attribute in my second enhancement. Somehow I need to get the instance of the object I created in the first enhancement so I can access this static attribute and I am not sure how to do that.
Do you know how I can get the instance of my object in the second enhancement? Or am I going about this the wrong way?
Thanks in advance!
Abra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
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.