‎2008 Jan 06 7:56 PM
Hi,
someone could help me with this (ty_planetypes), so, I known that some table don´t have in a SAP netweaver v 7 TRIAL, how I could to find out another structure like this?
I´ll be glad to any help
Regards
‎2008 Jan 06 11:02 PM
‎2008 Jan 07 3:57 AM
Hi Elizeu,
ty_planetypes is user defined table types.
If programmer is using Only standard table structure
in table types you can use same structure.
EX :
TYPES : Begin of ty_planetypes,
INCLUDE STRUCTURE mara.
TYPES. END OF ty_planetypes.
You can add some fields to same type like
TYPES : Begin of ty_planetypes,
TYPES : INCLUDE STRUCTURE mara,
v_num TYPE I.
TYPES. END OF ty_planetypes.
Pls. reward if useful.
‎2008 Jan 07 2:50 PM
hi,
muralikrishna kaipha,
and a good day to all.
I think that your answer almost attend mine need, so, internal table "mara" don´t have on sap netweaver 7 trial dictionary, it´s possible to use other internal table?, below the sintax in the programm:
=====================================
class lcl_airplane definition.
public section.
constants: pos_1 type i value 30.
methods: constructor importing
im_name type string
im_planetype type saplane-planetype,
display_attributes.
class-methods: class_constructor.
class-methods: display_n_o_airplanes.
private section.
data: name type string,
planetype type saplane-planetype.
class-data: n_o_airplanes type i.
class-data: list_of_planetypes type ty_planetypes. * here give the message error - THE TYPE type_planetypes is unknown*
endclass. "lcl_airplane DEFINITION
‎2008 Jan 08 4:27 PM
Please, see the post number 8, I think this post still unanswered.
‎2010 Oct 05 5:35 PM
Some late, but it works...
try with this code...
TYPES:BEGIN OF ty_planetypes,
MANDT TYPE saplane-MANDT,
PLANETYPE TYPE saplane-PLANETYPE,
SEATSMAX TYPE saplane-SEATSMAX,
CONSUM TYPE saplane-CONSUM,
CON_UNIT TYPE saplane-CON_UNIT,
TANKCAP TYPE saplane-TANKCAP,
CAP_UNIT TYPE saplane-CAP_UNIT,
WEIGHT TYPE saplane-WEIGHT,
WEI_UNIT TYPE saplane-WEI_UNIT,
SPAN TYPE saplane-SPAN,
SPAN_UNIT TYPE saplane-SPAN_UNIT,
LENG TYPE saplane-LENG,
LENG_UNIT TYPE saplane-LENG_UNIT,
OP_SPEED TYPE saplane-OP_SPEED,
SPEED_UNIT TYPE saplane-SPEED_UNIT,
PRODUCER TYPE saplane-PRODUCER,
SEATSMAX_B TYPE saplane-SEATSMAX_B,
SEATSMAX_F TYPE saplane-SEATSMAX_F,
END OF ty_planetypes.
DATA: name TYPE string,
planetype TYPE saplane-planetype.
CLASS-DATA: n_o_airplanes TYPE i.
CLASS-DATA: list_of_planetypes TYPE STANDARD TABLE OF ty_planetypes. "itab type in Dic.
‎2010 Oct 31 12:54 PM
Yes, By declaring Local Structure of type "SAPLANE" will solve the problem .
‎2011 Sep 25 3:53 PM
Hi all,
kindly need your help.
why do I still get this message error:
"The declaration for the key field MANDT is incomplete. However, MANDT is contained in the key of table lcl_airplane=>list_of_planetypes and must be filled."
The code:
METHOD get_technical_attributes.
DATA wa TYPE saplane.
READ TABLE list_of_planetypes INTO wa WITH TABLE KEY planetype = im_planetype
TRANSPORTING weight tankcap.
IF sy-subrc = 0.
ex_weight = wa-weight.
ex_tankcap = wa-tankcap.
ELSE.
RAISE wrong_planetype.
ENDIF.
ENDMETHOD.
ENDCLASS.
Tks
‎2011 Sep 25 4:58 PM
Hi,
Remove that line from your TYPES structure:
MANDT TYPE saplane-MANDT,
also, change your read statement:
READ TABLE list_of_planetypes INTO wa WITH KEY planetype = im_planetype
TRANSPORTING weight tankcap.
And check/update your query used to fill the table list_of_planetypes...
Kr,
m.
‎2011 Sep 29 2:10 PM
Hi,
If you use WITH TABLE KEY then its mandatory to specify all key fields as condition in READ TABLE statement.
Otherwise replace WITH TABLE KEY as WITH KEY and specify only the conditions you prefer.
READ TABLE list_of_planetypes INTO wa WITH TABLE KEY planetype = im_planetype
TRANSPORTING weight tankcap
reg
Ikshula
‎2011 Oct 08 2:18 PM