on 07-16-2011 7:24 AM
Hi,
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.
LOOP AT c_t_data INTO wa_glpcw.
READ TABLE it_bkpf INTO wa_bkpf
WITH KEY BUKRS = WA_GLPCW-RBUKRS
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.
ENDIF.
ELSE.
IF wa_glpcw-docln <> wa_oldpcaitm.
lv_bseg_index = lv_bseg_index + 1.
ENDIF.
READ TABLE it_bseg INTO wa_bseg INDEX lv_bseg_index.
ENDIF.
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.
ENDIF.
ELSE.
lv_bseg_index = 0..
ENDIF.
MODIFY c_t_data FROM wa_glpcw INDEX lv_tabix.
wa_oldpcaitm = wa_glpcw-docln.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Thanks,
Krishnan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
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.
regards,
Arvind.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try building a Function Module and incorporate your logic in it. I know it is bit tricky.....
Regards,
Suman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.