on ‎2017 Apr 17 4:22 PM
Hi Experts,
I want to enhance datasource 0CO_OM_CCA_1 with few fields from COSP and COSS table.
e.g. COSP-OBJNR
When I am looking at the available fields in datasource, I am not able to find any appropriate logic to use available fields in logic to derive required fields such as COSP-OBJNR.
or will I have to create a generic datasource on top of COSP and COSS to meet my requirement ?
Can you please help ?
Thanks,
Romil
Request clarification before answering.
Hi John,
Thank you for having a look on my question. Your inputs are helpful.
I had a look at the extractor code and observed that the code is already using OBJNR in order to extract the records from tables COSP and COSS. However when the records are being pushed for extraction, OBJNR was not being passed as it is not present as a field in the extract structure of datasource 0CO_OM_CCA_1.
I added the field OBJNR by appending the structure in datasource extract structure and then I could extract OBJNR automatically without doing any code or anything.
Extractor code where it is passing all relevant fields present in the extract structure is as below.
*...collect data into datasource table.................................*
LOOP AT TEMP_DATA.
MOVE-CORRESPONDING TEMP_DATA TO E_T_ICCTRCST.
MOVE-CORRESPONDING S_VIRTUALS TO E_T_ICCTRCST.
CHECK_VALID_PERIOD E_T_ICCTRCST.
COLLECT E_T_ICCTRCST.
ENDLOOP.
*...if there is no more data to be read: set corresponding flag........*
Thanks,
Romil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Romil
Take a look at at the SAP Help for datasource 0CO_OM_CCA_1
https://help.sap.com/saphelp_nw70/helpdata/en/ae/8876724e671341a91ff3ba711bacd0/frameset.htm
Please note that the extractor summarizes data and also parses COSP-OBJNR for the user.
Controlling area From the OBJNR of the totals record (places 3-6 of the object number)
Cost center From the OBJNR of the totals record (places 7-16 of the object number)
Activity type From the OBJNR of the totals record (places 17-24 of the object number)
My guess would be that you would need to create a generic datasource AND be very careful how you join it to the output of 0CO_OM_CCA_1
There is a strong risk of creating duplicate records.
What specific fields are do you need,that are not found in the extractor?
John Hawk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Romil,
how exactly did you append the field OBJNR to the structure of the data source 0CO_OM_CCA_1?
Did you append only the field or did you append a full (an new) structure?
We are facing a similar problem trying to append the field VRGNG to the structure, but it is not allowed to add the field, because it is already included in ICCTRCST_D.
Regards, Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.