cancel
Showing results for 
Search instead for 
Did you mean: 

2LIS_02_SCL: goods receipt and invoice document number

former_member185837
Active Participant
0 Kudos

Hi,

the BI Content documentation for the [Purchasing Data (Schedule Line Level) (2LIS_02_SCL)|http://help.sap.com/saphelp_nw04/helpdata/en/8d/bc383fe58d5900e10000000a114084/frameset.htm] DataSource reads:

The DataSource also provides information about the documents that are posted with regard to the purchase order, such as goods receipts and invoices.

The point is: where are the documents' numbers ?

When I test the extraction, I get the expected number of records, provided that those records with ROCANCEL=X (cancellation of Data Record) are taken into account.

For example, for a Purchase Order (PO) Schedule Line that has 3 Goods Receipts (GR) and 1 Invoce (IR), I get:

- 1 record with BWVORG=1 (SAP BW - Transaction Key) and ROCANCEL blank, for the PO document;

- 6 records for the 3 GR documents (BWVORG=2);

- 2 records for the 2 IR documents (BWVORG=3).

Therefore the DataSource provides the needed level of granularity. Just the field I need is missing, i.e. BELNR! Is there any trick to get it or the only way out is enhancing the DataSource?

Thanks, [Davide|https://wiki.sdn.sap.com/wiki/display/profile/Davide+Cavallari]

Edited by: Davide Cavallari on Jan 18, 2008 5:38 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185837
Active Participant
0 Kudos

Basically I need to provide:

- GR document number

- GR amount

- IR document number (if there is an invoice referred to this GR)

- IR amount

The 2LIS_02_SCL would be fine, but it does not provide the GR and IR numbers I need.

The 2LIS_02_SGR provides the GR document number and 2LIS_06_INV the IR document number. It would be fine if 2LIS_02_SGR provided the amounts (a left outer join of the two datasets should do the trick), but unfortunately it just provides quantities!

So to fetch all the information I would need:

- 2LIS_02_SGR for the GR numbers

- 2LIS_06_INV for the IR numbers and the IR amount

- 0FI_GL_4 for the GR amount

Three DataSource for just a few fields, if I want a BI Content-based solution -- otherwise enhancing 2LIS_02_SCL.. Do you have any better idea?

Cheers, [Davide|https://wiki.sdn.sap.com/wiki/display/profile/Davide+Cavallari]

Edited by: Davide Cavallari on Jan 18, 2008 5:57 PM

Former Member
0 Kudos

Hi,

Enhancing SCL won't work I think.. because you can have several IV for the same scheduled line item...

I think you'll have to go with the three sources and combine them in a multi....

hope this helps...

Olivier.

former_member185837
Active Participant
0 Kudos

Yes Olivier, both several GR docs and several IV docs can refer to the same schedule line item. In the example I gave in my first post, there were 3 GR and just one IV, but there could be more IV docs.

In my example, I showed that 2LIS_02_SCL extracts the multiple GR records referred to the one SCL. The same would happen if there were e.g. 2 IV docs referred to the SCL. The DataSource would extract multiple records for the IV docs as well.

So I think the enhancement would work. Anyway, 2LIS_06_INV would still be needed to have the link between the INV and the GR referred by that INV.

Thanks, [Davide|https://wiki.sdn.sap.com/wiki/display/profile/Davide+Cavallari|My wiki profile]

Former Member
0 Kudos

Hi again,

I have reread your two post a bit more carefully, apologies for having gone trhough it too fast (I did already this analysis some years ago...)

If you think that SCL will provide you the required information (even if for example an invoice is changed and/or an invoice is cleared on accouting level only, I mean you will receive the necessary records in your delta) then you can proceed with your enhancement...

What I don't understand is why would you need your GR value from GL? The GR amount is correct in SCL (as far as I have experienced...)...

In any case I think you can find all what you need in your enhencement in tables EKBE (for the GR MM doc, value.. you can even jump to MSEG) and RSEG for the invoices...

But I am really concerned about the granularity of SCL.

I am also very very curious to follow your investigations in this area if you don't mind of course...

Olivier.

former_member185837
Active Participant
0 Kudos

Hi Olivier and thanks again for your feedback.

It's right that it wouldn't be necessary to read GR value from GL, as long as 2LIS_02_SCL is used.

On the other hand, if you opt for a pure BI Content solution (in order not to enhance any DataSource), you'd need 2LIS_02_SGR for the GR number, 2LIS_06_INV for the IV number and value and 0FI_GL_4 for the GR value. That's because 2LIS_02_SGR's extract structure provides just quantity key figures -- no amounts.

Back to 2LIS_02_SCL, unfortunately it seems to me that both the amounts and quantities are cumulated key figs. For instance, a schedule line has three invoices of 60, 20 and 40 USD respectively. In this case, 2LIS_02_SCL would extract 3 records with BWVGEO=3 (document type invoice) and ROCANCEL initial (there are 3 more records with ROCANCEL=X, but these are the before-image records). The amount would be 60 USD in the first record, 80 USD in the second, and 120 USD in the third.

Has anyone experienced this behaviour. Are my observations correct or am I missing something?

Regards, [Davide|https://wiki.sdn.sap.com/wiki/display/profile/Davide+Cavallari|My wiki profile]

former_member185837
Active Participant
0 Kudos

I think I would choose the option that takes advantage of 3 DataSources:

- 2LIS_02_SGR, for GR number;

- 2LIS_06_INV, for IV number;

- 0FI_GL_4, for document amount, as well as some other informative characteristics, such as document type (useful when the document is an invoice), referred document (the field that contains the supplier's document number), document date, posting date

The Logistic DataSources would basically provide the link between GR and IV, while the General Ledger DataSource would provide the financial information.

In fact an analysis for controlling purchase expenditures at a detailed level is required. Not just a simple analysis of expenses for vendor, or even purchase document, but for any financial document posted to the General Ledger. This analysis has sort of a financial perspective. Probably it's not the kind of strategic analysis best suited to BI. It has a more tactical, operational nature. And maybe BI is not the best platform for developing this kind of application.

Anyway, if you have better ideas or any suggestion on this topic, please feel free to comment!

Cheers, [Davide|https://wiki.sdn.sap.com/wiki/display/profile/Davide+Cavallari|My wiki profile]

Edited by: Davide Cavallari on Jan 19, 2008 8:16 PM

former_member185837
Active Participant
0 Kudos

Hi Olivier and thanks again for your feedback.

It's right that it wouldn't be necessary to read GR value from GL, as long as 2LIS_02_SCL is used.

On the other hand, if you opt for a pure BI Content solution (in order not to enhance any DataSource), you'd need 2LIS_02_SGR for the GR number, 2LIS_06_INV for the IV number and value and 0FI_GL_4 for the GR value. That's because 2LIS_02_SGR's extract structure provides just quantity key figures -- no amounts.

Back to 2LIS_02_SCL, unfortunately it seems to me that both the amounts and quantities are cumulated key figs. For instance, a schedule line has three invoices of 60, 20 and 40 USD respectively. In this case, 2LIS_02_SCL would extract 3 records with BWVGEO=3 (document type invoice) and ROCANCEL initial (there are 3 more records with ROCANCEL=X, but these are the before-image records). The amount would be 60 USD in the first record, 80 USD in the second, and 120 USD in the third.

Has anyone experienced this behaviour. Are my observations correct or am I missing something?

Regards, [Davide|https://wiki.sdn.sap.com/wiki/display/profile/Davide+Cavallari|My wiki profile]

former_member185837
Active Participant
0 Kudos

Yes Olivier, both several GR docs and several IV docs can refer to the same schedule line item. In the example I gave in my first post, there were 3 GR and just one IV, but there could be more IV docs.

In my example, I showed that 2LIS_02_SCL extracts the multiple GR records referred to the one SCL. The same would happen if there were e.g. 2 IV docs referred to the SCL. The DataSource would extract multiple records for the IV docs as well.

So I think the enhancement would work. Anyway, 2LIS_06_INV would still be needed to have the link between the INV and the GR referred by that INV.

Thanks, [Davide|https://wiki.sdn.sap.com/wiki/display/profile/Davide+Cavallari|My wiki profile]