Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

internal table

Former Member
0 Likes
899

Select MARC-MATNR (Material), MARC-WERKS (Plant) and MAKT-MAKTX (Material Description) from MARC table inner joining MAKT table on MATNR into an internal table IT_MARC where MARC_MATNR in S_MATNR, MARC_WERKS IN S_WERKS, MARC-DISMM EQ 'TBD’ AND MAKT-SPRAS EQ 'EN'.

For this how to declare internal table it_marc.

plz provide the code.

8 REPLIES 8
Read only

Former Member
0 Likes
822

Hi,

data: begin of it_marc occurs 0,

matnr like marc-matnr,

werks like marc-werks,

maktx like makt-maktx,

end of it_marc.

if it is helpfull pls reward me.

Regards

Srimanta

Read only

Former Member
0 Likes
822

Hi,

Types:Begin of ty_marc, "types declaration

matnr type matnr,

maktx type maktx,

werks type werks,

end of ty_marc.

data:wa_marc type ty_marc, "work area declaration

it_marc type table of ty_marc."main area declaration

Regards,

Raj.

Read only

Former Member
0 Likes
822

Hi Frd

Do ur coding like this

data : BEGIN OF itab OCCURS 0,

matnr like marc-matnr,

werks like marc-werks,

maktx like makt-maktx,

end of itab.

SELECT marcmatnr marcwerks MARC~DISMM

maktmaktx MAKTSPRAS

INTO CORRESPONDING FIELDS OF TABLE itab FROM marc

INNER JOIN makt on maktmatnr = marcmatnr

where MARC~WERKS IN S_WERKS AND

MARC~DISMM EQ 'TBD' AND

MAKT~SPRAS EQ 'EN'.

Reward Me Points

By

Pari

Read only

Former Member
0 Likes
822

Hi,

do like this.



TABLES:marc.
SELECT-OPTIONS:s_matnr for marc-matnr,
s_werks for marc-werks.

DATA:BEGIN OF it_marc OCCURS 0,
  matnr like MARC-MATNR,
  werks like MARC-WERKS,
  maktx like MAKT-MAKTX,
  END OF it_marc.

Select MARC~MATNR MARC~WERKS MAKT~MAKTX from MARC INNER JOIN MAKT on
marc~matnr = makt~matnr into CORRESPONDING FIELDS OF TABLE IT_MARC
  WHERE MARC~MATNR in S_MATNR AND MARC~WERKS IN S_WERKS and
  MARC~DISMM EQ 'TBD' AND MAKT~SPRAS EQ 'EN'.

rgds,

bharat.

Read only

Former Member
0 Likes
822

data : BEGIN OF itab OCCURS 0,

matnr like marc-matnr,

werks like marc-werks,

maktx like makt-maktx,

end of itab.

select-options : s_matnr for marc-matnr,

s_werks for marc-werks.

SELECT marcmatnr marcwerks makt~maktx

INTO TABLE itab

FROM marc INNER JOIN makt

on maktmatnr = marcmatnr

where MARC~matnr IN S_matnr AND

MARC~WERKS IN S_WERKS AND

MARC~DISMM EQ 'TBD' AND

MAKT~SPRAS EQ 'EN'.

Read only

Former Member
0 Likes
822

Hi,

Use the following Code.

types : Begin of x_marc,

matnr type marc-matnr,

werks type marc-werks,

maktx type marc-maktx,

matnr1 type makt-matnr,

end of x_marc.

data : it_marc type standard table of x_marc, "internal table

wa_marc type x_marc. " workarea

Reward if useful.

Thanks.

Swati

Read only

Former Member
0 Likes
822

Hi,

tables: mara , marc.

Select-options: S_Matnr  for mara-matnr,
                       S_werks for marc-werks.

data: begin of it_marc occurs 0,
matnr like marc-matnr,
werks like marc-werks,
maktx like makt-maktx,
end of it_marc.

Regards,

Nehru.s

Read only

prasanth_kasturi
Active Contributor
0 Likes
822

hi

try this

types : Begin of ty_marc,

matnr type marc-matnr,

werks type marc-werks,

maktx type marc-maktx,

end of ty_marc.

data : it_marc type standard table of ty_marc, "internal table

wa_marc type ty__marc. " workarea

regards

prasanth