‎2008 Apr 17 7:44 AM
i have 2 internal tables it1,it2 in which 2 fields matnr,werks are repeating.then how ihave to declare it1,it2?
i.e it1 has matnr,werks,maktx and it2 has matnr,werks,ebeln,ebelp,meins.
‎2008 Apr 17 7:51 AM
HI,
data: begin of it1 occurs 0,
matnr like mara-matnr,
werks like mara-werks,
maktx like makt-maktx,
end of it1.
data: begin of it2 occurs 0,
matnr like marc-matnr,
werks like marc-werks,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
meins like ekpo-meins,
end of it2.
data: begin of it_final occurs 0,
matnr like mara-matnr,
werks like mara-werks,
maktx like makt-maktx,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
meins like ekpo-meins,
end of it_final.Regards,
S.Nehru.
‎2008 Apr 17 7:59 AM
HI
data: begin of it1 occurs 0,
matnr like mara-matnr,
werks like mara-werks,
maktx like makt-maktx,
end of it1.
data: begin of it2 occurs 0,
matnr like marc-matnr,
werks like marc-werks,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
meins like ekpo-meins,
end of it2.
data: begin of it_collection occurs 0,
matnr like mara-matnr,
werks like mara-werks,
maktx like makt-maktx,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
meins like ekpo-meins,
end of it_collection.
Plz Rewards points if useful,
Regards,
Ganesh.
‎2008 Apr 17 8:00 AM
hai,
Declare two Different structure with corresponding fields
or put matnr werks in single structure and include it in the both structures
and declare internal table type of corresponding structure
data: begin of x_it1 ,
matnr like mara-matnr,
werks like mara-werks,
maktx like makt-maktx,
end of x_it1.
data: begin of x_it2 ,
matnr like marc-matnr,
werks like marc-werks,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
meins like ekpo-meins,
end of x_it2.
data: it1 type standard table of x_it1_type with header line,
it2 type standard table of x_it2 with header line.
thanks & Regards
Sarath p
Edited by: sarath p on Apr 17, 2008 9:01 AM
‎2008 Apr 17 8:01 AM
i did not understand your problem
as the internal tables are different your way to access the fields in the internal tables will be different
it1 has matnr,werks,maktx and it2 has matnr,werks,ebeln,ebelp,meins
declare like this.
data : begin of it1 occurs 0,
matnr like mara-matnr,
werks type WERKS_D,
maktx type maktx,
end of it1.
data: begin of it2 occurs 0,
matnr like marc-matnr,
werks like marc-werks,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
meins like ekpo-meins,
end of it2.
when you acess the fields from first table you write as it1-matnr
and from second as it2-matnr so both are different