2009 Sep 04 7:56 AM
Hi Experts,
I have a requirement , where i need to display a report containing all the feilds from two table EBAN and EBKN avoiding duplicates.
My question is how to find all the feilds in the 2 tables avoind duplicates. is there any function module for which if if we give input as 2 tables , then it gives all the feilds present i it by avoiding duplicates.
How could i declare my internal table .
TYPES: BEGIN OF t_final.
INCLUDE STRUCTURE ebkn.
INCLUDE STRUCTURE eban.
TYPES: END OF t_final.
If i declare this way, it is showing error that some feilds are already declared.
is there any other way instead of listing all the feilds
2009 Sep 04 8:44 AM
Hello
There are no exist such FM. But you may try like this:
TYPES: BEGIN OF t_final.
INCLUDE STRUCTURE ebkn AS a RENAMING WITH SUFFIX a1.
INCLUDE STRUCTURE eban AS b RENAMING WITH SUFFIX b1.
TYPES: END OF t_final.
DATA: FINAL TYPE t_final OCCURS 0 WITH HEADER LINE.
Table FINAL will be contain all fields from both structures (with duplicates).
Access fields:
FINAL-MANDTA1 - field MANDT for table EBKN (also you may use FINAL-A-MANDT)
FINAL-MANDTB1 - field MANDT for table EBAN (also you may use FINAL-B-MANDT)
Hi Experts,
I have a requirement , where i need to display a report containing all the feilds from two table EBAN and EBKN avoiding duplicates.
My question is how to find all the feilds in the 2 tables avoind duplicates. is there any function module for which if if we give input as 2 tables , then it gives all the feilds present i it by avoiding duplicates.
How could i declare my internal table .
TYPES: BEGIN OF t_final.
INCLUDE STRUCTURE ebkn.
INCLUDE STRUCTURE eban.
TYPES: END OF t_final.
If i declare this way, it is showing error that some feilds are already declared.
is there any other way instead of listing all the feilds
2009 Sep 04 8:44 AM
Hello
There are no exist such FM. But you may try like this:
TYPES: BEGIN OF t_final.
INCLUDE STRUCTURE ebkn AS a RENAMING WITH SUFFIX a1.
INCLUDE STRUCTURE eban AS b RENAMING WITH SUFFIX b1.
TYPES: END OF t_final.
DATA: FINAL TYPE t_final OCCURS 0 WITH HEADER LINE.
Table FINAL will be contain all fields from both structures (with duplicates).
Access fields:
FINAL-MANDTA1 - field MANDT for table EBKN (also you may use FINAL-A-MANDT)
FINAL-MANDTB1 - field MANDT for table EBAN (also you may use FINAL-B-MANDT)
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |