2008 Dec 04 9:43 AM
This below shown code doesn't work because I get the message "p_ttest is not an internal table"
How can I get it working ?
TYPES: BEGIN OF tty_test,
name(10) type c,
zahl type i,
END OF tty_test.
data ttest type table of tty_test.
perform training changing ttest .
write: ''.
FORM training changing p_ttest.
data xyz type tty_test.
xyz-name = 'John'.
xyz-zahl = '23'.
append xyz TO p_ttest.
ENDFORM. "
2008 Dec 04 9:49 AM
U need to declare some syntax for p_ttest.
See code below...
TYPES: BEGIN OF tty_test,
name(10) type c,
zahl type i,
END OF tty_test.
data ttest type table of tty_test.
perform training changing ttest .
write: ''.
FORM training changing p_ttest like ttest.
data xyz type tty_test.
xyz-name = 'John'.
xyz-zahl = '23'.
append xyz TO p_ttest.
ENDFORM.
U need to declare some syntax for p_ttest.
See code below...
TYPES: BEGIN OF tty_test,
name(10) type c,
zahl type i,
END OF tty_test.
data ttest type table of tty_test.
perform training changing ttest .
write: ''.
FORM training changing p_ttest like ttest.
data xyz type tty_test.
xyz-name = 'John'.
xyz-zahl = '23'.
append xyz TO p_ttest.
ENDFORM.
2008 Dec 04 9:47 AM
2008 Dec 04 9:47 AM
TYPES: BEGIN OF tty_test,
name(10) type c,
zahl type i,
END OF tty_test.
data ttest type standard table of tty_test.
perform training changing ttest .
write: ''.
FORM training changing p_ttest type standard table of tty_test.
data xyz type tty_test.
xyz-name = 'John'.
xyz-zahl = '23'.
append xyz TO p_ttest.
ENDFORM. "
Edited by: kartik tarla on Dec 4, 2008 3:17 PM
2008 Dec 04 9:48 AM
Hi,
If u want to pass an internal table, then instead of the changing clause, use tables claues.
Regards,
Ajay
2008 Dec 04 9:49 AM
hi,
use FORM training changing p_ttest type tty_test.
data xyz type tty_test.
xyz-name = 'John'.
xyz-zahl = '23'.
append xyz TO p_ttest.
ENDFORM.
regards,
Srilatha
2008 Dec 04 9:49 AM
Hi,
Just a small change in your code.try this:
TYPES: BEGIN OF tty_test,
name(10) type c,
zahl type i,
END OF tty_test.
data:p_ ttest type table of tty_test.
perform training changing p_ttest .
write: ''.
FORM training changing p_ttest.
data xyz type tty_test.
xyz-name = 'John'.
xyz-zahl = '23'.
append xyz TO p_ttest.
ENDFORM. "
The error came because you have not made the internal table p_ttest.
after making the internal table only you can append the work area to intrnal table.
Hope it helps.
Rahul
Edited by: Rahul Kumar Sinha on Dec 4, 2008 10:50 AM
2008 Dec 04 9:49 AM
U need to declare some syntax for p_ttest.
See code below...
TYPES: BEGIN OF tty_test,
name(10) type c,
zahl type i,
END OF tty_test.
data ttest type table of tty_test.
perform training changing ttest .
write: ''.
FORM training changing p_ttest like ttest.
data xyz type tty_test.
xyz-name = 'John'.
xyz-zahl = '23'.
append xyz TO p_ttest.
ENDFORM.
2008 Dec 04 9:49 AM
PARAMETERS: p_carr TYPE sflight-carrid,
p_conn TYPE sflight-connid.
DATA sflight_tab TYPE STANDARD TABLE OF sflight.
PERFORM select_sflight TABLES sflight_tab
USING p_carr p_conn.
FORM select_sflight TABLES flight_tab LIKE sflight_tab
USING f_carr TYPE sflight-carrid
f_conn TYPE sflight-connid.
SELECT *
FROM sflight
INTO TABLE flight_tab
WHERE carrid = f_carr AND
connid = f_conn.
ENDFORM.
2008 Dec 04 9:50 AM
TYPES: BEGIN OF tty_test,
name(10) type c,
zahl type i,
END OF tty_test.
data ttest type table of tty_test.
perform training changing ttest[] .
write: ''.
FORM training changing p_ttest.
data : temp type table of tty_test.
data xyz type tty_test.
temp[] = p_ttest.
xyz-name = 'John'.
xyz-zahl = '23'.
append xyz TO temp.
p_ttest = temp[].
ENDFORM. "
2008 Dec 04 9:50 AM
hello erdem,
write lik ethis
TYPES: BEGIN OF tty_test,
name(10) type c,
zahl type i,
END OF tty_test.
data ttest type table of tty_test.
perform training changing ttest .
write: ''.
FORM training changing p_ttest type table .
data xyz type tty_test.
xyz-name = 'John'.
xyz-zahl = '23'.
append xyz TO p_ttest.
ENDFORM.
2008 Dec 04 9:52 AM
Hi
TYPES: BEGIN OF tty_test,
name(10) type c,
zahl type i,
END OF tty_test.
data ttest type table of tty_test.
perform training tables ttest .
write: ''.
FORM training tables p_ttest.
data xyz type tty_test.
xyz-name = 'John'.
xyz-zahl = '23'.
append xyz TO p_ttest.
ENDFORM.
Thanks.
Chitrali
2008 Dec 04 9:53 AM
Hi,
Try this,
FORM training changing p_ttest like ttest.
Regards,
Vadivelan B
2008 Dec 04 9:57 AM
Hi erdem,
u haven't defin p_ttest anywhere in your code declare it like ttest in changing. because u already defined that ttest type table of tty_test.
it will work fine.
regards
Saurabh
2008 Dec 04 10:09 AM
@kartik tarla your sample doesnt work
@Jansi Dorai your sample doesnt work
@Ajay Abhyankar this is obselete
@Rahul thank you but it is very circuitous
@ Ramesh has solved this problem finally
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |