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

form

Former Member
0 Kudos
187

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
165

Hi,

try this.

preform chck_car using car_no.

form chck_car using value( p_car_no ).

endform.

7 REPLIES 7
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Kudos
165

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

Read only

Former Member
0 Kudos
165

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

Read only

Former Member
0 Kudos
165

Hi,

USING will not change the value.

Read only

Former Member
0 Kudos
165

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

Read only

Former Member
0 Kudos
165

Hi Ami,

USING is correct for your requirement.

Regards,

Nitin.

Read only

Former Member
0 Kudos
166

Hi,

try this.

preform chck_car using car_no.

form chck_car using value( p_car_no ).

endform.

Read only

Former Member
0 Kudos
165

Hi,

use STATICS keyword

Regards,

jaya

Edited by: Jayapradha Neeli on Feb 18, 2009 5:23 PM