Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Convert I/O Field into checkbox in Module Pool Programming

0 Kudos

Hi Colleages,

I have created a view using Table Maintenance Generator. In the Table, one field has Char(10) data type. So, The corresponding element on the screen is appearing as I/O field. But I want to convert it to Checkbox. Is there any way that I can achieve this?


Thank You

Seshu

1 ACCEPTED SOLUTION

Jelena
Active Contributor
0 Kudos

But still - are Simone and I the only ones who clearly see this whole thing makes no sense?

If you have any other data in this field (and it can happen because the field type is not CHAR1) then how would it work when on screen you change the field to checkbox? And if there is no data then what exactly is preventing you from changing the field type? 

It takes only a minute to create a new data element and you can copy existing ones, just change the domain. It certainly takes more time to fiddle with the maintenance screen and, most importantly, all that could be lost when it's regenerated.

I would not allow such things in our system (it seems we do much better job with the table design to begin with) and it concerns me why it seems acceptable to someone with the SAP logo...

16 REPLIES 16

former_member230215
Participant
0 Kudos

Change data type to flag.

0 Kudos

Hi Kishore,

The requirement is that I have to use existing data elements which are not flags.

Regards,
Seshu

0 Kudos

Then you can change in layout of the screen using se51.

0 Kudos

Hi,

I tried to change it in layout editor. But i did not find any option like that.

Could you please give more details about it?

Regards,
Seshu

Former Member
0 Kudos

Hi,

Only CHAR1 fields can be converted as check-box

Regards,

PrAvIn.

0 Kudos

That's not true!

Did you test your words?

I did


REPORT ZZZZZ.

PARAMETERS: p_char TYPE char10.

call SCREEN 100.

It's a bad practice but this doesn't me that it's not possible to do!

Do not share false informations!

SimoneMilesi
Active Contributor
0 Kudos

I do not see the point in the request (not your, the one you received): we have different data elements to serve different scopes.

If a field is char10, it's because we want to use at least once all the 10 chars.

I suggest you to clearify this point, because even if it's technically possible (go in SE51 as as suggested or SE80 with the function group) and the result will be filling the 1st char of your field, it makes no sense!

And as professionals we have the right and the duty to point our feet and say "what are you asking!?

additional note:

remember that when you modify the generated dynpros for table maintanance, your changes will be lost if anyone will regenerate it (add/remove/change a field.

Message was edited by: Simone Milesi

0 Kudos

Hi Simone,

We have 30 fields in a table and each field has different data element (of Char (length > 1) ). Each field is a I/O field in the view.

Now, I have to create another view where each field should appear as checkbox. As we dont want to create 30 data elements again with Char1. We want to reuse the existing data elements (as It also has documentation associated with it).

Regards,
Seshu

Juwin
Active Contributor
0 Kudos

You can either use data element XFELD or create separate datalelements using XFELD domain, and use them in your table.

When you use XFELD domain through a custom dataelement or XFELD dataelement directly, table maintenance generator, automatically creates the column as a checkbox, no screen modification is required in these cases.

Thanks,

Juwin

pranay570708
Active Contributor
0 Kudos

Hi,

There is no point in keeping field of 10 chars wherein you will be using only one character for checkbox.

Former Member

Dear Seshu,

Please look at the below Screen :

1. Change Def Length = 1

2. Right Click in Column then Convert -> Checkbox -> Left Button.

Regards,

Yance

0 Kudos

Dear Yance,

I followed the steps as you mentioned. But Left Button and Right Button options are disabled in my screen as follows.

Do u have any idea on how to enable it?

Thanks

Seshu

0 Kudos

Dear Seshu,

I have tried in Table Control (Grid) and that was possible, because you said that you created a view using Table generator in your first email.

But you tried using Input/output field in your last email...and it is not possible, better that you use Checkbox field in your screen directly.

Regards,

Yance


0 Kudos

In second screenshot, i can see conversion exit ALPHA assigned to the field; that can be the issue because i am able to create it. First remove that and try again.

You can try transforming some other fields who does not contain conversion routine and see if it works.

Jelena
Active Contributor
0 Kudos

But still - are Simone and I the only ones who clearly see this whole thing makes no sense?

If you have any other data in this field (and it can happen because the field type is not CHAR1) then how would it work when on screen you change the field to checkbox? And if there is no data then what exactly is preventing you from changing the field type? 

It takes only a minute to create a new data element and you can copy existing ones, just change the domain. It certainly takes more time to fiddle with the maintenance screen and, most importantly, all that could be lost when it's regenerated.

I would not allow such things in our system (it seems we do much better job with the table design to begin with) and it concerns me why it seems acceptable to someone with the SAP logo...

SimoneMilesi
Active Contributor
0 Kudos

I could not express better the point.