2006 Jun 21 1:07 PM
Hi,
how can i pass a range to a form ?
example :
types: tt_data type table of ty_data,
data: i_data type tt_data,
r_data type range of matnr.
...
perform send_data using i_data
changing r_data.
...
...
form send_data using pi_data type tt_data
changing pr_data type ???????Which type must i use in the form declaration ?
regards,
Hans
2006 Jun 21 1:13 PM
REPORT YRT_TEST4.
data: r_range type range of matnr.
perform test changing r_range.
&----
*& Form test
&----
form test changing p_r_range like r_range.
endform. " test
REgards,
Ravi
Hi,
how can i pass a range to a form ?
example :
types: tt_data type table of ty_data,
data: i_data type tt_data,
r_data type range of matnr.
...
perform send_data using i_data
changing r_data.
...
...
form send_data using pi_data type tt_data
changing pr_data type ???????Which type must i use in the form declaration ?
regards,
Hans
2006 Jun 21 1:10 PM
hi,
declare a global table and use it has reference in form
that is in top include or before include statement
git_matnr type ranges of matnr.
form send_data tables lit_tab like git_matnr.
example
lit_switchnum TYPE RANGE OF eideswtdoc-switchnum.....
declared globally
PERFORM f4000_switchdoc_summary TABLES
* lit_swtch_sum
lit_swt_mprn_det
lit_lt_act_date
s_crdate
s_swtdoc
FORM f4000_switchdoc_summary
TABLES
yt_swt_mprn_det STRUCTURE ls_swt_mprn_det
yt_lt_act_date STRUCTURE ls_lt_act_date
xt_crdate LIKE lit_create_date
xt_swtdoc LIKE lit_switchnum
Message was edited by: Manoj Gupta
2006 Jun 21 1:13 PM
types: tt_data type table of ty_data,
data: i_data type tt_data.
RANGES: r_data FOR vbap-matnr.
...
perform send_data using i_data
changing r_data.
...
...
form send_data using pi_data type tt_data
changing pr_data type ???????
Regards,
Wasim Ahmed
2006 Jun 21 1:13 PM
REPORT YRT_TEST4.
data: r_range type range of matnr.
perform test changing r_range.
&----
*& Form test
&----
form test changing p_r_range like r_range.
endform. " test
REgards,
Ravi
2006 Jun 21 1:14 PM
Hi hans,
1. we have to use TABLES (and not using)
2. like this.
...
...
form send_data
<b>tables mytable structure i_data</b>
using pi_data type tt_data
where i_data should be a data variable declared
3. eg.
report abc.
tables : mara.
ranges : myrange for mara-matnr.
PERFORM ABC TABLES MYRANGE.
FORM ABC TABLES RG STRUCTURE MYRANGE.
ENDFORM.
regards,
amit m.
2006 Jun 21 1:33 PM
Hi again,
1. If we pass using LIKE,
p_r_range like r_range
then the whole data of range
(range is nothing but an internal table)
<b>WILL NOT BE PASSED</b>
to the subroutine.
(syntax would be ok, no problem in that)
2. if we want <b>to pass the FULL RANGE AND ITS DATA</b>,
we should pass using TABLES only.
regards,
amit m.
2015 Feb 05 6:59 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |