‎2007 Jun 14 10:02 AM
‎2007 Jun 14 10:04 AM
Hello,
Check this.
PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
......
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
......
/: ENDPERFORM
INVAR1
and INVAR2 are variable symbols and may be of any of the four SAPscript symbol
types.
OUTVAR1
and OUTVAR2 are local text symbols and must therefore be character strings.
The ABAP subroutine called via the command line stated above must be defined in the ABAP
report prog as follows:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
...
ENDFORM.
The values of the SAPscript symbols passed with /: USING... are now stored in the internal
table IN_TAB . Note that the system passes the values as character string to the subroutine,
since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See
the example below on how to access the variables.
The internal table OUT_TAB contains names and values of the CHANGING parameters in the
PERFORM statement. These parameters are local text symbols, that is, character fields
chk this sample code of driver program:
REPORT ZVKKSCRIPTS1 .
data: v_mat like mara-matnr,
var1 like makt-maktx.
form subroutine tables itab structure itcsy
otab structure itcsy.
read table itab with key name = 'IT_VBAP-MATNR'.
if sy-subrc = 0.
v_mat = itab-value.
select single maktx from makt into var1
where matnr = v_mat and
spras = sy-langu.
if sy-subrc = 0.
read table otab with key name = 'VAR1'.
if sy-subrc = 0.
otab-value = var1.
modify otab index sy-tabix.
endif.
endif.
endif.
endform.
Vasanth
‎2007 Jun 14 10:04 AM
Hello,
Check this.
PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
......
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
......
/: ENDPERFORM
INVAR1
and INVAR2 are variable symbols and may be of any of the four SAPscript symbol
types.
OUTVAR1
and OUTVAR2 are local text symbols and must therefore be character strings.
The ABAP subroutine called via the command line stated above must be defined in the ABAP
report prog as follows:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
...
ENDFORM.
The values of the SAPscript symbols passed with /: USING... are now stored in the internal
table IN_TAB . Note that the system passes the values as character string to the subroutine,
since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See
the example below on how to access the variables.
The internal table OUT_TAB contains names and values of the CHANGING parameters in the
PERFORM statement. These parameters are local text symbols, that is, character fields
chk this sample code of driver program:
REPORT ZVKKSCRIPTS1 .
data: v_mat like mara-matnr,
var1 like makt-maktx.
form subroutine tables itab structure itcsy
otab structure itcsy.
read table itab with key name = 'IT_VBAP-MATNR'.
if sy-subrc = 0.
v_mat = itab-value.
select single maktx from makt into var1
where matnr = v_mat and
spras = sy-langu.
if sy-subrc = 0.
read table otab with key name = 'VAR1'.
if sy-subrc = 0.
otab-value = var1.
modify otab index sy-tabix.
endif.
endif.
endif.
endform.
Vasanth
‎2007 Jun 14 10:05 AM
Hi,
perfrorm <formname> in program <program name>
using <i1>
changing<i2>
in zprogram u have to write the form ...............
form <form name> tables <intab> structure itcsy
<outtab> structure itcsy.
endform.
regards,
ram.
‎2007 Jun 14 10:18 AM
hi,
chk this from Help....
http://help.sap.com/saphelp_erp2005/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm
regards,
priya.
‎2007 Jun 15 10:36 AM