Skip to Content
0

Enhance 0CO_OM_CCA_1 with COSP and COSS fields ?

Apr 17, 2017 at 03:22 PM

117

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
ROMIL KIRTIKANT VAGHELA Apr 26, 2017 at 04:06 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
John Hawk Apr 18, 2017 at 06:10 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded