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

QUERRY

Former Member
0 Likes
396

hi ,can any one let me know how to do this,

i need to extracted the few fields from LQUA and put them in the itab

and i need to compared LQUA-MATNR to another custom table RMATNR field from ZCORE talbe, and i need to extract the records which are matching, but the zcore and lqua table having different structures.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
362

Hello,

Please check the following code

Data : ITAB_LQUA type standard table of LQUA.

Data : ITAB_ ZCORE type standard table of ZCORE.

or define a structures and tables for your need with required fields only

select * from LQUA into table/corresponding fields of table ITAB_LQUA

where

XXXXXXXXX. "Write your condition here

if ITAB_LQUA[] is not initial.

select * from ZCORE into table/corresponding fields of table ITAB_ZCORE

for all entries in LQUA

where RMATNR = LQUA-MATNR.

if sy-subrc = 0.

"It means for all MATNR present in LQUA,if the same material number is present in table ZCORE for field RMATNR selection will occur and add entries to your internal table itab_ZCORE

else.

"Not successful

endif.

Hope they were of some use

Reward if helpful

Regards

Byju Edamana

1 REPLY 1
Read only

Former Member
0 Likes
363

Hello,

Please check the following code

Data : ITAB_LQUA type standard table of LQUA.

Data : ITAB_ ZCORE type standard table of ZCORE.

or define a structures and tables for your need with required fields only

select * from LQUA into table/corresponding fields of table ITAB_LQUA

where

XXXXXXXXX. "Write your condition here

if ITAB_LQUA[] is not initial.

select * from ZCORE into table/corresponding fields of table ITAB_ZCORE

for all entries in LQUA

where RMATNR = LQUA-MATNR.

if sy-subrc = 0.

"It means for all MATNR present in LQUA,if the same material number is present in table ZCORE for field RMATNR selection will occur and add entries to your internal table itab_ZCORE

else.

"Not successful

endif.

Hope they were of some use

Reward if helpful

Regards

Byju Edamana