2009 Feb 18 11:44 AM
i want to pass a variablt to a form and i dont want its valu to change after i finish the form
preform chck_car using car_no.
and the form
form chck_car using p_car_no.
endform.
and i dont want the value of the var car_no to change after the form ?
what do i need to change?
Please use a more informative subject in the future.
Edited by: Rob Burbank on Feb 18, 2009 11:06 AM
2009 Feb 18 11:52 AM
Hi,
try this.
preform chck_car using car_no.
form chck_car using value( p_car_no ).
endform.
2009 Feb 18 11:45 AM
Hello Ami,
You have to use CHANGING instead of USING )
perform chck_car changing car_no
form chck_car changing p_car_no.
data: l_v_car_no type car_no.
l_v_car_no = p_car_no.
" Do all the processing here
p_car_no = l_v_car_no.
CLEAR l_v_car_no.
endform.
BR,
Suhas
Edited by: Suhas Saha on Feb 18, 2009 12:46 PM
2009 Feb 18 11:46 AM
HI....
USE 'VALUE' with 'USING' and your requirement is done
like
************************************************************************
FORM SUBR USING
VALUE(F1) TYPE P " passed by value and its value cannot be
VALUE(F2) TYPE I " changed
******************************************************************************
and refer to link
http://help.sap.com/saphelp_46c/helpdata/en/9f/db977635c111d1829f0000e829fbfe/frameset.htm
now you can use
perform subr and pass parameters to it
regards
Edited by: Mohit Kumar on Feb 18, 2009 12:47 PM
Edited by: Mohit Kumar on Feb 18, 2009 12:49 PM
2009 Feb 18 11:47 AM
2009 Feb 18 11:48 AM
Hi,
use STATICS keyword in form ,to keep the value even when u come out of the form..
Ex:
form name.
statics:
variable(10) type c.
endform.
Regards
Kiran
2009 Feb 18 11:49 AM
2009 Feb 18 11:52 AM
Hi,
try this.
preform chck_car using car_no.
form chck_car using value( p_car_no ).
endform.
2009 Feb 18 11:52 AM
Hi,
use STATICS keyword
Regards,
jaya
Edited by: Jayapradha Neeli on Feb 18, 2009 5:23 PM