cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Cost Center/Profit Center when the DataSource do not have the fields

tnecnivo
Active Contributor
0 Kudos
321

Hi BW gurus,

We are currently using Standard BI Content for FIAR and FIAP as following:-

0FI_AR_4 > 0FIAR_O03 > 0FIAR_C03

0FI_AP_4 > 0FIAP_O03 > 0FIAP_C03

What we need is to build a query on top of the InfoCube (or Multiprovider) and we need to include 0COSTCENTER and 0PROFIT_CTR,

but we have checked and there are no Source field from 0FI_AR_4 or 0FI_AP_4 that provide Cost/Profit Center.

Is there a way to get Cost Center and Profit Center?

Please share your knowledge if you know how, or did this before.

Any advice/help is much appreciated.

Many thanks,

Vince

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I'd say go via FIGL DataSources (e.g. 0FI_GL_4)

if you already set it up, you could "read" the cost/profict center info from this DSO while populating your AR InfoCubes and simply "add" this info

if not, set it up and proceed as above

tnecnivo
Active Contributor
0 Kudos

Hi Raf/Suyash,

Thanks for the reply, Yes, we do have 0FI_GL_4 as well.

By "read" the cost/profit center info from the DSO while populating the AR Cubes, you mean we create and link FIGL(DSO) to FIAR(DSO)?

or do you mean link between Datasource (FI_GL_4) to FIAR DSO?

Can you please elaborate more on how the flow going to be like?

Many thanks,

Vince

Former Member
0 Kudos

2 options

1) report directly on the FIGL InfoProvider(s)

2) when updating your AR InfoCube(s) from the underlying DSO, read the extra info from the FIGL DSO in an end routine and add it to the AR InfoCube(s) - linking DataSources would not be very wise (and no clue how you would actually link DataSources)

Former Member
0 Kudos

Hi Vincent,

The best option would be reporting from the multiprovider. Get the info of profit center and cost center from the GL cube.

Regards,

Rahul.

Former Member
0 Kudos

I will approach this by filling my AR DSO with lookup on GL line item DSO reading cost center and profit center.

As if you do this on the AR Cube you will not be able to manipulate data at line item level if you want to.

Otherwise go with raf approach I am just giving you a alternate.

Cheers!

tnecnivo
Active Contributor
0 Kudos

Hi Suyash,

Thanks, but can you elaborate more on how to fill AR DSO with lookup on GL Line Item DSO?

By using Start Routine?

Many thanks,

Vince

Former Member
0 Kudos

Fill it in end routine.

Read from GL line items DSO 0figl_14  with key as BELNR BUZEI and doc date

This will identify the unique record and fill the profit center and cost center data.

Cheers!

tnecnivo
Active Contributor
0 Kudos

Hi Suyash,

Thanks for the info, but I am not much of a Coder myself.

By any chance, do you have any samples for the end routine/something for me to start with and modify it?

Many thanks.

tnecnivo
Active Contributor
0 Kudos

Hi Rahul,

I have that in mind too, but not sure whether would multiprovider work flawlessly though.

Former Member
0 Kudos

Sample code of a DSO lookup

Replace your keys and DSO name and should work.

Declare this internal table with keys of gl line items DSO and profit center cost center

types:begin of  ls_str,

z0CRM_OHGUID type 0CRM_OHGUID,

z0NETVALORD  type 0NETVALORD,

end of ls_str

data:itab type table of ls_str.

data wa type ls_str.

Select all the records from DSO gl for which you want to read pcenter and ccenter

select  0CRM_OHGUID  0NETVALORD

from /bic/a<dso1>00

into table itab1 for all entries in  result_package

where 0CRM_OHGUID = RESULT_PACKAGE-0CRM_OHGUID.

Now loop at result package to assign your values to your AR dso

loop at result_package assigning <result_fields>.

read table itab1 into wa  where z0CRM_OHGUID = <result_fields>-0CRM_OHGUID.

If sy-subrc=0.

<result_fields>-0NETVALORD = wa-z0NETVALORD.

endif.

endloop.

Cheers!

Answers (1)

Answers (1)

Former Member
0 Kudos

0fi_gl_4 as raf said.

It is for gl line items which has profit and cost center.