BSAK, BKPF and EKBE
Hi Friends,
I'm selecting BELNR from BSAK. For all entries in BSAK, I'm selecting data AWKEY from BKPF based on BELNR. First 10 characters of the AWKEY are used to select data from EKBE (EKBE-BELNR = BKPF-AWKEY(10)).
Will this join return all the POs corresponding to the data in BSAK ? Some POs are missing in the output. Please let me know what can be the issue?
Thanks and Regards,
Netrey
Hi,
This is the code I'm using,
SELECT *
INTO CORRESPONDING FIELDS OF TABLE t_bsak
FROM bsak WHERE bukrs IN s_bukrs AND
blart IN s_blart AND augdt IN s_augdt .
SELECT bukrs belnr gjahr kursf awtyp awkey
FROM bkpf
INTO CORRESPONDING FIELDS OF TABLE t_bkpf
FOR ALL ENTRIES IN t_bsak
WHERE bukrs EQ t_bsak-bukrs AND belnr EQ t_bsak-belnr
AND gjahr = t_bsak-gjahr
AND awtyp = 'RMRP'.
SELECT ebeln
gjahr belnr FROM ekbe
INTO CORRESPONDING FIELDS OF TABLE t_ekbe
FOR ALL ENTRIES IN t_bkpf
WHERE belnr = t_bkpf-awkey(10)
AND gjahr = t_bkpf-gjahr
Similar Messages
-
Relation between BKPF and EKBE table for reversing document?
Is there any relation between BKPF and EKBE table for reversing document when STBLG is blank in BKPF.
AND
How to differentiate Old Accounting document / Reverse document / New document when in BKPF-STBLG is blank for all three document and BKPF-XBLNR are same for all.Hi Varun,
Table Document no (BKPF-BELNR) is link between Material document no (EKBE-BELNR). If you are looking for validating Material reversal document then please use following logic for your requirement.
Material Document (MBLNR) & Material Document Year (MJAHR). Pass material document (MBLNR) to MSEG-SMBLN to read MSEG-MBLNR with MSEG-MJAHR to MSEG-SJAHR, if record found delete both the documents i.e. MSEG-SMBLN & MSEG-MBLNR (donu2019t consider these documents in the logic) and display Material Document No. (MSEG-MBLNR)
Regards,
Santosh -
URGENT: REALTION b/w MKPF ,BKPF AND BSAK
Hi,
what would be the common fields among the MKPF,BKPF and BSAK so that data can be reterived.. plzz tell me as it really urgent to me.Hi,
MKPF table stores material document related data.BKPF stores accounting related data.In order to get the accounting document related to the material document in BKPF table we have 2 fields.
AWTYP : give the value as MKPF
AWKEY: concatenate material document number with year and paas it to this field.
Regards,
Shafi -
BSAK and EKBE tables...
Hello experts,
I am currently trying to modify a report where in it gets a PO's balance from BSAK-wrbtr but instead I need to get it from EKBE-wrbtr. So, is there a link between the 2 tables? Thanks guys and take care!Hi Vijay,
You can check the link as Purchasing Document Number and Item Number of Purchasing Document:
BSAK-EBELN and BSAK-EBELP
in EKBE-EBELN and EKBE-EBELP.
Then you ca retrieve EKBE-WRBTR.
Hope this may help you.
Regards,
Lanka -
JOIN for BSEG, BSIS, BSAS, MSEG, BKPF and MKPF
I am developing a report related to G/L . i am using the Tables BSEG BSIS BSAS MSEG BKPF MKPF ............please give me the Joinings of these tables.......how exactly we can join and get the prefect Data....
Thank U waiting for ur replies....
Title edited by: Alvaro Tejada Galindo on Jun 3, 2008 3:41 PMI have given the tables, internal tables and the select queries which can give you the join conditions of your requirement.
tables: bsis,
bsas,
bkpf,
bseg,
ekbe,
mkpf,
mseg.
select-options: s_hkont for bseg-hkont,
s_bldat for bkpf-budat,
s_budat for bkpf-bldat obligatory,
s_lifnr for bseg-lifnr,
s_lfbnr for ekbe-lfbnr no intervals no-extension.
data: begin of i_bsis_bsas occurs 0,
bukrs like bsis-bukrs,
hkont like bsis-hkont,
gjahr like bsis-gjahr,
belnr like bsis-belnr,
budat like bsis-budat,
bldat like bsis-bldat,
xblnr like bsis-xblnr,
wrbtr like bsis-wrbtr,
buzei like bsis-buzei,
end of i_bsis_bsas,
begin of i_bkpf occurs 0,
bukrs like bsis-bukrs,
belnr like bsis-belnr,
gjahr like bsis-gjahr,
xblnr like bkpf-xblnr,
stblg like bkpf-stblg,
awtyp like bkpf-awtyp,
tcode like bkpf-tcode,
end of i_bkpf,
begin of i_bseg occurs 0,
bukrs like bsis-bukrs,
belnr like bsis-belnr,
gjahr like bsis-gjahr,
buzei like bseg-buzei,
buzid like bseg-buzid,
koart like bseg-koart,
zuonr like bseg-zuonr,
hkont like bseg-hkont,
lifnr like bseg-lifnr,
sgtxt like bseg-sgtxt,
ebeln like bseg-ebeln,
ebelp like bseg-ebelp,
wrbtr like bseg-wrbtr,
end of i_bseg,
begin of i_ekbe occurs 0,
ebeln like ekbe-ebeln,
ebelp like ekbe-ebelp,
gjahr like ekbe-gjahr,
belnr like ekbe-belnr,
buzei like ekbe-buzei,
lfgja like ekbe-lfgja,
lfbnr like ekbe-lfbnr,
lfpos like ekbe-lfpos,
matnr like ekbe-matnr,
end of i_ekbe,
begin of i_mkpf_mseg occurs 0,
mblnr like mkpf-mblnr,
mjahr like mkpf-mjahr,
bktxt like mkpf-bktxt,
xblnr like mkpf-xblnr,
frbnr like mkpf-frbnr,
zeile like mseg-zeile,
matnr like mseg-matnr,
erfmg like mseg-erfmg,
end of i_mkpf_mseg.
*data: wa_ekbe like i_ekbe.
select bukrs
hkont
gjahr
belnr
budat
bldat
xblnr
wrbtr
buzei appending corresponding fields of table i_bsis_bsas
from bsis
where bukrs eq p_bukrs
and hkont in s_hkont
and gjahr eq p_gjahr
and budat in s_budat
and shkzg eq 'S'.
select bukrs
hkont
gjahr
belnr
budat
bldat
xblnr
wrbtr appending corresponding fields of table i_bsis_bsas
from bsas
where bukrs eq p_bukrs
and hkont in s_hkont
and gjahr eq p_gjahr
and budat in s_budat
and shkzg eq 'S'.
endform. " f_get_bsis_bsas_data
*& Form f_get_bkpf_bseg_data
Subroutine to get BKPF and BSEG data
form f_get_bkpf_bseg_data.
check not i_bsis_bsas[] is initial.
select bukrs
belnr
gjahr
xblnr
stblg
awtyp
tcode into table i_bkpf
from bkpf
for all entries in i_bsis_bsas
where bukrs eq i_bsis_bsas-bukrs
and belnr eq i_bsis_bsas-belnr
and gjahr eq i_bsis_bsas-gjahr.
and awtyp = 'BKPFF'
and tcode = 'J1IE'.
check not i_bkpf[] is initial.
select bukrs
belnr
gjahr
buzei
buzid
koart
zuonr
hkont
lifnr
sgtxt
ebeln
ebelp
wrbtr into corresponding fields of table i_bseg
from bseg
for all entries in i_bsis_bsas
where bukrs eq i_bsis_bsas-bukrs
and belnr eq i_bsis_bsas-belnr
and gjahr eq i_bsis_bsas-gjahr.
and buzei eq i_bsis_bsas-buzei
and hkont eq i_bsis_bsas-hkont.
delete i_bseg where not hkont in s_hkont.
endform. " f_get_bkpf_bseg_data
*& Form f_get_ekbe_data
Subroutine to get EKBE data
form f_get_ekbe_data.
data: $i_bseg like i_bseg occurs 0 with header line.
$i_bseg[] = i_bseg[].
delete $i_bseg where ebeln is initial.
check not $i_bseg[] is initial.
select ebeln
ebelp
gjahr
belnr
buzei
lfgja
lfbnr
lfpos
matnr into table i_ekbe
from ekbe
for all entries in $i_bseg
where ebeln eq $i_bseg-ebeln
and ebelp eq $i_bseg-ebelp
and gjahr eq $i_bseg-gjahr
and bwart = '101'.
and belnr eq $i_bseg-belnr.
check not i_ekbe[] is initial.
select a~mblnr
a~mjahr
a~bktxt
a~xblnr
a~frbnr
b~zeile
b~matnr
b~werks
b~erfmg into table i_mkpf_mseg
from mkpf as a inner join
mseg as b on amblnr eq bmblnr
and amjahr eq bmjahr
for all entries in i_ekbe
where a~mblnr eq i_ekbe-lfbnr
and a~mjahr eq i_ekbe-gjahr
and b~zeile eq i_ekbe-lfpos
and b~werks eq p_werks.
<REMOVED BY MODERATOR>
Edited by: Srikanth Kadiyala on Jun 3, 2008 7:24 AM
Edited by: Alvaro Tejada Galindo on Jun 3, 2008 3:40 PM -
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. -
hi gurujis,
with your kind help i am learning something, but there is problem in each step. Now i am working with FI , i have came to know about two tables,
they are BKPF and BSID i have to join them and also produce output on the basis of 4 inputs like company no, coustomer no, currency and posting date. I need your help on this, can somebody send me the code to do this.
Also i would like to know is there any FM's to join two or more tables, if yes, please send me the name of that module with an complete example.
I need this , it is very urgent.
Thanks,
KHAN.hi Khan,
SELECT bkpf~...
bsid~...
INTO TABLE ...
FROM bkpf AS bkpf
INNER JOIN bsid AS bsid
ON bkpf~bukrs EQ bsid~bukrs
AND bkpf~gjahr EQ bsid~gjahr
AND bkpf~belnr EQ bsid~belnr
WHERE bkpf~bukrs EQ p_bukrs
AND bsid~kunnr IN s_kunnr
AND bkpf~waers EQ p_waers
AND bkpf~budat EQ p_budat.
hope this helps
ec -
Relationship between Table BKPF and RBKP
Hello Developers,
I need to fetch value of field BKTXT from table BKPF and this value need to insert in internal table i_tab.
in the below situation:
select bebeln bebelp bwerks ausnam alifnr abelnr
abldat abudat
caedat cekgrp cbukrs cekorg
dbanfn dbnfpo dnetpr dafnam
into corresponding fields of table i_tab
from rbkp as a join rseg as b on abelnr = bbelnr
join ekko as c on bebeln = cebeln
join ekpo as d on cebeln = debeln
and bebelp = debelp
where a~budat in s_date
and b~werks in s_werks
and c~bstyp = c_f
and c~ekorg in s_ekorg
and a~bukrs in s_bukrs.
Can any one suggest how to relate table BKPF with other table like RBKP.
Thanks in advance.
Regards
SundeepHi,
perform the following steps:-
1. Go to transaction SQVI
2. Create a View
3. Enter title
4. Choose the Data source as Table Join
5. Go to insert table and add table as per your requirement.
and hereafter you can find relation between any two tables...
Rgds/Abhi -
Update the Grp. Curr Exg. Rate in BKPF and Amt in 2nd local curr in BSEG
Environment is
R3 4.7
Group Currency: TWD
Company Currency: USD
My customer has a scenario :
PO uses USD, Invoice Verification uses USD. When doing the MIRO, system will automatically write group currency/exchange rate in BKPF and Amount in 2nd Currency in BSEG according to the m-rate.
However, my customer wants to use an exchange-rate recorded in MIRO header, not m-reate.
All the user exits and BADI I reviewed cannot do anything to change the BKPF and BSEG. Is there any suggestion?
All UE and BADI I checked are:
User exits
MRMH0001
MRMH0002
MRMH0003
MRMN0001
LMR1M001
LMR1M002
LMR1M003
LMR1M004
LMR1M005
LMR1M006
BADI
INVOICE_UPDATE
Edited by: Paul C. Lee on Nov 15, 2011 4:10 PMHi Paul,
As a first step, see these notes
SAP Note 191927 - Posting logic: GR for foreign currency PO
SAP Note 308008 - FAQ: Posting logic: GR/IR clearing account (question 12 for instance)
To know the proper BADI, enhancement and so on, check this note
SAP Note 1156325 - BAdIs in the Logistics Invoice Verification environment
If you can't do a modification, try with a check for the right exchange rate.
I hope this helps you
Regards
Eduardo
Edited by: E_Hinojosa on Nov 15, 2011 11:59 AM -
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 ,
I want to do an inner join on bsid and bkpf tables in the select query . I want to order the result on the basis of cputm field in bkpf , that is why inner join on bkpf is req , rest all the fields are from bsid . But the requirement is that we should not select the cputm field in the select , it is only to be used for sorting the result of the select query . we are also using select * from bsid where ...... endselect . and not specific fields from bsid currently . Kindly let me know how to use the inner join on bkpf and bsid in this case .
Would reward all helpful answers .
ThanksHi Ankit,
First make a structure of the required fields.
TABLES : bkpf,bsid.
TYPES : BEGIN OF x_tab,
belnr like bkpf-belnr,
kunnr like bsid-kunnr,
bldat like bsid-bldat,
budat like bsid-budat,
waers like bsid-waers,
END OF x_tab.
DATA : itab type STANDARD TABLE OF x_tab,
wa_itab TYPE x_tab.
start-of-SELECTION.
SELECT bkpfbelnr bsidkunnr bsidbldat bsidbudat bsid~waers into table itab
FROM bkpf INNER JOIN bsid on bkpfbelnr = bsidbelnr and
bkpfbukrs = bsidbukrs and
bkpfgjahr = bsidgjahr.
Rewards Points, if useful.
Regards
Manoj Kumar
Edited by: Manoj Kumar on Dec 26, 2007 2:36 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 -
Update the stastics of tables BKPF and GLFUNCA
Hello All,
update the stastics of tables BKPF and GLFUNCA not updataing
I have execute via Brtools
7 - Database statistics >> 1 = Update database statistics >> 9 ~ Tables for update (table) ......... [BKPF]
same for table GLFUNCA
7 - Database statistics >> 1 = Update database statistics >> 9 ~ Tables for update (table) ......... [GLFUNCA]
But in .sta file it is not collected
<DB20>
Table GLFUNCA
Statistics are current (|Changes| < 50 %)
New Method E
New Sample Size P1
Old Method E Date 17.08.2008
Old Sample Size P1 Time 19:52:15
It is one year old , so please help me how to update this table
Is this table causing performance problem for job RSUVM007
Regards
Mohsin MBefore all,
Why do you wnat to calculate statistics on those tables?
Do you have performance problems and you have identified that they are caused by "bad" statistics?
or simply you "must" collect them because they are "OLD"?
If it is the latter, remember that statistics MUST be representative not current. Please read the SAP Note 825653 "Oracle: Common misconceptions" point 7
Regarding the options of BRtools, it works as designed.
BRCONNECT will check if the table needs statistics:
- if it has changed more than 50% since last time (in your case 17.08.2008) and, if so it will do, otherwise it will not do it. See the output of DB20 that you pasted:
> Statistics are current (|Changes| < 50 %)
IF you need new statistics (and I mean, need, not like) then you have to force them. On BRTOOLS you go to the next screen and choose the option:
> 7 ~ Force options (force) ............... []
In your version/patch could be located in a different place
and here input collect
I strongly recommend you to read the BR*tools documentation as ALL this information is there.
In case you do not know where to find it, it is quite easy:
SAP on Oracle => Oracle DBA Overview => SAP Database Guide: Oracle -
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 -
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
Maybe you are looking for
-
How can I record what the sound card is outputting?
I have an app. that I need to be able to capture what the sound card is outputting. That is I want to record anything that plays from the sound card. I don't want to have to route the speaker out to the mic in. Is there a way to "capture" the soun
-
Hi, I am trying my first test page in the OAF.. I did the following steps: 1. downloaded the correct version of JDev, unzip it and set the environment variable. 2. i copied the db_connection to the .dbc into dbc_files\secure. 3. I opened the toolbox
-
Update von Acrobat 8.0 auf 8.3
Hallo Das was ich dort erhalten habe, funktioniert nicht. Ich habe meine Version 8.0 als Update von 7.0 korrekt erworben und ich erwarte eine einige Update-Datei auf 8.3. Denn, die 8.0 Hat Fehler. Adobe ist dazu verpflichtet, jeden Kunden eine fehler
-
Hi, When I got my iPad I only had OSX 10.4 on my MacBookPro, so I authorised it on my work Mac which has 10.5. Now I have upgraded my MBP to 10.5.8 and want to put some pics and music on my iPad but it's not appearing in Itunes (9.1.1). I know the Ma
-
Output pulse every n units for x4 encoder
I found this on the National Instruments website showing how to ouptu a pulse every N input pulses, the issue is that I'm trying to do this on X4 decoding. I have a NI9178, NI9401 and a NI9201, I'm trying to input an X4 encoder to my counter and sub