cancel
Showing results for 
Search instead for 
Did you mean: 

How to create and share attributes or variables in Standard WebDynpro?

gilberto_parga
Participant
0 Kudos

Tremendous 2010 guys!

I'm having trouble about a Web Dynpro ABAP application. It uses two Web Dynpro components: FITE_VC_GENERAL_DATA and FITV_VC_COST_ASSIGNMENT, and the users would like to delete showed-in-text-field default info in the first View (contained in FITE_VC_GENERAL_DATA) but they want the user provides his/her own info in a second view by a window (view, contained in the second web Dynpro component FITV_VC_COST_ASSIGNMENT) that appears after clicking a button in the fisrt view. So, I want to declare an attribute or variable (a flag) in the second Web dynpro component that is to be copied or transmitted or exported at the first Web dynpro component to indicate "The user already used the second Web Dynpro component", and thus, to avoid an enhancement point I set in the first Web Dynpro having effect and delete the valid data entered by user (because in the begining, yes, I want to delete the data, but once the user writes his/her data, I need a FLAG to know it).

Really I am a newbie, even a dummy in Web Dynpro ABAP, I dont know if it is possible to declare new attributes in a Standard Web Dynpro Component (but I used an enhancement point to declare a char variable inside a method, but it is only local and I cant communicate it to another WD component). Because it is OO ABAP, I know it is not possible to declare Global data usable by various Web Dynpro Components, isnt it?

Beyond, If I could create my own attributes in the second Standard Web Dynpro Component, How I should export them to the first Web Dynpro Component?

I was wondering if it would be a good idea to use a transparent table to store my flag and use it again when the run time is on the first Web Dynpro component... Or use ABAP or SAP Memories... Have mercy, help me please!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

create a context node in your parent component with all the attribute which you need to pass acress. When you create the contextnode, check the "interface node" property.

now in your child component, declare the usage of parent component . when you will go to the component controller of the child component, on the right side, you will see the context node from parent comp. drag and drop it in child comp and data will be accessible toyou when you will read that node anywhere in the child component.

Search SDN for topic like "component reuse" to get better idea of it.

Thanks

Vishal Kapoor

former_member1245113
Active Contributor
0 Kudos

Hi Parga,

You need to declare the variable at Interface controller and need to map this at the context level.

Like a variable declared at web dynpro component context level can be used among all views.

every web dynpro component have an Interface component. this can be used in other components where this perticular component is used it is also have a Context.

For more info Take Usage of Component Controller Examples.

[Check this thead|http://help.sap.com/saphelp_nw70/helpdata/en/3a/165da11551994db913f56829f8f3f1/frameset.htm]MPUSAGE

WDR_TEST_CMPUSAGE_CI1

WDR_TEST_CMPUSAGE_CI2

WDR_TEST_CMPUSAGE1

WDR_TEST_CMPUSAGE2

WDR_TEST_CMPUSAGE3

WDR_TEST_CMPUSAGE4

WDR_TEST_CMPUSAGE5

WDR_TEST_REF_CMP_USAGE_CI

WDR_TEST_USAGE_GROUPS_CI

WDT_COMPONENTDETAIL

WDT_COMPONENTUSAGECheerz

Ram