Skip to Content

merger of GL ,PCA report


We are trying to create a line item level report by merging the classic GL and PCA datasources. There is no direct linkage in the system at the line item level between GL line items and PCA line items. However if we pick up document items in the same sequence they do match. We are enhancing 0EC_PCA_3 and adding GL document/item number to it.The challenge in this is that if the document gets split between two different data packages in BW data extraction then the sequencing logic would fail. Is there any way to ensure that documents dont get split into multiple packages and the design becomes full proof. Still better is there any way to connect the GL line item and PCA line item via any common fields/tables.

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Posted on Jul 16, 2011 at 07:42 AM


    Try building a Function Module and incorporate your logic in it. I know it is bit tricky.....



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 16, 2011 at 11:20 PM


    one of the fullproof method is to create a write optimized DSO as inbound and from this DSO extract data to a standard DSO.

    From this Write optimized DSO to the outbound DSO in the DTP selection you can define the Semantic keys of the target DSO.

    The write optimized DSO will take care that none of the values are overwritten and the semantic keys definition will extract the data in the same package when loading to the outbound DSO.



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 17, 2011 at 09:06 AM

    Hi Yogesh,

    Instead of enhancing the data flow in BW, the datasource can be enhanced in SAP and this will remove any dependency on items getting split into different packages.

    I suspect this fields are already available in the extractor.

    Please check REFDOCNR field.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 17, 2011 at 10:57 PM

    We are enhancing the datasource only- 0EC_PCA_3 to include the GL document. Wont it split the selection into multiple packages based on the package size and there is a likelihood of a single PCA document coming as part of two packages?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 18, 2011 at 05:33 AM

    LOOP AT c_t_data INTO wa_glpcw.

    READ TABLE it_bkpf INTO wa_bkpf


    blart = wa_glpcw-blart

    gjahr = wa_glpcw-refryear

    awtyp = wa_glpcw-awtyp

    awkey = wa_glpcw-zzawkey.

    IF sy-subrc EQ 0.

    wa_glpcw-zzbelnr = wa_bkpf-belnr.

    wa_glpcw-zzgjahr = wa_bkpf-gjahr.

    wa_glpcw-zzblart = wa_bkpf-blart.

    wa_glpcw-zzbktxt = wa_bkpf-bktxt.

    wa_glpcw-zzppnam = wa_bkpf-ppnam.

    wa_glpcw-zzusnam = wa_bkpf-usnam.

    wa_glpcw-zzbvorg = wa_bkpf-bvorg.

    IF wa_bkpf-belnr <> wa_old_bkpf+4(10)

    OR wa_bkpf-bukrs <> wa_old_bkpf(4)

    OR wa_bkpf-gjahr <> wa_old_bkpf+14(4).

    lv_bseg_index = 0.

    CONCATENATE wa_bkpf-bukrs wa_bkpf-belnr wa_bkpf-gjahr

    INTO wa_old_bkpf.

    READ TABLE it_bseg INTO wa_bseg WITH KEY

    bukrs = wa_bkpf-bukrs

    belnr = wa_bkpf-belnr

    gjahr = wa_bkpf-gjahr.

    IF sy-subrc EQ 0.

    lv_bseg_index = sy-tabix.



    IF wa_glpcw-docln <> wa_oldpcaitm.

    lv_bseg_index = lv_bseg_index + 1.


    READ TABLE it_bseg INTO wa_bseg INDEX lv_bseg_index.


    IF wa_bseg IS NOT INITIAL.

    wa_glpcw-zzaugdt = wa_bseg-augdt.

    wa_glpcw-zzaugbl = wa_bseg-augbl.

    wa_glpcw-zzkoart = wa_bseg-koart.

    wa_glpcw-zzbuzei = wa_bseg-buzei.

    wa_glpcw-zzsgtxt = wa_bseg-sgtxt.

    wa_glpcw-zzhkont = wa_bseg-hkont.

    wa_glpcw-zzzuonr = wa_bseg-zuonr.

    wa_glpcw-zzpernr = wa_bseg-pernr.

    wa_glpcw-zzimkey = wa_bseg-imkey.

    wa_glpcw-zzspgrq = wa_bseg-spgrq.

    wa_glpcw-zzvalut = wa_bseg-valut.

    wa_glpcw-zzxref1 = wa_bseg-xref1.

    wa_glpcw-zzxref2 = wa_bseg-xref2.

    wa_glpcw-zzxref3 = wa_bseg-xref3.

    wa_glpcw-zzvname = wa_bseg-vname.

    wa_glpcw-zzrecid = wa_bseg-recid.

    wa_glpcw-zzegrup = wa_bseg-egrup.



    lv_bseg_index = 0..


    MODIFY c_t_data FROM wa_glpcw INDEX lv_tabix.

    wa_oldpcaitm = wa_glpcw-docln.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.