2008 Apr 17 12:35 PM
Hi ABAP Experts!!
I posted the same thread twice in BI general, but was not able to get replies.
Could anyone help out me with this problem..
We have loaded some data into a Master Data Object (YMETADATA) in Development system.
Now, the same data can be present in a View RSDVCHA.
Our aim is to write a ABAP program, which would read a record from the View (RSDVCHA) and look into Master Data records and show whether it is present in the master data or not?
Do we have any built-in code to compare by such criteria??
Has anyone written such type of code earlier, If so, please do help me out in writing this code?
Thanks in advance,
Anjum.
2008 Apr 17 4:12 PM
hi,
tables:
YMETADATA,
RSDVCHA.
*internal table declarations
data:
t_ymetadata type table of ymetadata.
data:
t_rsdvcha type table of t_rsdvcha.
*populating records into internal tables
select * from ymetadata into table t_ymetadata.
select * from rsdvcha into table t_rsdvcha.
*checking if records are present or not.
loop at t_ymetadata into ymetadata.
*here fieldname is which you want to compare with the field of rsdvcha.
read table t_rsdvcha into rsdvcha with key fieldname = ymetadata-fieldname.
if sy-subrc eq 0.
write:/ ymetadata-fieldname, ' is present in rsdvcha'.
else.
write:/ ymetadata-fieldname, 'record does not exist in rsdvcha'.
endif.
endloop.
Regards
Anup.
hi,
tables:
YMETADATA,
RSDVCHA.
*internal table declarations
data:
t_ymetadata type table of ymetadata.
data:
t_rsdvcha type table of t_rsdvcha.
*populating records into internal tables
select * from ymetadata into table t_ymetadata.
select * from rsdvcha into table t_rsdvcha.
*checking if records are present or not.
loop at t_ymetadata into ymetadata.
*here fieldname is which you want to compare with the field of rsdvcha.
read table t_rsdvcha into rsdvcha with key fieldname = ymetadata-fieldname.
if sy-subrc eq 0.
write:/ ymetadata-fieldname, ' is present in rsdvcha'.
else.
write:/ ymetadata-fieldname, 'record does not exist in rsdvcha'.
endif.
endloop.
Regards
Anup.
2008 Apr 17 4:12 PM
hi,
tables:
YMETADATA,
RSDVCHA.
*internal table declarations
data:
t_ymetadata type table of ymetadata.
data:
t_rsdvcha type table of t_rsdvcha.
*populating records into internal tables
select * from ymetadata into table t_ymetadata.
select * from rsdvcha into table t_rsdvcha.
*checking if records are present or not.
loop at t_ymetadata into ymetadata.
*here fieldname is which you want to compare with the field of rsdvcha.
read table t_rsdvcha into rsdvcha with key fieldname = ymetadata-fieldname.
if sy-subrc eq 0.
write:/ ymetadata-fieldname, ' is present in rsdvcha'.
else.
write:/ ymetadata-fieldname, 'record does not exist in rsdvcha'.
endif.
endloop.
Regards
Anup.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |