SAP ERP: what is the difference between 'document type' and 'posting key' - sap-erp

I am new to SAP ERP and its tables. While studying the tables I decided to look for 'vendor invoice' transactions. I looked up the document type KR ("[vendor invoice][1]") in the BKPF table and used that to identify the documents I wanted in the BSEG table. But a colleague suggested that I should be looking for documents in the BSEG table with posting key of 31 ("[vendors invoices][2]").
The two approaches give different results. The definitions of the posting key and document type made me think they were the same thing. It appears they aren't the same so what is the difference?
Additional Info:
To clarify the preceding, these are some associations within the BSEG table:
subset of transaction codes associated with posting key tcode==31 in the SAP BSEG table
F110 Parameters for Automatic Payment
FB01 Post Document
FB05 Post with Clearing
FB08 Reverse Document
FB1D Clear Customer
FB1K Clear Vendor
FB1S Clear G/L Account
FB60 Enter Incoming Invoices
FB65 Enter Incoming Credit Memos
FBB1 Post Foreign Currency Valn
FBD5 Realize Recurring Entry
FBVB Post Parked Document
KO88 Actual Settlement: Order
MIRO Enter Invoice
MR8M Cancel Invoice Document
VF01 Create Billing Document
VF02 Change Billing Document
document types associated with posting key tcode==31 in the SAP BSEG table
AA Asset posting
AB Accounting Document
AN Net asset posting
DR Customer Invoice
JE Journal Entry
KA Vendor document
KG Vendor Credit Memo
KN Net vendors
KR Vendor Invoice
RE Invoice Receipt/ Gross
RN Invoice – net
RV Billing document transfer
SA G/L Account Document
SU Adjustment document```
[1]: https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/3cb1182b4a184bdd93f8d62e3f1f0741/7b47d153da7e4308e10000000a174cb4.html?version=2020.000
[2]: https://www.tutorialscampus.com/sap-fi/posting-keys.htm

Related

How to detect if a text is Person, Organization, or other entity using Spacy?

I have a csv records of sales, each record has column customer name. This column is a combination of persons name and organization name. How can I use spacy to detect if a this column is a person or organization?
This is a 'Named Entity Recognition' task. Spacy has a pretty good documentation:
doc = nlp(u'Apple is looking at buying U.K. startup for $1 billion')
for ent in doc.ents:
print(ent.text, ent.start_char, ent.end_char, ent.label_)
Apple 0 5 ORG

Register custom audit events for billing

We are running a custom app on Invantive Data Access Point which adds business functionality to Exact Online. For billing purposes, we would like to somehow register actual use of the software as defined in business terms instead of memory used, CPU, SQL statements executed, etc.
We do not yet have custom tables and I would like to keep it that way, so the whole state is kept in memory and in Exact Online only. So "insert into mytable#sqlserver..." is not an option. Neither does Exact Online offer the possibility to create custom tables as with Salesforce.
How can we somehow register billable events, such as "Performed an upload of 8 bank transactions" under this condition?
For billing purposes, you can lift along on the Customer Service infrastructure, which is similar to functionality offered by AWS or Apple for this purpose in their eco system. The "table" which stores the billing events like a Call Detail Record of a PBX is managed by Customer Service infrastructure.
There are two options:
Your apps use the default audit and license event registrations like "User logged on", "First use of partition #xyz", etc. each with a specific message code like 'itgenlic125'.
Your apps define their own event types like "Performed an upload of bank transactions", with a message code 'mybillingmessagecode123' and the number '8' as quantity in the natural key.
The first option is automatically and always done. These data is also used to manage resource consumption and detect runaways.
The second option is best done using Invantive SQL with the data dictionary table "auditevents". All records inserted into auditevents are automatically asynchronously forwarded to Customer Service. To see the current register audit events since start of application:
select *
from auditevents#datadictionary
where:
occurrence_date: when it happened.
logging_level: always "Audit".
message_code: code identifying the type of event.
data_container_d: ID of the data container, used with distributed SQL transactions.
partition: partition within the data container for platforms such as Exact Online or Microsoft SQL Server which store multiple databases under one customer/instance.
session_id: ID of the session.
user_message: actual text.
last_nk: last used natural key
application_name: name of the appplication.
application_user: user as known to the application.
gui_action: action within the GUI.
And some auditing and licensing information fields.
To register a custom event:
insert into auditevents#datadictionary select * from auditevents#datadictionary
Only some fields can be provided; the rest are automatically determined:
message_code
user_message
last_natural_key
application_name
application_user
gui_action
gui_module
partition
provider_name
reference_key
reference_table_code
session_id
To receive the billing events yourself from the infrastructure, you will need to access the Customer Service APIs or have them automatically forwarded to mail, Slack, RocketChat or Mattermost channel.
A sample SQL:
insert into auditevents#datadictionary
( message_code
, user_message
, last_natural_key
, application_name
, gui_action
, gui_module
, reference_key
, reference_table_code
, partition
)
select 'xxmycode001' message_code
, 'Processed PayPal payments in Exact Online for ' || divisionlabel user_message
, 'today' last_natural_key
, 'PayPalProcessor' application_name
, 'xx-my-paypal-processor-step-2' gui_action
, 'xx-my-payal-processor' gui_module
, clr_id reference_key
, 'clr' reference_table_code
, division partition
from settings#inmemorystorage

Database Table Design guidance

I am creating a table of pilots with the following fields, would there be any advantage to breaking the table down at each category shown into separate tables and link via the pilots primary key in a one to one relationship?
PILOT PROFILE
username
password
BASIC INFO
first_name
last_name
email
date_of_birth
address_line1
address_line2
town_city
county
postcode
country
tel_no
mobile_no
MEDICAL INFO
med_class
med_issued
med_special
med_verified
med_verified_date
med_verified_by
LICENCE INFO
licence_number
licence_type
licence_tailwheel
licence_retractableGear
licence_vpProp
licence_turboCharged
licence_cabinPressurisation
licence_sep_L
licence_sep_S
licence_mep_L
licence_mep_S
licence_tmg
licence_night
licence_imc
licence_ir
licence_fi
licence_fe
licence_other
licence_verified
licence_verified_date
licence_verified_by
FLIGHT EXPERIENCE
home_airport
hours_total
hours_pic
hours_in12months
hours_verified
hours_verified_date
hours_verified_by
PAYMENT
paid_date
No. Don't break up the row data in this context.
For reasons of performance at scale, sometimes it makes sense to break a table 1:1 into other tables, but given the information provided, this will absolutely not be necessary.
However, on a per-query basis, please do SELECT only the fields needed. Meaning: instead of using SELECT * at whim, use something like SELECT username, password FROM pilot. Side note: don't store your passwords clear text :)

Exchange EWS Calendar AppointmentState

I am using EWS against Exchange 2010 SP1.
I am trying to retrieve a list of appointments that have been neither accepted or declined. I thought AppointmentState may be the field i was looking for, but this does not seem to be the correct field (see links), does anyone know where i can find if a appointment has been accepted or declined?
AppointmentState
[http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.appointment_members(v=exchg.80).aspx]
AppointmentState Definition
[http://msdn.microsoft.com/en-us/library/aa564700(v=exchg.140).aspx]
after further research it appears that this is not the field you need to look at. the RequiredAttendee sand OptionalAttendees collections is where it's at, as detailed here:
EWS-manged: Fetch required and optional attendees of appointments
You can check whether the appointment was accepted or declined in the MyResponseType poperty.
This will have one of the following values:
Unknown - Response status is unknown
Organizer - The item owner is the meeting organizer
Tentative - The item owner accepted tentatively
Accept - The item owner accepted
Decline - The item owner declined
NoResponseReceived - The item owner did not yet respond to the invitation
The values are explained a little better in the documentation of the property in the EWS managed API documentation.

Access Audit Inspection + History block!

Objective:
- electronic form which displays 45 inspection points (rarely changes)
- 3 additional columns
- Rating (0, 1, 2)
- CorrectiveAction (Immediate, SOP, WO)
- Notes
- Maintain inspection history
- inspection date, production line inspected, production shift-crew inspected
Tables:
- Employee (empID (auto#), FName, LName, Shift, Line)
- Audit Facts (ID#, textdescrip) tried with and without autonumber
- Audit Details (auditID (auto#), auditdate, rating, action, notes) *(rating/action combobox)
A subform in a form has the 45 check points all tied to the Audit number. However, I cannot get the audit results to record, store and move into history.
every attempt i've made produces an audit number PER each 45 checkpts, as opposed to
Audit Date
AuditID(auto#)
AuditFact (list of 45 chckpts)
results
Audit1, 10/02/2010 ->
*AuditPt Rate Action*
IF1 0 WO
IF2 2 SOP
...
IF45 1 Immediate
Audit2, 12/15/2010 ->
*AuditPt Rate Action*
IF1 1 WO
IF2 0 SOP
...
IF45 0 Immediate
Get your tables right & your forms will follow.
The original question isn't entirely clear, but I think I got these points:
An "Audit" is the same as an "Inspection"
The collection of 45 "inspection points" constitutes an Audit (not each one individually).
"Ratings" and "Actions" apply to each inspeciton point.
So your tables want to be more like this:
Audit
AuditId (can be autonumber, or not...)
AuditDate
AuditItem
AuditItemId (can be autonumber, or not...)
AuditId (FK from Audit)
InspPoint (e.g., the "IF1" from the "result" sample, or--better--an FK to it another table)
Rating
Action (Or--better--an FK to it another table)
Table "Employee" seems entirely irrelevant to this strucure.
Note that each Insection Point has its own row in AuditItem, for each Audit, and that those rows also carry the AuditID from Audit, which lets you pull them all together to make you output.
Hopefully this will make sense--if it doesn't, I recommend reviewing fundamental relational database design.