‎2008 Jul 10 1:14 PM
Hi friends,
Can we change two fields with one variable in subroutine pool...
what I mean is......
/:FORM ZFORM IN PROGRAM ZPROG
/:USING &VAR&
/:CHANGING &ABC&
/:CHANGING &CDE&
/:ENDPERFORM.
Can I call like this.......
‎2008 Jul 10 1:16 PM
hi
Yes because you are passing one variable to Form Subroutine
Use this type of declaration
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
Regards
Pavan
Edited by: Pavan Bhamidipati on Jul 10, 2008 2:17 PM
‎2008 Jul 10 1:16 PM
hi
Yes because you are passing one variable to Form Subroutine
Use this type of declaration
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
Regards
Pavan
Edited by: Pavan Bhamidipati on Jul 10, 2008 2:17 PM
‎2008 Jul 10 1:17 PM
Hi,
No need to write CHANGING for two times, use the key work for single time, using the same key work in FORM is a syntax error.
ex:
FORM ZFORM IN PROGRAM ZPROG
USING V1
CHANGING V2 V3.
ENDFORM.
Is your question answered.
‎2008 Jul 10 1:21 PM
Hi Ravi,
You mean to say like this.....
/:USING &VAR&
/:CHANGING &ABC& &CDE&
‎2008 Jul 10 1:33 PM
Hi Hosmath,
Use as like the below
/:PERFORM ZFORM IN PROGRAM ZPROG
/:USING &V1&
/:CHANGING &A1&
/:CHANGING &A2&
/:ENDPERFORM.
‎2008 Jul 10 1:20 PM
hi,
You can use this. You can include two or maor CHANGING parameters.
In the Called Sub routine there parametrs are stored in a Internal TAble and Return the Value in the internal table so we can give fields like this.
Hope this will help.
Regards
Sumit Agarwal
‎2008 Jul 10 1:21 PM
Hi,
It will be
/:PERFORM ZFORM IN PROGRAM ZPROG
/:USING &VAR&
/:CHANGING &ABC&
/:CHANGING &CDE&
/:ENDPERFORM.
There Is no such rule for Changing parameters.
Regards,
Sujit
‎2008 Jul 10 1:23 PM
Hosmath,
Please check this link
http://www.sap-basis-abap.com/abap/how-to-call-a-subroutine-form-sapscripts.htm
Yes you can change as many fields u want using the subroutine .
/:PERFORM ZFORM IN PROGRAM ZPROG
/:USING &VAR&
/:CHANGING &ASD&
/:CHANGING &ZXC&
/:CHANGING &QWE&
/:CHANGING &CDE&
/:CHANGING &TYU&
/:ENDPERFORM.CHANGING is nothing but you are importing the values from the subroutine.
You are passing the value VAR and you are importing the other values.
Best reagrds,
raam