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

select query for inner join

Former Member
0 Likes
288

Hi all,

give me the query with innerjoin

Based on the input values of Material number (MARC-MATNR) from selection screen check and get the Special Procurement type details from MARC-SOBSL and Material description details from MAKT-MAKTX.

basha....

Moderator message - instead of asking, you should try to write the code yourself and get back to the forum if you have a specific question.

Edited by: Rob Burbank on Apr 19, 2009 4:46 PM

1 REPLY 1
Read only

faisalatsap
Active Contributor
0 Likes
265

Hi,

Please Test the following Sample Code it is according to your requirement hope will solve out your problem,

TABLES: marc.

SELECt-OPTIONS somatnr for marc-matnr.

TYPES: BEGIN OF ty_matnr,
  matnr LIKE marc-matnr,
  sobsl LIKE marc-sobsl,
  maktx LIKE makt-maktx,
  END OF ty_matnr.

DATA: it_matnr TYPE STANDARD TABLE OF ty_matnr WITH HEADER LINE.

SELECT marc~matnr marc~sobsl makt~maktx
  into CORRESPONDING FIELDS OF TABLE it_matnr
  from marc INNER JOIN makt on ( marc~matnr eq makt~matnr )
  WHERE marc~matnr in somatnr.

Best Regards,

Faisal