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: 

checkbox in selection screen

Former Member
0 Kudos

hello!

i have a problem in selection screen with a field that

defined as checkbox.

at the initialization if a user have special parameter

i move 'X' to the checkbox field.

if i delete the 'X' from the checkbox,later on in the program i see (with the debugger) that the field still

contain 'X'.

i defined the field in the sel screen:

parameter print as checkbox.

what can i do in order to get the real values in this field?

regards

yifat

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi!

i have done the set parameter, but it still

prints the goodmovment.

regards

yifat

12 REPLIES 12

Former Member
0 Kudos

how do you delete the 'X' from the checkbox?

normally you can remove the check status by clear the value in the checkbox paramter.

If you still have the trouble on this issue, paste your code here.

thanks

Former Member
0 Kudos

I am not understand that how you are deleting the 'X' from the checkbox? whether in selection screen you are clearing the checkbox by clicking on it?

if possible paste that part of code here where you are handling the checkbox.

Former Member
0 Kudos

hi!

i click on the checkbox (in the selection screen) in order to delete the 'X' value

in it.

regards

yifat

0 Kudos

Hi,

Can you provide the code which your are using because if you assigning the value 'X' in INITIALIZATION and removing the value in the selection screen, it should not contain 'X'.

Former Member
0 Kudos

hi!

the code is:

initialization.

SELECT SINGLE PARID

FROM USR05

INTO ZPARID

WHERE BNAME = SY-UNAME AND

PARID = 'NDR'.

IF SY-SUBRC = 0.

MOVE 'X' TO Z_PRINT.

ENDIF.

the problem is in field z_print.

regards

yifat

0 Kudos

Hi Yifat ,

Paste whole code . Between how do you check that Z_PRINT has no value. Have you tried debugging . AT which point do you say that Z_PRINT is having value "X" even if you have unchecked the Checkbox.

Unless we see the whole code not psossible to comment.

Another thing is in the select you are checking if the user has that parameter in his user master but you are not checking the value he has maintained . You can directly use "Get Parameter NDR Field <Field>." This should give you the value . It is the value which matters . You can have a value "X" another user can have space in this parameter. But your select will always have sy-subrc = 0. But this has nothing to do with your problem.

Cheers

0 Kudos

Hi

Your code is right, so where do you still see Z_PRINT = 'X'? In which side of your program.

Moreother if you you SET/GET parameter you should check if that parameter is active,

so:

GET PARAMETER ID 'NDR' FIELD Z_PRINT.

If user have parameter NDR sy-subrc is 0, if it haven't it sy-subrc is 4

In stead of SELECT SINGLE PARID.....

max

0 Kudos

Hi,

If the subrc of USR05 select is 0 then you are passing 'X' to z_print and thats the reason that even you are unchecked the check box the value remain same in z_print i.e. 'X' because you are not clearing the value of z_print but as you mention that you declare PRINT as checkbox then you are clearing the value of PRINT and not Z_PRINT.

Former Member
0 Kudos

hi!

thank you very much for all your answers. i solved the problem, but now another problem has occurred.

The origin idea of this program is to create goodmovment.

if the user has parameter NDR (like checkbox print in transaction mb1b, that prints the goodmovment)so i move 'X' to field GOODSMVT_HEADER-VER_GR_GI_SLIP.

if in the selection screen the field was demarked, so no

'X' is moved to this field.

the problem is that it doesnt matter if the field in the bapi is marked or not , if i have the parameter NDR the goodmovment is automatically printed, and i want to avoid it.

thanks

yifat

the problem is that

0 Kudos

Use

<b>SET PARAMETER ID NDR FIELD Z_PRINT.</b>

before calling the FM to create Goods Movememt.

Cheers.

( DOnt forget to reward if answers were helpful )

Former Member
0 Kudos

hi!

i have done the set parameter, but it still

prints the goodmovment.

regards

yifat

0 Kudos

Hi Yifat ,

See OSS 520813 Question 12 .

<b>You must make sure that a user name is transferred in the PR_UNAME

field in the header structure. This user is used for determining the

print parameters. You must set the value 'X' for the 'NDR' parameter

ID for this user. Make sure that all customizing-related settings

have been made for this user. </b>

Instead of "X" above you should set space in user master ( tcode SU01 ) of the user whose name is passed in PR_UNAME . Or you will have to find a way to update user master before call to BAPI to set the above parameter to SPACE

Also I think you should open a new thread for this problem and close this threa . Reward points if answers

were helpful.

Cheers