BSEG - Select on posting key (BSCHL)
I need all documents in the proceeding 2 months (cleared and uncleared) from BSEG whose posting key is '06'.
I can't find any other table that has all the records and there are no other fields to put into the where clause of BSEG.
Any ideas?
Hi Janet,
You can use BKPF table. ( accounting document header).
And u can use the fields BUKRS,GJAHR,BELNR and the posting date BUDAT.
Your code may look like below.
SELECT * FROM bkpf INTO TABLE itab_bkpf
WHERE BUDAT = ( last 2 months )
IF NOT itab_bkpf[] IS INITIAL.
SELECT * FROM bseg INTO TABLE itab_bseg FOR ALL ENTRIES IN itab_bkpf
WHERE belnr = itab_bkpf-belnr AND
bukrs = itab_bkpf-bukrs AND
gjahr = itab_bkpf-gjahr AND
bschl = '06'.
Please reward with points if it helps.
Thanks and Regards,
Nagendra
Similar Messages
-
How to select Posting key flag
Dear all,
how to select flag for posting key.
I'm getting the following Error:
You cannot enter any data in field BSEG-XREF1
Message no. ICC_TR168
Diagnosis
The system will not allow you to enter any data in the field. The flag for the posting key has not been selected in table TBSL.
Procedure
Change the settings in table TBSL for the posting key.
Pls help me
Reg
KrisHello George,
It seems that the posting key used has field staus as suppressed for the "Reference key1".
Please change the field status of the posting key from supressed to optional.
The procedure is as follows:
Go to Transaction OB41.
Select the posting key that gives this error message. Double click and enter the entry.
Select the field status of the posting key. (It is present in the Edit menu).
Select the "General Data".
Make the field "Reference specification 1/2" from "supressed" to "optional".
Please let me know in case you face any issue.
Regards,
Nisha -
How to find out the table for Posting Key and A/R & A/P Document types
hi folks,
can you let me know which TABLE is used to Posting key and also which TABLE is used for Account Receivables and Account Payables.
Thank you in advance.To find the table of posting key, select any posting key at OB41, then press F1, then click on hammer icon the table used will be displayed. For Posting Key TBSL is the table used.
Posting Key TBSL
Customer Master (General) KNA1
Customer Master (Company Code) KNB1
Vendor Master (General) LFA1
Vendor Master (Company Code) LFB1
Satish
(please close the thred if u satisfiy with the answer) -
Posting Key - FB02 data upload
Hi,
I am uploading data from a flat file using BAPI to upload customer gl accounts.
The Posting Key ( BSCHL ) mentioned in the flat file is 01 ( for invoice ) , but when it is posted , in FB02 i am seeing it as 11 ( credit memo ).
i checked all the data passed on to the BAPI. it is "01" .
What could be the reason for this ?
Can any one help me in this?
Vikki.Hi Max,
I debugged the BAPI. and went thro the subroutine FILL_ACC_TYPE.
in this subroutine, it is assigning the BSCHL.
I am not able to find out where in the BAPI it decides the SIGN of the AMOUNT.
Can you guide me .
My requirement is to pass on the POSTING KEY to the BAPI EXTENSION and get the SIGN of the amount automatically.
DATA: ld_bschh LIKE accit-bschl,
ld_bschs LIKE accit-bschl,
ld_umskz LIKE accit-umskz.
IF NOT gs_accit-ktosl IS INITIAL AND
gs_accit-kstat IS INITIAL.
CALL FUNCTION 'FI_GET_POSTING_KEY'
EXPORTING
i_ktosl = gs_accit-ktosl
IMPORTING
e_bschs = ld_bschs
e_bschh = ld_bschh
e_umskz = ld_umskz
EXCEPTIONS
error_message = 1.
IF sy-subrc IS INITIAL.
IF gs_accit-shkzg = 'S'.
gs_accit-bschl = ld_bschs.
ELSE.
gs_accit-bschl = ld_bschh.
ENDIF.
** SHB-Vorgänge HR-Travel mit Ktosl 'HRV'
* IF NOT ld_umskz IS INITIAL.
* gs_accit-umskz = ld_umskz.
** keine Ableitung Zahlungsbedingung für SHB-Vorgänge
* CLEAR gs_accit-zterm.
* ENDIF.
ELSE.
PERFORM error_from_system
USING gs_bapi_accit-parameter
gs_bapi_accit-tabix
'ACCT_KEY'.
ENDIF.
ENDIF.
IF gs_accit-bschl IS INITIAL.
CASE gs_accit-koart.
WHEN 'D' OR 'V'.
IF gs_accit-shkzg = 'S'.
gs_accit-bschl = '01'.
ELSE.
gs_accit-bschl = '11'.
ENDIF.
WHEN 'K'.
IF gs_accit-shkzg = 'S'.
gs_accit-bschl = '21'.
ELSE.
gs_accit-bschl = '31'.
ENDIF.
WHEN 'S'.
IF gs_accit-shkzg = 'S'.
gs_accit-bschl = '40'.
ELSE.
gs_accit-bschl = '50'.
ENDIF.
WHEN 'A'.
IF gs_accit-shkzg = 'S'.
gs_accit-bschl = '70'.
ELSE.
gs_accit-bschl = '75'.
ENDIF.
WHEN 'M'.
IF gs_accit-shkzg = 'S'.
gs_accit-bschl = '40'.
ELSE.
gs_accit-bschl = '50'.
ENDIF.
ENDCASE.
ENDIF.
IF NOT gs_accit-umskz IS INITIAL.
IF gs_accit-bschl+1 = '1'.
gs_accit-bschl+1 = '9'.
ENDIF.
ENDIF.
Waiting for your reply.
Vikki. -
Reverse posting key specification is missing for posting key 80
A FI document was wrongly posted with posting key "80" instead of 40. And now we are not able to reverse it. System is giving following error --
"Reverse posting key specification is missing for posting key 80"
Document posted as
50 207200 CASH - MAIN-O.H. 762.00-
40 410120 CONVEYANCE EXPENSES 702.00
<b>80 402440 STAFF WELFARE EXPENS 60.00</b>
Please suggest
Thanks & RegardsHi,
Go to OB41, select the posting key 80 and in the third tab "Other attributes" mention Reversal Posting key. Like you can observe for posting key 40, reversal key 50 would have been assigned.
Pl assign points, if helpful. -
Field Posting Key in BAPI_ACC_DOCUMENT_POST ?
Hi
I need to post documents like FB01 , i'm already using BAPI_ACC_DOCUMENT_POST and it works so i can now create documents with the header and itmes positions , filling the tables header, accountreceivable items and currency items.
I already found the most of fields for execute the BAPI and create the documents, but i can not find three fields, some of one (BSCHL) the most important:
Posting Key (BSCHL)
Special G/L Indicator (NEWUM)
Calculate Tax Automatically (XMWST) .
I think but i'm not sure the Posting Key (BSCHL) is placed in the EXTENSION2 table, but this table ask for some STRUCTURE name and i don't know what should i place in this field or how fill this parameter table.
Does somebody can help me about where can i place these 3 fields in the BAPI or where can i find help documentation for do this ?
Regards
FrankFrank,
you should use the Extension2 structure for passing the Posting Keys and you should implement the BADI for posting the documents with the Keys what you have supplied.
The Enhancement Spots are BADI_ACC_DOCUMENT and IF_EX_ACC_DOCUMENT.
I've used the BADI_ACC_DOCUMENT and now i'm able to post the documents using the keys which i've supplied to the BAPI.
Otherwise the BAPI is going to decide the posting keys based on tha amount .
Hope this will help you.
Thanks,
Adi. -
Field BSEG-ZLSPR in a posting key 50
Hello,
I have a doubt,
Is it possible to display the lock field (BSEG-ZLSPR) as a posting key 50? And after post are able to change?
Thanks.Hello again,
The problem I have is in a substitution i changed the posting key 50 to 31 (bseg-bschl = '31') and block the payment(BSEG-ZLSPR = 'Y '), but when i see the document I get the screen off the posting key 50 and the field payment block doesn't appear. I need that the field payment block appear to change it in the future.
Thanks. -
Generate 2 line items with posting keys in same table while using FM .
Dear Expert ,
For T-code f-65 ,I have to park a FI Document .i tried with PRELIMINARY_POSTING_FB01 for parked Document . But i am not successfully park the document .
with the help of F-65 the data Segregate between Tables VBSEGS and VBSEGD with respecting Posting key . but with this Fm entire entry is displaying in table VBSEGS .For example it generated two line items with posting keys '15' and '40' and these both are displayed in VBSEGS whereas posting key '15' has to be displayed in VBSEGD.
when i check this Document in FBV0 Error reflect " G/L Account 0012000 1001 Does not Exist ".
Here my code -
DATA: XT_BKPF LIKE BKPF OCCURS 0 WITH HEADER LINE ,
XT_BSEG LIKE BSEG OCCURS 0 WITH HEADER LINE ,
XT_BSEG1 LIKE BSEG OCCURS 0 WITH HEADER LINE ,
XT_BSEC LIKE BSEC OCCURS 0 WITH HEADER LINE ,
XT_BSET LIKE BSET OCCURS 0 WITH HEADER LINE ,
XT_BSEZ LIKE BSEZ OCCURS 0 WITH HEADER LINE ,
XT_BKORM LIKE BKORM OCCURS 0 WITH HEADER LINE ,
XT_THEAD LIKE THEAD OCCURS 0 WITH HEADER LINE ,
XT_SPLTTAB LIKE ACSPLT OCCURS 0 WITH HEADER LINE ,
XT_SPLTWT LIKE WITH_ITEMX OCCURS 0 WITH HEADER LINE .
DATA : XTEXT_UPDATE LIKE BOOLE-BOOLE VALUE SPACE,
XTEXT_ITEM_UPDATE LIKE BOOLE-BOOLE VALUE SPACE,
XI_UF05A LIKE UF05A,
XI_XCMPL TYPE XFELD VALUE 'X',
XFS006_FB01 LIKE FS006 ,
XI_TCODE LIKE T020-TCODE VALUE 'F-65',
XI_PARGB LIKE RF05A-PARGB ,
XI_TCODE_INT TYPE TCODE .
DATA P_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
XT_BKPF-BUKRS = 'CP01'.
XT_BKPF-GJAHR = 2011.
XT_BKPF-BLART = 'DZ'.
XT_BKPF-BLDAT = SY-DATUM.
XT_BKPF-BUDAT = SY-DATUM.
XT_BKPF-MONAT = '06'.
XT_BKPF-CPUDT = SY-DATUM.
XT_BKPF-WWERT = SY-DATUM.
XT_BKPF-USNAM = 'ABAPER'.
XT_BKPF-TCODE = 'F-65'.
APPEND XT_BKPF.
XT_BSEG-BUKRS = 'CP01'.
XT_BSEG-GJAHR = '2011'.
XT_BSEG-BUZEI = '001'.
XT_BSEG-BSCHL = '40'.
XT_BSEG-KOART = 'S'.
XT_BSEG-SHKZG = 'S' .
XT_BSEG-GSBER = 'CPLN'.
XT_BSEG-BUPLA = 'CP01'.
XT_BSEG-WRBTR = 10000.
XT_BSEG-PSWSL = 'INR'.
XT_BSEG-ZUONR = 'CH. 123456'.
XT_BSEG-HKONT = '241000'.
APPEND XT_BSEG .
CLEAR XT_BSEG.
Vendor line item - required even for header only - BSEG table
XT_BSEG-BUKRS = 'CP01'.
XT_BSEG-GJAHR = '2011'.
XT_BSEG-BUZEI = '002'.
XT_BSEG-BSCHL = '15'.
XT_BSEG-KOART = 'S'.
XT_BSEG-SHKZG = 'H' .
XT_BSEG-GSBER = 'CPLN'.
XT_BSEG-BUPLA = 'CP01'.
XT_BSEG-WRBTR = 10000.
XT_BSEG-PSWSL = 'INR'.
XT_BSEG-ZUONR = 'CH. 123456'.
XT_BSEG-HKONT = 'PC04000001'.
APPEND XT_BSEG .
CLEAR XT_BSEG.
CALL FUNCTION 'PRELIMINARY_POSTING_FB01'
EXPORTING
TEXT_UPDATE = XTEXT_UPDATE
TEXT_ITEM_UPDATE = XTEXT_ITEM_UPDATE
I_UF05A =
I_XCMPL = XI_XCMPL
FS006_FB01 =
I_TCODE = XI_TCODE
I_PARGB =
I_TCODE_INT =
IMPORTING
XEPBBP = CHECK_A
TABLES
T_BKPF = XT_BKPF
T_BSEG = XT_BSEG
T_BSEC = XT_BSEC
T_BSET = XT_BSET
T_BSEZ = XT_BSEZ
T_BKORM =
T_THEAD =
T_SPLTTAB =
T_SPLTWT =
EXCEPTIONS
ERROR_MESSAGE = 1.
P_RETURN-ID = SY-MSGID.
P_RETURN-TYPE = SY-MSGTY.
P_RETURN-NUMBER = SY-MSGNO.
APPEND P_RETURN.
p_return-MESSAGE_V1 = XSYMSGV.
IF SY-SUBRC = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF.
WRITE :/ sy-subrc , sy-MSGV1 .
Thanks ,
Ashish GuptaHi Raghuram,
I found a very important SAP Note 103051, details are below.
An IDoc processed by function module IDOC_INPUT_INVOIC_MM (of category INVOIC01) must not refer to the same purchase order item in several invoice items. This is also valid if for a goods receipt-related invoice verification several delivery notes belong to the same purchase order item.
Depending on the system settings and the situation, various error messages can occur (for example, FD240 'Order item ... selected more than once' or M8050 'Balance not zero: & debits: & credits: &').
In this situation module IDOC_INPUT_INVOIC_MRM generates error message M8321 'Document contains same order item more than once'.
For example, this situation occurs if you work with individual batch valuation and the SD billing document executes a batch split for different batches which belong to the same purchase order item and delivery.
Other terms
INVOIC, SAPLIEDI, M8047, M8, 321
Reason and Prerequisites
This is because of the program design.
Solution
There is no solution for IDOC_INPUT_INVOIC_MM.
Module IDOC_INPUT_INVOIC_MRM (only as of Release 4.0) for the logistics invoice verification can distinguish different goods receipts by means of the delivery note number. For this purpose, GR-related invoice verification must be active.
Owing to this symptom, billing documents for single batch valuation with batch split cannot be settled in MM-EDI inbound processing. The settlement generates exactly the situation described (several invoice items for the same purchase order item). In this case, the only solution is to deactivate the billing of the batch sub-items in SD Customizing and to calculate the main item only.
Hope this helps.
Reward if helpful.
Thanks -
how to decide posting key for negative valuies and for positive values
and who will decide this
i have to assign minus sign to value for posting key say 21.
how can i do that. is it like this ?
if itab-BSCHL = '22'.
concatenate '(-)' amount into itab-amount .
condense itab-amount no-gaps .
itab-WRBTR = itab-WRBTR * -1 . but not worki
endif.
please replyHi,
I dont think you can assign the sign to the amount for the posting key...
Posting keys are divided into Debit and Credit Indicator...
So system automaically take the sign of the amount from the Posting key you have selected.
You can try Txn FB01...there you cannot give the amount in negative...it should be positive but after posting u can see the differnece...
it depends on the posting key ....
exactly for what purpose you r looking posting key...
Thnx
Rahul
Edited by: Rahul Keshav on Aug 26, 2009 5:36 PM -
Hi ,
Please help me to find search help for posting key (NEWBS).
I tried BSCHL. But it is not working.
Thanks,
Sandeep GargHi,
Create the search help with table entires from
TBSL this is a value table.
Or
use the FM to have a search help for this field.
AT selection screen on value-request for <<FIEDLNAME>>
F4IF_INT_TABLE_VALUE_REQUEST'
*CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = 'FVALUETAB-CARRID'
retfield = t_connid
PVALKEY = ' '
DYNPPROG = 'W_REPID'
DYNPNR = 'W_DYNNR'
DYNPROFIELD = 'W_FIELD'
STEPL = 0
WINDOW_TITLE =
VALUE = 'W_VALUE'
VALUE_ORG = 'C'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = 'SY-CPROG'
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = T_VALUE1
FIELD_TAB = w_ftab
RETURN_TAB =
DYNPFLD_MAPPING = w_ftab
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
Thanks & Regards,
Chandralekha. -
FB01 Enter Trading Partner for Posting Key 01 (Customer Invoice)
Dear Experts,
I would like to ask is it possible to enter the Trading Partner for the FI Document line item with Posting Key 01.
I can modify the Trading Partner for Posting Key 40 and 50 but I cannot find field in the More Data Button.
Can anyone help me to solve this issue?
Thanks.hi,
Check whether the document type you are using to post is allowed to enter the trading partner.
To check use the TCODe OBA7 and select the relevent document type. then select the check box enter trading partner under control data.
and also check the customer you assigned for that posting key 01 is got assigned trading partner in the master record or not(TCOD XD02/XD03).
thanks. -
Posting key for payment documents with sales related check
Hi,
sometime during 2010 posting key for posting cusotmer payments was changed in other attibutes to sales related. a correction has been made to the posting key but now I need to correct all the documents in BSEG field XUMSW and remove the sales related check.
does anyone know of a way or a program that will do this?
your help is greatly appreciated.
CMHi,
You cannot change XUMSW (sales related item) in OB32.Here most of the fields are there for changeble option.but for your case it is not applicable.
It means you cant change that field.
If you want really modify it for certain documents you need to writ Query to change in table level.
Normal BDC and LSMW will not work.
Thanks
ANJI REDDY -
Posting Key in BAPI_ACC_DOCUMENT_POST
Hi,
I am using bapi 'BAPI_ACC_DOCUMENT_POST' to post 'Customer Document' in FB01. I was able to post the document but Posting Key in the document is not as desired. When I try to Post the document with out any Posting Key by default I am having Posting Key as '01'(Customer document) and '50'(GL account).
But I want bapi 'BAPI_ACC_DOCUMENT_POST' to post a document with Posting key '15'(Customer Document) and '40'(GL account).
In bapi I am using these tables along with header.
ACCOUNTGL- GL Account
ACCOUNTRECEIVABLE- Customer Document
I tried passing the posting key in ACCT_TYPE in table ACCOUNTGL and passing the the posting key using EXTENSION2 table but was not successful .
Can anyone let me know
How can I pass the Posting Key to the bapi 'BAPI_ACC_DOCUMENT_POST' for Customer Document and GL account?
OR
How can I use EXTENSION2 table to create an appropriate posting key?
please let me know.
Vikki,
In one of your thread you came across the same issue and you solved it. Can you please guide me how to achive appropriate posting key using EXTENSION2 table?
Thanks,
Vijay.Hi,
Just follow these steps:
1. Fill in your EXTENSION table like this
first 3 character represent item number
next 2 character represent posting key
CLEAR: gt_extension.
gt_extension(3) = sy-index(3).
gt_extension+3(2) = 'New Posting Key'.
APPEND gt_extension.
2. Create an FM similar to SAMPLE_INTERFACE_RWBAPI01 and put the following codes:
IF NOT extension IS INITIAL.
LOOP AT extension.
READ TABLE it_accit WITH KEY posnr = extension(3).
IF sy-subrc IS INITIAL.
it_accit-bschl = extension+3(2).
MODIFY it_accit INDEX sy-tabix.
ENDIF.
ENDLOOP.
ENDIF.
3.
- Go to TCode "FIBF".
- Go to Settings -> Products -> ... of a customer
- Create a new entry and check the box to activate the product
Product = <any name>
Text = <description>
RFC = blank
Check the activation box
- Go to Settings -> Process Modules -> ... of a customer
- Create a new entry by specifying the name of the function module name and product name created earlier.
Process = RWBAPI01
Ctr = blank
Appl = blank
FM = <FM created>
Product = <name of product created earlier>
Hope this helps,
Leonard Chomi. -
Posting Keys for Account Determination do not exist
This doubt in STO scenario:
STO - between 2 plants - different company codes under same client
Created STO from Receiving Plant in ME21N with document type NB
Based on that STO, Created Delivery in VL10B from supplying Plant
Tried PGI in VL02N from supplying Plant.
Received the Error Message as below:
Posting keys for account determination for transaction BUV do not exist
Message no. F5598
Diagnosis
The posting keys necessary for account determination for transaction BUV have not been set.
System Response
Because the posting key is missing, the system cannot generate any automatic postings.
Procedure
Maintain the posting keys necessary for transaction BUV.
kindly give the solution and advance thanks.
VaideeHi Vadee,
Account Determination for BUV has not been setup for PGI.
So , go to transaction OBYC and assign the account by double clicking BUV and give u r chart of accounts and check whether the account has been maintained. If not maintain.
If account has been maintained , select your account/valuation class and select posting keys push button and maintain the posting keys.
Regards,
Nani -
BAPI for transaction FB01 with account posting key
Hi,
I have to use a BAPI for registering Invoices into the FI module through the FB01 transaction.
I am trying to use the standard BAPI: BAPI_ACC_DOCUMENT_POST
The problem is that this BAPI does not manage the account posting key (field BSCHL).
Could anyone provide help?
Thank you very much in advance.It is happening here in the BAPI
CALL FUNCTION 'FI_GET_POSTING_KEY'
EXPORTING
i_ktosl = gs_accit-ktosl
IMPORTING
e_bschs = ld_bschs
e_bschh = ld_bschh
e_umskz = ld_umskz
EXCEPTIONS
error_message = 1.
As max pointed out, it is dependent on the transaction key(KTOSL).
Srinivas
Maybe you are looking for
-
SP 2013 Development - How can I Simulate Different Devices to Help Design and Test a New UI?
Hello Community! I am working with SharePoint 2013 and I need to be able to design and test a new design across multiple device browsers. Does anyone know how to simulate a device browser for design and testing? BTW, I know about Device Channels, a
-
FI/accounting document tab not working in migo or mb03
Dear Experts, In our test server the accounting entries are not showing when we are trying to check those through MIGO(display) or mb03 by clicking FI document tab. Although all are valuated entries, what could be the reason, message is coming "No su
-
End user receving same mail , twice in a day .
Hi, Throu this report , i am sending mail to a user. I the scheuld this program as background job. But My problem is end user receving same mail twice a day.I am sure , Program is executed onces in day. Plz help me to solve the problem REPORT zplm00
-
Difference between Cash Counter and Cash Journal
Hi All, Please tell me what is the difference between Cash Counters, Cash Journal And Cash Book. How can we use all of these in SAP FI? Please revert asap. Thank You
-
How to make full use of Apple iCloud
As a MacOS X 10.7 (Lion) and iOS 5 user, I have free access to Apple's iCloud services. I have used iCloud successfully in rural Georgia under Windstream DSL but I find no mention of iCloud in my search of the Verizon support forums. As I plan to m