Application Development and Automation 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: 
Read only

checkbox as import parameter in function module

Former Member
0 Likes
2,475

Hi all,

how to create a checkbox as import parameter in function module,

thnx in advance

8 REPLIES 8
Read only

Former Member
0 Likes
1,522

Hello,

Just create a parameter of type C of length 1. If it contains a value then it is selected else not.

Regards,

Sachin

Read only

Former Member
0 Likes
1,522

hi...

Define a parameter of Char1. if it is "X" then check box is checked or unchecked.

regards,

Lokeswari.

Read only

0 Likes
1,522

Hi all,

thnx for reply.

But my custom fm's initial screen will have the checkbox wil be exctly look like the checkbox as we seen in report

then how to du it

Read only

0 Likes
1,522

Hello,

Please be a bit clear on your requirement. What exactly are you trying to attain ? You will call the FM in some program , so when you call the FM you want a checkbox be displayed like a screen ?

Sachin

Read only

0 Likes
1,522

How can a FM have a initial screen? If you are meaning SE37 sxecution of the FM, i dont think you can have visible checkboxes as in report selection screens.

Read only

0 Likes
1,522

Thnx vikrant,

my test fm initial screen will have report like check boxes

Read only

0 Likes
1,522

?? Function modules don't have screens...they do have import, export parameters.

If you look at how "checkboxes" are stored in db tables, you'll see that the previous replies are precisely correct. A check box is a char1 field...it is on when 'X' (ABAP_TRUE) and off when blank (initial)....you would call your FM with an import field of type char1 set to 'X' or set to space, and handle accordingly in your FM code.

If you have a checkbox on a selection screen, then the value of that parameter is either 'X' or space, depending upon whether or not the user checked the box.

Read only

0 Likes
1,522

Rajdeep,

FM test screens are only for developers; end users never see it. Why do you care whether it shows a check box or a field with a width of 1 char? Instead of checking a box, you would type X in it.

What do you REALLY want to accomplish?