cancel
Showing results for 
Search instead for 
Did you mean: 

Invert attribute/property causes shortdump

paul_bakker2
Active Contributor
0 Kudos

Hi,

I have two related screen fields in Webdynpro, and I want one to be visible when the other is not.

I figured I could do this by defining 'visible' property bindings to a WDY_BOOLEAN attribute (called "INTERNAL_CHANNEL") in the View context.

Field 1's 'visible' property is bound to this attribute.

Field 2's 'visible' property is bound to the same attribute, but with the 'Invert Attribute/Property ("NOT")' flag set.

Is this the right way to do it?

I ask because it is shortdumping with the error "Could not find attribute INTERNAL_CHANNEL:NOT".

When I debug IF_WD_CONTEXT_NODE_INFO~GET_ATTRIBUTE, I can see that it finds the attribute INTERNAL_CHANNEL, but gets upset when it can't explicitly find INTERNAL_CHANNEL:NOT.

I've been aware of the 'Invert ' feature for a long time, but this is the first time I've actually used it.

It's hard to believe that such a basic feature has a bug, so I must be doing something wrong...

thanks in advance for your help

Paul Bakker


Accepted Solutions (1)

Accepted Solutions (1)

paul_bakker2
Active Contributor
0 Kudos

Hi,

I found the answer - 'solved by self', as they say.

It's an issue that is specific to FMCA Formbundle webdynpros - my visibility flags were apparently clashing with built-in behavior that switches fields on and off based on their prefix (eg 'C_DATE').

I solved it by putting the relevant fields inside a transparent container. I now control the visibility of the container instead.

Thanks for your fast and helpful responses!

cheers

Paul

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Paul,

I suggest not to select invert attribute / property ( "not"). Better two context attributes of type WDY_BOOLEAN and bind the attributes to visibile property of fields seperately.

Now based on your requirement, set the property of boolean attribute to abap_true / abap_false.

Hope this helps you to resolve the issue.Revert back with your queries.

Thanks

KH

paul_bakker2
Active Contributor
0 Kudos

Katrice,

  Thanks for that. Sure, I can do that (use two separate flags), but why?

  Doesn't this 'invert' feature work?

cheers

Paul

Former Member
0 Kudos

Hi,

We can use invert feature and that works fine in my case.Refer the attached document which will help you to resolve your issue.

Thanks

KH

paul_bakker2
Active Contributor
0 Kudos

KH,

I'm glad it works for you - that gives me hope.

Any inkling why it dumps for me? Attribute name is perhaps too long?

No one else on SCN (or the SAP Help Portal) seems to have reported this issue.

We're on ABAP 7.31

cheers

Paul


Former Member
0 Kudos

Hi,

Have you tried the code which i've mentioned in the attachment?

Thanks

KH

paul_bakker2
Active Contributor
0 Kudos

Yes - and that simple example works fine.

Gowtham
Contributor
0 Kudos

Hi Paul,

Create two attributes(with the type of WDY_BOOLEAN) to control the visibility property of those two fields ,

Take an example A1 , A2 are your fields and V1 , V2 are the visibility control fields & do the binding as follows


Visibility property of A1 -> bind it with V1

Visibility property of A2 -> bind it with V2

call the following code to make A1 as visible & A2 as invisible.


Element->set_attribute( EXPORTING name `V1`  value = ABAP_TRUE).

Element->set_attribute( EXPORTING name `V2`  value = ABAP_FALSE ).

Similarly do the vise versa to make A1 as invisible & A2 as visible.

- Gowtham

paul_bakker2
Active Contributor
0 Kudos

Hi,

Thanks for that, but if we know the two attributes will always have opposite values, isn't it more parsimonious to just use one?

thanks

Paul