2007 Jun 19 9:30 PM
Hi,
can anyone explain the purpose of using and changing in perform statemnt
the using and changing fields in the corresponding form statemnts differs from the one in perform statment.
Can anyone explain me with a simple statement
Thanks
Kajol
2007 Jun 19 9:49 PM
Hi kajol,
Check the code below:
Imagine you need to change the date of v_datum and send the result to v_datum_ok.
data: v_datum(10) type c value '10/02/2007',
v_datum_ok type dats.
PERFORM F_TEST USING v_datum CHANGING v_datumok.
Below is the form code:
FORM F_TEST USING P_DATUM CHANGING P_DATUM_OK.
data: v_day(2) type c,
v_month(2) type c,
v_year(4) type c.
split P_datum at '/' into v_day v_month v_year.
concatenate v_year v_month v_day into p_datum_ok.
ENDFORM. "F_TEST
Hi,
can anyone explain the purpose of using and changing in perform statemnt
the using and changing fields in the corresponding form statemnts differs from the one in perform statment.
Can anyone explain me with a simple statement
Thanks
Kajol
2007 Jun 19 9:42 PM
From the ABAP Guide:
For calling by reference, USING and CHANGING are equivalent. For documentation purposes,
you should use USING for input parameters which are not changed in the subroutine, and
CHANGING for output parameters which are changed in the subroutine.
2007 Jun 19 9:49 PM
Hi kajol,
Check the code below:
Imagine you need to change the date of v_datum and send the result to v_datum_ok.
data: v_datum(10) type c value '10/02/2007',
v_datum_ok type dats.
PERFORM F_TEST USING v_datum CHANGING v_datumok.
Below is the form code:
FORM F_TEST USING P_DATUM CHANGING P_DATUM_OK.
data: v_day(2) type c,
v_month(2) type c,
v_year(4) type c.
split P_datum at '/' into v_day v_month v_year.
concatenate v_year v_month v_day into p_datum_ok.
ENDFORM. "F_TEST
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |