Help on BSEG table
Dear all,
Can anyone plz tell me when does KUNNR of 2nd line item of a particular document number (BELNR) get updated.Anywas,can the KUNNR from 1st line item be moved to the 2nd line item of that BELNR.
What will I have to do for this?.Basically i will have to modify BSEG table.But as many tables will be logically connected,how can this be done?
Edited by: Rahul Bhat on Jan 28, 2008 10:09 AM
Hi,
The KUNNR does not get updated for 2nd and subsequent line items of an accounting document no.
The reason being, in an accounting doc, since the 1st line is a debit entry it always belong to the customer code. Hence fo any acc. doc, the KUNNR will be available for 1st line item. Whereas the subsequent line items are credit items and will get recorded against a G/L account and not against a customer code.
This is designed as per std SAP. Also FYI, since BSEG is a cluster table and any changes to an acc. doc gets recorded in this table, its not advisable to change this std SAP table. It will lead to data in consistency in your system and lead to accounting errors during reporting.
Regards,
JLN
Similar Messages
-
Error while appending structure into BSEG Table
We had appended BSEG table with a ZSTRUCTURE to enable Custom field in MIRO. Subsequently there was a change required in the appended field. After Changing the field there was adjustment required to activate the appended table . However due to slow system performance during that time the Adjustment SE14 timed out. And created inconsistency in BSEG table.
If I Do the Table adjustment now it is showing below error.
We tried to delete the append structure also but the structure is not appearing in the append structure list to delete.
Even if we try deleting the Z structure from se11 it is throwing below error.
Any one could help me out to resolve this..hi Ramesh,
Please First Check if the Database version and disctionary version are in sync.
Also, it could be the case that you would have enhanced an already existing Append stucture. which might be being used in other BKPF dependent tables.
Please check -
PO Line Item Number not filled in BSEG Table
HI,
While posting to goods receipt through MIGO FI documents are generated.
For these FI documents , in BSEG table the corresponding PO line item numbers (EBELP )are not getting filled up,
How can they be filled. can it be done through any standard configuration?Hi,
Check if you are doing the summarization of FI doc. You can check reading these notes:
SAP Note 36353 - AC interface: Summarizing FI documents
SAP Note 77161 - Summarization of FI postings w.ref.to purchase orders
I hope this helps you
Regards
Eduardo -
Hi,
How to update PERNR Field BSEG Table?
My scenario is to update the (Personnel Number ) PERNR Field in FB50 Transaction.
I get the following fields details from a third party system
Document Information
o I_BUKRS (Company Code) u2013 example: 0010
o I_BELNR (Document Number) u2013 example: 1700006041
o I_GJAHR (Fiscal Year) u2013 example: 2008
u2022 Final Approver ID
o I_PERNR (Personnel No.) u2013 example U0050049
For all line items of the document (represented by the key (I_BUKRS, I_BELNR, I_GJAHR)) need to update the BSEG-PERNR field in FB50.
Please let me know if you have any ideas like BAPI's or any alternative.
Thanks & Regards,
SatyaHi
Try to use below the FM's
FMUDBSEGH_UPDATE
FMUDBSEG_UPDATE
G_BKPF_BSEG_UPDATE
before to that you need to read data from FM READ_BSEG. then update.
hope it helps you
Thanks!
Edited by: Prasanth Maddela on Apr 21, 2009 6:26 PM -
Hi,
Below is my code, it taking much time to get the data from BSEG table and even after executing for long time it not populating the data into internal table. If i pass single account in selection screen, it is displaying the data.
Please help me out.
SELECT hkont lkorr FROM t030hb INTO CORRESPONDING FIELDS OF
TABLE gt_tr_t030hb
WHERE ktopl = 'ZCOA'
AND bwber = 'TR'
and hkont in so_hkont.
IF gp_pprct IS INITIAL.
loop at gt_tr_t030hb.
SELECT hkont prctr bewar dmbe2 FROM bseg INTO CORRESPONDING
FIELDS OF table gt_hkont for all entries
in gt_tr_t030hb
WHERE bukrs IN so_bukrs
AND prctr IN so_prctr
AND saknr = gt_tr_t030hb-hkont
AND vbund IN so_vbund
and gjahr in so_gjahr
and xauto = 'X'.
Thanks,
Pavan.
Message was edited by: Pavan PanduruHi
Try to select the items from BSIS/BSAS:
- One solution can be:
TABLES: BSIS.
DATA: GT_TR_T030HB LIKE STANDARD TABLE OF T030HB.
SELECT-OPTIONS: SO_BUKRS FOR BSIS-BUKRS,
SO_HKONT FOR BSIS-HKONT,
SO_GJAHR FOR BSIS-GJAHR,
SO_PRCTR FOR BSIS-PRCTR,
SO_VBUND FOR BSIS-VBUND.
DATA: BEGIN OF GT_HKONT OCCURS 0,
BUKRS LIKE BSIS-BUKRS,
HKONT LIKE BSIS-HKONT,
GJAHR LIKE BSIS-GJAHR,
BELNR LIKE BSIS-BELNR,
BUZEI LIKE BSIS-BUZEI,
PRCTR LIKE BSIS-PRCTR,
BEWAR LIKE BSIS-BEWAR,
DMBE2 LIKE BSIS-DMBE2,
END OF GT_HKONT.
DATA: XAUTO.
SELECT * FROM T030HB INTO TABLE GT_TR_T030HB
WHERE HKONT IN SO_HKONT
Open Items (BSIS)
SELECT BUKRS HKONT GJAHR BELNR BUZEI
PRCTR BEWAR DMBE2
FROM BSIS INTO TABLE GT_HKONT
FOR ALL ENTRIES IN GT_TR_T030HB
WHERE BUKRS IN SO_BUKRS
AND HKONT = GT_TR_T030HB-HKONT
AND GJAHR IN SO_GJAHR
AND PRCTR IN SO_PRCTR
AND VBUND IN SO_VBUND.
Cleared items
SELECT BUKRS HKONT GJAHR BELNR BUZEI
PRCTR BEWAR DMBE2
FROM BSAS APPENDING TABLE GT_HKONT
FOR ALL ENTRIES IN GT_TR_T030HB
WHERE BUKRS IN SO_BUKRS
AND HKONT = GT_TR_T030HB-HKONT
AND GJAHR IN SO_GJAHR
AND PRCTR IN SO_PRCTR
AND VBUND IN SO_VBUND.
If you need to check if the item is automatically loaded:
LOOP AT GT_HKONT.
SELECT SINGLE XAUTO FROM BSEG INTO XAUTO
WHERE BUKRS = GT_HKONT-BUKRS
AND BELNR = GT_HKONT-BELNR
AND GJAHR = GT_HKONT-GJAHR
AND BUZEI = GT_HKONT-BUZEI.
IF XAUTO = SPACE.
DELETE GT_HKONT.
ENDIF.
ENDLOOP.
Other solution can be
TABLES: BSIS.
DATA: GT_TR_T030HB LIKE STANDARD TABLE OF T030HB.
SELECT-OPTIONS: SO_BUKRS FOR BSIS-BUKRS,
SO_HKONT FOR BSIS-HKONT,
SO_GJAHR FOR BSIS-GJAHR,
SO_PRCTR FOR BSIS-PRCTR,
SO_VBUND FOR BSIS-VBUND.
DATA: BEGIN OF T_DOCUMENT OCCURS 0,
BUKRS LIKE BSIS-BUKRS,
GJAHR LIKE BSIS-GJAHR,
BELNR LIKE BSIS-BELNR,
BUZEI LIKE BSIS-BUZEI,
END OF T_DOCUMENT.
DATA: BEGIN OF GT_HKONT OCCURS 0,
HKONT LIKE BSIS-HKONT,
PRCTR LIKE BSIS-PRCTR,
BEWAR LIKE BSIS-BEWAR,
DMBE2 LIKE BSIS-DMBE2,
END OF GT_HKONT.
DATA: XAUTO.
Open Items (BSIS)
SELECT BUKRS GJAHR BELNR BUZEI
FROM BSIS INTO TABLE T_DOCUMENT
FOR ALL ENTRIES IN GT_TR_T030HB
WHERE BUKRS IN SO_BUKRS
AND HKONT = GT_TR_T030HB-HKONT
AND GJAHR IN SO_GJAHR
AND PRCTR IN SO_PRCTR
AND VBUND IN SO_VBUND.
Cleared items
SELECT BUKRS GJAHR BELNR BUZEI
FROM BSAS INTO TABLE T_DOCUMENT
FOR ALL ENTRIES IN GT_TR_T030HB
WHERE BUKRS IN SO_BUKRS
AND HKONT = GT_TR_T030HB-HKONT
AND GJAHR IN SO_GJAHR
AND PRCTR IN SO_PRCTR
AND VBUND IN SO_VBUND.
Auto items
SELECT HKONT PRCTR BEWAR DMBE2
FROM BSEG INTO TABLE GT_HKONT
FOR ALL ENTRIES IN T_DOCUMENT
WHERE BUKRS = T_DOCUMENT-BUKRS
AND BELNR = T_DOCUMENT-BELNR
AND GJAHR = T_DOCUMENT-GJAHR
AND BUZEI = T_DOCUMENT-BUZEI
AND XAUTO = 'X'.
Try
Max -
How to delete a record from BSEG table
Dear Experts,
How to delete a record from BSEG table.
If there possible to delete some records from transparent table ?
Please help.
Regards,
TanHi,
Deleting a record from a standard table can be done only if table maintenance exists - Cehck tcode - SM30. But it is not advisable to delete records, coz the records may be dependent on many other tables. If u delete in a single place, there may be chance that inconsistency in the data happens and hence will affect ur financial statements.
Pls. assign points, if useful
Regards,
Sridevi -
Performance Problem in using the BSEG table - Required alternative
Hi All,
Pl go thru the below program.
I am unable to change this code
It is having 46 performance errors
Pls check the code and suggest.
*To get Pmt Doc No & Posting Date
SELECT SINGLE
BELNR
ZFBDT
FROM BSEG
INTO (WA_ZFT011_FIFO-PAY_DOC_NO, WA_ZFT011_FIFO-POST_DATE)
WHERE AUGBL = W_CLR_DOC
AND AUGDT = WA_ZFT011_FIFO-CLR_DATE
AND BSCHL = '15'.
IF SY-SUBRC <> 0.
SELECT SINGLE
BELNR
ZFBDT
FROM BSEG
INTO (WA_ZFT011_FIFO-PAY_DOC_NO, WA_ZFT011_FIFO-POST_DATE)
WHERE AUGBL = W_CLR_DOC
AND AUGDT = WA_ZFT011_FIFO-CLR_DATE
AND BSCHL = '11'.
The above code is having performance error "NO field of a table Index in WHERE"
The same error repeated for 45 select statements and for all statements the "BSEG" table is used for selecting data.
But creating a secondary index on BSEG table columns will not be possible
So pls suggest me accordingly
Awaits for the Reply.
P KamalHi,
Perhaps my post here: Re: BSEG table performance issues might help you.
Regards, Gerd Rother -
HI,
I am using Bseg table in one of my report, but it takes too much time to execute. SO am looking for any alternative table for BSEG table. Can Any one Please Help to sort out this problem.
Thanks
ImranBSEG always gives performance issue if you do not have indexed key fields in where condition.
1. do not try to pass every available field in where condition, only use indexed fields in where condition. you may select more data in internal table & then filter fron internal table.
2. if do not have index fields , them write select statements on other secondary indexed tables like
BSAD,BSAK,BSAS,BSID,BSIK,BSIS get all required fields & then write select on BSEG.
If you have proper where condition then select on BSEG is quite fast. -
Dear SD Gurus,
We are not able to see entries related to Material and material quantity in BSEG table. I am not sure why these entries are not coming in this table.
As far as my knowledge goes BSEG table is a cluster table and an important part of the Accounting Document Segment.
It comes in picture whenever there is a movement type of material such as 601 is involved i.e. at the time of PGI or PGR, i have my doubts over u201Chow it is skipping data insertion in this table?u201D
Could anybody let me know from where and how BSEG table fatched material and its quantity.
Thanks in advance. Suitable Text Removed
Regards
Vinod Kumar
Edited by: Lakshmipathi on Jan 28, 2011 9:16 PM
Dont offer anythingIts happening after transporting some requests in Dec 2010
In that case, you need to take the list of those requests and check which particular request relates to changes in SD table that parallely affects BSEG table.
You can also check from document flow for that Accounting document whether values are posted correctly in FI. As a random test, take a billing document for which an Accounting document is generated and check in FB03 how many line items are flowing. Next go to SE16 / BSEG and check whether you could see all those line items in this table.
Meanwhile, you can also check from those transport requests what changes were made in which SD tables.
Perhaps, you can also have a look at the following notes which may help you.
1) Note 10083 - BSIS missing for G/L account
2) Note 401646 - New DataSources for Line Items from FI-GL, FI-AP, FI-AR
3) Note 416076 - SELECT FOR UPDATE does not lock cluster tables
4) Note 608340 - SAP Cons.: No quantity update in subsequent posting from FI
5) Note 677630 - Correcting functional areas in FI documents
6) Note 685688 - Release of "old" invoices as of SAP R/3 Enterprise
7) Note 1497911 - F-26: All items not selected
In case, you could find out the root cause, please update the forum without fail which will be very helpful to all.
thanks
G. Lakshmipathi -
Hi friends,
I have a problem where I need to load the BSEG table data but when it loads only one million records, it stuck and gives error. there are more than 5 millions records in it. is there any way to load the data to PSA. I doubt it is due to memory but how I increase the memory or enhancement for loading the data.
Thanks
AhmedHi Ahmed....
Don't load all the data in a single go..............split the load with selection...........If it is a Transaction data datasource..........then copy the same infopackage..........in the Data selection field give the selection.........and execute them parallely.............since fact table will never loack each other....
If it a Master data datasource......then don't run paralley..............since master data table locks each other..........just give the selection one by one.........and load the data.....
Hope this helps......
Regards,
Debjani..... -
Updation of the MENGE field in the BSEG table
SAP 4.6C
The material is moved from one plant to another. The excise on the same is also moved from one plant to another via STO. The value in the GL accounts is calculated using the quantity in the STO. However when the FI posting is triggered, the quantity does not flow to the BSEG table (MENGE field), but the value is populated. The posting is triggered via conditions and via OBYC setting
How can we populate the quantity in the FI document.Hello,
There is a note to help you on to achieve this requirement. CAn you please check the note 608340??
This note has a detailed description about what should be done to update the field MENGE.
Regards,
Renan -
Hi
Below is my bseg table data. My requirement is if line item 1 of zuonr is space i want to get this value from line 2 of kunnr.
BUKRS BELNR GJAHR BUZEI ZUONR KUNNR
7063 0140951570 2009 001
7063 0140951570 2009 002 0000017017 0000055555
my output will be
BUKRS BELNR GJAHR BUZEI ZUONR KUNNR
7063 0140951570 2009 001 0000055555
7063 0140951570 2009 002 0000017017 0000055555Hi Kumar,
Define one more table (itab2) of same structure.
Loop at 1st table.
Itab2-bukrs = itab1-bukrs.
Itab2-belnr = itab1-belnr.
Itab2-gjahr = itab1-gjahr.
Itab2-bezei = itab1-bezei.
If itab1-zuonr = space.
Itab2-zuonr = itab1-kunnr.
Else.
Itab2-zuonr = itab1-zuonr.
Endif.
Append itab2.
Endloop.
Hope this will help you.
Best Regards,
Deepa Kulkarni -
Dear All
i have sales order number from that i am able to get the billing document number from VBFA table.
i am passing input to the BSEG table billing documnet number and customer number and to get the Advance payment
and also the Actual payment so is it suffiicient to read the BSEG Table.
and make clear how can i get the Outstanding amount related to that salesorder. i mean hear i want to get it from table with out doing manual calculation.
and also guide me BSEG is Cluster table if i use selct statement na it is database cost so any function modules available for read it
please guide me.
thanks ........................Hi,
Try with function AC_DOCUMENT_RECODS
CALL FUNCTION 'AC_DOCUMENT_RECORD'
EXPORTING
i_awtyp = 'MKPF'
i_awref = awref
i_aworg = aworg
i_awsys = awsys
i_awtyp_incl = 'BKPF'
i_valutyp = '0'
x_dialog = ' '
TABLES
t_documents = docs_fi
EXCEPTIONS
no_reference = 1
no_document = 2
OTHERS = 3.
where
DATA: docs_fi LIKE acc_doc OCCURS 10 WITH HEADER LINE.
and
DATA: awref LIKE acchd-awref,
aworg LIKE acchd-aworg,
awsys LIKE acchd-awsys.
I hope this helps you
Regards
Eduardo
PD: I think that I havent read properly your post.
Surely you must work with tables BSID and BSAD, better that with BSEG. Remember that one is open items. Surely the document from the first funcion was cleared. So, you must rebuild the flow of documents.
Edited by: E_Hinojosa on Nov 11, 2010 9:37 AM -
Hi,
I am new to BIW.Please can you guide how i can see the table entries of BSEG Table of ECC in BIW.
In BIW,what are the series of steps i have to follow.Like creating info cube and all.Please can you help me in providing the tcodes and steps sequentially.
Thanks
KiranmayiSearch in the forum, you will find many threads on InfoCube creation...see below for a sample of information you can find.
Uploading of master data
Log on to your SAP
Transaction code RSA1LEADS YOU TO MODELLING
1. Creation of Info Objects
In left panel select info object
Create info area
Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
Create new characteristics and key figures under respective catalogs according to the project requirement
Create required info objects and Activate.
2. Creation of Data Source
In the left panel select data sources
Create application component(AC)
Right click AC and create datasource
Specify data source name, source system, and data type ( master data attributes, text, hierarchies)
In general tab give short, medium, and long description.
In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
In proposal tab load example data and verify it.
In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
Activate data source and read preview data under preview tab.
Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
3. Creation of data targets
In left panel select info provider
Select created info area and right click to select Insert Characteristics as info provider
Select required info object ( Ex : Employee ID)
Under that info object select attributes
Right click on attributes and select create transformation.
In source of transformation , select object type( data source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
Activate created transformation
Create Data transfer process (DTP) by right clicking the master data attributes
In extraction tab specify extraction mode ( full)
In update tab specify error handling ( request green)
Activate DTP and in execute tab click execute button to load data in data targets.
4. Monitor
Right Click data targets and select manage and in contents tab select contents to view the loaded data. Alternatively monitor icon can be used.
BW 7.0
Uploading of Transaction data
Log on to your SAP
Transaction code RSA1LEAD YOU TO MODELLING
5. Creation of Info Objects
In left panel select info object
Create info area
Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
Create new characteristics and key figures under respective catalogs according to the project requirement
Create required info objects and Activate.
6. Creation of Data Source
In the left panel select data sources
Create application component(AC)
Right click AC and create datasource
Specify data source name, source system, and data type ( Transaction data )
In general tab give short, medium, and long description.
In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
In proposal tab load example data and verify it.
In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
Activate data source and read preview data under preview tab.
Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
7. Creation of data targets
In left panel select info provider
Select created info area and right click to create ODS( Data store object ) or Cube.
Specify name fro the ODS or cube and click create
From the template window select the required characteristics and key figures and drag and drop it into the DATA FIELD and KEY FIELDS
Click Activate.
Right click on ODS or Cube and select create transformation.
In source of transformation , select object type( data source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
Activate created transformation
Create Data transfer process (DTP) by right clicking the master data attributes
In extraction tab specify extraction mode ( full)
In update tab specify error handling ( request green)
Activate DTP and in execute tab click execute button to load data in data targets.
8. Monitor
Right Click data targets and select manage and in contents tab select contents to view the loaded data. There are two tables in ODS new table and active table to load data from new table to active table you have to activate after selecting the loaded data . Alternatively monitor icon can be used
Edited by: Anita Savant on May 14, 2008 4:32 AM -
Hi all,
By using MIRO, we get an invoice document number.
While checking the same invoice document number in BSEG table, we find the MIRO information in different document number than the invoice document number.
Kindly, let me know the reason of this error and how to rectify the same.
Quick reply will be appreciated and points will be assigned.
Thanks & Regardshi Mehak,
in MIRO two documents (invoices) are created: one in MM and one in FI. Both of them have different numbers (they can have the same number, but this requires some coding). The number which is displayed right after you save in MIRO, is the MM number. The MM invoice is stored in tables RKPF/RSEG, the FI in BKPF/BSEG.
hope this helps
ec
Maybe you are looking for
-
Hi, I need a automatic popup of Internal note maintained in Equipment Master during Notification creation.Is this possible without any userexit? Secondly,how is "Classification View & Display" in Obect Info Customising done?How can I customise view
-
I recently got an iPhone 5 and I need some help...
Ive noticed on my siblings iPods, that it has the option of having my phone number as a way to send messages to their devices. Since those are not my devices, how can I have it that my number wont show up on their devices? My problem is, in their set
-
Performance probelem any idea?????
REPORT ztest . include ZOPEN_RTRN_data. include ZOPEN_RTRN_scr. SELECT DISTINCT kdauf kdpos kunnr matnr prctr FROM mseg *UP TO lv_rows ROWS INTO CORRESPONDING FIELDS OF TABLE imseg WHERE matnr IN ma
-
Printer message "paper out or not loaded correctly"
I have an Epson Stylus Pro 3800 printer and iMac that that worked flawlwssly until the last Mountain Lion upgrade. Now it will not recognize paper that is loaded correctly. Clicking on printer utility gives an error and states a message is being se
-
Changing shopping cart in approval stage-SRM 5.0
Hi All, I am facing an issue in Integration environment. It is working fine in Dev. Even if the security level at user details is defined as "Low" (2), user is not able to change the shopping cart in approval status (via Check Status, in case of requ