2010 Jan 06 9:04 AM
Hi Friends
Am querying COSS table for posting details based on all primary keys available.
i want to select only particular field WTGXXX (XXX- is the period ranging from 001 till 016) in the select clause.
Is it possible, if yes how is the approach.
Thanks
Lavanya
2010 Jan 06 9:31 AM
Hello
Try like this:
PARAMETERS: P_PERIO(3).
DATA: IFIELDS LIKE RSFS_STRUC OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF ITAB OCCURS 0,
DMBTR TYPE WTGXXX,
END OF ITAB.
CONCATENATE 'WTG' P_PERIO INTO IFIELDS-LINE. APPEND IFIELDS.
SELECT (IFIELDS) INTO TABLE ITAB FROM COSS
WHERE LEDNR EQ ... " set conditions
AND OBJNR EQ ...
AND GJAHR EQ ...
You set P_PERIO value (f.e. 001) and run. In table itab you will have all values of field WTG001 for particular conditions.
Hi Friends
Am querying COSS table for posting details based on all primary keys available.
i want to select only particular field WTGXXX (XXX- is the period ranging from 001 till 016) in the select clause.
Is it possible, if yes how is the approach.
Thanks
Lavanya
2010 Jan 06 9:31 AM
Hello
Try like this:
PARAMETERS: P_PERIO(3).
DATA: IFIELDS LIKE RSFS_STRUC OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF ITAB OCCURS 0,
DMBTR TYPE WTGXXX,
END OF ITAB.
CONCATENATE 'WTG' P_PERIO INTO IFIELDS-LINE. APPEND IFIELDS.
SELECT (IFIELDS) INTO TABLE ITAB FROM COSS
WHERE LEDNR EQ ... " set conditions
AND OBJNR EQ ...
AND GJAHR EQ ...
You set P_PERIO value (f.e. 001) and run. In table itab you will have all values of field WTG001 for particular conditions.
2010 Jan 28 10:51 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |