2005 Oct 06 10:28 AM
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
2005 Oct 06 1:06 PM
hi!
i have done the set parameter, but it still
prints the goodmovment.
regards
yifat
2005 Oct 06 10:35 AM
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
2005 Oct 06 10:49 AM
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.
2005 Oct 06 11:18 AM
hi!
i click on the checkbox (in the selection screen) in order to delete the 'X' value
in it.
regards
yifat
2005 Oct 06 11:21 AM
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'.
2005 Oct 06 11:29 AM
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
2005 Oct 06 12:06 PM
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
2005 Oct 06 12:09 PM
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
2005 Oct 06 12:23 PM
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.
2005 Oct 06 12:37 PM
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
2005 Oct 06 12:41 PM
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 )
2005 Oct 06 1:06 PM
hi!
i have done the set parameter, but it still
prints the goodmovment.
regards
yifat
2005 Oct 06 1:19 PM
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