BSAK link to BSIS and BSAS...
Hello Experts,
I am doing 2 FOR ALL ENTRIES to get records from BSIS and BSAS based on the records
that I got in BSAK. Currently, I only know of 3 fields to link which is BUKRS, BELNR, AND GJAHR
but I is still any more fields that I can link to BSAK from BSIS and BSAS? Because we are
experiencing performance issues in my program. I am using index for the 3 tables but still it gives us
performance issues. Below is my code:
* Get previous year
lv_year = p_gjahr - 1.
* Get records from PAYR
SELECT zbukr vblnr gjahr lifnr zaldt
FROM payr
INTO TABLE gt_payr
WHERE zbukr = p_bukrs
AND gjahr IN (lv_year, p_gjahr).
DELETE gt_payr WHERE zaldt+4(2) > p_monat.
SORT gt_payr BY zbukr vblnr gjahr lifnr zaldt.
DELETE ADJACENT DUPLICATES FROM gt_payr COMPARING zbukr vblnr gjahr lifnr zaldt.
IF NOT gt_payr[] IS INITIAL.
* Get records from BSAK
SELECT bukrs blart gjahr monat belnr lifnr dmbtr shkzg
FROM bsak
INTO TABLE gt_bsak
FOR ALL ENTRIES IN gt_payr
WHERE lifnr = gt_payr-lifnr
AND bukrs = gt_payr-zbukr
AND augdt = gt_payr-zaldt
AND augbl = gt_payr-vblnr
AND gjahr = gt_payr-gjahr.
ENDIF.
DELETE gt_bsak WHERE monat > p_monat.
DELETE gt_bsak WHERE shkzg <> 'H'.
gt_payments[] = gt_bsak[].
IF NOT gt_payments[] IS INITIAL.
* Get records from BSIS(Open items)
SELECT bukrs blart gjahr monat dmbtr hkont
FROM bsis
INTO TABLE gt_bsis
FOR ALL ENTRIES IN gt_payments
WHERE bukrs = gt_payments-bukrs
AND belnr = gt_payments-belnr
AND gjahr = gt_payments-gjahr
AND blart IN (lc_su, lc_px).
* Get records from BSAS(Cleared items)
SELECT bukrs blart gjahr monat dmbtr hkont
FROM bsas
INTO TABLE gt_bsas
FOR ALL ENTRIES IN gt_payments
WHERE bukrs = gt_payments-bukrs
AND belnr = gt_payments-belnr
AND gjahr = gt_payments-gjahr
AND blart IN (lc_su, lc_px).
ENDIF.
Hope you can help me guys. Thank you and take care!
In a statement with a SELECTstatement with FOR ALL ENTRIES, the addition ORDER BY can only be used with the addition PRIMARY KEY
bsis
select MANDT
BUKRS
HKONT
AUGDT
AUGBL
ZUONR
GJAHR
BELNR
BUZEI
bsak
select MANDT
BUKRS
LIFNR
UMSKS
UMSKZ
AUGDT
AUGBL
ZUONR
GJAHR
BELNR
BUZEI
bsas
select MANDT
BUKRS
HKONT
AUGDT
AUGBL
ZUONR
GJAHR
BELNR
BUZEI
Message was edited by:
Karthikeyan Pandurangan
Similar Messages
-
Hi Experts
1) Is there any difference between BSIS and BSAS table?
2) What are open items and closed items?
pallaviBSIS : Open Items Available for GL
BSAS: Cleared Items Available for GL
Gl Acoount Open Line Items Available in Table BSIS,
GL Account Cleared Line Items Available in BSAS,
Ex: while Using T. Code F-02,
Dr 400500 Rs 1000
Cr 500100 Rs 1000
This Data Is Availeble In BSIS
Reverse Above Entry
Dr 500100 Rs 1000
Cr 400500 Rs 1000
This Data is Available In BSAS,
Regards,
Viswa -
Data recovery from BSIS and BSAS tables
Hi all,
The records in the tables BSIS and BSAS are deleted due to adhoc circumstances.
How do I recover this data in SAP?
Please help!!!
Thanks,
RaghavHello Raghav,
two possibilities without a complete restore (in a standard SAP environment):
1) Flashback Query (but it only works if your UNDO tablespace still contains all the data - parameter undo_retention):
http://docs.oracle.com/cd/E11882_01/appdev.112/e25518/adfns_flashback.htm#ADFNS01003
2) LogMiner
http://docs.oracle.com/cd/E11882_01/server.112/e22490/logminer.htm#i1005553
Regards
Stefan -
Get zuonr of table bsis and bsas
Hi All,
Tried getting the zuonr of bsas and bsis using bseg but got
Run time error long text. Exceeded the permitted time.
My condition is c_sales_pdc type bseg-hkont value u20180000102120u2019.
Need your advise on program optimization and rephrasing my program statements especially the case statements.
below is the code
Many thanks,
Aashta
SELECT bukrs
hkont
gjahr
belnr
budat
waers
blart
shkzg
wrbtr
dmbtr
augdt
xragl
FROM bsis
INTO TABLE it_bsis
WHERE hkont EQ c_sales_pdc
AND bukrs IN s_bukrs
AND belnr IN s_belnr
AND budat LE p_budat.
DELETE it_bsis WHERE blart NE 'DZ'
AND blart NE 'PD'.
DELETE it_bsis WHERE xragl NE ''.
SELECT augbl belnr bukrs gjahr buzei bschl
FROM bseg
INTO TABLE it_bseg
FOR ALL ENTRIES IN it_bsis
WHERE zuonr NE space
AND buzei = '01'
AND gjahr = it_bsis-gjahr
AND bschl IN ('01', '15')
AND qsskz = 'XX'
AND bukrs IN s_bukrs
AND zuonr IN s_zuonr
AND augbl IN s_belnr
AND augbl = it_bsis-belnr.
LOOP AT it_bseg.
CLEAR: it_bseg2-belnr, it_bseg2-zuonr, it_bseg2-kunnr.
CASE it_bseg-bschl.
WHEN '01'.
SELECT augbl zuonr kunnr
FROM bseg
INTO TABLE it_bseg2
FOR ALL ENTRIES IN it_bseg
WHERE augbl = it_bseg-augbl
AND augbl IN s_belnr
AND zuonr IN s_zuonr
AND kunnr IN s_kunnr.
WHEN '15'.
SELECT belnr zuonr kunnr
FROM bseg
INTO TABLE it_bseg2
FOR ALL ENTRIES IN it_bseg
WHERE belnr = it_bseg-belnr
AND belnr IN s_belnr
AND zuonr IN s_zuonr
AND kunnr IN s_kunnr.
WHEN OTHERS.
EXIT.
ENDCASE.
ENDLOOP.
SELECT zuonr prctr
FROM zfspbu
INTO TABLE it_zfspbu
FOR ALL ENTRIES IN it_bseg2
WHERE zuonr = it_bseg2-zuonr
AND zuonr IN s_zuonr.Hi Aasta,
Obviously it will take the long time, because the fields you are retrieving in the select query are not in the proper order as of database fields and the same case in the where condition. Therefore I have corrected and kept in order. please check.
Select bukrs
hkont
gjahr
augdt
belnr
budat
waers
blart
shkzg
dmbtr
wrbtr
xragl
FROM bsis
INTO TABLE it_bsis
WHERE bukrs IN s_bukrs
AND hkont EQ c_sales_pdc
AND belnr IN s_belnr
AND budat LE p_budat.
Also please put the initial check before using for all entries.
i.e., if not it_bsis[] is initial.
SELECT bukrs
belnr
gjahr
buzei
augbl
bschl
FROM bseg
INTO TABLE it_bseg
FOR ALL ENTRIES IN it_bsis
WHERE bukrs IN s_bukrs
AND gjahr = it_bsis-gjahr
AND buzei = '01'
AND augbl = it_bsis-belnr
AND bschl IN ('01', '15')
AND qsskz = 'XX'
AND zuonr IN s_zuonr.
endif.
Please do the changes, hope will work fine.
Regards,
Md Ziauddin. -
Urgent: BSIS and MSEG link
Hello,
I cannot get the material number of the GR line in FI documents.
I am using the tables BSIS and BSAS but cannot find any material number associated with them.
BSEG is an option but it is giving time-out dump when data of more than 10 days are selected.
Any suggestions will be appreciated.
Regards,
SukritiHi Sukriti,
Never use BSEG or MSEG directly to fetch data as they always have huge data and it takes lot of time to fetch data.
the link between BSIS and MSEG is as follows.
BSIS-BELNR = MSEG-BELNR
BSIS-GJAHR = MSEG-GJAHR
BSIS-BUZEI = MSEG-BUZEI
BSIS-BUKRS = MSEG-BUKRS
and filter in where condition based on MSEG-MATNR = materials from Select option or Parameters.
May be you can create an index with the above 4 fields and also BSIS-HKONT in BSIS table.
This would definitely give you the exact number of entries as in BSIS and MSEG.
You can notice that in MSEG the Fields are not Key fields but they will give you unique entries.
So you should be using join for BSIS and MSEG tables on the above 4 fields.
hope this will solve your problem.
If useful please dow reward
Thanks
Venugopal -
How are BSIS and COEP linked?
Is there a link between BSIS and COEP tables?
Any reference doc number can be populated from COEP to BSIS automatically?
My requirement is to find how the BSIS-XBLNR can be linked to COEP?
pl advise.
VenTo put my question in a better way,
when I enter a document with FB50, it generates controlling docs and also populates the FI doc number in the reference field of COEP.
When I post a document with KB21N, it does generate the FI docs but does not populate the reference doc field.
I need to find how is FB50 behaving. I tried to do a debug but not of much help.
- Ven -
Why there is no account entry in GL account which link to VBR and GBB.
Hi,
I am trying to understand about transaction event key GBB. As per my knowledge, GBB is offsetting entry for Inventry BSX. There are many general modifier VBR, AUF, BSA etc under under GBB.
GL account '400082' has been assign to VBR for the material valution class ZVL1 and valution grouping code 0001.
I have issued material with movement type 201 for consumption (Cost Center) from stock. Hence there should be some account entry to GL account 400082 which link to VBR under GBB. I can see the accounting entry in inventry account and consumption accountm, but I can not see any entry in GL account that link to VBR. I am checking accounting entry in transaction code - FBL3N.
Please let me know why there is no entry to GL account that link to VBR and GBB. Appreciate if you can give some input about GBB concept with example.
Thanks in advance.
Regards,
sp sahuHi,
General modification key (Account modifier ) VBR is used for for 201 movement type where goods issue to cost center.You can also cross check in OME9 t.code where VBR Acct modification is assigned with cost object K.After posting goods issue with 201 movement type, you can cross check the accounting document ( by proper setting layout) where you can find
Account description...............................Transaction
Inventory A/C: ..................Cr.................BSX
Consumption A/C: ..............Dr................GBB
NOTE: In t.code:FBL3N, you will get document type of accounting document(WE,RE,ML,KZ,KE,UP etc) in main screen, but you can view all details by clicking document number and in next screen press F9 button.( by proper setting layout)
Regards,
Biju K -
Link between Delivery and Sales Order Schedule Line
Hi Gurus,
I have a requirement in which i need to display quantity and amount at schedule line level and also the delivery and delivery item for each schedule line.
For example, if there is a sales order O1 and item 10 for which we have 3 schedule lines and 3 deliveries as well say D1, D2 and D3.
Report should be something like this
Sales Order Item Schedule Line Delivery Del Item Confirmed Order Qty
O1 10 1 D1 10 5
O1 10 2 D2 10 5
O1 10 3 D3 10 4
How can i determine that a particular delivery corresponds to which schedule line of that saler order-item?
We have the link between delivery and sales order but is there any way that we can get the link of delivery at schedule line level?
Please help.
Regards,
GauravHi,
I suppose you must check with SD functional consultant and the post should also be in the logistics SD forum and not BI. But I suppose there is know specific link between the schedule line of SO to the Delivery. It is more like a bucket flow for ex.
Sale order Item Schedule line qty
SO1 Item1 Sch1 10
SO2 Item1 Sch2 10
Delivery Item QTy
DO1 IT1 15
DO2 IT1 5
In this case qty 15 is distributed over both SO1 and SO2, and SO2 ITem1 Sch2 has link to both the DOs
So I am not sure if you can establish a one to one link, please check with your SD consultants.
Regards,
Ashwin G -
When I first open Firefox it is fine but if I open a second tab to search another site I get a white screen and have to continually click 'back', click the site link, white screen, back, click the link, white screen and so on.
This can also be a problem with the files [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
Delete [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
If you see files sessionstore-##.js with a number in the left part of the name like sessionstore-1.js then delete those as well.
You will have to redo App Tabs and Tab Groups after deleting sessionstore.js.
See:
* http://kb.mozillazine.org/Session_Restore -
hi all,
i have a problem regarding relation or link between sales and production order. i have to fetch production order number related to sales order number. i have checked in the table AFPO that is production order item table , there is field AFPO-KDAUF and AFPO-KDPOS ie, sales order and sales item. but when i see these two fields there is no data into the field so how can i get data into the table related to production order.can anyone help me on this issue.Please refer to the below links -
https://forums.sdn.sap.com/post!reply.jspa?threadID=309885
Integration points with MM/IM and PP are some of the following -
When a Production order is created and released a reservation gets created for the materials in BOM
When the reservation is created and materials are posted against the reservation with mvt type 311 these are transferred to the respective location.
When a GR is posted with mvt type 101, the Finished or Semifinished goods are posted to the respective storage location and inventorized.
When a consumption is posted with mvt type 261 then stock will get reduced in resepective storage location.
When a batch determination is done in a production order basing on the batch search strategy and sort rule material, quantity and batch are selected.
If WM is configured an associated internal movement for all the above movement types will be posted.
During MRP, BOM which is a master data for PP is used to calculate the dependent requirements of materials.
During availabilty check of a production order basing on the availability check configured materials will be selected and checked.
Hope the above may help you. -
'Is there a link between OLM and iProcurement'
I have been asked 'Is there a link between OLM and iProcurement'? The person posing the question is wanting to create trainers as suppliers and I know that the supplier information is shared between OLM and the A/P, A/R and G/L modules and I presume that the link to iProcurement will be via one of these modules however is there a more direct vanilla link between OLM and iprocurement?
Any help would be great
Thanks
DMI am afraid there is no link between the iProc and OLM.
The closest that apps can offer you is that your learner/delegates can be of type external i.e. being an Organization or a Customer. Hence there exists a link for your delegate to be a customer(hz_parties).
However this might be a future integration i.e. Trainers being suppliers. I am saying so because in 11.5.10 there is a table named OTA_VENDOR_SUPPLIES that has reference to vendor_id. Currently this table is not being used by OLM.
You may look into the code of packages OTA_VSP_API, OTA_TEA_BUS & OTA_PLE_BUS and see if Oracle's future functionality will converge towards your business requirement.
Thanks,
Anil Passi
http://oracle.anilpassi.com -
Link between Project and Sales Order
Apart from sales order can we have a link between project and customer master ??
I know that WBS element assignment can be made in sales order but i want to have link between
customer master and project. I don't want any user field or text field in sales order.
Any idea ?
Regards
AshishYes Mr Ashish!
As far as iam concern there is no link between Project & Customer Master, you have to link it with SALES order, I had check in XD03,XD01, the complete customer master, i didnt find any field in customer master which links with Project.
I'll let you know if i find any links.
Regards,
ANSAR -
Link between Item and delivery
Hi ,
I want to know the link between item and deliveyr. Like for example, an sales order item ( no. 10) containing 10 quantities can be delviered 5 times( each containing 2 quantities) and line item ( no. 20) can contain one single delivery. I am working on a report where i have to link all the line item to its delivery number. I am trying to achieve this through GENIl but i am not able to indetify as to how to differentiate the different deliveyr numbers. In other words, can some one help me as to how to link the delivery number to its corresponding items?Document flow is stored in the table VBFA in ECC.
VBELV fied is the sales order number and in POSNV specify the line item number and speicfy VBTYP_N = J (Delivery).
Regards,
Bhanu -
Link between GTM and FSCM (sales or purchase order hedging)
Hi all,
I am trying for a few days to have SAP GTM working (I am in an IDES ECC6 system, and as far as I know in EhP4 version). The main goal in fact is to test the currency hedging, and therefore to the link GTM and FSCM, either single-sided purchase or sales order, or two-sided . The flow I want is the following :
- I buy or sell a product, in GTM, through a trading contract which generates a purchase or sales order.
- Automatically a currency hedge is generated to cover the risk, in FSCM, I guess in exposure management.
- And then the financial products (derivatives) are generated as well.
No problem to create the trading contract, no problem to generate the sales or purchase order. But in spite of the (very little) customizing I found in u201CSAP GTM => currency hedgesu201D, and some in FSCM, in u201Ctreasury and risk managementu201D, no way to have this link between GTM and FSCM, no additional document is generated like a Forward Exchange Transaction (I guess I should have this, and then a risk exposure in FSCM).
Would you have an idea ? Is this customizing, or an additional Business Functions or Extension Set not activated ? SAP says : u201Cit worksu201D, but canu2019t find the way.
Thank you very much for your help, I am quite looking for this link for a few days now u2026
Best regards
PatrickYes Mr Ashish!
As far as iam concern there is no link between Project & Customer Master, you have to link it with SALES order, I had check in XD03,XD01, the complete customer master, i didnt find any field in customer master which links with Project.
I'll let you know if i find any links.
Regards,
ANSAR -
What is the link between PO and Requisition in database side
hello friends,
please can any one tell me that what is the link between PO and Requisition in database side. means after creating the requisition we will go for create the PO based on that requisition.
want to know that what is the link between both in database side.
Thanks in advance
krish.Hi,
The link is at distribution level, between:
PO_DISTRIBUTIONS_ALL.REQ_DISTRIBUTION_ID
and
PO_REQ_DISTRIBUTIONS_ALL.DISTRIBUTION_ID
Hope it helps.
Maybe you are looking for
-
Seem to be in mirror and pacman hell
Hi, reinstalled arch, with 5/1/12 core 32 bit disk with KDE4 but despite enabling an Australian mirror could only get [core remote extra remote community remote] at first for the install. However now this has all disappeared since upgrading and
-
Question about throws exception in interface and realized class
Hi,all If I define a method In the interface like that- public void Execute() throws NumberFormatException; In the realized class, I can define this method like that- public void Execute() throws RuntimeException{ System.out.println("test");
-
Interface for Configuration Rules
Hi, I need to know, whether there is any Open Interface or Public API to import Configuration Rules. Please somebody help me out.
-
I have a HP OficeJet Pro L7590 on my home network and looking at the Print & Share App if it is compatible with my printer or not. Is someone using this app with the same series printer and share with your experience? Thanks!
-
Hi, I m new to workflow. Here wen employee sends a leave request or anything from portal side, how to identify which workflow is triggered for wihch service. How to trace a perticualr employees events. If employee faces problem in prd, how to check a