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

Code meaning

Former Member
0 Likes
481

hai

Im BW-Consultant. Can anyone tell me the meaning of the below code.

<b>SELECT MATNR WERKS MATGR PRCTR

INTO CORRESPONDING FIELDS OF TABLE ITAB_MAT_MARC FROM MARC

FOR ALL ENTRIES IN ITAB_ALL_MAT

WHERE PRCTR = ITAB_ALL_MAT-PRCTR AND

werks = itab_all_mat-werks AND

MATGR <> ' '.</b>

I will assing the points

kumar

3 REPLIES 3
Read only

abdulazeez12
Active Contributor
0 Likes
438

Hey its simple..

The code fetches the feilds MATNR WERKS MATGR PRCTR from table MARC for every entry from another internal table ITAB_ALL_MAT in the internal table

ITAB_MAT_MARC with the conditions on MARC table as PRCTR = ITAB_ALL_MAT-PRCTR AND

werks = itab_all_mat-werks AND

MATGR <> ' '.

Read only

Former Member
0 Likes
438

select fields MATNR WERKS MATGR PRCTR

From database table MARC

into internal table ITAB_MAT_MARC (but this table may have more field so select fields and place into internal table with same field name)

Before placing Check ITAB_ALL_MAT

internal table

such that from MARC table

value of PRCTR should be present in ITAB_ALL_MAT with field name PRCTR

and

value of WERKS should be present in ITAB_ALL_MAT with field name WERKS

and

value of MATGR should<b> not</b> be blank (no data)

Rewards if useful..............

Minal

Read only

Former Member
0 Likes
438

hi,

ur select statement fetches data from dtabaser table marc into internal table table ITAB_MAT_MARC with fields as MATNR WERKS MATGR PRCTR based on a condition

i.e

the values which u gave in internal table ITAB_ALL_MAT[ for any field this is some thing similar to join based on the values of internal table in ITAB_ALL_MAT , the records from marc are fetched for u with input values].

condition part:

PRCTR = ITAB_ALL_MAT-PRCTR AND

werks = itab_all_mat-werks AND

MATGR <> ' '.

if helpful reward some points.

with regards,

Suresh Aluri.