cancel
Showing results for 
Search instead for 
Did you mean: 

Check box in POWL application not working

jitendra_it
Active Contributor
0 Kudos

Hello,

We have a requirement to show check box in POWL report.

Issue are : 1. Once we select check box it gets disabled. so we cannot deselect that again.

                2. Upon selecting check box a X appears  after the check box. 

Below is the code which we are using to add check box.

Type of ls_work is powl_fieldcat_sty.

*-- Display check box for Selection
IF <lfs_schema>-tabname EQ lc_structure_name AND
<lfs_schema>-fieldname EQ lc_check.
ls_work-colid = lc_check.
ls_work-display_type = lc_checkbox.
ls_work-editable = abap_true.
ls_work-editable_ref = <lfs_schema>-fieldname.
ENDIF.


Check below snapshots.


Initial View :


Post Check box Selection:


Accepted Solutions (0)

Answers (3)

Answers (3)

ramakrishnappa
Active Contributor
0 Kudos

Hi Jitendra,

As Mr. Kiran said, comment out the line ls_work-editable_ref = <lfs_schema>-fieldname. Because, you are referencing the editable property of check box with value of the same field itself. Hence, as soon you select check box, it get the value and make READ_ONLY = X.

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi Ramakrishnappa (thats a cool name!)

am struggling with the same requirement.

Here is the configuration:

ls_fieldcat-colid = <ls_dfies>-fieldname.

ls_fieldcat-text_ref = <ls_dfies>-fieldname.

ls_fieldcat-header = <ls_dfies>-scrtext_m.

ls_fieldcat-allow_sort = 'X'.

ls_fieldcat-allow_filter = 'X'.

ls_fieldcat-col_visible = 'X'.

ls_fieldcat-enabled = 'X'.

ls_fieldcat-fixed = ''.

ls_fieldcat-display_type = 'TV'.

ls_fieldcat-h_align = 'L'.

ls_fieldcat-editable = 'X'.

ls_fieldcat-col_visible = 'X'.

ls_fieldcat-colpos = 1.

ls_fieldcat-header = text-001.

ls_fieldcat-width = 5.

ls_fieldcat-display_type = 'CK'.

The field, which is set to CK does contain a string.

Problems:

1) When powl is loaded, the check box is ticked. How can I set it to unticked when data is loaded.

2) When klicking on the checkbox (checkbox is not ticked) the text beside disapears

3) When klicking again on the checkbox, that 'X' is apeard instead of the loaded text.

Hope you guys have as solution...

Kind regards

Pourang

Former Member
0 Kudos

Ok got it.

You need another column in your outtab, where the state of the checkbox is stored.

That column is referenced by cbox_check_ref.

Hope that helps somebody!

Regards

P

nishantbansal91
Active Contributor
0 Kudos

Hi Jitendra,


Two days back i developed one report in POWL with Checkbox.

    ls_fieldcat-colid = 'APPROVE' . "

     ls_fieldcat-enabled = 'X'.

     ls_fieldcat-col_visible = 'X'.

     ls_fieldcat-display_type  = 'CK'.

     ls_fieldcat-header        = 'Approve/Reject'.

     ls_fieldcat-editable      = ABAP_TRUE.

Pass this value to fieldcat then it must be working fine.

Let me know if you have any furthur issue.

Regards

Nishant

former_member184578
Active Contributor
0 Kudos

Hi,

It's because of 'editable_ref' property which sets the editability status.

Comment out the line and check "  ls_work-editable_ref = <lfs_schema>-fieldname.

Hope this helps u,

Regards,

Kiran

jitendra_it
Active Contributor
0 Kudos

Thanks Kiran. It worked.

but still we are getting an X after check box.

ramakrishnappa
Active Contributor
0 Kudos

Hi Jitendra,

Please check if any icon source ( ICON_SRC, ICON_SRC_REF )  set to the field.

Regards,

Rama