How to join anla anlc bkpf and bseg in sap
any can u tel me how to join the anla anlc bkpf and bseg tables in sap.if any body having asset report send me plz
Moderator message - Welcome to SCN
But please search for answers here before posting and do not ask the forum to do your work for you.
Thread locked.
Please read [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement], How to post code in SCN, and some things NOT to do... and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
Rob
Similar Messages
-
How to create view on bkpf and bseg?
friends,
can we create views on bkpf and bseg if yes wht are the steps...please note it down n send me..regards essam ([email protected])Hi,
Use standard views...
View name Short text
BKPF_AEDAT BW FI: BKPF Extraction Using AEDAT
BKPF_BSAD BW FI: BSAD Extraction Using CPUDT
BKPF_BSAD_AEDAT BW FI: BSAD Extraction using AEDAT
BKPF_BSAK BW FI: BSAK Extraction Using CPUDT
BKPF_BSAK_AEDAT BW FI: BSAK Extraction using AEDAT
BKPF_BSID BW FI: BSID Extraction Using CPUDT
BKPF_BSID_AEDAT BW FI: BSID Extraction using AEDAT
BKPF_BSIK BW FI: BSIK Extraction Using CPUDT
BKPF_BSIK_AEDAT BW FI: BSIK Extraction using AEDAT
CRMV_BKPF_BEBD FI Documents Relevant for Feedback to CRM
V_EWU_BKPF Update View for Parallel Processing on BKPF
V_VBSEGK
V_VBSEGS
Regards,
Omkar. -
How to use BKPF and BSEG without using inner join
Hi,
can anybody plz tell me the logic about how to complete the report without inner joining bkpf and bseg.Is this report can be really be made by using only bseg,bkpf ?
*selection-criteria .
BKPF-USNAM
BKPF-CPUDT
BKPF-BUDAT
BKPF-GJAHR
BKPF-BUKRS
BKPF-BELNR
BSEG-SAKNR
BSEG-LIFNR
BSEG-KUNNR
BSEG-ZUONR
BSEG-SGTXT
Output fields required.
BKPF-BUKRS
BKPF-BELNR
BKPF-GJAHR
BKPF-MONAT
BKPF-BLART
BKPF-CPUDT
BKPF-BLDAT
BKPF-BUDAT
BKPF-USNAM
BKPF-XBLNR
BKPF-STBLG
BKPF-BKTXT
BKPF-WAERS
BKPF-KURSF
BSEG-BUZEI
BSEG-BSCHL
BSEG-KOART
BSEG-UMSKZ
BSEG-SHKZG
BSEG-MWSKZ
BSEG-PSWBT
BSEG-PSWSL
BSEG-DMBTR
BSEG-SAKNR
BSEG-HKONT
BSEG-KOSTL
BSEG-KUNNR
BSEG-VBELN
BSEG-LIFNR
BSEG-ANLN1
BSEG-ANLN2
BSEG-AUFNR
BSEG-MATNR
BSEG-MENGE
BSEG-MEINS
BSEG-ZUONR
BSEG-SGTXT
Thanks,
Rahman
Moderator Message: Please search before posting your question. Thread locked.
Edited by: Suhas Saha on Jan 31, 2012 3:07 PMQuick question - what's preventing your from using built-in functions?
I suggest mapping your Time Dim to a standard Time Dim and work with it - you'll save a lot more time. You'd even need this table if you wanted to work around Todate/AGO.
It is possible to model this functionality w/o functions, but it'll be time consuming task, similar to using Time Series Wizard in Siebel Analytics. You'll need to build aliases and views along with some complex joins (such as TIME.KEY=TIME.KEY-365), introduce a bunch of variables to control. Also, you might not get much flexibility in terms of years. For each year, you'd need an alias table. (TIME_DIM_PY). -
Hi Experts,
how to join BKPF and BSEG
Thanks
naginiHi,
BKPF is Transparent table but BSEG is cluster table. We can't create views by joining cluster tables.
hope it helps...
regards,
Raju -
Query with tables of BKPF and BSEG and Structures COBL, RF05A
hi experts,
I want to create query with the tables of BKPF and BSEG and Structures COBL, RF05A
How can i proceed?
Please give me complete points
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:52 PMcheck the common fields and required fields and the write SELECT query useing Inner Joins or For all entries
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:52 PM -
I need a report that will join two tables BKPF and VBRK in QuickViewer. The only field with the right character length is XBLNR but when creating the join no records are dispalyed beacuse the values of this field in both tables are not the same.
There are also other fields available in BKPF but the char length is not the appropriate.
Does anyone have any idea how I can link these two tables?
Thank youNeither of these combinations is possible with QuickViewer because the fields need to have the same length of characters in order to create the join.
VBRK - VBLEN char(10) and BKPF - AWKEY char(20)
VBRK -ZUONR char(18) BKPF- BELNR char (10)
Any other idea?
Thank you, JP -
How to join between network head and activity in DB
hi expert:
Network head store in a table named AUFK, Activity store in a table named AFVC. How to join this two table.
because there are no foreign key in this two table. It spend my much time. but have not find it.
thank youHi,
Table AFKO provides the link.
Input AUFNR-AUFK to AUFNR-AFKO to get AUFPL. Input this AUFPL in AFVC.
Regards -
Hi all,
Can someone help me optimize the performance of this code as i don't know how else to select from BSEG as i cannot use a join coz its a cluster table. I need to find a way to improve the perfomance.Any help would be much appreciated.
SELECT belnr gjahr bukrs budat stblg awkey blart
FROM bkpf INTO CORRESPONDING FIELDS OF TABLE t_bkpf
WHERE belnr IN s_belnr and
gjahr = p_gjahr and
bukrs = p_bukrs.
LOOP AT t_bkpf.
SELECT belnr gjahr buzei ebeln ebelp
wrbtr fipos geber fistl fkber
augbl augdt shkzg
INTO CORRESPONDING FIELDS OF table t_bseg
FROM bseg
WHERE belnr = t_bkpf-belnr
AND gjahr = t_bkpf-gjahr
AND bukrs = t_bkpf-bukrs.
Thanks alot
seemaHi Seema,
You have to avoid the database retrival inside the loop.You can use for all entries.
This is taken from a link.
Some of the SAP tables are not transparant, but pooled or clustered. Be aware of this !
There are a lot of limitations on how such tables can be accessed. You can not include such
tables in database views and join constructs. The FI-GL table BSEG, which is one of our
biggest PR1 tables, is an example of a clustered table. At the database-level, there is no table
called BSEG, but instead RFBLG is being used for the BSEG data. Most of the fields known
in BSEG are not known in the database table RFBLG, but are compressed in a VARDATA
field of RFBLG. So tests in the WHERE clause of SELECTs agains BSEG are not used by
the database (e.g. lifnr = vendor account number, hkont = G/L account, kostl = cost center).
As a consequence, these tests are done after the facts similar to using the CHECK statement,
and as already said in tip 1, CHECK statements are worse than tests in the WHERE-clause.
Check this link also.
How to Read BSEG Efficiently
you'll never select table bkpf alone.
alternatives:
1) select with header information from bkpf
2) use secondary index tables
Re: Tuning cluster table selection
3) use logical data base e.g.: BRF
Hope this helps.If so,reward points.Otherwise, get back. -
Performance issue in BI due to direct query on BKPF and BSEG tables
Hi,
We had a requirement that FI document number fieldshould be extracted in BI.
Following code was written which has the correct logic but performance is bad.
It fetched just 100 records in more than 4-5 hrs.
The reason is there was a direct qury written on BSEG and BKPF tables(without WHERE clause).
Is there any way to improve this code like adding GJAHR field in where clause? I dont want to change the logic.
Following is the code:
WHEN '0CO_OM_CCA_9'." Data Source
TYPES:BEGIN OF ty_bkpf,
belnr TYPE bkpf-belnr,
xblnr TYPE bkpf-xblnr,
bktxt TYPE bkpf-bktxt,
awkey TYPE bkpf-awkey,
bukrs TYPE bkpf-bukrs,
gjahr TYPE bkpf-gjahr,
AWTYP TYPE bkpf-AWTYP,
END OF ty_bkpf.
TYPES : BEGIN OF ty_bseg1,
lifnr TYPE bseg-lifnr,
belnr TYPE bseg-belnr,
bukrs TYPE bseg-bukrs,
gjahr TYPE bseg-gjahr,
END OF ty_bseg1.
DATA: it_bkpf TYPE STANDARD TABLE OF ty_bkpf,
wa_bkpf TYPE ty_bkpf,
it_bseg1 TYPE STANDARD TABLE OF ty_bseg1,
wa_bseg1 TYPE ty_bseg1,
l_s_icctrcsta1 TYPE icctrcsta1.
"Extract structure for Datasoure 0co_om_cca_9.
DATA: l_awkey TYPE bkpf-awkey.
DATA: l_gjahr1 TYPE gjahr.
DATA: len TYPE i,
l_cnt TYPE i.
l_cnt = 10.
tables : covp.
data : ref_no(20).
SELECT lifnr
belnr
bukrs
gjahr
FROM bseg
INTO TABLE it_bseg1.
DELETE ADJACENT DUPLICATES FROM it_bseg1 COMPARING belnr gjahr .
SELECT belnr
xblnr
bktxt
awkey
bukrs
gjahr
AWTYP
FROM bkpf
INTO TABLE it_bkpf.
IF sy-subrc EQ 0.
CLEAR: l_s_icctrcsta1,
wa_bkpf,
l_awkey,
wa_bseg1.
LOOP AT c_t_data INTO l_s_icctrcsta1.
MOVE l_s_icctrcsta1-fiscper(4) TO l_gjahr1.
select single AWORG AWTYP INTO CORRESPONDING FIELDS OF COVP FROM COVP
WHERE belnr = l_s_icctrcsta1-belnr.
if sy-subrc = 0.
if COVP-AWORG is initial.
concatenate l_s_icctrcsta1-refbn '%' into ref_no.
READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(10) =
l_s_icctrcsta1-refbn
awtyp = COVP-AWTYP
gjahr = l_gjahr1.
IF sy-subrc EQ 0.
MOVE wa_bkpf-belnr TO l_s_icctrcsta1-zzbelnr.
MOVE wa_bkpf-xblnr TO l_s_icctrcsta1-zzxblnr.
MOVE wa_bkpf-bktxt TO l_s_icctrcsta1-zzbktxt.
MODIFY c_t_data FROM l_s_icctrcsta1.
READ TABLE it_bseg1 INTO wa_bseg1
WITH KEY
belnr = wa_bkpf-belnr
bukrs = wa_bkpf-bukrs
gjahr = wa_bkpf-gjahr.
IF sy-subrc EQ 0.
MOVE wa_bseg1-lifnr TO l_s_icctrcsta1-lifnr.
MODIFY c_t_data FROM l_s_icctrcsta1.
CLEAR: l_s_icctrcsta1,
wa_bseg1,
l_gjahr1.
ENDIF.
ENDIF.
ELSE. " IF AWORG IS NOT BLANK -
concatenate l_s_icctrcsta1-refbn COVP-AWORG into ref_no.
READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(20) =
ref_no
awtyp = COVP-AWTYP
gjahr = l_gjahr1.
IF sy-subrc EQ 0.
MOVE wa_bkpf-belnr TO l_s_icctrcsta1-zzbelnr.
MOVE wa_bkpf-xblnr TO l_s_icctrcsta1-zzxblnr.
MOVE wa_bkpf-bktxt TO l_s_icctrcsta1-zzbktxt.
MODIFY c_t_data FROM l_s_icctrcsta1.
READ TABLE it_bseg1 INTO wa_bseg1
WITH KEY
belnr = wa_bkpf-belnr
bukrs = wa_bkpf-bukrs
gjahr = wa_bkpf-gjahr.
IF sy-subrc EQ 0.
MOVE wa_bseg1-lifnr TO l_s_icctrcsta1-lifnr.
MODIFY c_t_data FROM l_s_icctrcsta1.
CLEAR: l_s_icctrcsta1,
wa_bseg1,
l_gjahr1.
ENDIF.
ENDIF.
endif.
endif.
CLEAR: l_s_icctrcsta1.
CLEAR: COVP, REF_NO.
ENDLOOP.
ENDIF.Hello Amruta,
I was just looking at your coding:
LOOP AT c_t_data INTO l_s_icctrcsta1.
MOVE l_s_icctrcsta1-fiscper(4) TO l_gjahr1.
select single AWORG AWTYP INTO CORRESPONDING FIELDS OF COVP FROM COVP
WHERE belnr = l_s_icctrcsta1-belnr.
if sy-subrc = 0.
if COVP-AWORG is initial.
concatenate l_s_icctrcsta1-refbn '%' into ref_no.
READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(10) =
l_s_icctrcsta1-refbn
awtyp = COVP-AWTYP
gjahr = l_gjahr1.
Here you are interested in those BKPF records that are related to the contents of c_t_data internal table.
I guess that this table does not contain millions of entries. Am I right?
If yes, the the first step would be to pre-select COVP entries:
select BELNR AWORG AWTYP into lt_covp from COVP
for all entries in c_t_data
where belnr = c_t_data-belnr.
sort lt_covp by belnr.
Once having this data ready, you build an internal table for BKPF selection:
LOOP AT c_t_data INTO l_s_icctrcsta1.
clear ls_bkpf_sel.
ls_bkpf_sel-awkey(10) = l_s_icctrcsta1-refbn.
read table lt_covp with key belnr = l_s_icctrcsta1-belnr binary search.
if sy-subrc = 0.
ls_bkpf_sel-awtyp = lt_covp-awtyp.
endif.
ls_bkpf_sel-gjahr = l_s_icctrcsta1-fiscper(4).
insert ls_bkpf_sel into table lt_bkpf_sel.
ENDLOOP.
Now you have all necessary info to read BKPF:
SELECT
belnr
xblnr
bktxt
awkey
bukrs
gjahr
AWTYP
FROM bkpf
INTO TABLE it_bkpf
for all entries in lt_bkpf_sel
WHERE
awkey = lt_bkpf_sel-awkey and
awtyp = lt_bkpf_sel-awtype and
gjahr = lt_bkpf_sel-gjahr.
Then you can access BSEG with the bukrs, belnr and gjahr from the selected BKPF entries. This will be fast.
Moreover I would even try to make a join on DB level. But first try this solution.
Regards,
Yuri -
Performance tuning on BKPF and BSEG for my code.
Please provide alternative code for the following code so that processing is fast.
my select queries are as follows. It take a lot of time and system gets loaded when it is scheduled.
select BUKRS
BELNR
GJAHR
BLART
BLDAT
BUDAT
TCODE
XBLNR
STBLG
WAERS
KURSF
AWKEY
STGRD
into CORRESPONDING FIELDS OF TABLE
IT_BKP from bkpf where bukrs = p_bukrs
and gjahr in s_gjahr
AND BLART NE 'SA'
and budat in s_date.
select BELNR
KOART
SHKZG
MWSKZ
DMBTR
KTOSL
SGTXT
VBELN
HKONT
KUNNR
MATNR
MENGE
FROM BSEG INTO CORRESPONDING FIELDS OF TABLE it_bseg
for all entries in it_bkpf
where bukrs = it_bkpf-bukrs
and belnr = it_bkpf-belnr
and gjahr = it_bkpf-gjahr
and MWSKZ in s_MWSKZ .
Please help.Hi,
Declare internal table same fields as the you are selecting from table and
remove corresponding fields of and also check ur t_bkpf table is not initial
before using for all enteries.
foe e.g.
select BUKRS
BELNR
GJAHR
BLART
BLDAT
BUDAT
TCODE
XBLNR
STBLG
WAERS
KURSF
AWKEY
STGRD
into TABLE
IT_BKP from bkpf where bukrs = p_bukrs
and gjahr in s_gjahr
AND BLART NE 'SA'
and budat in s_date.
IF IT_BKPF[] IN NOT INITIAL.
select BELNR
KOART
SHKZG
MWSKZ
DMBTR
KTOSL
SGTXT
VBELN
HKONT
KUNNR
MATNR
MENGE
FROM BSEG INTO TABLE it_bseg
for all entries in it_bkpf
where bukrs = it_bkpf-bukrs
and belnr = it_bkpf-belnr
and gjahr = it_bkpf-gjahr
and MWSKZ in s_MWSKZ .
ENDIF.
reward if useful. -
How to join gl_daily_rates with AR and SO and Customers
Hi All,
i need to populate the overall credit limit of the customer, if he has any SO backlog(not shipped) amount for all SO's and in AR not paid transactions for the customer, i need to convert the fuctional currency to foreign currency of the all types of amounts.
1) how to link with daily rates table with AR and OM?
2) how to get term name of the customer and Legal entity name?
please help me asap.
Thanks
sreeniQuickTime X can join your two files. Edit menu "Add Clip to End..."
-
LOGICAL DATABASE BRF FOR ... BKPF AND BSEG
Hi friends ,
i want the change the input criteria ( select option) in my program , i am using the LDB "BRF" ..it gives me standard selection screen .. but i want to add the GSBER field in the input condition ..
How can i cahge the selection criteria in standard LDB ..How can i do that ..
Ialso want to convert select option in output to parameter ...
Plz suggest..Dude LDB gives me one extra selection parameter but i need not that parameter ...
Is ther any way by which i remove that selection parameter and add up my new paramere ...
The same thing i done in pnp LDB but i am unable to do same in brf LDB.
Beaus in PNP there is "HR report category " BY which i cam made >>>> -
How to join multiple source tables and do lookup?
I have a requirement to load a target table by joining 4 source tables. Also I have to do a lookup on a domain table to transform codes and check for nulls. What will be the best approach to load the target table?
Is it possible to do it in one interface or do I need to build multiple interfaces to achive this?
My source and target database both are oracle and I am planing to use Oracle Incremental Update Merge.
Thank youYou are in the right direction by creating one interface for this transformation.
You will need to drag drop 4 source tables + the lookup table on the Sources window of Interface and then make appropriate joins.
Also, check for NULLS in the transformation. Depends what you want to do with the NULLS. If you want to ignore them, use a filter.
If you want them to error out, use a constraint.
If you want to convert them, use NVL
Start with Oracle Incremental Update and once successful, use Oracle Incremental Update MERGE. -
LDB SDF - why can not we add fields of BKPF and BSEG?
I went to SE36 - SAP to CUS and added the field CPUDT fron BKPF to functionla group 03 Document.
But it does not appear in the Dynamic Selections.
Any thing needs to be activated orno solution heard - so closing
-
I would like for my actions palette and my layers palette to be visible when editing. I had it like that before and my computer got a little screwy and now I can't get it to do it again. Please help!
Grab the Actions panel and hover it over the left hand side of the Layers panel until you see a Blue line and then let go of the mouse button.
Maybe you are looking for
-
How/Can I install WINDOWS 7 64BIT on a 1st Generation Mac Pro ?
Hi, Is it possible to install Windows 7 64 bit on a 1st Generation Mac Pro 2.66Ghz? Apple suggests that it's not possible and yet I've seen several Googled posts where the users have successfully installed 64 bit on a 1st Generation Mac Pro. The prob
-
Hello. The last few weeks I have come along way in flash, being new to the whole software. I have watched numerous video tutorials, one from www.entheosweb.com about creating a simple gallery. http://www.entheosweb.com/Flash/video_tutorials/basic_sli
-
My iPhone 6 doesn't work with Audi MMI adapter
When I try to connect my iPhone 6 to the Audi MMI adapter in the glove compartment of my 2015 Q5, it shows up as a source on the media screen, but says there are no playable files.
-
Best pattern to signal a parent control from a deeply nested child control
#1 The application i created hosts intially a logincontrol. The login control signals the application with OnAuthenticationPassed to move states. This state change removes the login control and loads the administration control. this one level nesting
-
Are you aware of an Audit Vault Demo... A vmware image or something like that? Would it be possible to setup a db, the audit server and the audit agent all in a single machine (or vmware image) mainly for purposes of checking out Audit Vault features