2009 Feb 02 9:27 AM
Hi Experts,
I have a code which is standard include RPUAUDFR. Now some part of code in this include is used in my code. I have bit confusion....
* groesste und kleinste PerNr finden:
PERFORM get_min_max_from_range_tab TABLES persnr USING 'P'
CHANGING lowpernr higpernr sy_subrc.This is the perform, in which they used
TABLESstatement. this is obsolete now. Now i am using like this.
PERFORM get_min_max_from_range_tab USING s_persnr
'P'
CHANGING v_lowpernr v_higpernr sy_subrc.and form statement is
FORM get_min_max_from_range_tab
USING fp_range_tab STRUCTURE s_DATUM
value(fp_flag)
CHANGING fp_min
fp_max
fp_subrc.
SORT fp_range_tab BY sign DESCENDING.
* NUR 'E'XCLUDE?
READ TABLE fp_range_tab INDEX 1.Is this valid statement? If yes, i got this error
"FP_RANGE_TAB" is not an internal table "OCCURS n" specification is missingPlease remember one point all are without header line.
Plase help me in this regard. This delivery date is today. Please help me....
2009 Feb 02 9:33 AM
Hi,
Use this way...
FORM get_min_max_from_range_tab
USING fp_range_tab type BAL_R_DATE " Change
value(fp_flag)
CHANGING fp_min
fp_max
fp_subrc.
" You need to decalre the work area to access the records because fp_range_tab is table without header line.
DATA : l_range_tab like BAL_S_DATE. " Add this line
SORT fp_range_tab BY sign DESCENDING.
* NUR 'E'XCLUDE?
READ TABLE fp_range_tab INTO l_range_tab INDEX 1.Edited by: Avinash Kodarapu on Feb 2, 2009 3:03 PM
Hi,
Use this way...
FORM get_min_max_from_range_tab
USING fp_range_tab type BAL_R_DATE " Change
value(fp_flag)
CHANGING fp_min
fp_max
fp_subrc.
" You need to decalre the work area to access the records because fp_range_tab is table without header line.
DATA : l_range_tab like BAL_S_DATE. " Add this line
SORT fp_range_tab BY sign DESCENDING.
* NUR 'E'XCLUDE?
READ TABLE fp_range_tab INTO l_range_tab INDEX 1.Edited by: Avinash Kodarapu on Feb 2, 2009 3:03 PM
2009 Feb 02 9:33 AM
Hi,
Use this way...
FORM get_min_max_from_range_tab
USING fp_range_tab type BAL_R_DATE " Change
value(fp_flag)
CHANGING fp_min
fp_max
fp_subrc.
" You need to decalre the work area to access the records because fp_range_tab is table without header line.
DATA : l_range_tab like BAL_S_DATE. " Add this line
SORT fp_range_tab BY sign DESCENDING.
* NUR 'E'XCLUDE?
READ TABLE fp_range_tab INTO l_range_tab INDEX 1.Edited by: Avinash Kodarapu on Feb 2, 2009 3:03 PM
2009 Feb 02 9:45 AM
Hi I used this way, but i got error like
In PERFORM or CALL FUNCTION "GET_MIN_MAX_FROM_RANGE_TAB", the actual parameter "S_PERSNR" is incompatible with the formal parameter "FP_RANGE_TAB".The code is
PERFORM get_min_max_from_range_tab USING s_persnr[]
'P'
CHANGING v_lowpernr v_higpernr sy_subrc.Form:
FORM get_min_max_from_range_tab
USING fp_range_tab type BAL_R_DATE
value(fp_flag)
CHANGING fp_min
fp_max
fp_subrc.
DATA : l_range_tab like BAL_S_DATE.
CLEAR: fp_subrc.
SORT fp_range_tab BY sign DESCENDING.
READ TABLE fp_range_tab INTO l_range_tab INDEX 1.Please help me any inputs in this regard..........
2009 Feb 02 9:56 AM
Hope this helps:
start-of-selection.
data: it_t001 type standard table of t001.
select * into table it_t001 from t001.
perform write_itab using it_t001.*&---------------------------------------------------------------------*
*& Form WRITE_ITAB
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_IT_T001[] text
*----------------------------------------------------------------------*
form WRITE_ITAB using p_it_t001.
field-symbols: <fs> type standard table.
field-symbols: <fs1> type T001.
assign p_it_t001 TO <fs>.
loop at <fs> ASSIGNING <FS1>.
WRITE: <FS1>-BUKRS.
endloop.
endform. " WRITE_ITABregards,
S. Chandramouli.
2009 Feb 02 9:35 AM
Hi,
You can try creating a data type in your se11 screen for your table and then create
type1 TYPE demo_dt "demo_dt-data type name
type1 will have a structure similar to the table now.
Hope this helps.
Regards,
Deepthi.
2009 Feb 02 9:37 AM
Hi,
When declaring fp_range_tab(formal parameter) in form statement, use a table type in stead of structure s_datum
FORM get_min_max_from_range_tab
USING fp_range_tab type ty_DATUM
where ty_datum is a table type of structure s_datum.
With Regards,
Dwaraka.S
2009 Feb 02 9:48 AM
Hi,
Check this exmaple, it is the correct way :
TYPES: BEGIN OF line,
col1(1) TYPE c,
col2(1) TYPE c,
END OF line.
DATA: wa TYPE line,
itab TYPE HASHED TABLE OF line WITH UNIQUE KEY col1,
key(4) TYPE c VALUE 'col1'.
wa-col1 = 'X'. INSERT wa INTO TABLE itab.
wa-col1 = 'Y'. INSERT wa INTO TABLE itab.
PERFORM demo USING itab.
FORM demo USING p_table TYPE ANY TABLE. " You can give the type here.
...
sort p_itab by ....
READ TABLE p_table index 1
...
ENDFORM.
regards,
Advait
2009 Feb 02 9:51 AM
Sorry it is not working. I does not taking Sign, option, low and high....
2009 Sep 11 4:51 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |