cancel
Showing results for 
Search instead for 
Did you mean: 

SET_VISIBLE for input field takes incorrect path

former_member184111
Active Contributor
0 Kudos

Hi Forum,

In a WD view we have a context node Header it has an attribute ZHDR_PGRP. I am trying to hide this field for some condition in WDDOMODIFYVIEW using the simple code below

DATA lr_zpgrp TYPE REF TO cl_wd_input_field.

DATA path TYPE string.

    

   lr_zpgrp ?= view->get_element( 'ZHDR_PGRP_ATTR' ).

   CHECK lr_zpgrp IS BOUND.

  lr_zpgrp->set_visible( 01 ).

It dumps and the description says...


Could not find attribute ZHDR_PGRP:VISIBLE

When I check the path with

   path = lr_zpgrp->bound_visible( ).

it gives path = HEADER.ZHDR_PGRP:VISIBLE which is correct.

Why is the set_visible method using the wrong path i.e.  ZHDR_PGRP:VISIBLE instead of HEADER.ZHDR_PGRP:VISIBLE and goes to short dump?

Thank you,

Anubhav

Accepted Solutions (1)

Accepted Solutions (1)

chengalarayulu
Active Contributor
0 Kudos

Anubhav,

provide InputField ID instead of attribute Name: 'ZHDR_PGRP_ATTR'

former_member184111
Active Contributor
0 Kudos

Hi,

lr_zpgrp ?= view->get_element( 'ZHDR_PGRP_ATTR' ).

ZHDR_PGRP_ATTR <--- This is field ID only...checked in technical info in portal..

That should be correct...

Thanks,

Anubhav

Answers (1)

Answers (1)

former_member184111
Active Contributor
0 Kudos

Did that using meta data but still not sure why the issue occured in first place.