‎2007 Aug 22 2:18 PM
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.
‎2007 Aug 22 2:30 PM
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
‎2007 Aug 22 2:30 PM
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