Sie sind auf Seite 1von 432

KGS Activator for SAP R/3

Reference Guide

Version 01.77 19 May 2011

KGS ACTIVATOR FOR SAP R/3 ...................................................................................................................... 1 VERSION 01.77 .................................................................................................................................................... 1 1 GENERAL ..................................................................................................................................................... 6 1.1 SAMPLE FORMS-PROCESSING .................................................................................................................. 6 1.1.1 Scenario Late Archiving .................................................................................................................. 7 1.1.2 Scenario Early Archiving (external Image Source) ........................................................................ 9 1.1.3 Invoice posting in background ...................................................................................................... 11 2 INSTALLATION ........................................................................................................................................ 13 2.1 KGS ACTIVATOR COM OBJECT ............................................................................................................ 13 2.1.1 Configuration ................................................................................................................................ 13 2.1.2 INI-File.......................................................................................................................................... 13 2.2 KGS ACTIVATOR JAVA INTERFACE ..................................................................................................... 15 2.2.1 Sample INI File with access to 1 SAP System ............................................................................... 17 2.2.2 Sample INI File direct Archive System configurartion ................................................................. 17 2.2.3 Sample INI File with multiple Configurations (depending on Configuration-ID) ........................ 18 2.3 SAP SOFTWARE (RELEASE 4.0B)........................................................................................................... 19 2.3.1 Adding KGS functionality.............................................................................................................. 19 2.3.2 ArchiveLink Customizing for ContentRepositories ....................................................................... 21 2.3.3 SAP Customizing for Early Archiving (with data exchange) ........................................................ 23 2.3.4 Customizing for invoice processing with transaction MR1M........................................................ 34 2.3.5 Business Case for scenario Early Storing for subsequent entry ............................................... 48 2.3.6 Supported Index-Fields ................................................................................................................. 53
2.3.6.1 2.3.6.2 2.3.6.3 2.3.6.4 Transaction MRHR ................................................................................................................................... 53 Transaction MR1M ................................................................................................................................... 55 Transaction MR1G .................................................................................................................................... 57 Transaction F-63........................................................................................................................................ 59

2.4 SAP SOFTWARE (RELEASE 4.6C)........................................................................................................... 64 2.4.1 Adding KGS functionality.............................................................................................................. 64 2.4.2 ArchiveLink Customizing for ContentRepositories ....................................................................... 66 2.4.3 SAP Customizing for Early Archiving (with data exchange) ........................................................ 68 2.4.4 Customizing for invoice processing with transaction FB60 .......................................................... 79
2.4.4.1 Business Case for scenario Early Storing for subsequent entry ............................................................. 92

2.4.5
2.4.5.1

Customizing for invoice processing with transaction MIRO ......................................................... 97


Business Case for scenario Early Storing for subsequent entry ........................................................... 109

2.4.6
2.4.6.1 2.4.6.2 2.4.6.3 2.4.6.4 2.4.6.5 2.4.6.6 2.4.6.7 2.4.6.8 2.4.6.9 2.4.6.10 2.4.6.11

Supported Index-Fields ............................................................................................................... 112


Transaction F-43...................................................................................................................................... 112 Transaction F-47...................................................................................................................................... 117 Transaction FB60 .................................................................................................................................... 120 Transaction FV60 .................................................................................................................................... 132 Transaction FB70 .................................................................................................................................... 143 Transaction FBV0 ................................................................................................................................... 150 Transaction MIRO ................................................................................................................................... 151 Transaction MIR7 .................................................................................................................................... 160 Transaction MIR4 .................................................................................................................................... 168 Transaction MIRA .............................................................................................................................. 169 Transaction FBV1 ............................................................................................................................... 172

2.5 SAP SOFTWARE (RELEASE 4.7 OR HIGHER) ......................................................................................... 177 2.5.1 Adding KGS functionality............................................................................................................ 177 2.5.2 ArchiveLink Customizing for ContentRepositories ..................................................................... 179 2.5.3 SAP Customizing for Early Archiving (with data exchange) ...................................................... 181 2.5.4 Customizing for invoice processing with transaction FB60 ........................................................ 192
2.5.4.1 Business Case for scenario Early Storing for subsequent entry ........................................................... 206

2.5.5
2.5.5.1

Customizing for invoice processing with transaction MIRO ....................................................... 210


Business Case for scenario Early Storing for subsequent entry ........................................................... 223

2.5.6
2.5.6.1 2.5.6.2 2.5.6.3

Supported Index-Fields ............................................................................................................... 226


Transaction F-43...................................................................................................................................... 226 Transaction F-47...................................................................................................................................... 231 Transaction FB60 .................................................................................................................................... 234

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 2/432

2.5.6.4 2.5.6.5 2.5.6.6 2.5.6.7 2.5.6.8 2.5.6.9 2.5.6.10 2.5.6.11 2.5.6.12

Transaction F-90 / F-92 ........................................................................................................................... 246 Transaction FV60 .................................................................................................................................... 251 Transaction FB70 .................................................................................................................................... 263 Transaction FBV0 ................................................................................................................................... 270 Transaction MIRO ................................................................................................................................... 272 Transaction MIR7 .................................................................................................................................... 281 Transaction MIR4 ............................................................................................................................... 289 Transaction FBV1 ............................................................................................................................... 290 Transaction MIRA .............................................................................................................................. 295

2.6 ABAP SAMPLES / EXITS ...................................................................................................................... 299 2.6.1 Userexit ....................................................................................................................................... 299 2.6.2 SAP Workflow programming ...................................................................................................... 302 3 KGS ACTIVATOR COM CLASSES ..................................................................................................... 303 3.1 TLFIELDLIST (SAPALINKCOM. TLFIELDLIST) ...................................................................................... 303 3.1.1 Methods ....................................................................................................................................... 303
3.1.1.1 3.1.1.2 3.1.1.3 3.1.1.4 3.1.1.5 3.1.1.6 3.1.1.7 3.1.1.8 Function AddField ................................................................................................................................... 303 Function AddFieldsFromString ............................................................................................................... 303 Function GetCount .................................................................................................................................. 303 Function GetFieldValue .......................................................................................................................... 303 Function CreateString .............................................................................................................................. 303 Function RemoveAll ............................................................................................................................... 304 Function RemoveField ............................................................................................................................ 304 Function LoadString ................................................................................................................................ 305

3.2 RWDATA (SAPALINKCOM. RWDATA) ................................................................................................. 306 3.2.1 Methods ....................................................................................................................................... 306
3.2.1.1 3.2.1.2 3.2.1.3 3.2.1.4 3.2.1.5 3.2.1.6 3.2.1.7 3.2.1.8 Function AddString ................................................................................................................................. 306 Function GetCount .................................................................................................................................. 306 Function GetFirstString ........................................................................................................................... 306 Function GetLastString............................................................................................................................ 306 Function GetNextString ........................................................................................................................... 306 Function GetPrevString ........................................................................................................................... 306 GetString(short Index) ............................................................................................................................. 306 RemoveAll() ............................................................................................................................................ 306

3.3 DOCCONTAINER (SAPALINKCOM. DOCCONTAINER) .......................................................................... 307 3.3.1 Methods ....................................................................................................................................... 307
3.3.1.1 3.3.1.2 3.3.1.3 3.3.1.4 3.3.1.5 Function AddDocument .......................................................................................................................... 307 Function RemoveAll ............................................................................................................................... 307 Function RemoveDocument .................................................................................................................... 307 Function GetCount .................................................................................................................................. 307 Function GetDocumentAt........................................................................................................................ 308

3.4 SAPSYS (SAPALINKCOM.SAPSYS) .................................................................................................... 309 3.4.1 Methods ....................................................................................................................................... 309


3.4.1.1 Function Open ......................................................................................................................................... 309 3.4.1.2 Function ActivitiyCreateCRM................................................................................................................. 310 3.4.1.3 Function ArchiveConnectionsGet............................................................................................................ 311 3.4.1.4 Function CallUsrFct ................................................................................................................................ 312 3.4.1.5 Function CallUsrFctDocContainer .......................................................................................................... 317 3.4.1.6 Function CallUsrFctDocRelease.............................................................................................................. 323 3.4.1.7 Function CompanyCodeGetList .............................................................................................................. 327 3.4.1.8 Function CompanyCodeGetDetail ........................................................................................................... 327 3.4.1.9 Function DocumentBarcodeSend ............................................................................................................ 328 3.4.1.10 Function DocumentAttach .................................................................................................................. 329 3.4.1.11 Function DocumentPost ...................................................................................................................... 330 3.4.1.12 Function DocumentPostExt................................................................................................................. 332 3.4.1.12.1 Example: Incoming Invoice ............................................................................................................. 338 3.4.1.12.2 Example: Incoming Invoice in Foreign Currency, Goods-Receipt-Based Invoice Verification and Tax Information 339 3.4.1.12.3 Example: Incoming Invoice for Blanket Purchase Order ................................................................. 340 3.4.1.12.4 Example: Change Account Assignments and Add Unplanned Assignments ................................... 341 3.4.1.12.5 Example: Invoice with Planned Delivery Costs ............................................................................... 342 3.4.1.12.6 Example: Incoming Invoice with Withholding Tax ......................................................................... 344 3.4.1.12.7 Example: Incoming Invoice with Amount Split ............................................................................... 344

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 3/432

3.4.1.12.8 3.4.1.13 3.4.1.14 3.4.1.15 3.4.1.16 3.4.1.17 3.4.1.18 3.4.1.19 3.4.1.20 3.4.1.21 3.4.1.22 3.4.1.23 3.4.1.24 3.4.1.25 3.4.1.26 3.4.1.27

Example: Invoice for Ext. Services and Service-Based Invoice Verification................................... 345 Function DuplicateInvoiceCheck ........................................................................................................ 349 Function InvoicePost ........................................................................................................................... 350 Function PostingDateCheck ................................................................................................................ 352 Function PostingPeriodGetDetail ........................................................................................................ 352 Function SAPObjDelete ...................................................................................................................... 353 Function SAPObjGetDetail ................................................................................................................. 354 Function SAPObjRelease .................................................................................................................... 357 Function SetGlobalOptions ................................................................................................................. 358 Function VendorGetDetail .................................................................................................................. 358 Function VendorFind .......................................................................................................................... 359 Function PurchaseOrderGetDetail....................................................................................................... 361 Function PurchaseOrderFind............................................................................................................... 364 Function WorkItemCreate ................................................................................................................... 365 Function WorkItemCreateData ........................................................................................................... 367 Function Close .................................................................................................................................... 369

3.4.2

Methods Addons ......................................................................................................................... 370

3.4.2.1 Process Control Center ............................................................................................................................ 370 3.4.2.1.1 PCCEntryCreate ................................................................................................................................. 370 3.4.2.1.2 PCCEntryUpdate................................................................................................................................ 371 3.4.2.1.3 PCCEntryDelete ................................................................................................................................. 372 3.4.2.1.4 PCCEntrySearch ................................................................................................................................ 372

3.5 ARCHSYS (SAPALINKCOM.ARCHSYS)............................................................................................. 373 3.5.1 Methods ....................................................................................................................................... 373


3.5.1.1 3.5.1.2 3.5.1.3 3.5.1.4 3.5.1.5 Function Open ......................................................................................................................................... 373 Function DocumentArchiv ...................................................................................................................... 373 Function DocumentDelete ....................................................................................................................... 375 Function GetLastErrorMsg ...................................................................................................................... 375 Function Close ......................................................................................................................................... 375

KGS ACTIVATOR JAVA CLASSES..................................................................................................... 376 4.1 ARCHSYS (PACKAGE COM.KGS.ACTIVATOR) ................................................................................... 376 4.1.1 Constructor ................................................................................................................................. 376
4.1.1.1 4.1.1.2 ARCHSYS() ............................................................................................................................................ 376 ARCHSYS(CFGParam CFGP[])............................................................................................................. 376

4.1.2
4.1.2.1 4.1.2.2 4.1.2.3 4.1.2.4 4.1.2.5 4.1.2.6 4.1.2.7 4.1.2.8 4.1.2.9 4.1.2.10 4.1.2.11 4.1.2.12 4.1.2.13 4.1.2.14 4.1.2.15 4.1.2.16 4.1.2.17

Methods ....................................................................................................................................... 376


Function open .......................................................................................................................................... 376 Function configurationSet ....................................................................................................................... 376 Function documentArchive ..................................................................................................................... 376 Function documentDelete ........................................................................................................................ 377 Function documentKeysSet ..................................................................................................................... 377 Function documentRetrieve ..................................................................................................................... 377 Function componentArchive ................................................................................................................... 378 Function componentArchive ................................................................................................................... 378 Function componentDelete ...................................................................................................................... 379 Function componentExists .................................................................................................................. 379 Function componentIdsGet ................................................................................................................. 379 Function componentMimeTypeGet..................................................................................................... 380 Function componentRetrieve .............................................................................................................. 380 Function componentRetrieve .............................................................................................................. 381 Function componentSize ..................................................................................................................... 381 Function generateUniqueDocID.......................................................................................................... 381 Function close ..................................................................................................................................... 381

4.2 CFGPARAM (PACKAGE COM.KGS.ACTIVATOR) .................................................................................. 382 4.2.1 Constructor ................................................................................................................................. 382
4.2.1.1 CFGParam(String sSection, String sName, String sValue) .................................................................... 382

4.2.2
4.2.2.1 4.2.2.2 4.2.2.3 4.2.2.4 4.2.2.5 4.2.2.6

Methods ....................................................................................................................................... 382


Function getSection ................................................................................................................................. 382 Function getName() ................................................................................................................................. 382 Function getValue() ................................................................................................................................. 382 Function setSection ................................................................................................................................. 382 Function setName .................................................................................................................................... 382 Function setValue .................................................................................................................................... 382

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 4/432

4.3 INTERFACES (PACKAGE COM.KGS.ACTIVATOR) .................................................................................. 383 4.3.1 ProgessListener ........................................................................................................................... 383 THIS INTERFACE REPORTS THE PROCESSING STATUS OF A FUNCTION CALL...................... 383
4.3.1.1 Methods ................................................................................................................................................... 383 4.3.1.1.1 update ................................................................................................................................................. 383

PARAMETER: ................................................................................................................................................. 383 4.4 SAMPLES JAVA CODE ......................................................................................................................... 384 4.4.1 Storing a PDF document ............................................................................................................. 384 4.4.2 Retrieving a PDF document ........................................................................................................ 384 4.4.3 Storing a document with two components ( 2 TIF files) ............................................................. 385 4.4.4 Retrieving compoents from a document ...................................................................................... 385 4.4.5 Creating Workitem for FB60....................................................................................................... 386 4.4.6 Reading PurchaseOrder .............................................................................................................. 387 4.4.7 Posting with DocumentPostExt ................................................................................................... 388 5 APPENDIX ................................................................................................................................................ 390 5.1 TESTING AVAILABILITY ARCHIVE SYSTEM ........................................................................................... 390 5.1.1 HTTP ContentServer ................................................................................................................... 390
5.1.1.1 5.1.1.2 Connection test HTTP ContentServer ..................................................................................................... 390 Function test HTTP ContentServer.......................................................................................................... 393

TRANSACTION SE38 ..................................................................................................................................... 393 F8 (EXECUTE) ................................................................................................................................................. 393 ALL LIGHTS MUST BE GREEN .................................................................................................................. 395 5.1.2
5.1.2.1

RFC Server (ArchiveLink 3.1) ..................................................................................................... 396


Connection test RFC Server .................................................................................................................... 396

TRANSACTION SM59 .................................................................................................................................... 397 5.2 WORKFLOW TEST (ARCHIVELINK STANDARD) .................................................................................... 400 5.2.1 Customizing Content Repository protocol................................................................................... 400 TRANSACTION: OAC0 .................................................................................................................................. 400 5.2.2 Customizing Doctype................................................................................................................... 414

TRASNACTION: OAD5 .................................................................................................................................. 414 5.2.3 Test scenario ............................................................................................................................... 425

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 5/432

General

KGS Activator for SAP R/3 provides connectivity to SAP R/3 Systems (for e.g validating data against SAP) and SAP ArchiveLink 4.5 certified Archive Systems.

1.1

Sample Forms-Processing

Following the OCR process the captured data can be validated against the SAP System to ensure the value and integrity of all information captured. After the forms processing, the image files and text information will hand over to the KGS SAP Activator. Together with the reference to the archived document (ContentRepository-ID / Doc ID) the KGS SAP Activator creates a Workitem in the SAP Business Workflow. With selection of the Workitem in the SAP Business Workflow, the user will get the document and the prefilled booking mask of the corresponding transaction on the screen.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 6/432

1.1.1

Scenario Late Archiving

VB Sample for creating the Workflow with text Information and archiving the image file Dim Dim Dim Dim Dim Dim Set Set Set Set myArchive As Object mySAP As Object myFList As Object myItemData As Object RetCode as Integer sHeaderP As String myFList = CreateObject("sapalinkcom.TLFieldList") myArchive = CreateObject("sapalinkcom.ARCHSYS") mySAP = CreateObject("sapalinkcom.SAPSYS") myItemData = CreateObject("sapalinkcom.RWData")

Create Headerdatastring myFList.AddField "VENDOR_NO", sVendorNo myFList.AddField "INVOICE_NO", sInvoiceNo myFList.AddField "INVOICE_DATE", sInvoiceDate myFList.AddField "AMOUNT", sAmount . sHeaderP=myFList.CreateString Create ItemData myFList.RemoveAll myFlist.AddField ACCOUNT,113109 myFlist.AddField AMOUNT, sAmount1

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 7/432

myItemData.AddString myFlist.CreateString myFList.RemoveAll myFlist.AddField ACCOUNT,113110 myFlist.AddField AMOUNT, sAmount2 myItemData.AddString myFlist.CreateString RetCode = myArchive.Open("KGS", "Demo", "1.00") If RetCode <> 0 then MsgBox myArchive.GetLastErrorMsg() End If If RetCode = 0 then RetCode = mySAP.Open("KGS", "Demo", "1.00") If RetCode <> 0 then MsgBox mySAP.GetLastErrorMsg() End If End If

If RetCode = 0 then RetCode = myArchive.DocumentArchive(sConfigID, sArchivContentRepID, FileName, "FAX", soutDocID) If RetCode = 0 then SArchiveDocID = soutDocID Else MsgBox myArchive.GetLastErrorMsg() End If End If If RetCode = 0 then RetCode = mySAP.WorkItemCreateData(sConfigID, sArchivContentRepID, sArchiveDocID, "",FAX, sHeaderP ,myItemData).

If RetCode <> 0 then MsgBox mySAP.GetLastErrorMsg() MyArchive. DocumentDelete(sConfigID, sArchivContentRepID, sArchiveDocID) End If End If

myArchive.Close () mySAP.Close ()

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 8/432

1.1.2

Scenario Early Archiving (external Image Source)

VB Sample for creating the Workflow with text Information Dim Dim Dim Dim Dim mySAP As Object myFList As Object myItemData As Object RetCode as Integer sHeaderP As String

Set myFList = CreateObject("sapalinkcom.TLFieldList") Set mySAP = CreateObject("sapalinkcom.SAPSYS") Set myItemData = CreateObject("sapalinkcom.RWData") Create Headerdatastring myFList.AddField "VENDOR_NO", sVendorNo myFList.AddField "INVOICE_NO", sInvoiceNo myFList.AddField "INVOICE_DATE", sInvoiceDate myFList.AddField "AMOUNT", sAmount . sHeaderP=FList.CreateString Create ItemData myFList.RemoveAll myFlist.AddField ACCOUNT,113109 myFlist.AddField AMOUNT, sAmount1 myItemData.AddString myFlist.CreateString myFList.RemoveAll myFlist.AddField ACCOUNT,113110

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 9/432

myFlist.AddField AMOUNT, sAmount2 myItemData.AddString myFlist.CreateString If RetCode = 0 then RetCode = mySAP.Open("KGS", "Demo", "1.00") If RetCode <> 0 then MsgBox mySAP.GetLastErrorMsg() End If End If If RetCode = 0 then RetCode = mySAP.WorkItemCreateData(sConfigID, sArchivContentRepID, sArchiveDocID, "",FAX, sHeaderP ,myItemData, soutInvoiceInfo).

If RetCode <> 0 then MsgBox mySAP.GetLastErrorMsg() End If End If

myArchive.Close () mySAP.Close ()

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 10/432

1.1.3

Invoice posting in background

If the posting fails then we create a workflow. VB Sample: dark invoice posting and if it fails create a workitem

Dim myArchive As Object Dim mySAP As Object Dim myFList As Object Dim myItemData As Object Dim RetCode As Integer Dim sHeaderP As String Dim sConfigID As String Dim sArchivContentRepID As String Dim sImageFile As String Dim soutDocID As String Dim sArchiveDocID As String Dim soutInvoiceInfo As String sConfigID = "MR1M" sArchivContentRepID = "T1" sImageFile = "D:\tiff\invoice.tif" Set myFList = CreateObject("sapalinkcom.TLFieldList") Set myArchive = CreateObject("sapalinkcom.ARCHSYS") Set mySAP = CreateObject("sapalinkcom.SAPSYS") Set myItemData = CreateObject("sapalinkcom.RWData")

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 11/432

'Create Headerdatastring myFList.AddField "TRANSACTION", "MR1M" myFList.AddField "COMP_CODE", "1000" myFList.AddField "INVOICE_DATE", "20040108" myFList.AddField "POSTING_DATE", "19971208" myFList.AddField "AMOUNT", "1450" myFList.AddField "INVOICE_NO", "Ref 123" myFList.AddField "TAX_CALC", "X" sHeaderP = myFList.CreateString 'Create ItemData myFList.RemoveAll myFList.AddField "PO_NUMBER", "4500004363" myItemData.AddString myFList.CreateString RetCode = myArchive.Open("KGS", "Demo", "1.00") If RetCode <> 0 Then MsgBox myArchive.GetLastErrorMsg() End If If RetCode = 0 Then RetCode = mySAP.Open("KGS", "Demo", "1.00") If RetCode <> 0 Then MsgBox mySAP.GetLastErrorMsg() End If End If If RetCode = 0 Then RetCode = myArchive.DocumentArchive(sConfigID, sArchivContentRepID, sImageFile, "TIF", soutDocID) If RetCode = 0 Then sArchiveDocID = soutDocID Else MsgBox myArchive.GetLastErrorMsg() End If End If If RetCode = 0 Then RetCode = mySAP.InvoicePost(sConfigID, sArchivContentRepID, sArchiveDocID, "", "FAX", sHeaderP, myItemData, soutInvoiceInfo) If RetCode = 0 Then MsgBox soutInvoiceInfo, vbOKOnly, "InvoicePost okay" Else MsgBox mySAP.GetLastErrorMsg(), vbOKOnly, "InvoicePost failed" RetCode = mySAP.WorkItemCreateData(sConfigID, sArchivContentRepID, sArchiveDocID, "", "FAX", sHeaderP, myItemData) If RetCode = 0 Then MsgBox "Workitem sucessful created", vbOKOnly, "WorkItemCreateData" Else MsgBox mySAP.GetLastErrorMsg(), vbOKOnly, "WorkItemCreateData failed" End If End If End If myArchive.Close mySAP.Close

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 12/432

Installation

2.1

KGS Activator COM Object

For installation, please start program Setup.exe and follow the instructions of the installation program.

2.1.1 2.1.2

Configuration INI-File

Configuration parameters are stored in the SapalinkCOM.ini file at the Windows folder. Following parameters are available Typ [SAPALINKCOM] DebugLevel Value Description Default

Integer

0 1 8

Log-File Log-Mode

String Integer

Log-ModeScreen

Integer

1 2 4 0

1 2 4 [CONFIG-xxxxxxxx]

SAP-Client SAP-Username SAP-Password

String String String

SAP-Hostname SAP-SystemNo SAP-GatewayHost SAP-GatewayService SAP-ArObj SAP-Codepage ARCH-MODE

String Integer String String String String Integer

Debugmode off 0 Open Log Window Functiontest without access to a SAP R/3 System. In this case all functions return values are read from file sapalinkcomdebug.ini (must be present in Windows Directory) logfile Logging mode. It can be a combination of the following values Log errors Log debug strings Log info strings Logging mode for the Log Window. It can be a combination of the following values Log errors Log debug strings Log info strings xxxxxxxxx = Config-ID (parameter set in relationship with Functionparameter Config-ID) SAP Clientnumber SAP Username SAP Passwort (After change of the password, the Activator will encode the password at the next access). Name or IP Address SAP Server SAP Systemno. Name or IP address SAP Gateway SAP Gateway Service SAP ArchiveLink Documentclass character code page Default 1100 ArchiveLink 4.5 ContentServer

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 13/432

2 CON-Mode CON-Mode Integer 0 1

ArchiveLink 3.1 RFC-Server Default RFC Extended RFC-Mode. In dependence of the SAP release it can be required to activate this mode. Especially if you use function InvoicePost and get system errors like CTLN_ERROR or The transaction was terminated by user Addition Headerdaten (Syntax |KEYNAME=KEYVALUE|

SAPGUI must be installed on the machine SAPGUI must be installed on the machine

AdditonalData-HDR

String

Adds specified key to Headerdata line WFLM=1 -> Use this Key, if Invoicedata not appear in Workflow with FB60.

Example: [Default] SAP-Client=800 SAP-UserName=root SAP-Password=maximal SAP-Hostname=SAPSERVER SAP-SystemNo=0 SAP-GatewayHost= SAP-GatewayService= SAP-Language= SAP-ArObj=ZFIINVOIC

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 14/432

2.2

KGS Activator JAVA Interface

Configuration parameters are stored in the KGSActivator.ini file at the current working directory. Following parameters are available Typ [KGSActivator] DebugLevel Value Description Default

Integer

0 1 8

Log-File Log-Mode

String Integer

Log-ModeScreen

Integer

1 2 4 0

1 2 4 LK [CONFIG-xxxxxxxx]

SAP-Client SAP-Username SAP-Password

String String String

SAP-Hostname

String

SAP-SystemNo SAP-Group

Integer String

SAP-System

SAP-GatewayHost SAP-GatewayService

String String

Debugmode off 0 Open Log Window Functiontest without access to a SAP R/3 System. In this case all functions return values are read from file sapalinkcomdebug.ini (must be present in Windows Directory) logfile Logging mode. It can be a combination of the following values Log errors Log debug strings Log info strings Logging mode for the Log Window. It can be a combination of the following values Log errors Log debug strings Log info strings Licensekey xxxxxxxxx = Config-ID (parameter set in relationship with Functionparameter Config-ID) SAP Clientnumber SAP Username SAP Passwort (After change of the password, the Activator will encode the password at the next access). Name or IP Address SAP Host. Depending on Parameter SAP-Group / SAP-System for RFC with load balancing. With load balacing Hostname MessageServer, without load balancing Hostname ApplicationServer. SAP Systemno. Name of the group of application servers. (If RFC connection with load balancing). Name of the SAP system. Use this param in connection with a load balanced RFC configuration in connection with the param SAPGroup. Name or IP address SAP Gateway SAP Gateway Service

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 15/432

SAP-ArObj SAP-Codepage ARCH-MODE

String String Integer

1 2 3 0 1

SAP ArchiveLink Documentclass character code page ArchiveLink 4.5 ContentServer ArchiveLink 3.1 RFC-Server direct access to an ContenServer Default RFC Extended RFC-Mode. In dependence of the SAP release it can be required to activate this mode. Especially if you use function InvoicePost and get system errors like CTLN_ERROR or The transaction was terminated by user Addition Headerdaten (Syntax |KEYNAME=KEYVALUE|

Default 1100 SAPGUI must be installed on the machine

CON-Mode CON-Mode

Integer

SAPGUI must be installed on the machine

AdditonalData-HDR

String

ARCHIVE-HTTPServerPort ARCHIVE-HTTPServer ARCHIVE-HTTPServerProg ARCHIVE-Security WorkDir

String String String Integer String 0 1

Server port ContenServer IP adresse or UNC Name ContenServer ContentServer Progname (ex. SAPALink/ContentServer) ArchiveLink Security disabled ArchiveLink Security enabled Directory for temporay files

Adds specified key to Headerdata line WFLM=1 -> Use this Key, if Invoicedata not appear in Workflow with FB60. if ARCH-MODE = 3 if ARCH-MODE = 3 if ARCH-MODE = 3

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 16/432

2.2.1

Sample INI File with access to 1 SAP System

Note: The connecting informations of the Archiving System will be read from the SAP configuartion [KGSActivator] DebugLevel = 1 Log-Mode = 7 Log-File =KGSActivator.log LK = SACOM-FD6177010016607A063399-55D9 [default] SAP-Client = 800 SAP-HostName = sapides47 SAP-UserName = MyCPICUser SAP-Password = Mypassword SAP-SystemNo = 0 SAP-GatewayHost = SAP-GatewayService = SAP-Language = EN SAP-ArObj = ZDMS_FB60 ARCH-Mode = 1

2.2.2

Sample INI File direct Archive System configurartion

[KGSActivator] DebugLevel = 1 Log-Mode = 7 Log-File =KGSActivator.log LK = SACOM-FD6177010016607A063399-55D9 [default] ARCH-Mode = 3 ARCHIVE-HTTPServer = 129.1.1.205 ARCHIVE-HTTPServerPort = 8079 ARCHIVE-HTTPServerProg = servlet/ContentServer

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 17/432

2.2.3

Sample INI File with multiple Configurations (depending on Configuration-ID)

[KGSActivator] DebugLevel = 1 Log-Mode = 7 Log-File =KGSActivator.log LK = SACOM-FD6177010016607A063399-55D9 [default] SAP-Client = 800 SAP-HostName = sapides47 SAP-UserName = MyCPICUser SAP-Password = Mypassword SAP-SystemNo = 0 SAP-GatewayHost = SAP-GatewayService = SAP-Language = EN SAP-ArObj = ZDMS_FB60 ARCH-Mode = 1 [DMS-Direct] ARCH-Mode = 1 ARCHIVE-HTTPServer = 129.1.1.205 ARCHIVE-HTTPServerPort = 8079 ARCHIVE-HTTPServerProg = servlet/ContentServer [W1_P11] SAP-Client = 800 SAP-HostName = vm47 SAP-UserName = root SAP-Password = maximal SAP-SystemNo = 00 SAP-Language = DE SAP-ArObj = ZDMSI_FB60 AdditonalData = ZDMS_MIRO [W2_Q12] SAP-Client = 800 SAP-HostName = 129.1.1.202 SAP-UserName = root SAP-Password = maximal SAP-SystemNo = 00 SAP-GatewayHost = SAP-GatewayService = SAP-Language = DE SAP-ArObj = ZDMSI_MIRO AdditonalData = ZDMS_MIRO

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 18/432

2.3

SAP Software (Release 4.0B)

Not all functions of the KGS Activator are supported with SAP Release 4.0B. If you plan to use SAP Release 4.0B, contact KGS for details. The SAP Modules are available as an SAP Transport and can be imported using the SAP Transport Management System.

2.3.1

Adding KGS functionality

To prepare your SAP system for the transport, please extract the provided ZIP file SAP40B_Vx_xx_KGSActivator.zip into the transport directory of the SAP Application Server (\sapmnt\trans\). In the subdirectories cofiles and data you should now find the files Kxxxxxx.XXX respectitly Rxxxxxx.XXX. In our example K900059.LS1 respectitly R900059.LS1. To add this transport to the SAPs Transport Management System, please start transaction STMS , press F5 for Import Overview and select the import queue for your target system by double clicking its queue name.

Now choose from the menu Extras -> Other requests -> Add and type specify the transport name as shown

Continue (Enter) and confirm the following screen to add this transport to the desired import queue

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 19/432

login with your transport user

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 20/432

The transport should now appear in the import queue

To start the import select the queue entry and press F9 to import the request. Please fill in the target client in the subsequent dialog (e. g. 800) and use default settings for the other options (Start date should be set to Immediate).

Continue (F8) to start the import procedure and confirm this by pressing Yes in the subsequent dialog.

The progress of the import procedure is shown in the status bar of the SAP GUI window. To finish the import may take several minutes, depending on the SAP environment.

2.3.2

ArchiveLink Customizing for ContentRepositories

As a preparation for the following ArchiveLink szenarios Early Archiving with SAP Business Workflow and Late Archiving with Barcode a ContentRepository where the images are stored (in an external Archiving solution) has to be customized using Transaction OAC0

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 21/432

RPC service/RFC field contains the reference to the communication definiton of the archive system (Transaction SM59) push button save (Ctrl-S)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 22/432

2.3.3

SAP Customizing for Early Archiving (with data exchange)

To enable the SAP environment for the ArchiveLink scenario Store for subsequent entry using the SAP Business Workflow a workflow document type has to be defined using transaction OAD5 Create a Workflowtask.(in our example we copy the Standard task TS00007869) Transaction PFTC

push button copy or press F8

press enter

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 23/432

put the task to your own development class or press Local object.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 24/432

Specify the agents for the new task Transaction PFTC

push button change or press F5

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 25/432

push button container def.

push button YES

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 26/432

push button create or press F5

push button No

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 27/432

press enter

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 28/432

push button back or press F3

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 29/432

Menu /Additional data/Agent assignment/Maintain

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 30/432

push button Attributes

push button Continue (Enter)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 31/432

push button back oder press F3

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 32/432

push button Save or press Ctrl-S

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 33/432

2.3.4

Customizing for invoice processing with transaction MR1M

To enable the SAP environment for the ArchiveLink scenario Store for subsequent entry using the SAP Business Workflow a workflow document type has to be defined using transaction OAD5

You can either use an existing Document Type (e. g. MMINVOICE) or create a new one. Please follow this example for details:

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 34/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 35/432

Specify a documenttype template if one is available.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 36/432

specify the technical document class

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 37/432

Specify the Workflow Task (in our sample TS80000011) an Methode for the Dataprocessing (Obj.Type ZKGS_B2081 for MM and Methode ZCreateWD).

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 38/432

Specify Transaction

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 39/432

In the following dialog please specify the ContentRepository where the documents should reside in (e. g. FI). Please see ArchiveLink Customizing (OAC0 [2.4.2]) for repositories for details.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 40/432

In the following screen you can specify the user/group/organiziation as the addressee for the work items. Please choose from the selection boxes the appropriate values. In the following example the USER ROOT will receive the created work items in his inbox.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 41/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 42/432

Press Done to finish with the Document type definition

push button complete

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 43/432

Link Document type ZDMSI_MRM1 to original SAP Business Object BUS2081 with Transaction oac3

push change button or press Crtl + F1

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 44/432

Mark line ZKGS_B2081 ZDMSI_MR1M and press F6

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 45/432

press Enter to link Document type ZDMSI_MR1M to original SAP Business Object BUS2081

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 46/432

Specify your SAP connection parameters in file SAPALINKCOM.INI (see also Section 3)
[Default] SAP-Client=800 SAP-UserName=XXXXX SAP-Password=XXXXXX SAP-HostName=SAPIDES40B SAP-SystemNo=0 SAP-GatewayHost= SAP-GatewayService= SAP-Language=DE SAP-ArObj=FIIINVOICE ARCH-Mode=1 [MR1M] SAP-ArObj=ZDMSI_MR1M

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 47/432

2.3.5

Business Case for scenario Early Storing for subsequent entry

Transaction SO01

push button Workflow

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 48/432

Simultate Scanning with KGS Activator Demo or use your Scanning Application for Archiving and creating SAP Workitems (Function WorkitemCreateData)

push buttonWorkitem

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 49/432

pushbutton refresh and mark line push button execute (CTRL F6)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 50/432

the image appears and following dialog

push button Process

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 51/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 52/432

2.3.6

Supported Index-Fields

2.3.6.1 Transaction MRHR

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 53/432

Headerdata SAP Fielddescription 1 Invoice date 2 DocType 3 Company code 4 Posting date 5 Currency 6 Document number 7 Reference 8 Doc.header text 9 Vendor 10 Invoice = 1 Creditmemo = 2 11 Amount 12 Tax amount 13 Tax Code 14 Calculate Tax 15 Text

SAP Screenfield
BKPF-BLDAT BKPF-BLART BKPF-BUKRS BKPF-BUDAT BKPF-WAERS BKPF-BELNR BKPF-XBLNR BKPF-BKTXT RM08R-KONTO RM08R-RECHN RM08R-GUTSC BSEG-WRBTR RM08R-WMWST1 RM08R-MWSKZ1 BKPF-XMWST BSEG-SGTXT

KGS Activator fieldname


INVOICE_DATE BLART COMP_CODE POSTING_DATE CURRENCY BELNR INVOICE_NO BKTXT VENDOR_NO POSTING_TYPE AMOUNT TAX_AMOUNT TAX_CODE TAX_CALC ITXT

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 54/432

Itemdata SAP Fielddescription A Purchase order

SAP Screenfield
RM08R-EBELN

KGS Activator fieldname


PO_NUMBER

2.3.6.2 Transaction MR1M

Headerdata SAP Fielddescription 1 Invoice date 2 Posting date 3 Company code 4 Currency 5 Reference 6 Amount 7 Calculate Tax 8 Unpl. Del. cst

SAP Screenfield
RBKPV-BLDAT RBKPV-BUDAT RBKPV-BUKRS RBKPV-WAERS RBKP-XBLNR RBKPV-RMWWR RBKPV-XMWST RBKPV-BEZNK

KGS Activator fieldname


INVOICE_DATE POSTING_DATE COMP_CODE CURRENCY INVOICE_NO AMOUNT TAX_CALC DELV_COST

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 55/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 56/432

Itemdata SAP Fielddescription A Purchasing Doc.

SAP Screenfield
RM08M-EBELN

KGS Activator fieldname


PO_NUMBER

2.3.6.3 Transaction MR1G

Headerdata SAP Fielddescription 1 Invoice date 2 Posting date 3 Company code 4 Currency 5 Reference 6 Amount 7 Calculate Tax 8 Unpl. Del. Cst

SAP Screenfield
RBKPV-BLDAT RBKPV-BUDAT RBKPV-BUKRS RBKPV-WAERS RBKP-XBLNR RBKPV-RMWWR RBKPV-XMWST RBKPV-BEZNK

KGS Activator fieldname


INVOICE_DATE POSTING_DATE COMP_CODE CURRENCY INVOICE_NO AMOUNT TAX_CALC DELV_COST

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 57/432

Itemdata SAP Fielddescription A Purchasing Doc.

SAP Screenfield
RM08M-EBELN

KGS Activator fieldname


PO_NUMBER

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 58/432

2.3.6.4 Transaction F-63

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 59/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 60/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 61/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 62/432

Headerdata SAP Fielddescription 1 Invoice date 2 DocType 3 Company code 4 Currency 5 Posting date 6 Document no. 7 Reference 8 Header text 9 Postkey 10 Account 11 Amount 12 Tax amount 13 Calculate Tax 14 Tax Code 15 Bus.area 16 Pmnt. Method 17 Ind payee 18 Text 19 Name 20 Street and house number 21 PO box 22 PO box PCode 23 City 24 Postal code 25 Country 26 Bank key 27 Bank account 28 Bank country 29 Bank name

SAP Screenfield
BKPF-BLDAT BKPF-BLART BKPF-BUKRS BKPF-WAERS BKPF-BUDAT BKPF-BELNR BKPF-XBLNR BKPF-BKTXT RF05V-NEWBS RF05V-NEWKO BSEG-WRBRT BSEG-WMWST BKPF-XMWST BSEG-MWSKZ BSEG-GSBER BSEG-ZLSCH RF05V-REGUL BSEG-SGTXT BSEC-NAME1 BSEC-STRAS BSEC-PFACH BSEC-PSTL2 BSEC-ORT01 BSEC-PSTLZ BSEC-LAND1 BSEC-BANKL BSEC-BANKN BSEC-BANKS BNKA-BANKA

KGS Activator fieldname


INVOICE_DATE BLART COMP_CODE CURRENCY POSTING_DATE BELNR INVOICE_NO BKTXT POSTING_TYPE ACCOUNT AMOUNT TAX_AMOUNT TAX_CALC TAX_CODE GSBER ZLSCH CPD_REGUL ITXT

CPD_NAME1 CPD_STRAS CPD_PFACH CPD_PSTL2 CPD_ORT01 CPD_PSTLZ CPD_LAND CPD_BANKL CPD_BANKN CPD_BANKS CPD_BANKA

Itemdata SAP Fielddescription A PostKy B Account C Amount D Tax Code E Business Area F Cost Center G Allocation H Text

SAP Screenfield
RF05V-NEWBS RF05V-NEWKO BSEG-WRBRT BSEG-MWSKZ COBL-GSBER COBL-KOSTL BSEG-ZUONR BSEG-SGTXT

KGS Activator fieldname PKEY


ACCOUNT AMOUNT TAX_CODE GSBER COSTCENTER ZUORD ITXT

Special Key: DMODE=KR DMODE=DB Creditor Invoice Debitor Invoice

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 63/432

2.4

SAP Software (Release 4.6C)

The SAP Modules are available as an SAP Transport and can be imported using the SAP Transport Management System.

2.4.1

Adding KGS functionality

To prepare your SAP system for the transport, please extract the provided ZIP file SAP46_Vx_xx_KGSActivator.zip into the transport directory of the SAP Application Server (\sapmnt\trans\). In the subdirectories cofiles and data you should now find the files Kxxxxxx.XXX respectitly Rxxxxxx.XXX. In our example K900011.TS2 respectitly R900011.TS2. To add this transport to the SAPs Transport Management System, please start transaction STMS , press F5 for Import Overview and select the import queue for your target system by double clicking its queue name.

Now choose from the menu Extras -> Other requests -> Add and type specify the transport name as shown

Continue (Enter) and confirm the following screen to add this transport to the desired import queue

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 64/432

The transport should now appear in the import queue

To start the import select the queue entry and press Ctrl+F11 to import the request.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 65/432

Please fill in the target client in the subsequent dialog (e. g. 800) and use default settings for the other options (Start date should be set to Immediate).

Continue (Enter) to start the import procedure and confirm this by pressing Yes in the subsequent dialog.

The progress of the import procedure is shown in the status bar of the SAP GUI window. To finish the import may take several minutes, depending on the SAP environment.

2.4.2

ArchiveLink Customizing for ContentRepositories

As a preparation for the following ArchiveLink szenarios Early Archiving with SAP Business Workflow and Late Archiving with Barcode a ContentRepository where the images are stored (in an external Archiving solution) has to be customized using Transaction OAC0

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 66/432

push button Display/Change (CRTL-F4) push button Full administrator

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 67/432

push button connection test. It is very important due security reasons that a certificate has been sent to the external ContentServer during installation of the external archiving solution.

2.4.3

SAP Customizing for Early Archiving (with data exchange)

To enable the SAP environment for the ArchiveLink scenario Store for subsequent entry using the SAP Business Workflow a workflow document type has to be defined using transaction OAD5 Create a Workflowtask.(in our example we copy the Standard task TS00007869) Transaction PFTC

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 68/432

push button copy or press F8

press enter

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 69/432

put the task to your own development class or press Local object.

Specify the agents for the new task Transaction PFTC

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 70/432

push button change or press F5

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 71/432

push button container

push button YES

push button create or press F5

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 72/432

Enter

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 73/432

push button back or press F3

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 74/432

Menu /Additional data/Agent assignment/Maintain

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 75/432

push button Attributes

push button Transfer

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 76/432

push button back oder press F3

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 77/432

push button Save or press Ctrl-S

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 78/432

2.4.4

Customizing for invoice processing with transaction FB60

To enable the SAP environment for the ArchiveLink scenario Store for subsequent entry using the SAP Business Workflow a workflow document type has to be defined using transaction OAD5

You can either use an existing Document Type (e. g. FIIINVOICE) or create a new one. Please follow this example for details:

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 79/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 80/432

Specify a documenttype template if one is available.

In the following dialog please specify the ContentRepository where the documents should reside in (e. g. FI). Please see ArchiveLink Customizing (OAC0 [2.4.2]) for repositories for details.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 81/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 82/432

Specify the Workflow Task (in our sample TS80000022) an Methode for the Dataprocessing (Obj.Type ZKGS_BKPF for FI and Methode ZCreateWD).

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 83/432

Specify Transaction

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 84/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 85/432

In the following screen you can specify the user/group/organiziation as the addressee for the work items. Please choose from the selection boxes the appropriate values. In the following example the USER ROOT will receive the created work items in his inbox.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 86/432

Press Complete to finish with the Document type definition

push button complete

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 87/432

Link Document type ZDMSI_FB60 to original SAP Business Object BKPF with Transaction oac3

push change button or press Crtl + F1

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 88/432

mark line ZKGS_BKPF ZDMSI_FB60 and press F6

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 89/432

press Enter to link Document type ZDMSI_FB60 to original SAP Business Object BKPF

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 90/432

Specify your SAP connection parameters in file SAPALINKCOM.INI (see also Section 3)
[Default] SAP-Client=800 SAP-UserName=XXXXX SAP-Password=XXXXXX SAP-HostName=SAPIDES46CV2 SAP-SystemNo=0 SAP-GatewayHost= SAP-GatewayService= SAP-Language=DE SAP-ArObj=FIIINVOICE ARCH-Mode=1 [FB60] SAP-ArObj=ZDMSI_FB60

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 91/432

2.4.4.1 Business Case for scenario Early Storing for subsequent entry
Transaction SBWP

Simultate Scanning with KGSActivatorDemo or use your Scanning Application for Archiving and creating SAP Workitems (Function WorkitemCreateData)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 92/432

push button Workitem

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 93/432

doubleklick workitem

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 94/432

the image appears and following dialog

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 95/432

push button Process

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 96/432

2.4.5

Customizing for invoice processing with transaction MIRO

To enable the SAP environment for the ArchiveLink scenario Store for subsequent entry using the SAP Business Workflow a workflow document type has to be defined using transaction OAD5

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 97/432

Specify a documenttype template if one is available.

In the following dialog please specify the ContentRepository where the documents should reside in (e. g. FI). Please see ArchiveLink Customizing (OAC0 [2.4.2]) for repositories for details.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 98/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 99/432

Specify the Workflow Task (in our sample TS80000022) an Methode for the Dataprocessing (Obj.Type ZKGS_B2081 for MM and Methode ZCreateWD).

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 100/432

Specify Transaction

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 101/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 102/432

In the following screen you can specify the user/group/organiziation as the addressee for the work items. Please choose from the selection boxes the appropriate values. In the following example the USER ROOT will receive the created work items in his inbox.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 103/432

Press Complete to finish with the Document type definition

push button complete

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 104/432

Link Document type ZDMSI_FB60 to original SAP Business Object BKPF with Transaction oac3

push change button or press Crtl + F1

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 105/432

mark line ZKGS_B2081 ZDMSI_MIRO and press F6

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 106/432

press Enter to link Document type ZDMSI_MIRO to original SAP Business Object BUS2081

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 107/432

Specify your SAP connection parameters in file SAPALINKCOM.INI (see also Section 3)
[Default] SAP-Client=800 SAP-UserName=XXXXX SAP-Password=XXXXXX SAP-HostName=SAPIDES46CV2 SAP-SystemNo=0 SAP-GatewayHost= SAP-GatewayService= SAP-Language=DE SAP-ArObj=FIIINVOICE ARCH-Mode=1 [FB60] SAP-ArObj=ZDMSI_FB60 [MIRO] SAP-ArObj=ZDMSI_MIRO

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 108/432

2.4.5.1 Business Case for scenario Early Storing for subsequent entry
Transaction SBWP

Simultate Scanning with KGSActivatorDemo or use your Scanning Application for Archiving and creating SAP Workitems (Function WorkitemCreateData)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 109/432

push button Workitem

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 110/432

doubleklick workitem

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 111/432

2.4.6

Supported Index-Fields

2.4.6.1 Transaction F-43

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 112/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 113/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 114/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 115/432

Headerdata SAP Fielddescription 1 Document date 2 Type 3 Company code 4 Posting date 5 Currency 6 Document Number 7 Reference Doc.header text 8

SAP Screenfield
BKPF-BLDAT BKPF-BLART BKPF-BUKRS BKPF-BUDAT BKPF-WAERS BKPF-BELNR BKPF-XBLNR BKPF-BKTXT

KGS Activator fieldname


INVOICE_DATE POSTING_TYPE COMP_CODE POSTING_DATE CURRENCY BELNR INVOICE_NO BKTXT

Itemdata Dataset ACCOUNT SAP Fielddescription Posting Key Account Amount Tax amount Terms of payment key Baseline date Amount Eligible for Cash Discount Payment Block Key Text Tax Code Cash discount amount Cost Center Sales Order Number Item number in Sales Order Order Number Calculate Tax Transaction type Part. bank State central bank indicator SAP Screenfield
RF05A-NEWBS RF05A-NEWKO BSEG-WRBTR BSEG-WMWST BSEG-ZTERM BSEG-ZFBDT BSEG-SKFBT BSEG-ZLSPR BSEG-SGTXT BSEG-MWSKZ BSEG-WSKTO COBL-KOSTL COBL-KDAUF COBL-KDPOS COBL-AUFNR BKPF-XMWST RF05A-NEWBW BSEG-BVTYP BSEG-LZBKZ

A B C D E F G H I J K L M N O P Q

KGS Activator fieldname PKEY


ACCOUNT AMOUNT TAX_AMOUNT PTERM BLINE_DATE DBAS PBLK ITXT TAX_CODE DAMOUNT COSTCENTER SORD SORDP ORDNO TAX_CALC TTYPE BVTYP LZBKZ

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 116/432

2.4.6.2 Transaction F-47

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 117/432

Headerdata SAP Fielddescription 1 Document date 2 Posting date 3 Type 4 Company code 5 Currency 6 Exchange rate 7 Document Number 8 Fiscal Period 9 Translation date 10 Reference 11 Doc.header text 12 Trading Partners Business Area

SAP Screenfield
BKPF-BLDAT BKPF-BUDAT BKPF-BLART BKPF-BUKRS BKPF-WAERS BKPF-KURSF BKPF-BELNR BKPF-MONAT BKPF-WWERT BKPF-XBLNR BKPF-BKTXT RF05A-PARGB

KGS Activator fieldname


INVOICE_DATE POSTING_DATE POSTING_TYPE COMP_CODE CURRENCY EXRATE BELNR FPERIOD EXDATE INVOICE_NO BKTXT PARGB

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 118/432

Itemdata Dataset ACCOUNT SAP Fielddescription Account Target Special G/L Indicator Amount Tax amount Tax Code Calculate tax Business Area Baseline date Payment Block Key Individual Payee Order Number Payment Method Main Asset Number Asset Subnumber Purchasing Document Number Item Number of Purchasing Document Sequential number of account assignment Profit Center WBS Element Assignment number Item Text SAP Screenfield
RF05A-NEWKO RF05A-ZUMSK BSEG-WRBTR BSEG-WMWST BSEG-MWSKZ RF05A-XMWST BSEG-GSBER BSEG-ZFBDT BSEG-ZLSPR RF05A-REGUL BSEG-AUFNR BSEG-ZLSCH BSEG-ANLN1 BSEG-ANLN2 BSEG-EBELN BSEG-EBELP BSEG-ZEKKN BSEG-PRCTR BSEG-PROJK BSEG-ZUONR BSEG-SGTXT

KGS Activator fieldname


ACCOUNT ZUMSK AMOUNT TAX_AMOUNT TAX_CODE TAX_CALC GSBER BLINE_DATE PBLK REGUL ORDNO ZLSCH ANLN1 ANLN2 PO_NUMBER PO_POS ZEKKN PRCTR PROJK ZUONR ITXT

A B C D E F G H I J K L M N O P Q R S T U

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 119/432

2.4.6.3 Transaction FB60

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 120/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 121/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 122/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 123/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 124/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 125/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 126/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 127/432

Headerdata SAP Fielddescription 1 Company code

SAP Screenfield
BKPF-BUKRS

KGS Activator fieldname


COMP_CODE

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 128/432

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

Transaction Vendor Invoice date Doctype Posting date Currency Calculate Tax Reference Amount Tax amount Tax code Itemtext POR Number POR Number check digit POR ref. no Baseline date Terms of payment key Cash Discount days 1 Cash Discount Percentage 1 Cash Discount days 2 Cash Discount Percentage 2 Net Payment Terms Period Amount Eligible for Cash Discount Payment Method Invoice Referenz Fiscal Year of relevant Invoice Referenz Line item in the relevant Invoice Referenz Payment Block Key Part. bank House bank Assignment HeadText Reference key 1 for line item Reference key 2 for line item Reference key 3 for line item State central bank indicator Supplying Country Translation dte. Exchange rate Title Language Key Name Name Name Name PO Box Street PO Box PCode City Postal Code Country Bank Key Bank Account Bank country Reference VAT reg. no

RF05A-BUSCS INVFO-ACCNT INVFO-BLDAT INVFO-BLART INVFO-BUDAT INVFO-WAERS INVFO-XMWST INVFO-XBLNR INVFO-WRBTR INVFO-WMWST INVFO-MWSKZ INVFO-SGTXT INVFO-ESRNR INVFO-ESRPZ INVFO-ESRRE INVFO-ZFBDT INVFO-ZTERM INVFO-ZBD2T INVFO-ZBD1P INVFO-ZBD2T INVFO-ZBD2P INVFO-ZBD3T INVFO-SKFBT INVFO-ZLSCH INVFO-REBZG INVFO-REBZJ INVFO-REBZZ INVFO-ZLSPR INVFO-BVTYP INVFO-HBKID INVFO-ZUONR INVFO-BKTXT INVFO-XREF1 INVFO-XREF2 INVFO-XREF3 INVFO-LZBKZ INVFO-LANDL INVFO-WWERT INVFO-KURSF BSEC-ANRED BSEC-SPRAS BSEC-NAME1 BSEC-NAME2 BSEC-NAME3 BSEC-NAME4 BSEC-PFACH BSEC-STRAS BSEC-PSTL2 BSEC-ORT01 BSEC-PSTLZ BSEC-LAND1 BSEC-BANKL BSEC-BANKN BSEC-BANKS BSEC-BKREF BSEG-STCEG

POSTING_TYPE VENDOR_NO INVOICE_DATE BLART POSTING_DATE CURRENCY TAX_CALC INVOICE_NO AMOUNT TAX_AMOUNT TAX_CODE ITXT ESRNR ESRPZ ESRRE BLINE_DATE PTERM ZBD1T ZBD1P ZBD2T ZBD2P ZBD3T DBAS ZLSCH REBZG REBZJ REBZZ PBLK BVTYP HBKID ZUONR BKTXT XREF1 XREF2 XREF3 LZBKZ LANDL EXDATE EXRATE CPD_ANRED CPD_SPRAS CPD_NAME1 CPD_NAME2 CPD_NAME3 CPD_NAME4 CPD_PFACH CPD_STRAS CPD_PSTL2 CPD_ORT01 CPD_PSTLZ CPD_LAND1 CPD_BANKL CPD_BANKN CPD_BANKS CPD_BKREF CPD_STCEG

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 129/432

58

Bank name Swiftcode IBAN Dunning Area Invest.ID Payment Reference Reporting Country Payment Method Supplement Planning date Cash discount amount in doc. currency Amount Eligible Cash Discount in doc. curr.

BNKA-BANKA BNKA-SWIFT IBAN00 INVFO-MABER INVFO-XINVE INVFO-KIDNO T007A-LSTML INVFO-UZAWE INVFO-FDTAG INVFO-WSKTO INVFO-SKFBT

CPD_BANKA CDP_SWIFT CDP_IBAN MABER XINVE KIDNO REPCNTRY UZAWE FDTAG DAMOUNT DBAS

Technical Keys in Headerarea NOBINPT


Activates "no batchinput" mode for methode CALL TRANSACTION

Itemdata Dataset ACCOUNT SAP Fielddescription G/L Account Debit/credit indicator Amount in document currency Tax on sales/purchases code Assignment no. Value date Itemtext Companycode Cost Center Order Number Sales Order Item in Sales Order Profit Center Partner profit center WBS Element Network Operation number First Note Text Line Dynamic Dialog in our example: Customer Product Billing Type Sales Order Sales Ord. Item Order Plant Sales Org. Distr. Channel Division SAP Screenfield
ACGL_ITEM-HKONT ACGL_ITEM-SHKZG ACGL_ITEM-WRBTR ACGL_ITEM-MWSKZ ACGL_ITEM-ZUONR ACGL_ITEM-VALUT ACGL_ITEM-SGTXT ACGL_ITEM-BUKRS ACGL_ITEM-KOSTL ACGL_ITEM-AUFNR ACGL_ITEM-VBEL2 ACGL_ITEM-POSN2 ACGL_ITEM-PRCTR ACGL_ITEM-PPRCT ACGL_ITEM-PROJK ACGL_ITEM-NPLNR ACGL_ITEM-VORNR EENO_DYNP-ZEILE RKEAK-FIELD(01) RKEAK-FIELD(02) RKEAK-FIELD(03) RKEAK-FIELD(04) RKEAK-FIELD(05) RKEAK-FIELD(06) RKEAK-FIELD(07) RKEAK-FIELD(08) RKEAK-FIELD(09) RKEAK-FIELD(10)

KGS Activator fieldname


ACCOUNT SHKZG AMOUNT TAX_CODE ZUONR VDATE ITXT COMP_CODE COSTCENTER ORDNO SORD SORDP PRCTR PPRCT PROJK NPLNR VORNR LTXT RKEAKFA01 RKEAKFA02 RKEAKFA03 RKEAKFA04 RKEAKFA05 RKEAKFA06 RKEAKFA07 RKEAKFA08 RKEAKFA09 RKEAKFA10

A B C D E F G H I J K L M N O P Q R S

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 130/432

WBS Element Cost Object Profit Center Partner Pr. Ctr Customer group ... RKEAK_FIELD(01) - (04) missing in
this example

RKEAK-FIELD(11) RKEAK-FIELD(12) RKEAK-FIELD(13) RKEAK-FIELD(14) RKEAK-FIELD(15)

RKEAKFA11 RKEAKFA12 RKEAKFA13 RKEAKFA14 RKEAKFA15 RKEAKFB01 -xx05 RKEAKFB05 RKEAKFB06 RKEAKFB07 RKEAKFB08 RKEAKFB09 RKEAKFB10 RKEAKFB11 RKEAKFB12 RKEAKFB13 RKEAKFB14 RKEAKFB15 RKEAKFB16 RKEAKFB17 RKEAKFB18 RKEAKFB19 KDAUF MENGE MEINS PERNR ETEN2 GSBER

Material Group Prod.hierarchy Sales employee 1 Sales emplyee 2 Payer 1 Payer 2 Payer 3 Payer 4 Payer 5 Payer 6 Cost center (disabled in our sample) Promotion Material Type Acct asgnmt grp Vertegenwoord. Customer order number Quantity Base Unit of Measure Personal Number Schedule line Business area

RKEAK-FIELD(05) RKEAK-FIELD(06) RKEAK-FIELD(07) RKEAK-FIELD(08) RKEAK-FIELD(09) RKEAK-FIELD(10) RKEAK-FIELD(11) RKEAK-FIELD(12) RKEAK-FIELD(13) RKEAK-FIELD(14) RKEAK-FIELD(15) RKEAK-FIELD(16) RKEAK-FIELD(17) RKEAK-FIELD(18) RKEAK-FIELD(19) ACGL_ITEM_KDAUF ACGL_ITEM-MENGE ACGL_ITEM-MEINS ACGL_ITEM-PERNR ACGL_ITEM-ETEN2 ACGL_ITEM-GSBER

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 131/432

2.4.6.4 Transaction FV60

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 132/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 133/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 134/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 135/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 136/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 137/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 138/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 139/432

Headerdata SAP Fielddescription 1 Company code 2 Transaction 3 Vendor

SAP Screenfield
BKPF-BUKRS RF05A-BUSCS INVFO-ACCNT

KGS Activator fieldname


COMP_CODE POSTING_TYPE VENDOR_NO

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 140/432

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Invoice date Doctype Posting date Currency Calculate Tax Reference Amount Tax amount Tax code Itemtext POR Number POR Number check digit POR ref. no Baseline date Terms of payment key Cash Discount days 1 Cash Discount Percentage 1 Cash Discount days 2 Cash Discount Percentage 2 Net Payment Terms Period Amount Eligible for Cash Discount Payment Method Invoice Referenz Fiscal Year of relevant Invoice Referenz Line item in the relevant Invoice Referenz Payment Block Key Part. bank House bank Assignment HeadText Reference key 1 for line item Reference key 2 for line item Reference key 3 for line item State central bank indicator Supplying Country Translation dte. Exchange rate Title Language Key Name Name Name Name PO Box Street PO Box PCode City Postal Code Country Bank Key Bank Account Bank country Reference VAT reg. no Bank name Dunning Area

INVFO-BLDAT INVFO-BLART INVFO-BUDAT INVFO-WAERS INVFO-XMWST INVFO-XBLNR INVFO-WRBTR INVFO-WMWST INVFO-MWSKZ INVFO-SGTXT INVFO-ESRNR INVFO-ESRPZ INVFO-ESRRE INVFO-ZFBDT INVFO-ZTERM INVFO-ZBD2T INVFO-ZBD1P INVFO-ZBD2T INVFO-ZBD2P INVFO-ZBD3T INVFO-SKFBT INVFO-ZLSCH INVFO-REBZG INVFO-REBZJ INVFO-REBZZ INVFO-ZLSPR INVFO-BVTYP INVFO-HBKID INVFO-ZUONR INVFO-BKTXT INVFO-XREF1 INVFO-XREF2 INVFO-XREF3 INVFO-LZBKZ INVFO-LANDL INVFO-WWERT INVFO-KURSF BSEC-ANRED BSEC-SPRAS BSEC-NAME1 BSEC-NAME2 BSEC-NAME3 BSEC-NAME4 BSEC-PFACH BSEC-STRAS BSEC-PSTL2 BSEC-ORT01 BSEC-PSTLZ BSEC-LAND1 BSEC-BANKL BSEC-BANKN BSEC-BANKS BSEC-BKREF BSEG-STCEG BNKA-BANKA INVFO-MABER

INVOICE_DATE BLART POSTING_DATE CURRENCY TAX_CALC INVOICE_NO AMOUNT TAX_AMOUNT TAX_CODE ITXT ESRNR ESRPZ ESRRE BLINE_DATE PTERM ZBD1T ZBD1P ZBD2T ZBD2P ZBD3T DBAS ZLSCH REBZG REBZJ REBZZ PBLK BVTYP HBKID ZUONR BKTXT XREF1 XREF2 XREF3 LZBKZ LANDL EXDATE EXRATE CPD_ANRED CPD_SPRAS CPD_NAME1 CPD_NAME2 CPD_NAME3 CPD_NAME4 CPD_PFACH CPD_STRAS CPD_PSTL2 CPD_ORT01 CPD_PSTLZ CPD_LAND1 CPD_BANKL CPD_BANKN CPD_BANKS CPD_BKREF CPD_STCEG CPD_BANKA MABER

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 141/432

Invest.ID Payment Reference Reporting Country Payment Method Supplement Planning date Cash discount amount in doc. currency Amount Eligible Cash Discount in doc. curr. Itemdata Dataset ACCOUNT SAP Fielddescription G/L Account Debit/credit indicator Amount in document currency Tax on sales/purchases code Assignment no. Value date Itemtext Companycode Cost Center Order Number Sales Order Item in Sales Order Profit Center Partner profit center WBS Element Network Operation number First Note Text Line Dynamic Dialog in our example: Customer Product Billing Type Sales Order Sales Ord. Item Order Plant Sales Org. Distr. Channel Division WBS Element Cost Object Profit Center Partner Pr. Ctr Customer group ... RKEAK_FIELD(01) - (04) missing in
this example

INVFO-XINVE INVFO-KIDNO T007A-LSTML INVFO-UZAWE INVFO-FDTAG INVFO-WSKTO INVFO-SKFBT

XINVE KIDNO REPCNTRY UZAWE FDTAG DAMOUNT DBAS

SAP Screenfield
ACGL_ITEM-HKONT ACGL_ITEM-SHKZG ACGL_ITEM-WRBTR ACGL_ITEM-MWSKZ ACGL_ITEM-ZUONR ACGL_ITEM-VALUT ACGL_ITEM-SGTXT ACGL_ITEM-BUKRS ACGL_ITEM-KOSTL ACGL_ITEM-AUFNR ACGL_ITEM-VBEL2 ACGL_ITEM-POSN2 ACGL_ITEM-PRCTR ACGL_ITEM-PPRCT ACGL_ITEM-PROJK ACGL_ITEM-NPLNR ACGL_ITEM-VORNR EENO_DYNP-ZEILE RKEAK-FIELD(01) RKEAK-FIELD(02) RKEAK-FIELD(03) RKEAK-FIELD(04) RKEAK-FIELD(05) RKEAK-FIELD(06) RKEAK-FIELD(07) RKEAK-FIELD(08) RKEAK-FIELD(09) RKEAK-FIELD(10) RKEAK-FIELD(11) RKEAK-FIELD(12) RKEAK-FIELD(13) RKEAK-FIELD(14) RKEAK-FIELD(15)

KGS Activator fieldname


ACCOUNT SHKZG AMOUNT TAX_CODE ZUONR VDATE ITXT COMP_CODE COSTCENTER ORDNO SORD SORDP PRCTR PPRCT PROJK NPLNR VORNR LTXT RKEAKFA01 RKEAKFA02 RKEAKFA03 RKEAKFA04 RKEAKFA05 RKEAKFA06 RKEAKFA07 RKEAKFA08 RKEAKFA09 RKEAKFA10 RKEAKFA11 RKEAKFA12 RKEAKFA13 RKEAKFA14 RKEAKFA15 RKEAKFB01 -xx05 RKEAKFB05 RKEAKFB06 RKEAKFB07 RKEAKFB08 RKEAKFB09 RKEAKFB10 RKEAKFB11

A B C D E F G H I J K L M N O P Q R S

Material Group Prod.hierarchy Sales employee 1 Sales emplyee 2 Payer 1 Payer 2 Payer 3

RKEAK-FIELD(05) RKEAK-FIELD(06) RKEAK-FIELD(07) RKEAK-FIELD(08) RKEAK-FIELD(09) RKEAK-FIELD(10) RKEAK-FIELD(11)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 142/432

Payer 4 Payer 5 Payer 6 Cost center (disabled in our sample) Promotion Material Type Acct asgnmt grp Vertegenwoord. Customer order number Quantity Base Unit of Measure Personnel Number Schedule line Business area

RKEAK-FIELD(12) RKEAK-FIELD(13) RKEAK-FIELD(14) RKEAK-FIELD(15) RKEAK-FIELD(16) RKEAK-FIELD(17) RKEAK-FIELD(18) RKEAK-FIELD(19) ACGL_ITEM_KDAUF ACGL_ITEM-MENGE ACGL_ITEM-MEINS ACGL_ITEM-PERNR ACGL_ITEM-ETEN2 ACGL_ITEM-GSBER

RKEAKFB12 RKEAKFB13 RKEAKFB14 RKEAKFB15 RKEAKFB16 RKEAKFB17 RKEAKFB18 RKEAKFB19 KDAUF MENGE MEINS PERNR ETEN2 GSBER

2.4.6.5 Transaction FB70

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 143/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 144/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 145/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 146/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 147/432

Headerdata SAP Fielddescription 1 Company code 2 Transaction 3 Vendor 4 Invoice date 5 Doctype 6 Posting date 7 Currency 8 Calculate Tax 9 Reference 10 Amount 11 Tax amount 12 Tax code 13 Itemtext 14 POR Number 15 POR Number check digit 16 POR ref. no 17 Baseline date

SAP Screenfield
BKPF-BUKRS RF05A-BUSCS INVFO-ACCNT INVFO-BLDAT INVFO-BLART INVFO-BUDAT INVFO-WAERS INVFO-XMWST INVFO-XBLNR INVFO-WRBTR INVFO-WMWST INVFO-MWSKZ INVFO-SGTXT INVFO-ESRNR INVFO-ESRPZ INVFO-ESRRE INVFO-ZFBDT

KGS Activator fieldname


COMP_CODE POSTING_TYPE VENDOR_NO INVOICE_DATE BLART POSTING_DATE CURRENCY TAX_CALC INVOICE_NO AMOUNT TAX_AMOUNT TAX_CODE ITXT ESRNR ESRPZ ESRRE BLINE_DATE

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 148/432

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Terms of payment key Cash Discount days 1 Cash Discount Percentage 1 Cash Discount days 2 Cash Discount Percentage 2 Net Payment Terms Period Amount Eligible for Cash Discount Payment Method Invoice Referenz Fiscal Year of relevant Invoice Referenz Line item in the relevant Invoice Referenz Payment Block Key Part. bank House bank Assignment HeadText Reference key 1 for line item Reference key 2 for line item Reference key 3 for line item State central bank indicator Supplying Country Translation dte. Exchange rate Reporting Country Payment Method Supplement

INVFO-ZTERM INVFO-ZBD2T INVFO-ZBD1P INVFO-ZBD2T INVFO-ZBD2P INVFO-ZBD3T INVFO-SKFBT INVFO-ZLSCH INVFO-REBZG INVFO-REBZJ INVFO-REBZZ INVFO-ZLSPR INVFO-BVTYP INVFO-HBKID INVFO-ZUONR INVFO-BKTXT INVFO-XREF1 INVFO-XREF2 INVFO-XREF3 INVFO-LZBKZ INVFO-LANDL INVFO-WWERT INVFO-KURSF T007A-LSTML INVFO-UZAWE

PTERM ZBD1T ZBD1P ZBD2T ZBD2P ZBD3T DBAS ZLSCH REBZG REBZJ REBZZ PBLK BVTYP HBKID ZUONR BKTXT XREF1 XREF2 XREF3 LZBKZ LANDL EXDATE EXRATE REPCNTRY UZAWE

Itemdata Dataset ACCOUNT SAP Fielddescription Dynpro number (default for itemline 2 = 302 and for all other line 300) G/L Account Debit/credit indicator Amount in document currency Tax on sales/purchases code Assignment no. Value date Itemtext Companycode Cost Center Order Number Sales Order Item in Sales Order Profit Center Partner profit center WBS Element Network Operation number G/L account short text Trading Partner Long Text Document line SAP Screenfield KGS Activator fieldname DYNPRO
ACCOUNT SHKZG AMOUNT TAX_CODE ZUORD VDATE ITXT COMP_CODE COSTCENTER ORDNO SORD SORDP PRCTR PPRCT PROJK NPLNR VORNR TXT VBUND LTXT

A B C D E F G H I J K L M N O P Q R S T

ACGL_ITEM-HKONT ACGL_ITEM-SHKZG ACGL_ITEM-WRBTR ACGL_ITEM-MWSKZ ACGL_ITEM-ZUONR ACGL_ITEM-VALUT ACGL_ITEM-SGTXT ACGL_ITEM-BUKRS ACGL_ITEM-KOSTL ACGL_ITEM-AUFNR ACGL_ITEM-VBEL2 ACGL_ITEM-POSN2 ACGL_ITEM-PRCTR ACGL_ITEM-PPRCT ACGL_ITEM-PROJK ACGL_ITEM-NPLNR ACGL_ITEM-VORNR ACGL_ITEM-KONTO_TXT ACGL_ITEM-VBUND EENO_DYNP-ZEILE

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 149/432

2.4.6.6 Transaction FBV0


Transaction FBV0 is used to post park documents. Behind the initial screen, transaction FV60 will be started. Please see Section Transaction FV60" for details.

Headerdata SAP Fielddescription 1 Key for Parking Processing mode

SAP Screenfield

KGS Activator fieldname


SAP_OBJECTID PMODE S=SAVE P=POST

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 150/432

2.4.6.7 Transaction MIRO

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 151/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 152/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 153/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 154/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 155/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 156/432

Headerdata SAP Fielddescription 1 Company code 2 Transaction 3 Invoice date 4 Posting date 5 Reference 6 Currency Key 7 Amount 8 Tax amount 9 Tax code 10 Reference document category 11 Item Text 12 Calculate tax 13 POR Number 14 POR Number check digit 15 POR ref. no 16 Baseline date 17 Terms of payment key 18 Cash discount days 1 19 Cash Discount Percentage 1 20 Cash Discount Percentage 2 21 Cash discount days 2 22 Net Payment Terms Period

SAP Screenfield
BKPF-BUKRS RM08M-VORGANG INVFO-BLDAT INVFO-BUDAT INVFO-XBLNR INVFO-WAERS INVFO-WRBTR INVFO-WMWST INVFO-MWSKZ RM08M-REFERENZBELEGTYP INVFO-SGTXT INVFO-XMWST INVFO-ESRNR INVFO-ESRPZ INVFO-ESRRE INVFO-ZFBDT INVFO-ZTERM INVFO-ZBD1T INVFO-ZBD1P INVFO-ZBD2P INVFO-ZBD2T INVFO-ZBD3T

KGS Activator fieldname


COMP_CODE POSTING_TYPE INVOICE_DATE POSTING_DATE INVOICE_NO CURRENCY AMOUNT TAX_AMOUNT TAX_CODE REFTYPE ITXT TAX_CALC ESRNR ESRPZ ESRRE BLINE_DATE PTERM ZBD1T ZBD1P ZBD2P ZBD2T ZBD3T

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 157/432

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

Cash discount Payment Method Invoice Referenz Fiscal Year of relevant Invoice Referenz Line item in the relevant Invoice Referenz Payment Block Key Part. bank House bank Unplanned delivery costs Document type Tax code Unplanned delivery costs Exch. Rate Inv.Party Assignment number Header Text Cent. Bank Suppl. Cntry Reporting Country

INVFO-WSKTO INVFO-ZLSCH INVFO-REBZG INVFO-REBZJ INVFO-REBZZ INVFO-ZLSPR INVFO-BVTYP INVFO-HBKID INVFO-BEZNK INVFO-BLART INVFO-MWSKZ_BNK INVFO-KURSF INVFO-LIFRE INVFO-ZUONR INVFO-BKTXT INVFO-LZBKZ INVFO-LANDL T007A-LSTML

DBAS ZLSCH REBZG REBZJ REBZZ PBLK BVTYPE HBKID DELV_COST BLART DELV_TAXCODE EXRATE VENDOR_NO ZUONR BKTXT LZBKZ LANDL REPCNTRY

Itemdata Dataset PO_NUMBER SAP Fielddescription A1 A2 A3 B C D E F Number of external delivery note (depending on BLART 1) Purchasing Document Number (depending on BLART 2) Vendor Number (depending on BLART 5) Amount Quantit Tax Code subsequent debit/credit Final Invoice Indicator Quantity in purchase order price unit SAP Screenfield
RM08M-LFSNR RM08M-EBELN RM08M-SUPERFIELD DRSEG-WRBTR DRSEG-MENGE DRSEG-MWSKZ DRSEG-TBTKZ DRSEG-EREKZ DRSEG-BPMNG

KGS Activator fieldname


PO_NUMBER PO_NUMBER PO_NUMBER NET_AMOUNT QUANTITY TAX_CODE TBTKZ FINVF PO_PR_QNT

Additional note: This transaction supports the processing of max. 8 Purchase order numbers. This is a SAP limit. Please keep in mind that the order of the submitted line information must exactly correspond to the order in which the transaction offers the line information for input. With function PurchaseOrderGetDetail, e.g. you can find out which positions of the purchase order were not paid yet.
Dataset ACCOUNT SAP Fielddescription G/L Account Debit/Credit indicator Amount in document currency SAP Screenfield
ACGL_ITEM-HKONT ACGL_ITEM-SHKZG ACGL_ITEM-WRBTR

KGS Activator fieldname


ACCOUNT SHKZG AMOUNT

H I J

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 158/432

K L M N O P Q R S T

Tax on sales/purchases code Item Text Cost Center Order Number Sales Order Profit Center WBS Element Assignment Number Network Operation number

ACGL_ITEM-MWSKZ ACGL_ITEM-SGTXT ACGL_ITEM-KOSTL ACGL_ITEM-AUFNR ACGL_ITEM-VBEL2 ACGL_ITEM-PRCTR ACGL_ITEM-PROJK ACGL_ITEM-ZUONR ACGL_ITEM-NPLNR ACGL_ITEM-VORNR

TAX_CODE ITXT COSTCENTER ORDNO VBEL2 PRCTR PROJK ZUONR NPLNR VORNR

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 159/432

2.4.6.8 Transaction MIR7

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 160/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 161/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 162/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 163/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 164/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 165/432

Headerdata SAP Fielddescription 1 Company code 2 Transaction 3 Invoice date 4 Posting date 5 Reference 6 Currency Key 7 Amount 8 Tax amount 9 Tax code 10 Reference document category 11 Item Text 12 Calculate tax 13 POR Number 14 POR Number check digit 15 POR ref. no 16 Baseline date 17 Terms of payment key 18 Cash discount days 1

SAP Screenfield
BKPF-BUKRS RM08M-VORGANG INVFO-BLDAT INVFO-BUDAT INVFO-XBLNR INVFO-WAERS INVFO-WRBTR INVFO-WMWST INVFO-MWSKZ RM08M-REFERENZBELEGTYP INVFO-SGTXT INVFO-XMWST INVFO-ESRNR INVFO-ESRPZ INVFO-ESRRE INVFO-ZFBDT INVFO-ZTERM INVFO-ZBD1T

KGS Activator fieldname


COMP_CODE POSTING_TYPE INVOICE_DATE POSTING_DATE INVOICE_NO CURRENCY AMOUNT TAX_AMOUNT TAX_CODE REFTYPE ITXT TAX_CALC ESRNR ESRPZ ESRRE BLINE_DATE PTERM ZBD1T

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 166/432

19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

Cash Discount Percentage 1 Cash Discount Percentage 2 Cash discount days 2 Net Payment Terms Period Cash discount Payment Method Invoice Referenz Fiscal Year of relevant Invoice Referenz Line item in the relevant Invoice Referenz Payment Block Key Part. bank House bank Unplanned delivery costs Document type Tax code Unplanned delivery costs Exch. Rate Inv.Party Assignment number Header Text Cent. Bank Suppl. Cntry Reporting Country

INVFO-ZBD1P INVFO-ZBD2P INVFO-ZBD2T INVFO-ZBD3T INVFO-WSKTO INVFO-ZLSCH INVFO-REBZG INVFO-REBZJ INVFO-REBZZ INVFO-ZLSPR INVFO-BVTYP INVFO-HBKID INVFO-BEZNK INVFO-BLART INVFO-MWSKZ_BNK INVFO-KURSF INVFO-LIFRE INVFO-ZUONR INVFO-BKTXT INVFO-LZBKZ INVFO-LANDL T007A-LSTML

ZBD1P ZBD2P ZBD2T ZBD3T DBAS ZLSCH REBZG REBZJ REBZZ PBLK BVTYPE HBKID DELV_COST BLART DELV_TAXCODE EXRATE VENDOR_NO ZUONR BKTXT LZBKZ LANDL REPCNTRY

Itemdata Dataset PO_NUMBER SAP Fielddescription A1 A2 A3 B C D E F Number of external delivery note (depending on BLART 1) Purchasing Document Number (depending on BLART 2) Vendor Number (depending on BLART 5) Amount Quantity Tax Code subsequent debit/credit Final Invoice Indicator Quantity in purchase order price unit SAP Screenfield
RM08M-LFSNR RM08M-EBELN RM08M-SUPERFIELD DRSEG-WRBTR DRSEG-MENGE DRSEG-MWSKZ DRSEG-TBTKZ DRSEG-EREKZ DRSEG-BPMNG

KGS Activator fieldname


PO_NUMBER PO_NUMBER PO_NUMBER NET_AMOUNT QUANTITY TAX_CODE TBTKZ FINVF PO_PR_QNT

Additional note: This transaction supports the processing of max. 8 Purchase order numbers. This is a SAP limit. Please keep in mind that the order of the submitted line information must exactly correspond to the order in which the transaction offers the line information for input. With function PurchaseOrderGetDetail, e.g. you can find out which positions of the purchase order were not paid yet.
Dataset ACCOUNT

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 167/432

H I J K L M N O P Q R S T

SAP Fielddescription G/L Account Debit/Credit indicator Amount in document currency Tax on sales/purchases code Item Text Cost Center Order Number Sales Order Profit Center WBS Element Assignment Number Network Operation number

SAP Screenfield
ACGL_ITEM-HKONT ACGL_ITEM-SHKZG ACGL_ITEM-WRBTR ACGL_ITEM-MWSKZ ACGL_ITEM-SGTXT ACGL_ITEM-KOSTL ACGL_ITEM-AUFNR ACGL_ITEM-VBEL2 ACGL_ITEM-PRCTR ACGL_ITEM-PROJK ACGL_ITEM-ZUONR ACGL_ITEM-NPLNR ACGL_ITEM-VORNR

KGS Activator fieldname


ACCOUNT SHKZG AMOUNT TAX_CODE ITXT COSTCENTER ORDNO VBEL2 PRCTR PROJK ZUONR NPLNR VORNR

2.4.6.9 Transaction MIR4


Transaction FBV0 is used to post park documents. Behind the initial screen, transaction MIR7 will be started. Please see Section Transaction MIR7" for details.

Headerdata SAP Fielddescription 1 Key for Parking

SAP Screenfield

KGS Activator fieldname


SAP_OBJECTID

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 168/432

2.4.6.10 Transaction MIRA

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 169/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 170/432

Headerdata SAP Fielddescription 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Company code Transaction Invoice date Reference Posting date Currency Key Calculate Tax Amount Tax code Tax amount Item Text Reference document category Goods Items/Delivery Costs/Both Baseline date Cash discount days 1 Cash Discount Percentage 1 Cash Discount Percentage 2 Cash Discount

SAP Screenfield
BKPF-BUKRS RM08M-VORGANG INVFO-BLDAT INVFO-XBLNR INVFO-BUDAT INVFO-WAERS INVFO-XMWST INVFO-WRBTR INVFO-MWSKZ INVFO-WMWST INVFO-SGTXT RM08M-REFERENZBELEGTYP RM08M-XWARE_BNK INVFO-ZFBDT INVFO-ZBD1T INVFO-ZBD1P INVFO-ZBD2P INVFO-WSKTO

KGS Activator fieldname


COMP_CODE POSTING_TYPE INVOICE_DATE INVOICE_NO POSTING_DATE CURRENCY TAX_CALC AMOUNT TAX_CODE TAX_AMOUNT ITXT REFTYPE XWAREBNK BLINE_DATE ZBD1T ZBD1P ZBD2P WSKTO

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 171/432

19 20 21 22 23 24 25 26 27 28 29

Terms of payment key Cash discount days 2 Net Payment Terms Period Fixed Payment Terms Payment Method Payment Block Key Part. Bank Invoice Reference Fiscal Year of relevant Invoice Referenz House bank Vendor

INVFO-ZTERM INVFO-ZBD2T INVFO-ZBD3T INVFO-ZBFIX INVFO-ZLSCH INVFO-ZLSPR INVFO-BVTYP INVFO-REBZG INVFO-REBZJ INVFO-HBKID RM08M-SUPERFIELD

PTERM ZBD2T ZBD3T ZBFIX ZLSCH PBLK BVTYPE REBZG REBZJ HBKID VENDOR_NO

Dataset PO_NUMBER SAP Fielddescription A Purchasing Document Number SAP Screenfield


RM08M-EBELN

KGS Activator fieldname


PO_NUMBER

Special Header Keys: PMODE=P PMODE=S post parked invoice (default) store parked invoice

2.4.6.11 Transaction FBV1

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 172/432

3 5

4 6 8 7

10

11

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 173/432

E F Q G I H J W L K N O A B M C1 D1 C D P Y B1 Z X A1 R S T U V

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 174/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 175/432

Headerdata SAP Fielddescription 1 Document date 2 Type 3 Company code 4 Posting date 5 Currency 6 Document Number 7 Translation date 8 Reference 9 Doc.header text 10 Partner Business Area 11 Only transfer doc. in doc.curr. when posting

SAP Screenfield
BKPF-BLDAT BKPF-BLART BKPF-BUKRS BKPF-BUDAT BKPF-WAERS BKPF-BELNR BKPF-WWERT BKPF-XBLNR BKPF-BKTXT VBKPF-PARGB VBKPF-XBWAE

KGS Activator fieldname


INVOICE_DATE POSTING_TYPE COMP_CODE POSTING_DATE CURRENCY BELNR EXDATE INVOICE_NO BKTXT PARGB XBWAE

Itemdata Dataset ACCOUNT SAP Fielddescription Posting Key Account Special G/L Indicator for the Next Line Item Transaction type Amount Tax amount Calculate tax automatically Business Area Terms of payment key Baseline date Amount Eligible for Cash Discount Payment Block Key Currency for Automatic Payment Assignment number Text Company Code for the Next Line Item Tax Code Cash discount days 1 Cash discount percentage 1 Cash discount days 2 Cash discount percentage 2 Net Payment Terms Period Fixed Payment Terms Cash discount amount Invoice Reference Fiscal Year Invoice Reference Line Item Reference Invoice Payment Method Amount in Payment Currency Individual Payee in Document SAP Screenfield
RF05V-NEWBS RF05V-NEWKO RF05V-NEWUM RF05V-NEWBW BSEG-WRBTR BSEG-WMWST BKPF-XMWST BSEG-GSBER BSEG-ZTERM BSEG-ZFBDT BSEG-SKFBT BSEG-ZLSPR BSEG-PYCUR BSEG-ZUONR BSEG-SGTXT RF05V-NEWBK BSEG-MWSKZ BSEG-ZBD1T BSEG-ZBD1P BSEG-ZBD2T BSEG-ZBD2P BSEG-ZBD3T BSEG-ZBFIX BSEG-WSKTO BSEG-REBZG BSEG-REBZJ BSEG-REBZZ BSEG-ZLSCH BSEG-PYAMT RF05V-REGUL

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A1 B1 C1 D1

KGS Activator fieldname PKEY


ACCOUNT SPGLI TTYPE AMOUNT TAX_AMOUNT TAX_CALC GSBER PTERM BLINE_DATE DBAS PBLK PYCUR ZUONR ITXT COMP_CODE TAX_CODE ZBD1T ZBD1P ZBD2T ZBD2P ZBD3T ZBFIX DAMOUNT REBZG REBZJ REBZZ ZLSCH PYAMT REGUL

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 176/432

2.5

SAP Software (Release 4.7 or higher)

The SAP Modules are available as an SAP Transport and can be imported using the SAP Transport Management System.

2.5.1

Adding KGS functionality

To prepare your SAP system for the transport, please extract the provided ZIP file SAP47_Vx_xx_KGSActivator.zip into the transport directory of the SAP Application Server (\sapmnt\trans\). In the subdirectories cofiles and data you should now find the files Kxxxxxx.XXX respectitly Rxxxxxx.XXX. In our example K900011.DS1 respectitly R900011. DS1. To add this transport to the SAPs Transport Management System, please start transaction STMS , press F5 for Import Overview and select the import queue for your target system by double clicking its queue name.

Now choose from the menu Extras -> Other requests -> Add and type specify the transport name as shown

Continue (Enter) and confirm the following screen to add this transport to the desired import queue

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 177/432

The transport should now appear in the import queue

To start the import select the queue entry and press Ctrl+F11 to import the request.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 178/432

Please fill in the target client in the subsequent dialog (e. g. 800) and use default settings for the other options (Start date should be set to Immediate).

Continue (Enter) to start the import procedure and confirm this by pressing Yes in the subsequent dialog.

The progress of the import procedure is shown in the status bar of the SAP GUI window. To finish the import may take several minutes, depending on the SAP environment.

2.5.2

ArchiveLink Customizing for ContentRepositories

As a preparation for the following ArchiveLink szenarios Early Archiving with SAP Business Workflow and Late Archiving with Barcode a ContentRepository where the images are stored (in an external Archiving solution) has to be customized using Transaction OAC0

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 179/432

push button Display/Change (CRTL-F4) push button Full administrator

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 180/432

push button connection test. It is very important due security reasons that a certificate has been sent to the external ContentServer during installation of the external archiving solution.

2.5.3

SAP Customizing for Early Archiving (with data exchange)

To enable the SAP environment for the ArchiveLink scenario Store for subsequent entry using the SAP Business Workflow a workflow document type has to be defined using transaction OAD5 Create a Workflowtask.(in our example we copy the Standard task TS00007869) Transaction PFTC

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 181/432

push button copy or press Ctrl-F5

press enter

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 182/432

put the task to your own development class or press Local object.

Specify the agents for the new task Transaction PFTC

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 183/432

push button change or press F6

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 184/432

push Container

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 185/432

push button create element

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 186/432

push Properties

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 187/432

push Enter

push button back or press F3

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 188/432

Menu /Additional data/Agent assignment/Maintain

Yes

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 189/432

push button Attributes

push button Transfer

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 190/432

push button back or press F3

push button Save or press Ctrl-S

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 191/432

2.5.4

Customizing for invoice processing with transaction FB60

To enable the SAP environment for the ArchiveLink scenario Store for subsequent entry using the SAP Business Workflow a workflow document type has to be defined using transaction OAD5

You can either use an existing Document Type (e. g. FIIINVOICE) or create a new one. Please follow this example for details:

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 192/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 193/432

Specify a documenttype template if one is available.

In the following dialog please specify the ContentRepository where the documents should reside in (e. g. FI). Please see ArchiveLink Customizing (OAC0 [2.4.2]) for repositories for details.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 194/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 195/432

Specify the Workflow Task (in our sample TS80000057) an Methode for the Dataprocessing (Obj.Type ZKGS_BKPF for FI and Methode ZCreateWD).

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 196/432

Specify Transaction

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 197/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 198/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 199/432

In the following screen you can specify the user/group/organiziation as the addressee for the work items. Please choose from the selection boxes the appropriate values. In the following example the USER ROOT will receive the created work items in his inbox.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 200/432

Press Complete to finish with the Document type definition

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 201/432

push button complete

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 202/432

Link Document type ZDMSI_FB60 to original SAP Business Object BKPF with Transaction oac3

push change button or press Crtl + F1

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 203/432

mark line ZKGS_BKPF ZDMSI_FB60 and press F6

press Enter to link Document type ZDMSI_FB60 to original SAP Business Object BKPF

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 204/432

Specify your SAP connection parameters in file SAPALINKCOM.INI (see also Section 3)
[Default] SAP-Client=800 SAP-UserName=XXXXX SAP-Password=XXXXXX SAP-HostName=SAPIDES47 SAP-SystemNo=0 SAP-GatewayHost= SAP-GatewayService= SAP-Language=DE SAP-ArObj=FIIINVOICE ARCH-Mode=1 [FB60] SAP-ArObj=ZDMSI_FB60

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 205/432

2.5.4.1 Business Case for scenario Early Storing for subsequent entry
Transaction SBWP

Simultate Scanning with KGSActivatorDemo or use your Scanning Application for Archiving and creating SAP Workitems (Function WorkitemCreateData)

push button Workitem

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 206/432

doubleklick workitem

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 207/432

the image appears and following dialog

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 208/432

push button Process

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 209/432

2.5.5

Customizing for invoice processing with transaction MIRO

To enable the SAP environment for the ArchiveLink scenario Store for subsequent entry using the SAP Business Workflow a workflow document type has to be defined using transaction OAD5

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 210/432

Specify a documenttype template if one is available.

In the following dialog please specify the ContentRepository where the documents should reside in (e. g. FI). Please see ArchiveLink Customizing (OAC0 [2.4.2]) for repositories for details.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 211/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 212/432

Specify the Workflow Task (in our sample TS80000056) an Methode for the Dataprocessing (Obj.Type ZKGS_B2081 for MM and Methode ZCreateWD).

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 213/432

Specify Transaction

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 214/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 215/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 216/432

In the following screen you can specify the user/group/organiziation as the addressee for the work items. Please choose from the selection boxes the appropriate values. In the following example the USER ROOT will receive the created work items in his inbox.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 217/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 218/432

Press Complete to finish with the Document type definition

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 219/432

Link Document type ZDMSI_FB60 to original SAP Business Object BKPF with Transaction oac3

push change button or press Crtl + F1

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 220/432

mark line ZKGS_B2081 ZDMSI_MIRO and press F6

press Enter to link Document type ZDMSI_MIRO to original SAP Business Object BUS2081

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 221/432

Specify your SAP connection parameters in file SAPALINKCOM.INI (see also Section 3)
[Default] SAP-Client=800 SAP-UserName=XXXXX SAP-Password=XXXXXX SAP-HostName=SAPIDES47 SAP-SystemNo=0 SAP-GatewayHost= SAP-GatewayService= SAP-Language=DE SAP-ArObj=FIIINVOICE ARCH-Mode=1 [FB60] SAP-ArObj=ZDMSI_FB60 [MIRO] SAP-ArObj=ZDMSI_MIRO

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 222/432

2.5.5.1 Business Case for scenario Early Storing for subsequent entry
Transaction SBWP

Simultate Scanning with KGSActivatorDemo or use your Scanning Application for Archiving and creating SAP Workitems (Function WorkitemCreateData)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 223/432

push button Workitem

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 224/432

doubleklick workitem

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 225/432

2.5.6

Supported Index-Fields

2.5.6.1 Transaction F-43

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 226/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 227/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 228/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 229/432

Headerdata SAP Fielddescription 1 Document date 2 Type 3 Company code 4 Posting date 5 Currency 6 Document Number 7 Reference Doc.header text 8

SAP Screenfield
BKPF-BLDAT BKPF-BLART BKPF-BUKRS BKPF-BUDAT BKPF-WAERS BKPF-BELNR BKPF-XBLNR BKPF-BKTXT

KGS Activator fieldname


INVOICE_DATE POSTING_TYPE COMP_CODE POSTING_DATE CURRENCY BELNR INVOICE_NO BKTXT

Itemdata Dataset ACCOUNT SAP Fielddescription Posting Key Account Amount Tax amount Terms of payment key Baseline date Amount Eligible for Cash Discount Payment Block Key Text Tax Code Cash discount amount Cost Center Sales Order Number Item number in Sales Order Order Number Calculate Tax Transaction type SAP Screenfield
RF05A-NEWBS RF05A-NEWKO BSEG-WRBTR BSEG-WMWST BSEG-ZTERM BSEG-ZFBDT BSEG-SKFBT BSEG-ZLSPR BSEG-SGTXT BSEG-MWSKZ BSEG-WSKTO COBL-KOSTL COBL-KDAUF COBL-KDPOS COBL-AUFNR BKPF-XMWST RF05A-NEWBW

A B C D E F G H I J K L M N O P Q

KGS Activator fieldname PKEY


ACCOUNT AMOUNT TAX_AMOUNT PTERM BLINE_DATE DBAS PBLK ITXT TAX_CODE DAMOUNT COSTCENTER SORD SORDP ORDNO TAX_CALC TTYPE

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 230/432

2.5.6.2 Transaction F-47

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 231/432

Headerdata SAP Fielddescription 1 Document date 2 Posting date 3 Type 4 Company code 5 Currency 6 Exchange rate 7 Document Number 8 Fiscal Period 9 Translation date 10 Reference 11 Doc.header text 12 Trading Partners Business Area

SAP Screenfield
BKPF-BLDAT BKPF-BUDAT BKPF-BLART BKPF-BUKRS BKPF-WAERS BKPF-KURSF BKPF-BELNR BKPF-MONAT BKPF-WWERT BKPF-XBLNR BKPF-BKTXT RF05A-PARGB

KGS Activator fieldname


INVOICE_DATE POSTING_DATE POSTING_TYPE COMP_CODE CURRENCY EXRATE BELNR FPERIOD EXDATE INVOICE_NO BKTXT PARGB

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 232/432

Itemdata Dataset ACCOUNT SAP Fielddescription Account Target Special G/L Indicator Amount Tax amount Tax Code Calculate tax Business Area Baseline date Payment Block Key Individual Payee Order Number Payment Method Main Asset Number Asset Subnumber Purchasing Document Number Item Number of Purchasing Document Sequential number of account assignment Profit Center WBS Element Assignment number Item Text SAP Screenfield
RF05A-NEWKO RF05A-ZUMSK BSEG-WRBTR BSEG-WMWST BSEG-MWSKZ RF05A-XMWST BSEG-GSBER BSEG-ZFBDT BSEG-ZLSPR RF05A-REGUL BSEG-AUFNR BSEG-ZLSCH BSEG-ANLN1 BSEG-ANLN2 BSEG-EBELN BSEG-EBELP BSEG-ZEKKN BSEG-PRCTR BSEG-PROJK BSEG-ZUONR BSEG-SGTXT

KGS Activator fieldname


ACCOUNT ZUMSK AMOUNT TAX_AMOUNT TAX_CODE TAX_CALC GSBER BLINE_DATE PBLK REGUL ORDNO ZLSCH ANLN1 ANLN2 PO_NUMBER PO_POS ZEKKN PRCTR PROJK ZUONR ITXT

A B C D E F G H I J K L M N O P Q R S T U

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 233/432

2.5.6.3 Transaction FB60

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 234/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 235/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 236/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 237/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 238/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 239/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 240/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 241/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 242/432

Headerdata SAP Fielddescription 1 Company code 2 Transaction 3 Vendor 4 Invoice date 5 Doctype 6 Posting date 7 Currency 8 Calculate Tax 9 Reference 10 Amount 11 Tax amount 12 Tax code 13 Itemtext 14 POR Number 15 POR Number check digit 16 POR ref. no 17 Baseline date 18 Terms of payment key 19 Cash Discount days 1 20 Cash Discount Percentage 1 21 Cash Discount days 2 22 Cash Discount Percentage 2 23 Net Payment Terms Period 24 Amount Eligible for Cash Discount 25 Payment Method 26 Invoice Referenz 27 Fiscal Year of relevant Invoice Referenz 28 Line item in the relevant Invoice Referenz 29 Payment Block Key 30 Part. bank 31 House bank 32 Assignment 33 HeadText 34 Reference key 1 for line item 35 Reference key 2 for line item 36 Reference key 3 for line item 37 State central bank indicator 38 Supplying Country 39 Translation dte. 40 Exchange rate 41 Title 42 Language Key 43 Name 44 Name 45 Name 46 Name 47 PO Box 48 Street 49 PO Box PCode 50 City 51 Postal Code 52 Country 53 Bank Key 54 Bank Account

SAP Screenfield
BKPF-BUKRS RF05A-BUSCS INVFO-ACCNT INVFO-BLDAT INVFO-BLART INVFO-BUDAT INVFO-WAERS INVFO-XMWST INVFO-XBLNR INVFO-WRBTR INVFO-WMWST INVFO-MWSKZ INVFO-SGTXT INVFO-ESRNR INVFO-ESRPZ INVFO-ESRRE INVFO-ZFBDT INVFO-ZTERM INVFO-ZBD2T INVFO-ZBD1P INVFO-ZBD2T INVFO-ZBD2P INVFO-ZBD3T INVFO-SKFBT INVFO-ZLSCH INVFO-REBZG INVFO-REBZJ INVFO-REBZZ INVFO-ZLSPR INVFO-BVTYP INVFO-HBKID INVFO-ZUONR INVFO-BKTXT INVFO-XREF1 INVFO-XREF2 INVFO-XREF3 INVFO-LZBKZ INVFO-LANDL INVFO-WWERT INVFO-KURSF BSEC-ANRED BSEC-SPRAS BSEC-NAME1 BSEC-NAME2 BSEC-NAME3 BSEC-NAME4 BSEC-PFACH BSEC-STRAS BSEC-PSTL2 BSEC-ORT01 BSEC-PSTLZ BSEC-LAND1 BSEC-BANKL BSEC-BANKN

KGS Activator fieldname


COMP_CODE POSTING_TYPE VENDOR_NO INVOICE_DATE BLART POSTING_DATE CURRENCY TAX_CALC INVOICE_NO AMOUNT TAX_AMOUNT TAX_CODE ITXT ESRNR ESRPZ ESRRE BLINE_DATE PTERM ZBD1T ZBD1P ZBD2T ZBD2P ZBD3T DBAS ZLSCH REBZG REBZJ REBZZ PBLK BVTYP HBKID ZUONR BKTXT XREF1 XREF2 XREF3 LZBKZ LANDL EXDATE EXRATE CPD_ANRED CPD_SPRAS CPD_NAME1 CPD_NAME2 CPD_NAME3 CPD_NAME4 CPD_PFACH CPD_STRAS CPD_PSTL2 CPD_ORT01 CPD_PSTLZ CPD_LAND1 CPD_BANKL CPD_BANKN

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 243/432

55 56 57 58

Bank country Reference VAT reg. no Bank name Dunning Area Invest.ID Payment Reference Reporting Country Payment Method Supplement Planning date Cash discount amount in doc. currency Amount Eligible Cash Discount in doc. curr.

BSEC-BANKS BSEC-BKREF BSEG-STCEG BNKA-BANKA INVFO-MABER INVFO-XINVE INVFO-KIDNO T007A-LSTML INVFO-UZAWE INVFO-FDTAG INVFO-WSKTO INVFO-SKFBT

CPD_BANKS CPD_BKREF CPD_STCEG CPD_BANKA MABER XINVE KIDNO REPCNTRY UZAWE FDTAG DAMOUNT DBAS

Technical Keys in Headerarea NOBINPT


Activates "no batchinput" mode for methode CALL TRANSACTION

Itemdata Dataset ACCOUNT SAP Fielddescription G/L Account Debit/credit indicator Amount in document currency Tax on sales/purchases code Assignment no. Value date Itemtext Companycode Cost Center Order Number Sales Order Item in Sales Order Profit Center Partner profit center WBS Element Network Operation number First Note Text Line Dynamic Dialog in our example: Customer Product Billing Type Sales Order Sales Ord. Item Order Plant Sales Org. Distr. Channel Division WBS Element Cost Object SAP Screenfield
ACGL_ITEM-HKONT ACGL_ITEM-SHKZG ACGL_ITEM-WRBTR ACGL_ITEM-MWSKZ ACGL_ITEM-ZUONR ACGL_ITEM-VALUT ACGL_ITEM-SGTXT ACGL_ITEM-BUKRS ACGL_ITEM-KOSTL ACGL_ITEM-AUFNR ACGL_ITEM-VBEL2 ACGL_ITEM-POSN2 ACGL_ITEM-PRCTR ACGL_ITEM-PPRCT ACGL_ITEM-PROJK ACGL_ITEM-NPLNR ACGL_ITEM-VORNR EENO_DYNP-ZEILE RKEAK-FIELD(01) RKEAK-FIELD(02) RKEAK-FIELD(03) RKEAK-FIELD(04) RKEAK-FIELD(05) RKEAK-FIELD(06) RKEAK-FIELD(07) RKEAK-FIELD(08) RKEAK-FIELD(09) RKEAK-FIELD(10) RKEAK-FIELD(11) RKEAK-FIELD(12)

KGS Activator fieldname


ACCOUNT SHKZG AMOUNT TAX_CODE ZUONR VDATE ITXT COMP_CODE COSTCENTER ORDNO SORD SORDP PRCTR PPRCT PROJK NPLNR VORNR LTXT RKEAKFA01 RKEAKFA02 RKEAKFA03 RKEAKFA04 RKEAKFA05 RKEAKFA06 RKEAKFA07 RKEAKFA08 RKEAKFA09 RKEAKFA10 RKEAKFA11 RKEAKFA12

A B C D E F G H I J K L M N O P Q R S

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 244/432

Profit Center Partner Pr. Ctr Customer group ... RKEAK_FIELD(01) - (04) missing in this example Material Group Prod.hierarchy Sales employee 1 Sales emplyee 2 Payer 1 Payer 2 Payer 3 Payer 4 Payer 5 Payer 6 Cost center (disabled in our sample) Promotion Material Type Acct asgnmt grp Vertegenwoord. Customer order number Quantity Base Unit of Measure Personal Number Schedule line Business area Segment for Segmental Reporting

RKEAK-FIELD(13) RKEAK-FIELD(14) RKEAK-FIELD(15)

RKEAKFA13 RKEAKFA14 RKEAKFA15 RKEAKFB01 -xx05 RKEAKFB05 RKEAKFB06 RKEAKFB07 RKEAKFB08 RKEAKFB09 RKEAKFB10 RKEAKFB11 RKEAKFB12 RKEAKFB13 RKEAKFB14 RKEAKFB15 RKEAKFB16 RKEAKFB17 RKEAKFB18 RKEAKFB19 KDAUF MENGE MEINS PERNR ETEN2 GSBER SEGMENT

RKEAK-FIELD(05) RKEAK-FIELD(06) RKEAK-FIELD(07) RKEAK-FIELD(08) RKEAK-FIELD(09) RKEAK-FIELD(10) RKEAK-FIELD(11) RKEAK-FIELD(12) RKEAK-FIELD(13) RKEAK-FIELD(14) RKEAK-FIELD(15) RKEAK-FIELD(16) RKEAK-FIELD(17) RKEAK-FIELD(18) RKEAK-FIELD(19) ACGL_ITEM_KDAUF ACGL_ITEM-MENGE ACGL_ITEM-MEINS ACGL_ITEM-PERNR ACGL_ITEM-ETEN2 ACGL_ITEM-GSBER ACGL_ITEM-SEGMENT

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 245/432

2.5.6.4 Transaction F-90 / F-92

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 246/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 247/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 248/432

Headerdata SAP Fielddescription 1 Document date 2 Posting date 3 Type 4 Company code 5 Currency 6 Exchange rate 7 Document Number 8 Reference 9 Doc.header text 10 Trading Part. BA 11 Fiscal Period 12 Translation date 13 Cross-CC no. Itemdata

SAP Screenfield
BKPF-BLDAT BKPF-BUDAT BKPF-BLART BKPF-BUKRS BKPF-WAERS BKPF-KURSF BKPF-BELNR BKPF-XBLNR BKPF-BKTXT RF05A-PARGB BKPF-MONAT BKPF-WWERT BKPF-BVORG

KGS Activator fieldname


INVOICE_DATE POSTING_DATE POSTING_TYPE COMP_CODE CURRENCY EXRATE BELNR INVOICE_NO BKTXT PARGB FPERIOD EXDATE BVORG

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 249/432

Dataset ACCOUNT SAP Fielddescription Dynpro number (default for itemline 2 = 302 and for all other line 300) Posting Key Account Special G/L Indicator Asset transaction type Amount Tax amount Tax Code Calculate tax Business Area Payment Terms Baseline date Amount Eligible for Cash Discount Payment Block Key Currency for Automatic Payment Assignment number Item Text Cash discount amount Partner bank type Short key for a house bank SAP Screenfield KGS Activator fieldname
DYNPRO RF05A-NEWBS RF05A-NEWKO RF05A-NEWUM RF05A-NEWBW BSEG-WRBTR BSEG-WMWST BSEG-MWSKZ RF05A-XMWST BSEG-GSBER BSEG-ZTERM BSEG-ZFBDT BSEG-SKFBT BSEG-ZLSPR BSEG-PYCUR BSEG-ZUONR BSEG-SGTXT BSEG-WSKTO BSEG-BVTYP BSEG-HBKID PKEY ACCOUNT NEWUM TTYPE AMOUNT TAX_AMOUNT TAX_CODE TAX_CALC GSBER PTERM BLINE_DATE DBAS PBLK PYCUR ZUONR ITXT DAMOUNT BVTYP HBKIDE

A B C D E F G H I J K L M N O P Q R S

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 250/432

2.5.6.5 Transaction FV60

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 251/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 252/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 253/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 254/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 255/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 256/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 257/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 258/432

Headerdata SAP Fielddescription 1 Company code 2 Transaction 3 Vendor KGS Activator for SAP R/3 Reference Guide

SAP Screenfield
BKPF-BUKRS RF05A-BUSCS INVFO-ACCNT

KGS Activator fieldname


COMP_CODE POSTING_TYPE VENDOR_NO

Version 1.75E3

Page 259/432

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Invoice date Doctype Posting date Currency Calculate Tax Reference Amount Tax amount Tax code Itemtext POR Number POR Number check digit POR ref. no Baseline date Terms of payment key Cash Discount days 1 Cash Discount Percentage 1 Cash Discount days 2 Cash Discount Percentage 2 Net Payment Terms Period Amount Eligible for Cash Discount Payment Method Invoice Referenz Fiscal Year of relevant Invoice Referenz Line item in the relevant Invoice Referenz Payment Block Key Part. bank House bank Assignment HeadText Reference key 1 for line item Reference key 2 for line item Reference key 3 for line item State central bank indicator Supplying Country Translation dte. Exchange rate Title Language Key Name Name Name Name PO Box Street PO Box PCode City Postal Code Country Bank Key Bank Account Bank country Reference VAT reg. no Bank name Dunning Area

INVFO-BLDAT INVFO-BLART INVFO-BUDAT INVFO-WAERS INVFO-XMWST INVFO-XBLNR INVFO-WRBTR INVFO-WMWST INVFO-MWSKZ INVFO-SGTXT INVFO-ESRNR INVFO-ESRPZ INVFO-ESRRE INVFO-ZFBDT INVFO-ZTERM INVFO-ZBD2T INVFO-ZBD1P INVFO-ZBD2T INVFO-ZBD2P INVFO-ZBD3T INVFO-SKFBT INVFO-ZLSCH INVFO-REBZG INVFO-REBZJ INVFO-REBZZ INVFO-ZLSPR INVFO-BVTYP INVFO-HBKID INVFO-ZUONR INVFO-BKTXT INVFO-XREF1 INVFO-XREF2 INVFO-XREF3 INVFO-LZBKZ INVFO-LANDL INVFO-WWERT INVFO-KURSF BSEC-ANRED BSEC-SPRAS BSEC-NAME1 BSEC-NAME2 BSEC-NAME3 BSEC-NAME4 BSEC-PFACH BSEC-STRAS BSEC-PSTL2 BSEC-ORT01 BSEC-PSTLZ BSEC-LAND1 BSEC-BANKL BSEC-BANKN BSEC-BANKS BSEC-BKREF BSEG-STCEG BNKA-BANKA INVFO-MABER

INVOICE_DATE BLART POSTING_DATE CURRENCY TAX_CALC INVOICE_NO AMOUNT TAX_AMOUNT TAX_CODE ITXT ESRNR ESRPZ ESRRE BLINE_DATE PTERM ZBD1T ZBD1P ZBD2T ZBD2P ZBD3T DBAS ZLSCH REBZG REBZJ REBZZ PBLK BVTYP HBKID ZUONR BKTXT XREF1 XREF2 XREF3 LZBKZ LANDL EXDATE EXRATE CPD_ANRED CPD_SPRAS CPD_NAME1 CPD_NAME2 CPD_NAME3 CPD_NAME4 CPD_PFACH CPD_STRAS CPD_PSTL2 CPD_ORT01 CPD_PSTLZ CPD_LAND1 CPD_BANKL CPD_BANKN CPD_BANKS CPD_BKREF CPD_STCEG CPD_BANKA MABER

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 260/432

Invest.ID Payment Reference Reporting Country Swiftcode IBAN Payment Method Supplement Planning date Cash discount amount in doc. currency Amount Eligible Cash Discount in doc. curr.

INVFO-XINVE INVFO-KIDNO T007A-LSTML BNKA-SWIFT IBAN00 INVFO-UZAWE INVFO-FDTAG INVFO-WSKTO INVFO-SKFBT

XINVE KIDNO REPCNTRY CDP_SWIFT CDP_IBAN UZAWE FDTAG DAMOUNT DBAS

Itemdata Dataset ACCOUNT SAP Fielddescription G/L Account Debit/credit indicator Amount in document currency Tax on sales/purchases code Assignment no. Value date Itemtext Companycode Cost Center Order Number Sales Order Item in Sales Order Profit Center Partner profit center WBS Element Network Operation number First Note Text Line Dynamic Dialog in our example: Customer Product Billing Type Sales Order Sales Ord. Item Order Plant Sales Org. Distr. Channel Division WBS Element Cost Object Profit Center Partner Pr. Ctr Customer group ... RKEAK_FIELD(01) - (04) missing in this example Material Group Prod.hierarchy Sales employee 1 Sales emplyee 2 SAP Screenfield
ACGL_ITEM-HKONT ACGL_ITEM-SHKZG ACGL_ITEM-WRBTR ACGL_ITEM-MWSKZ ACGL_ITEM-ZUONR ACGL_ITEM-VALUT ACGL_ITEM-SGTXT ACGL_ITEM-BUKRS ACGL_ITEM-KOSTL ACGL_ITEM-AUFNR ACGL_ITEM-VBEL2 ACGL_ITEM-POSN2 ACGL_ITEM-PRCTR ACGL_ITEM-PPRCT ACGL_ITEM-PROJK ACGL_ITEM-NPLNR ACGL_ITEM-VORNR EENO_DYNP-ZEILE RKEAK-FIELD(01) RKEAK-FIELD(02) RKEAK-FIELD(03) RKEAK-FIELD(04) RKEAK-FIELD(05) RKEAK-FIELD(06) RKEAK-FIELD(07) RKEAK-FIELD(08) RKEAK-FIELD(09) RKEAK-FIELD(10) RKEAK-FIELD(11) RKEAK-FIELD(12) RKEAK-FIELD(13) RKEAK-FIELD(14) RKEAK-FIELD(15)

KGS Activator fieldname


ACCOUNT SHKZG AMOUNT TAX_CODE ZUONR VDATE ITXT COMP_CODE COSTCENTER ORDNO SORD SORDP PRCTR PPRCT PROJK NPLNR VORNR LTXT RKEAKFA01 RKEAKFA02 RKEAKFA03 RKEAKFA04 RKEAKFA05 RKEAKFA06 RKEAKFA07 RKEAKFA08 RKEAKFA09 RKEAKFA10 RKEAKFA11 RKEAKFA12 RKEAKFA13 RKEAKFA14 RKEAKFA15 RKEAKFB01 -xx05 RKEAKFB05 RKEAKFB06 RKEAKFB07 RKEAKFB08

A B C D E F G H I J K L M N O P Q R S

RKEAK-FIELD(05) RKEAK-FIELD(06) RKEAK-FIELD(07) RKEAK-FIELD(08)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 261/432

Payer 1 Payer 2 Payer 3 Payer 4 Payer 5 Payer 6 Cost center (disabled in our sample) Promotion Material Type Acct asgnmt grp Vertegenwoord. Customer order number Quantity Base Unit of Measure Personal Number Schedule line Business area Segment for Segmental Reporting

RKEAK-FIELD(09) RKEAK-FIELD(10) RKEAK-FIELD(11) RKEAK-FIELD(12) RKEAK-FIELD(13) RKEAK-FIELD(14) RKEAK-FIELD(15) RKEAK-FIELD(16) RKEAK-FIELD(17) RKEAK-FIELD(18) RKEAK-FIELD(19) ACGL_ITEM_KDAUF ACGL_ITEM-MENGE ACGL_ITEM-MEINS ACGL_ITEM-PERNR ACGL_ITEM-ETEN2 ACGL_ITEM-GSBER ACGL_ITEM-SEGMENT

RKEAKFB09 RKEAKFB10 RKEAKFB11 RKEAKFB12 RKEAKFB13 RKEAKFB14 RKEAKFB15 RKEAKFB16 RKEAKFB17 RKEAKFB18 RKEAKFB19 KDAUF MENGE MEINS PERNR ETEN2 GSBER SEGMENT

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 262/432

2.5.6.6 Transaction FB70

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 263/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 264/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 265/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 266/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 267/432

Headerdata SAP Fielddescription 1 Company code 2 Transaction 3 Vendor 4 Invoice date 5 Doctype 6 Posting date 7 Currency 8 Calculate Tax 9 Reference 10 Amount 11 Tax amount 12 Tax code 13 Itemtext 14 POR Number 15 POR Number check digit 16 POR ref. no 17 Baseline date

SAP Screenfield
BKPF-BUKRS RF05A-BUSCS INVFO-ACCNT INVFO-BLDAT INVFO-BLART INVFO-BUDAT INVFO-WAERS INVFO-XMWST INVFO-XBLNR INVFO-WRBTR INVFO-WMWST INVFO-MWSKZ INVFO-SGTXT INVFO-ESRNR INVFO-ESRPZ INVFO-ESRRE INVFO-ZFBDT

KGS Activator fieldname


COMP_CODE POSTING_TYPE VENDOR_NO INVOICE_DATE BLART POSTING_DATE CURRENCY TAX_CALC INVOICE_NO AMOUNT TAX_AMOUNT TAX_CODE ITXT ESRNR ESRPZ ESRRE BLINE_DATE

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 268/432

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Terms of payment key Cash Discount days 1 Cash Discount Percentage 1 Cash Discount days 2 Cash Discount Percentage 2 Net Payment Terms Period Amount Eligible for Cash Discount Payment Method Invoice Referenz Fiscal Year of relevant Invoice Referenz Line item in the relevant Invoice Referenz Payment Block Key Part. bank House bank Assignment HeadText Reference key 1 for line item Reference key 2 for line item Reference key 3 for line item State central bank indicator Supplying Country Translation dte. Exchange rate Reporting Country Swiftcode IBAN Payment Method Supplement

INVFO-ZTERM INVFO-ZBD2T INVFO-ZBD1P INVFO-ZBD2T INVFO-ZBD2P INVFO-ZBD3T INVFO-SKFBT INVFO-ZLSCH INVFO-REBZG INVFO-REBZJ INVFO-REBZZ INVFO-ZLSPR INVFO-BVTYP INVFO-HBKID INVFO-ZUONR INVFO-BKTXT INVFO-XREF1 INVFO-XREF2 INVFO-XREF3 INVFO-LZBKZ INVFO-LANDL INVFO-WWERT INVFO-KURSF T007A-LSTML BNKA-SWIFT IBAN00 INVFO-UZAWE

PTERM ZBD1T ZBD1P ZBD2T ZBD2P ZBD3T DBAS ZLSCH REBZG REBZJ REBZZ PBLK BVTYP HBKID ZUONR BKTXT XREF1 XREF2 XREF3 LZBKZ LANDL EXDATE EXRATE REPCNTRY CDP_SWIFT CDP_IBAN UZAWE

Itemdata Dataset ACCOUNT SAP Fielddescription G/L Account Debit/credit indicator Amount in document currency Tax on sales/purchases code Assignment no. Value date Itemtext Companycode Cost Center Order Number Sales Order Item in Sales Order Profit Center Partner profit center WBS Element Network Operation number G/L account short text Trading Partner Long Text Document line SAP Screenfield
ACGL_ITEM-HKONT ACGL_ITEM-SHKZG ACGL_ITEM-WRBTR ACGL_ITEM-MWSKZ ACGL_ITEM-ZUONR ACGL_ITEM-VALUT ACGL_ITEM-SGTXT ACGL_ITEM-BUKRS ACGL_ITEM-KOSTL ACGL_ITEM-AUFNR ACGL_ITEM-VBEL2 ACGL_ITEM-POSN2 ACGL_ITEM-PRCTR ACGL_ITEM-PPRCT ACGL_ITEM-PROJK ACGL_ITEM-NPLNR ACGL_ITEM-VORNR ACGL_ITEM-KONTO_TXT ACGL_ITEM-VBUND EENO_DYNP-ZEILE

KGS Activator fieldname


ACCOUNT SHKZG AMOUNT TAX_CODE ZUONR VDATE ITXT COMP_CODE COSTCENTER ORDNO SORD SORDP PRCTR PPRCT PROJK NPLNR VORNR TXT VBUND LTXT

A B C D E F G H I J K L M N O P Q R S T

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 269/432

2.5.6.7 Transaction FBV0


Transaction FBV0 is used to post park documents. Behind the initial screen, transaction FV60 will be started. Please see Section Transaction FV60" for details.

Headerdata SAP Fielddescription 1 Key for Parking Processing mode

SAP Screenfield

KGS Activator fieldname


SAP_OBJECTID PMODE S=SAVE P=POST

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 270/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 271/432

2.5.6.8 Transaction MIRO

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 272/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 273/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 274/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 275/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 276/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 277/432

Headerdata SAP Fielddescription 1 Company code 2 Transaction 3 Invoice date 4 Posting date 5 Reference 6 Currency Key 7 Amount 8 Tax amount 9 Tax code 10 Reference document category 11 Item Text 12 Calculate tax 13 POR Number 14 POR Number check digit 15 POR ref. no 16 Baseline date 17 Terms of payment key 18 Cash discount days 1 19 Cash Discount Percentage 1 20 Cash Discount Percentage 2 21 Cash discount days 2 22 Net Payment Terms Period

SAP Screenfield
BKPF-BUKRS RM08M-VORGANG INVFO-BLDAT INVFO-BUDAT INVFO-XBLNR INVFO-WAERS INVFO-WRBTR INVFO-WMWST INVFO-MWSKZ RM08M-REFERENZBELEGTYP INVFO-SGTXT INVFO-XMWST INVFO-ESRNR INVFO-ESRPZ INVFO-ESRRE INVFO-ZFBDT INVFO-ZTERM INVFO-ZBD1T INVFO-ZBD1P INVFO-ZBD2P INVFO-ZBD2T INVFO-ZBD3T

KGS Activator fieldname


COMP_CODE POSTING_TYPE INVOICE_DATE POSTING_DATE INVOICE_NO CURRENCY AMOUNT TAX_AMOUNT TAX_CODE REFTYPE ITXT TAX_CALC ESRNR ESRPZ ESRRE BLINE_DATE PTERM ZBD1T ZBD1P ZBD2P ZBD2T ZBD3T

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 278/432

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

Cash discount Payment Method Invoice Referenz Fiscal Year of relevant Invoice Referenz Line item in the relevant Invoice Referenz Payment Block Key Part. bank House bank Unplanned delivery costs Document type Tax code Unplanned delivery costs Exch. Rate Inv.Party Assignment number Header Text Cent. Bank Suppl. Cntry Reporting Country

INVFO-WSKTO INVFO-ZLSCH INVFO-REBZG INVFO-REBZJ INVFO-REBZZ INVFO-ZLSPR INVFO-BVTYP INVFO-HBKID INVFO-BEZNK INVFO-BLART INVFO-MWSKZ_BNK INVFO-KURSF INVFO-LIFRE INVFO-ZUONR INVFO-BKTXT INVFO-LZBKZ INVFO-LANDL T007A-LSTML

DBAS ZLSCH REBZG REBZJ REBZZ PBLK BVTYPE HBKID DELV_COST BLART DELV_TAXCODE EXRATE VENDOR_NO ZUONR BKTXT LZBKZ LANDL REPCNTRY

Itemdata Dataset PO_NUMBER SAP Fielddescription A1 A2 A3 B C D E F Number of external delivery note (depending on BLART 1) Purchasing Document Number (depending on BLART 2) Vendor Number (depending on BLART 5) Amount Quantity Tax Code subsequent debit/credit Final Invoice Indicator Quantity in purchase order price unit SAP Screenfield
RM08M-LFSNR RM08M-EBELN RM08M-SUPERFIELD DRSEG-WRBTR DRSEG-MENGE DRSEG-MWSKZ DRSEG-TBTKZ DRSEG-EREKZ DRSEG-BPMNG

KGS Activator fieldname


PO_NUMBER PO_NUMBER PO_NUMBER NET_AMOUNT QUANTITY TAX_CODE TBTKZ FINVF

PO_PR_QNT

Additional note: This transaction supports the processing of max. 8 Purchase order numbers. This is a SAP limit. Please keep in mind that the order of the submitted line information must exactly correspond to the order in which the transaction offers the line information for input. With function PurchaseOrderGetDetail, e.g. you can find out which positions of the purchase order were not paid yet.
Dataset ACCOUNT SAP Fielddescription G/L Account SAP Screenfield
ACGL_ITEM-HKONT

KGS Activator fieldname


ACCOUNT

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 279/432

I J K L M N O P Q R S T

Debit/Credit indicator Amount in document currency Tax on sales/purchases code Item Text Cost Center Order Number Sales Order Profit Center WBS Element Assignment Number Network Operation number

ACGL_ITEM-SHKZG ACGL_ITEM-WRBTR ACGL_ITEM-MWSKZ ACGL_ITEM-SGTXT ACGL_ITEM-KOSTL ACGL_ITEM-AUFNR ACGL_ITEM-VBEL2 ACGL_ITEM-PRCTR ACGL_ITEM-PROJK ACGL_ITEM-ZUONR ACGL_ITEM-NPLNR ACGL_ITEM-VORNR

SHKZG AMOUNT TAX_CODE ITXT COSTCENTER ORDNO VBEL2 PRCTR PROJK ZUONR NPLNR VORNR

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 280/432

2.5.6.9 Transaction MIR7

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 281/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 282/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 283/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 284/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 285/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 286/432

Headerdata SAP Fielddescription 1 Company code 2 Transaction 3 Invoice date 4 Posting date 5 Reference 6 Currency Key 7 Amount 8 Tax amount 9 Tax code 10 Reference document category 11 Item Text 12 Calculate tax 13 POR Number 14 POR Number check digit 15 POR ref. no 16 Baseline date 17 Terms of payment key 18 Cash discount days 1

SAP Screenfield
BKPF-BUKRS RM08M-VORGANG INVFO-BLDAT INVFO-BUDAT INVFO-XBLNR INVFO-WAERS INVFO-WRBTR INVFO-WMWST INVFO-MWSKZ RM08M-REFERENZBELEGTYP INVFO-SGTXT INVFO-XMWST INVFO-ESRNR INVFO-ESRPZ INVFO-ESRRE INVFO-ZFBDT INVFO-ZTERM INVFO-ZBD1T

KGS Activator fieldname


COMP_CODE POSTING_TYPE INVOICE_DATE POSTING_DATE INVOICE_NO CURRENCY AMOUNT TAX_AMOUNT TAX_CODE REFTYPE ITXT TAX_CALC ESRNR ESRPZ ESRRE BLINE_DATE PTERM ZBD1T

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 287/432

19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

Cash Discount Percentage 1 Cash Discount Percentage 2 Cash discount days 2 Net Payment Terms Period Cash discount Payment Method Invoice Referenz Fiscal Year of relevant Invoice Referenz Line item in the relevant Invoice Referenz Payment Block Key Part. bank House bank Unplanned delivery costs Document type Tax code Unplanned delivery costs Exch. Rate Inv.Party Assignment number Header Text Cent. Bank Suppl. Cntry Reporting Country

INVFO-ZBD1P INVFO-ZBD2P INVFO-ZBD2T INVFO-ZBD3T INVFO-WSKTO INVFO-ZLSCH INVFO-REBZG INVFO-REBZJ INVFO-REBZZ INVFO-ZLSPR INVFO-BVTYP INVFO-HBKID INVFO-BEZNK INVFO-BLART INVFO-MWSKZ_BNK INVFO-KURSF INVFO-LIFRE INVFO-ZUONR INVFO-BKTXT INVFO-LZBKZ INVFO-LANDL T007A-LSTML

ZBD1P ZBD2P ZBD2T ZBD3T DBAS ZLSCH REBZG REBZJ REBZZ PBLK BVTYPE HBKID DELV_COST BLART DELV_TAXCODE EXRATE VENDOR_NO ZUONR BKTXT LZBKZ LANDL REPCNTRY

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 288/432

Itemdata Dataset PO_NUMBER SAP Fielddescription A1 A2 A3 B C D E F Number of external delivery note (depending on BLART 1) Purchasing Document Number (depending on BLART 2) Vendor Number (depending on BLART 5) Amount Quantity Tax Code subsequent debit/credit Final Invoice Indicator Quantity in purchase order price unit SAP Screenfield
RM08M-LFSNR RM08M-EBELN RM08M-SUPERFIELD DRSEG-WRBTR DRSEG-MENGE DRSEG-MWSKZ DRSEG-TBTKZ DRSEG-EREKZ DRSEG-BPMNG

KGS Activator fieldname


PO_NUMBER PO_NUMBER PO_NUMBER NET_AMOUNT QUANTITY TAX_CODE TBTKZ FINVF PO_PR_QNT

Additional note: This transaction supports the processing of max. 8 Purchase order numbers. This is a SAP limit. Please keep in mind that the order of the submitted line information must exactly correspond to the order in which the transaction offers the line information for input. With function PurchaseOrderGetDetail, e.g. you can find out which positions of the purchase order were not paid yet.
Dataset ACCOUNT SAP Fielddescription G/L Account Debit/Credit indicator Amount in document currency Tax on sales/purchases code Item Text Cost Center Order Number Sales Order Profit Center WBS Element Assignment Number Network Operation number SAP Screenfield
ACGL_ITEM-HKONT ACGL_ITEM-SHKZG ACGL_ITEM-WRBTR ACGL_ITEM-MWSKZ ACGL_ITEM-SGTXT ACGL_ITEM-KOSTL ACGL_ITEM-AUFNR ACGL_ITEM-VBEL2 ACGL_ITEM-PRCTR ACGL_ITEM-PROJK ACGL_ITEM-ZUONR ACGL_ITEM-NPLNR ACGL_ITEM-VORNR

KGS Activator fieldname


ACCOUNT SHKZG AMOUNT TAX_CODE ITXT COSTCENTER ORDNO VBEL2 PRCTR PROJK ZUONR NPLNR VORNR

H I J K L M N O P Q R S T

2.5.6.10 Transaction MIR4


Transaction MIR4 is used to post park documents. Behind the initial screen, transaction MIR7 will be started. Please see Section Transaction MIR7" for details.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 289/432

Headerdata SAP Fielddescription 1 Key for Parking

SAP Screenfield

KGS Activator fieldname


SAP_OBJECTID

2.5.6.11 Transaction FBV1

3 5

4 6 8 7

10

11

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 290/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 291/432

E F Q G I H J W L K N O A B M C1 D1 C D P Y B1 Z X A1 R S T U V

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 292/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 293/432

Headerdata SAP Fielddescription 1 Document date 2 Type 3 Company code 4 Posting date 5 Currency 6 Document Number 7 Translation date 8 Reference 9 Doc.header text 10 Partner Business Area 11 Only transfer doc. in doc.curr. when posting

SAP Screenfield
BKPF-BLDAT BKPF-BLART BKPF-BUKRS BKPF-BUDAT BKPF-WAERS BKPF-BELNR BKPF-WWERT BKPF-XBLNR BKPF-BKTXT VBKPF-PARGB VBKPF-XBWAE

KGS Activator fieldname


INVOICE_DATE POSTING_TYPE COMP_CODE POSTING_DATE CURRENCY BELNR EXDATE INVOICE_NO BKTXT PARGB XBWAE

Itemdata Dataset ACCOUNT SAP Fielddescription Posting Key Account Special G/L Indicator for the Next Line Item Transaction type Amount Tax amount Calculate tax automatically Business Area Terms of payment key Baseline date Amount Eligible for Cash Discount Payment Block Key Currency for Automatic Payment Assignment number Text Company Code for the Next Line Item Tax Code Cash discount days 1 Cash discount percentage 1 Cash discount days 2 Cash discount percentage 2 Net Payment Terms Period Fixed Payment Terms Cash discount amount Invoice Reference Fiscal Year Invoice Reference Line Item Reference Invoice Payment Method Amount in Payment Currency Individual Payee in Document SAP Screenfield
RF05V-NEWBS RF05V-NEWKO RF05V-NEWUM RF05V-NEWBW BSEG-WRBTR BSEG-WMWST BKPF-XMWST BSEG-GSBER BSEG-ZTERM BSEG-ZFBDT BSEG-SKFBT BSEG-ZLSPR BSEG-PYCUR BSEG-ZUONR BSEG-SGTXT RF05V-NEWBK BSEG-MWSKZ BSEG-ZBD1T BSEG-ZBD1P BSEG-ZBD2T BSEG-ZBD2P BSEG-ZBD3T BSEG-ZBFIX BSEG-WSKTO BSEG-REBZG BSEG-REBZJ BSEG-REBZZ BSEG-ZLSCH BSEG-PYAMT RF05V-REGUL

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A1 B1 C1 D1

KGS Activator fieldname PKEY


ACCOUNT SPGLI TTYPE AMOUNT TAX_AMOUNT TAX_CALC GSBER PTERM BLINE_DATE DBAS PBLK PYCUR ZUONR ITXT COMP_CODE TAX_CODE ZBD1T ZBD1P ZBD2T ZBD2P ZBD3T ZBFIX DAMOUNT REBZG REBZJ REBZZ ZLSCH PYAMT REGUL

Special Header Keys: PMODE=P PMODE=S post parked invoice (default) store parked invoice

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 294/432

2.5.6.12 Transaction MIRA

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 295/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 296/432

Headerdata SAP Fielddescription 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Company code Transaction Invoice date Reference Posting date Currency Key Calculate Tax Amount Tax code Tax amount Item Text Reference document category Goods Items/Delivery Costs/Both Baseline date Cash discount days 1 Cash Discount Percentage 1 Cash Discount Percentage 2 Cash Discount

SAP Screenfield
BKPF-BUKRS RM08M-VORGANG INVFO-BLDAT INVFO-XBLNR INVFO-BUDAT INVFO-WAERS INVFO-XMWST INVFO-WRBTR INVFO-MWSKZ INVFO-WMWST INVFO-SGTXT RM08M-REFERENZBELEGTYP RM08M-XWARE_BNK INVFO-ZFBDT INVFO-ZBD1T INVFO-ZBD1P INVFO-ZBD2P INVFO-WSKTO

KGS Activator fieldname


COMP_CODE POSTING_TYPE INVOICE_DATE INVOICE_NO POSTING_DATE CURRENCY TAX_CALC AMOUNT TAX_CODE TAX_AMOUNT ITXT REFTYPE XWAREBNK BLINE_DATE ZBD1T ZBD1P ZBD2P WSKTO

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 297/432

19 20 21 22 23 24 25 26 27 28 29

Terms of payment key Cash discount days 2 Net Payment Terms Period Fixed Payment Terms Payment Method Payment Block Key Part. Bank Invoice Reference Fiscal Year of relevant Invoice Referenz House bank Vendor

INVFO-ZTERM INVFO-ZBD2T INVFO-ZBD3T INVFO-ZBFIX INVFO-ZLSCH INVFO-ZLSPR INVFO-BVTYP INVFO-REBZG INVFO-REBZJ INVFO-HBKID RM08M-SUPERFIELD

PTERM ZBD2T ZBD3T ZBFIX ZLSCH PBLK BVTYPE REBZG REBZJ HBKID VENDOR_NO

Dataset PO_NUMBER SAP Fielddescription A Purchasing Document Number SAP Screenfield


RM08M-EBELN

KGS Activator fieldname


PO_NUMBER

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 298/432

2.6 2.6.1

ABAP Samples / Exits Userexit

The submitted invoice data can be manipulated by an individual ABAP Function. You can activate your Userexitfunction in Table ZKGS_DMSIMP_EX. Transaction: SE16

Typ EXIT-ID String

Value

Description

ACTIVE EXIT FUB

Char

XXXX_WFL Userexit-ID for singlestep Workflow Transaction dependent e.g: FB60_WFL XXX Userexit-ID for function DocumentPost Transaction dependent e.g. FB60 X this dataset is active Name of your Userexitfunction

Your function must have following interface parameters.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 299/432

Parameter EXIT_ID contains the EXIT_ID of the current action. E.g. Exit-ID FB60_WFL -> Userexit is called from singlestep Workflow for FB60. Table DOCUMENT_DATA contains all invoiceinformation already provided by the OCR System.. You can modify this table. The modifications are taken into account at the further processing. The Table has 2 rows. NAME = dataset name (e.g HEADER for Headerdata, ITEM-00000001 for lineitem information WERT = Keylist Sample: NAME HEADER ITEM-00000001

WERT |COMP_CODE=1000|VENDOR_NO=12345678|. |ACCOUNT=113109|

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 300/432

You can use function Z_KGSREPLACEKEYINTABLE for replacing keyvalues or add new keys to the corresponding Keylist. Sample: FUNCTION Z_OCR_USEREXIT. *"---------------------------------------------------------------------*"*"Lokale Schnittstelle: *" IMPORTING *" REFERENCE(EXIT_ID) TYPE OAEXIT *" TABLES *" DOCUMENT_DATA STRUCTURE OARFCDATA *"---------------------------------------------------------------------DATA: KeyList type CHAR1024 ,FVALUE type CHAR255 ,CompCode type BUKRS ,PostingDate like SY-DATUM ,VendorNo like LFA1-LIFNR ,FNum type NUM10 ,w_Kred like VF_KRED ,BelArt type BLART . * Add key WFLM IF EXIT_ID = 'FB60_WFL'. CALL FUNCTION 'Z_KGSREPLACEKEYINTABLE' EXPORTING DATASET_NAME = 'HEADER' KEYNAME = 'WFLM' KEYVALUE = '1' * APPENDKEY = 'X' TABLES DOCUMENT_DATA = DOCUMENT_DATA. ENDIF.

* set payment block flag 'A if company code = 73 * Headerdaten lesen CALL FUNCTION 'Z_KGSGETFIELDLIST' EXPORTING NAME = 'HEADER' IMPORTING KEYLIST = KeyList TABLES DOCUMENT_DATA = DOCUMENT_DATA EXCEPTIONS NOT_FOUND = 1 OTHERS = 2. IF SY-SUBRC = 0. CALL FUNCTION 'Z_KGSGETFIELDVALUE' EXPORTING FELDLIST = KeyList FIELDNAME = 'COMP_CODE' INDEX = 0 IMPORTING FIELDVALUE = FVALUE EXCEPTIONS NOT_FOUND = 1

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 301/432

OTHERS ENDIF.

= 2.

IF EXIT_ID = 'FB60_WFL' AND CompCode = '73'. FVALUE = 'A'. CALL FUNCTION 'Z_KGSREPLACEKEYINTABLE' EXPORTING DATASET_NAME = 'HEADER' KEYNAME = 'PBLK' KEYVALUE = FVALUE * APPENDKEY = 'X' TABLES DOCUMENT_DATA = DOCUMENT_DATA. ENDIF. ENDFUNCTION.

2.6.2

SAP Workflow programming

The enclosed RFC functions for calling SAP transaction with invoice data see themselves as examples. The naming of such functions has the following construction: Z_KGSCALL_xxxx. For example the name of the Function for transaction FB60 is Z_KGSCALL_FB60. To call such a function from the workflow, see following example:
Data DOCDATA TYPE TABLE OF OARFCDATA

READ TABLE it_requester WITH KEY OBJTYPE = 'WORKITEM'. workitem_id = it_requester-OBJKEY. CALL FUNCTION 'Z_KGSREADWIDOCDATA' EXPORTING WORKITEM_ID = workitem_id TABLES DOCDATA = DOCDATA EXCEPTIONS IS_NULL = 1 NOT_FOUND = 2 TYPE_CONFLICT = 3 OTHERS = 4. IF TCODE = 'FB60'. CALL FUNCTION 'Z_KGSCALL_FB60' IMPORTING * SAP_OBJECT = w_SAPOBJ * SAP_OBJECTID = w_SAPOBJKEY TABLES DOCUMENT_DATA = docdata. ENDIF.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 302/432

3
3.1

KGS Activator COM Classes


TLFieldList (sapalinkcom. TLFieldlist)

This class is toolset to create parameterstrings. A parameterstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: |PARAM1=VALUE1| PARAM2=VALUE2| PARAM3=VALUE3| Example using Class TLFieldList with VB:. Dim SAP as Object Set SAP = CreateObject("sapalinkcom.TLFieldList")

3.1.1

Methods

3.1.1.1 Function AddField


void AddField(BSTR FieldName, BSTR FieldValue) Sample: MyTLFieldList.AddField(COMPANY_CODE,1000);

3.1.1.2 Function AddFieldsFromString


void AddFieldsFromString(BSTR String) Sample: MyTLFieldList.AddFieldsFromString(|KEY1=VAL1|KEY2=VAL2|);

3.1.1.3 Function GetCount


int GetCount()

3.1.1.4 Function GetFieldValue


String GetFieldValue(BSTR FieldName)

3.1.1.5 Function CreateString


String CreateString()

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 303/432

3.1.1.6 Function RemoveAll


String RemoveAll()

3.1.1.7 Function RemoveField


short RemoveFieldl(BSTR FieldName)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 304/432

3.1.1.8 Function LoadString


With this function you can load a parameterstring and access the values with function GetFieldValue String LoadString() Sample: MyTLFieldList.LoadString(|COMPANY_CODE,1000|AMOUNT=12,34|); Str=MyTLFieldList.GetFieldValue(AMOUNT);

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 305/432

3.2

RWData (sapalinkcom. RWData)

This class serves for the exchange of arrays (e.g. ordering positions) Example using Class RWData with VB:. Dim SAP as Object Set SAP = CreateObject("sapalinkcom.RWData")

3.2.1

Methods

3.2.1.1 Function AddString


Adds an parameterstring to the object. A parameterstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: |PARAM1=VALUE1| PARAM2=VALUE2| PARAM3=VALUE3|

3.2.1.2 Function GetCount


Returns an integer value containing the element count

3.2.1.3 Function GetFirstString


Gets the first string of the object

3.2.1.4 Function GetLastString


Gets the last string of the object

3.2.1.5 Function GetNextString


Gets the next string of the object

3.2.1.6 Function GetPrevString


Gets the previous string of the object

3.2.1.7 GetString(short Index)


Gets the string of the object specified by a zero-based index.

3.2.1.8 RemoveAll()
Removes all previous added Strings from the object.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 306/432

3.3

DOCContainer (sapalinkcom. DOCContainer)

This class function as a containers for documentdata (see Methode CallUsrFctDocContainer in SAPSYS object). Example using Class DOCContainer with VB:. Dim SAP as Object Set SAP = CreateObject("sapalinkcom. DOCContainer ")

3.3.1

Methods

3.3.1.1 Function AddDocument


This function adds documentinformation to the container short AddDocument(BSTR ContRepID, BSTR DocID, BSTR ArchiveObj, BSTR DocType, BSTR Data, IRWData *PosData,) Parameter:(IN) ContRepID SAP ContentRepository DocID Archive-Document ID ArchivObj SAP ArchivObj DocType Mimetyp of the Document Data Keyliste with Headerinforamtion (see SAPSYS Workitemcreatedata) PosData Object with detailed purchase order items (see SAPSYS Workitemcreatedata)

Returncode: 0 ok -1 Error

3.3.1.2 Function RemoveAll


This function removes all documents from the container RemoveAll()

3.3.1.3 Function RemoveDocument


This function removes a specified document from the container short RemoveDocument(BSTR ContRepID, BSTR DocID,) Parameter:(IN) ContRepID SAP ContentRepository DocID Archive-Document ID Returncode: 0 ok -1 Error (not found)

3.3.1.4 Function GetCount


This function delivers the number of documents in the container

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 307/432

short GetCount() Returncode: Number of documents

3.3.1.5 Function GetDocumentAt


This function delivers the document information in the container with the specified index short GetDocumentAt(int Index, BSTR *ContRepID, BSTR *DocID, BSTR *ArchiveObj, BSTR *DocType, BSTR *Data, IRWData **PosData) Parameter:(IN) Index zero based index

Parameter:(OUT) ContRepID SAP ContentRepository DocID Archive-Document ID ArchivObj SAP ArchivObj DocType Mimetyp of the Document Data Keyliste with Headerinforamtion (see SAPSYS Workitemcreatedata) PosData Object with detailed purchase order items (see SAPSYS Workitemcreatedata)

Returncode: 0 ok -1 Error

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 308/432

3.4

SAPSYS (sapalinkcom.SAPSYS)

Example using Class SAPSYS with VB:. Dim SAP as Object Set SAP = CreateObject("sapalinkcom.SAPSYS")

3.4.1

Methods

3.4.1.1 Function Open


This function initialize the class. Function Open has to be called before using other function of the SAPSYS class. short Open (LPCSTR VendorName, LPCSTR ProductName, LPCSTR ProductVersion) Parameter: VendorName Vendorname (of the calling Application ) ProductName Productname ProductVersion Productversion Returncode: 0 ok

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 309/432

3.4.1.2 Function ActivitiyCreateCRM


This Function creates a Activity and link a document to this item . This function is only available at a SAP CRM System short ActivityCreateCRM(BSTR ConfigID, BSTR ContRepID, BSTR DocID, BSTR ArchiveObj, BSTR DocType, BSTR Keylist, BSTR *ActivityInfo) Parameter: ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. ContRepID SAP ContentRepository DocID Archive-Document ID ArchivObj SAP ArchivObj DocType Mimetyp of the Document Keyliste Keyliste with Activity information.

The Keylist has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator

Example: |ACTIVITY_CODE=Z003|BUSPARTNER_NO=2222222|DEP_NAME=Dep. Of Health|POSTREF_NO=ABCDERF| ACTIVITY_CODE BUSPARTNER_NO BUSPARTNER_NAME DEP_NAME POSTREF_NO ActivityInfo Activity Code Business partner No. Business partner Name Department Name Posting Reference No. information about the create Activity .

Example: |ACTIVITY_NO=01000012| ACTIVITY_GUID = E3FEA85DB6364F57A1DF96FD8E4E0F3A | ACTIVITY_CODE BUSPARTNER_NO DEP_NO Activity Code Business partner No. Department No.

Returncode: 0 ok -1 Connection to SAP System failed -2 Error translating parameters

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 310/432

3.4.1.3 Function ArchiveConnectionsGet


This function finds all SAP Object connected with the specified contentrepository / archive document id. short ArchiveConnectionsGet(BSTR ConfigID, BSTR ContRepID, BSTR DocID, BSTR ADateFrom, BSTR ADateTo, IRWData **ConnectionData) Parameter: ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. ContRepID SAP ContentRepository (optional -> Empty String allowed) DocID Archive-Document ID (optional -> Empty String allowed) ADateFrom Archive Date from (optional -> Empty String allowed) ADateTo Archive Date To (optional -> Empty String allowed) Parameter (OUT): ConnectionData Object with the Connectionslist Each parameter string contains following fields SAP_CLIENT SAP_OBJECT SAP_OBJECTID CREPID DOCID AROBJECT ARDATE SAP Client Number SAP Objecttyp SAP Object ID Content Repository ID Archive Document ID ArchiveLink Documenttyp Date of archiving / object link

Returncode: 0 ok -1 Connection to SAP System failed

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 311/432

3.4.1.4 Function CallUsrFct


This Function calls the RFC Function Z_KGSACTIVATORUSRFCT. Here you can add your own ABAP Code for special requirements. short CallUsrFct(LPCSTR ConfigID, LPCSTR OpCode LPCSTR InParam,, BSTR * OutParam) Parameter: ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. OpCode will be passed to Function Z_KGSACTIVATORUSRFCT InParameter will be passed to Function Z_KGSACTIVATORUSRFCT OutParameter return information from Function Z_KGSACTIVATORUSRFCT

Returncode: 0 ok -1 Connection to SAP System failed

The RFC Function must be defined as follow:

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 312/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 313/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 314/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 315/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 316/432

3.4.1.5 Function CallUsrFctDocContainer


This Function calls the RFC Function Z_KGSACTIVATORUSRFCTDOCC. Here you can add your own ABAP Code for special requirements. short CallUsrFctDocContainer(BSTR ConfigID, BSTR OpCode, IDOCContainer *DocContainer) Parameter(IN): ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. OpCode will be passed to Function Z_KGSACTIVATORUSRFCT DocContainer will be passed to Function Z_KGSACTIVATORUSRFCT

Returncode: 0 ok -1 Connection to SAP System failed

The RFC Function must be defined as follow:

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 317/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 318/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 319/432

This RFC Function receives the document parameter from the container in the table DOCUMENT_DATA. Table DOCUMENT_DATA contains 2 rows. Row NAME and WERT. The first dataset has the value DOCINFO following by HEADER,ITEM etc. . The next dataset with name DOCINFO is the first dataset of a new document.
Sample Name DOCINFO HEADER HEADER-00000001 ATTRIBUT ITEM-00000001 ITEM-00000002 DOCINFO HEADER HEADER-00000001 ATTRIBUT ITEM-00000001 DOCINFO .. .. Wert |DOCID=DOCID0001|ARCHIVID=T1|DOCTYPE=FAX|AROBJECT=FIIINVOICE| |COMP_CODE=1000|USRF_GJAHR=2003|ACDOC_TYPE=31|ACDOC_NO=. |USRF_AUFTABR=0|USRF_TELNO.. |ATTR_UFSD=20030829|.. |NET_AMOUNT=1000,00|ACCOUNT=116100|TAX_CODE=VN| |NET_AMOUNT=400,00|ACCOUNT=116120|TAX_CODE=VN| |DOCID=DOCID0002|ARCHIVID=T1|DOCTYPE=FAX|AROBJECT=FIIINVOICE| |COMP_CODE=1000|USRF_GJAHR=2003|ACDOC_TYPE=31|ACDOC_NO=. |USRF_AUFTABR=0|USRF_TELNO.. |ATTR_UFSD=20030829|.. |NET_AMOUNT=1000,00|ACCOUNT=116100|TAX_CODE=VN| |DOCID=DOCID0002|ARCHIVID=T1|DOCTYPE=FAX|AROBJECT=FIIINVOICE|

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 320/432

FUNCTION Z_KGSACTIVATORUSRFCTDOCC. *"---------------------------------------------------------------------*"*"Lokale Schnittstelle: *" IMPORTING *" VALUE(OPCODE) TYPE CHAR1024 OPTIONAL *" EXPORTING *" VALUE(RETURN) TYPE BAPIRET1 *" TABLES *" DOCUMENT_DATA STRUCTURE OARFCDATA *"---------------------------------------------------------------------DATA: w_keyliste type CHAR1024 w_scandate type ..... ....... ....... IF OPCODE = 'MyOpcode' ......... ENDIF.

LOOP AT document_data. w_keyliste = document_data-wert. IF document_data-name = 'DOCINFO'. * --- Dokumentenwechsel ---* CALL FUNCTION 'Z_KGSGETFIELDVALUE' EXPORTING FIELDLIST FIELDNAME IMPORTING FIELDVALUE EXCEPTIONS NOT_FOUND IF sy-subrc = 0. w_archiv_id = FVALUE. ENDIF. CALL FUNCTION 'Z_KGSGETFIELDVALUE' EXPORTING FIELDLIST FIELDNAME IMPORTING FIELDVALUE EXCEPTIONS NOT_FOUND IF sy-subrc = 0. w_arc_doc_id = FVALUE. ENDIF. CALL FUNCTION 'Z_KGSGETFIELDVALUE' EXPORTING FIELDLIST FIELDNAME IMPORTING FIELDVALUE EXCEPTIONS NOT_FOUND IF sy-subrc = 0. w_doc_type = FVALUE. ENDIF.

= w_keyliste = 'ARCHIVID' = FVALUE = 1.

= w_keyliste = 'DOCID' = FVALUE = 1.

= w_keyliste = 'DOCTYPE' = FVALUE = 1.

ENDIF. IF document_data-name(6) = 'HEADER'. CALL FUNCTION 'Z_KGSGETFIELDVALUE' EXPORTING FIELDLIST FIELDNAME IMPORTING FIELDVALUE EXCEPTIONS

= w_keyliste = 'COMP_CODE' = FVALUE

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 321/432

NOT_FOUND IF sy-subrc = 0. w_bukrs = FVALUE. ENDIF. ENDIF. * --- Felder aus Attribut ---* IF document_data-name = 'ATTRIBUT'. CALL FUNCTION 'Z_KGSGETFIELDVALUE' EXPORTING FIELDLIST FIELDNAME IMPORTING FIELDVALUE EXCEPTIONS NOT_FOUND IF sy-subrc = 0. w_scandate = FVALUE. ENDIF. ENDIF. ENDLOOP. . IF sy-subrc NE 0. CALL FUNCTION 'BALW_BAPIRETURN_GET1' EXPORTING type = SY-MSGTY cl = SY-MSGID number = SY-MSGNO par1 = SY-MSGV1 par2 = SY-MSGV2 par3 = SY-MSGV3 par4 = SY-MSGV4 IMPORTING bapireturn = return. ENDIF.

= 1.

= w_keyliste = 'ATTR_UFSD' = FVALUE = 1.

ENDFUNCTION.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 322/432

3.4.1.6 Function CallUsrFctDocRelease


This Function calls the RFC Function Z_KGSACTIVATORUSRFCTDOCRELEASE. Here you can add your own ABAP Code for special requirements. Short CallUsrFctDocRelease(BSTR ConfigID, BSTR ContRepID, BSTR DocID, BSTR ARObject, BSTR DocType, BSTR Data, IRWData *RWData, BSTR * OutParam, short *Return) Parameter (IN): ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. ContRepID SAP ContentRepository DocID Archive-Document ID ArchivObj SAP ArchivObj DocType Mimetyp of the Document Keyliste Keylist ItemData Object with line item information Parameter (OUT): return information from Function Z_KGSACTIVATORUSRFCTDOCRELEASE

Returncode: 0 ok -1 Connection to SAP System failed -2 Error reported from

The RFC Function must be defined as follow:

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 323/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 324/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 325/432

FUNCTION Z_KGSACTIVATORUSRFCTDOCRELEASE. *"---------------------------------------------------------------------*"*"Local interface: *" IMPORTING *" VALUE(DOCUMENT_ENTRY) TYPE OARFCIN *" EXPORTING *" VALUE(OUTPARAM) TYPE CHAR1024 *" VALUE(RETURN) LIKE BAPIRET1 STRUCTURE BAPIRET1 *" TABLES *" DOCUMENT_DATA STRUCTURE OARFCDATA OPTIONAL *"---------------------------------------------------------------------DATA:


ENDFUNCTION.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 326/432

3.4.1.7 Function CompanyCodeGetList


This method provides the user with a list of company codes. The system returns both the keys and the names of the company codes. short CompanyCodeGetList(BSTR ConfigID,IRWData **CompanyList) Parameter (OUT): CompanyList Object with CompanyList Each parameter string contains following fields Company Code Name of the company code or company

COMP_CODE COMP_NAME

Returncode: 0 ok -1 Connection to SAP System failed

3.4.1.8 Function CompanyCodeGetDetail


This method enables the user to access further information for a company code. The system returns the detail data and address data for the company code short CompanyCodeGetDetail (BSTR ConfigID,BSTR CompCodeSearch, BSTR *CompCodeDetail, BSTR *CompCodeAddress) Parameter (IN): ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. CompCodeSearch: Searchparameter to identify the company. The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: |COMP_CODE =1000| Valid Fieldnames:. COMP_CODE Parameter (OUT): CompCodeDetail: The parameter string contains following fields COMP_CODE COMP_NAME CITY COUNTRY CURRENCY VAT_REG_NO Company Code Name of the company code or company City Country key Currency Key VAT registration number

Company Code

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 327/432

CompCodeAddress: The parameter string contains following fields FORMOFADDR Form of address text NAME Name1 NAME_2 Name2 NAME_3 Name3 NAME_4 Name4 C_O_NAME c/o name CITY City CITY_NO City code for city/street file POSTL_COD1 City postal code STREET Street name HOUSE_NO House number COUNTRY Country key TEL1_NUMBR First telephone no.: dialling code+number FAX_NUMBER First fax no.: dialling code+number Returncode: 0 ok -1 Connection to SAP System failed -2 not found

3.4.1.9 Function DocumentBarcodeSend


This function send barcode information to SAP. This function is used for the ArchiveLink Scenario late/early archiving with barcode short DocumentBarcodeSend(BSTR ConfigID, BSTR ContRepID, BSTR DocID, BSTR Barcode, BSTR DocType) Parameter (IN): ConfigID ContRepID DocID Barcode DocType Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. SAP ContentRepository Archive-Document ID Barcode Number Documenttype (e.g. FAX,TIF,PDF)

Returncode: 0 ok -1 Connection to SAP System -2 creating Barcodeentry failed

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 328/432

3.4.1.10 Function DocumentAttach


This function connects a Document with a SAP Object. short DocumentAttach(BSTR ConfigID, BSTR ContRepID, BSTR DocID, BSTR ARObject, BSTR SAPObj, BSTR SAPObjID) Parameter (IN): ConfigID ContRepID DocID ARObject SAPObj SAPObjID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. SAP ContentRepository Archive-Document ID SAP ArchiveObject (e.g. FIIINVOICE) SAP Business Object (e.g. BKPF) SAP Object ID (Target Object )

Returncode: 0 ok -1 Connection to SAP System failed -2 Failed to attach document

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 329/432

3.4.1.11 Function DocumentPost


This function post e.g. an invoice. short DocumentPost (LPSTR ConfigID, LPSTR ContRepID, LPSTR DocID, LPSTR ArchivObj, LPSTR DOCType, LPSTR KeyList, IRWData ItemData, IRWData *outMsgTab, BSTR * outInvoiceInfo) Parameter (IN): ConfigID ContRepID DocID ArchivObj DocType Keyliste Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. SAP ContentRepository Archive-Document ID SAP ArchivObj Mimetyp of the Document Keyliste with additional informations (e.g. invoice information from an OCR). These values can be used at the SAP side for an automatic processing of invoices etc. (There are special ABAP programs available from KGS to enhance SAP with such a functionality) The Keylist has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: | TRANSACTION=FB60|VENDOR_NO=4711| INVOICE_DATE=20020502|INVOICE_NO=0815|AMOUNT=57,11|

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 330/432

TRANSACTION NODLNK

(Mandatory !!)

SAP Processing Transaction =X no document link

The fieldnames are dependent on the used transaction. See chapter Supported Index-Fields for details.

ItemData

Object with detailed purchase order items Each parameter string contains one line item information.

The fieldnames are dependent on the used transaction. See chapter Supported Index-Fields for details.

Parameter (OUT): outMsgTab Table with all SAP messages which were caused during the booking process.

TYPE

Each line contains following field Messagetype W=Warning E=Error S=Success A=Abort I=Info MSGNO SAP Messagenumber MSG SAP Messagetext Sample: |TYPE=W|MSGNO=000|MSG=Period 01 adjusted in line with posting date 04.07.2004| |TYPE=W|MSGNO=658|MSG=Account is not tax-relevant, tax code will be ignored| |TYPE=S|MSGNO=312|MSG=Document 1900000161 was posted in company code 1000| outInvoiceInfo Textstring with information about the created SAP Object name created SAP-Businessobject SAP_OBJECTID

SAP_OBJECT SAP_OBJECTID

Returncode: 0 ok -1 Connection to SAP System failed -2 Error posting invoice

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 331/432

3.4.1.12 Function DocumentPostExt


You can use this method to create and post invoices short DocumentPost (LPSTR ConfigID, LPSTR ContRepID, LPSTR DocID, LPSTR ArchivObj, LPSTR DOCType, LPSTR KeyList, IRWData ItemData, IRWData *outMsgTab, BSTR * outInvoiceInfo) Parameter (IN): ConfigID ContRepID DocID ArchivObj DocType Keyliste Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. SAP ContentRepository Archive-Document ID SAP ArchivObj Mimetyp of the Document Keyliste with additional informations (e.g. invoice information from an OCR). These values can be used at the SAP side for an automatic processing of invoices etc. (There are special ABAP programs available from KGS to enhance SAP with such a functionality) The Keylist has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: | TRANSACTION=MIRO|VENDOR_NO=4711| INVOICE_DATE=20020502|INVOICE_NO=0815|AMOUNT=57,11|

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 332/432

General Parameter TRANSACTION NODLNK Parameter Transaction MIRO/MIR7


POSTING_TYPE BLART INVOICE_DATE POSTING_DATE INVOICE_NO COMP_CODE VENDOR_NO CURRENCY CURRENCY_ISO EXRATE EXRATEV AMOUNT TAX_CODE TAX_AMOUNT TAX_CALC PTERM BLINE_DATE ZBD1T ZBD2T ZBD3T ZBD1P ZBD2P IVTYP BKTXT PBLK DELV_COST DELV_TAXCODE DELV_TAXJCODE PERSON_EXT ZLSCH ZAWE BELNR LZBKZ LANDL DIEKZ REF_DOC_NO_LONG DBAS ESRNR ESRPZ ESRRE PAYEE_PAYER BVTYP HBKID ITXT CPD_ACC1TIME CPD_NAME1 CPD_NAME2 CPD_NAME3 CPD_NAME4 CPD_PSTLZ CPD_ORT01 CPD_LAND1 CPD_STRAS CPD_PFACH CPD_PSTL2 CPD_POBK_CURAC CPD_BANKN CPD_BANKL 1 =Invoice, 2 => Credite Note Document type Invoice Date Posting Date Invoice Reference Number Company Code Invoicing party (different from PO) Currency Key ISO currency code Direct quoted exchange rate Indirect quoted exchange rate Gross Invoice Amount in Document Curr. Tax code Tax amount in document currency X=Calculate tax automatically Terms of payment key Baseline date for due date calculation Cash discount days 1 Cash discount days 2 Net Payment Terms Period Cash Discount Percentage 1 Cash Discount Percentage 2 Origin of a Logistics Inv. Verification Doc Document header text Payment Block Key Unplanned delivery costs Tax code for delivery costs Jurisdiction code for delivery costs Entered by external system user Payment method Payment method supplement External document number State central bank indicator Supplying country Service indicator (foreign payment) Reference Document Number (for Dependencies see Long Text) Cash Discount Amount in Document Curr POR subscriber number POR check digit POR reference number Payee/Payer Partner bank type Short key for a house bank Item Text Indicator: Is the account a one-time account? Name 1 Name 2 Name 3 Name 4 Postal Code City Country House number and street PO Box P.O. Box Postal Code Account No. of Bank Account at Post Office Bank account number Bank number

(Mandatory !!)

SAP Processing Transaction X no document link

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 333/432

CPD_BANKS CPD_ TAXNO1 CPD_ TAXNO2 CPD_ TAXNO3 CPD_ TAXNO4 CPD_ SLS_PUR_TX CPD_ EQUAL_TAX CPD_ REGION CPD_CTRLKEY CPD_INSTR_KEY CPD_DME_IND CPD_SPRAS CPD_ PAYEECODE CPD_ TAXCAT CPD_ SOLEPROP CPD_BKREF CPD_ REPNAME CPD_BUSTYP CPD_ITYP CPD_ANRED CPD_STCEG SAPFCT

Bank country key Tax Number 1 Tax Number 2 Tax Number 3 Tax Number 4 Liable for VAT Indicator: Business Partner Subject to Equalization Tax? Region (State, Province, County) Bank Control Key Instruction key for data medium exchange Indicator for Data Medium Exchange Language Key Payee code Tax type Natural Person Reference specifications for bank details Name of Representative Type of Business Type of Industry Title VAT Registration Number Name of the SAP RFC function that should be used instead of the corresponding original BAPI.

ItemData

Object with detailed purchase order items Each parameter string contains one line item information.

Dataset with PO_NUMBER


PO_NUMBER INV_ITEM PO_ITEM REF_DOC REF_DOC_YEAR REF_DOC_IT DE_CRE_IND TAX_CODE TAX_JCODE NET_AMOUNT QUANTITY PO_UNIT PO_UNIT_ISO Purchase order number Document item in invoice document Item Number of Purchasing Document Document no of a reference document Fiscal year of current period Item of a reference document Indicator: subsequent debit/credit Tax code Jurisdiction for tax calculation tax jurisdiction code Amount in document currency Quantity Order unit Order unit in ISO code

PO_PR_QNT ORDERPR_UN ORDERPR_UN_ISO COND_TYPE COND_ST_NO COND_COUNT SHEET_NO SHEET_ITEM ITXT FINVF CGRIR

Quantity in purchase order price unit Order price unit Purchase order price unit in ISO code Condition type Step number Condition counter Entry sheet number Entry sheet line number Item Text Final invoice indicator Clearing Indicator for GR/IR Posting for External Services

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 334/432

Dataset with ACCOUNT


ACCOUNT INV_ITEM XUNPL SERIAL_NO TAX_CODE TAX_JCODE AMOUNT QUANTITY PO_UNIT PO_UNIT_ISO G/L account number Document item in invoice document Unplanned account assignment from invoice verification Sequential number of account assignment Tax code Jurisdiction for tax calculation tax jurisdiction code Amount in document currency Quantity Order unit Order unit in ISO code

PO_PR_QNT ORDERPR_UN ORDERPR_UN_ISO


COSTCENTER SORD SORDP ASSET_NO SUB_NUMBER ORDNO VDATE CMMT_ITEM FUNDS_CTR FUNC_AREA FUND BUS_AREA RL_EST_KEY CO_AREA COSTOBJECT NPLNR VORNR PROFIT_SEGM_NO PRCTR PROJK

Quantity in purchase order price unit Order price unit Purchase order price unit in ISO code
Cost Center Sales and distribution document number Sales document item Main asset number Asset sub-number Order Number Reference date for settlement Commitment Item Funds Center Functional Area Fund Business Area Internal key for Real Estate object Controlling Area Cost Object Network Number for Account Assignment Operation Number Profitability segment number (CO-PA) Profit center Work breakdown structure element (WBS element)

Dataset with GLACCOUNT


GLACCOUNT INV_ITEM AMOUNT General Ledger Account Document item in invoice document Amount in document currency

DB_CR_IND NEG_POSTNG COMP_CODE TAX_CODE TAX_JCODE ITXT COSTCENTER SORD SORDP ORDNO VDATE CMMT_ITEM

Debit/Credit Indicator Indicator: Negative posting Company Code Sales Tax Code Tax Jurisdiction Item Text Cost Center Sales and Distribution Doc. Number Sales document item Order Number Reference Date for Settlement Commitment Item

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 335/432

FUNDS_CTR FUNC_AREA PRCTR FUND BUS_AREA TR_PART_BA COSTOBJECT NPLNR VORNR PROJK ACTTYPE RL_EST_KEY PERSON_NO CO_BUSPROC GRANT_NBR CMMT_ITEM_LONG FUNC_AREA_LONG QUANTITY BASE_UOM ZUONR CSHDIS_IND TAX_BASE_AMOUNT PROFIT_SEGM_NO Dataset with MATERIAL
MATERIAL INV_ITEM VAL_AREA VALUATION_TYPE DB_CR_IND AMOUNT QUANTITY BASE_UOM BASE_UOM_ISO

Funds Center Functional Area Profit Center Fund Business Area Trading partner's business area Cost Object Network No. for Account Assignment Operation/Activity Number Work Breakdown Structure Element (WBS_ELEM) Activity Type Internal Key for Real Estate Object Personnel Number Business Process Grant Commitment Item Functional Area Quantity Base Unit of Measure Assignment Number Line item not liable to cash discount? Tax Base Amount in Document Currency Profitability Segment Number (CO-PA)

Material Number Document item in invoice document Valuation Area Valuation Type Debit/Credit Indicator Amount in document currency Quantity Base Unit of Measure Base unit of measure in ISO code

TAX_CODE TAX_JCODE MAT_EXTERNAL MAT_GUID MAT_VERSION

Sales Tax Code Tax Jurisdiction Long Mat. Number MATERIAL Field External GUID for MATERIAL Field Version Number for MATERIAL Field

Dataset TAX_DATA (if this Dataset is specified overied TAX_AMOUNT and TAX_CODE from HDR Area) TAX_DATA
TAX_CODE TAX_AMOUNT

Always X
Tax code Tax amount in document currency

Dataset TAX_WITHHOLDING_DATA TAX_WITHHOLDINGT_DATA SPLIT_KEY WI_TAX_TYPE WI_TAX_CODE Always X Grouping key for splitting vendor line item Indicator for withholding tax type Withholding tax code

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 336/432

WI_TAX_BASE WI_TAX_AMOUNT WI_TAX_WITHHELD_AMOUNT

Withholding Tax Base Amount Withholding Tax Amount (in Document Currency) Withheld Withholding Tax Amount ( in Document Currency)

Dataset VENDORITEMSPLIT_DATA TAX_WITHHOLDINGT_DATA SPLIT_KEY SPLIT_AMOUNT


ZLSCH

TAX_CODE
ZAWE PTERM

Always X Group key for splitting vendor line item Partial gross inv. amount in doc. Currency Payment method Tax on sales/purchases code Payment method supplement Terms of payment key

Parameter Transaction MIR4 SAP_OBJECTID Parameter (OUT): outMsgTab

SAP Object ID

Table with all SAP messages which were caused during the booking process. Each line contains following field TYPE Messagetype W=Warning E=Error S=Success A=Abort I=Info MSGNO SAP Messagenumber MSG SAP Messagetext

Sample: |TYPE=W|MSGNO=000|MSG=Period 01 adjusted in line with posting date 04.07.2004| |TYPE=W|MSGNO=658|MSG=Account is not tax-relevant, tax code will be ignored| |TYPE=S|MSGNO=312|MSG=Document 1900000161 was posted in company code 1000| outInvoiceInfo Textstring with information about the created SAP Object SAP_OBJECT SAP_OBJECTID Returncode: 0 ok 1 Posting ok. Document assign failed -1 Connection to SAP System failed -2 Error posting invoice name created SAP-Businessobject SAP_OBJECTID

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 337/432

You can use method DocumentPostExt to create and post invoices. When passing on the header data, you use the field POSTING_TYPE to determine whether the system posts a credit memo or an invoice. If the field is 2 , the system posts a credit memo. If you enter 1 or a other value then, the system posts an invoice. If you want to enter an invoice for a returns order, the POSTING_TYPE must be 2. As in the online transaction, the system updates the purchase order history and stock valuation data in Materials Management. The system creates accounting documents in Accounting. Using this method, you can:
Enter and post invoices with multiple account assignment Change the account assignment of invoices, add account assignments, and post the invoices Enter invoices for blanket purchase orders Enter and post invoices for purchase orders containing planned delivery costs Enter and post invoices containing unplanned delivery costs Enter and post subsequent debits/credits Use document types with external number assignment Enter and post invoices with withholding tax Enter and post invoice with more than one vendor line and different payment methods and terms of payment Enter and post invoices for returns orders Enter and post invoices for transportation service providers Enter and post invoices for external service orders Post to G/L accounts Post to material accounts Enter and post invoices with a different payee

Restrictions The following fields in Financial Accounting are not passed on:
POR subscriber number Bank details Payment reference House bank ID

Notes: The following authorization object is checked using activity 01:


M_RECH_WRK Authorization to create invoices in certain plants

3.4.1.12.1 Example: Incoming Invoice This example shows the header data that you need to enter in table Headerdata and the item data that you need to enter in table Itemdata to post an invoice.
KGS Activator for SAP R/3 Reference Guide Version 1.75E3 Page 338/432

Purchase order: 10 pieces of material A at $10/piece Goods receipt: 10 pieces of material A You receive an invoice against this purchase order, with reference to purchase order number 4500007491, order item 10, for a quantity of 10 pieces of material A and an amount of $116, including 16% sales tax. Enter the following data: HeaderData
POSTING_TYPE (Post invoice/credit memo): 1 INVOICE_DATE (Document date): 05.20.2000 POSTING_DATE (Posting date): 05.23.2000 COMP_CODE (Company code): 1000 AMOUNT (Gross amount): 116.00 CURRENCY (Currency key): USD TAX_CALC (Calculate tax): X

ItemData (Dataset with PO_NUMBER)


PO_NUMBER (Purchase order number): 4500007491 INV_ITEM (Invoice document item): 00001 PO_ITEM (Purchase order item): 00010 TAX_CODE (Tax code): VN NET_AMOUNT (Item amount): 100 QUANTITY (Quantity): 10 PO_UNIT (Unit of measure): PC

3.4.1.12.2 Example: Incoming Invoice in Foreign Currency, Goods-Receipt-Based Invoice Verification and Tax Information This example specifies the header data that you need t the item data that you need to enter to post an invoice in a foreign currency. Purchase order: 10 pieces of material A at $10/piece First goods receipt: 4 pieces of material A Second goods receipt: 6 pieces of material A You receive an invoice against this purchase order, with reference to purchase order number 4500007505, order item 10, goods receipt document 50010095, 2000, item 1. The invoice is for a quantity of 4 pieces of material A, a gross amount of $46.60 and 16% sales tax ($6.60). Enter the following data: HeaderData
POSTING_TYPE (Post invoice/credit memo): 1 INVOICE_DATE (Document date): 05.20.2000 POSTING_DATE (Posting date): 05.23.2000 COMP_CODE (Company code): 1000 CURRENCY (Currency key): USD

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 339/432

AMOUNT (Gross amount): 46.60 TAX_CODE (Sales tax code): VN TAX_AMOUNT (Tax amount in document currency): USD 6.60

ItemData (Dataset with PO_NUMBER)


INV_ITEM (Invoice document item): 00001 PO_NUMBER (Purchase order number): 4500007505 PO_ITEM (Purchase order item): 00010 REF_DOC (Goods receipt document): 50010095 REF_DOC_YEAR (Fiscal year of current period): 2000 REF_DOC_ITEM (Goods receipt document item): 1 TAX_CODE (Tax code): VN NET_AMOUNT (Item amount): 40.00 QUANTITY (Quantity): 4 PO_UNIT (Unit of measure): PC

3.4.1.12.3 Example: Incoming Invoice for Blanket Purchase Order This invoice shows which header data you need, which item data you need, and which account assignment data you need in order to post an incoming invoice for a blanket purchase order. You receive an invoice for the blanket PO 4500015172, PO item 10 for an amount 110 USD incl. sales tax at 10%. You want to distribute the invoice amount to the cost centers 1200 and 1500. Enter, for example, the following data: HeaderData
POSTING_TYPE (Post invoice/credit memo): 1 INVOICE_DATE (Document date): 02.19.2001 PSTING_DATE (Posting date): 02.21.2001 COMP_CODE (Company code): 1000 AMOUNT (Gross amount): 110 CURRENCY (Currency): USD TAX_CALC (Calculate tax): X

ItemData (Dataset with PO_NUMBER)


INV_ITEM (Item in the invoice document): 00001 PO_NUMBER (PO number): 4500015172 PO_ITEM (PO item): 00010 TAX_CODE (Tax code): V1 NET_AMOUNT (Item amount): 100

ItemData (Dataset with ACCOUNT) 1st line: Change account assignment data
INV_ITEM (Document item in invoice document): 0001 SERIAL_NO (Serial number for the acc. assignment): 01

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 340/432

TAX_CODE (Tax code): V1 AMOUNT (Amount in document currency): 30 ACCOUNT (G/L account number): 890000 COSTCENTER (Cost center): 1200

2nd line: Add unplanned account assignment


INV_ITEM (Document item in invoice document): 0001 XUNPL (Unplanned acct. assignment from IV): X TAX_CODE (Tax code): V1 AMOUNT (Amount in document currency): 70 ACCOUNT (G/L account number): 890000 COSTCENTER (Cost center): 1500

In the case of a blanket purchase order, the following fields for quantities and units of measurement must not be filled in ItemData.
Quantity (QUANTITY) PO_UNIT (PO unit of measure) PO_UNIT_ISO (PO unit of measure in ISO code) PO_PR_QNT (Quantity in PO price unit of measure) ORDERPR_UN (PO price unit of measure) ORDERPR_UN_ISO (PO price unit of measure in ISO code)

3.4.1.12.4 Example: Change Account Assignments and Add Unplanned Assignments This example shows the header data that you need, the item data that you need and the account assignment information that you need to change, add, and post account assignments for an invoice. If you want to change or add account assignments, there must be a nonvaluated goods receipt or no goods receipt in the system. Goods-receipt-based invoice verification is specified. Purchase order: 300 pieces of material A at $1.00/piece Goods receipt: 300 pieces of material A This purchase order is subject to account assignment. You receive an invoice for it, refering to purchase order number 4500006846, order item 10, goods receipt document 50008849, 2000, item 1. The invoice is for a quantity of 100 pieces of material A, with a gross invoice amount of USD 116.00, including 16% sales tax. You want to change the planned account assignment for the second account assignment item and add an unplanned account assignment. Enter the following data: HeaderData
POSTING_TYPE (Post invoice/credit memo): 1 INVOICE_DATE (Document date): 08.05.2000 POSTING_DATE (Posting date): 08.08.2000 COMP_CODE (Company code): 1000 CURRENCY (Currency key): USD AMOUNT (Gross amount): 17.40 TAX_CALC (Calculate tax automatically): X

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 341/432

PTERM(Terms of payment key): 0001

ItemData (Dataset with PO_NUMBER)


INV_ITEM (Invoice document item): 00001 PO_NUMBER (Purchase order number): 4500006846 PO_ITEM (Purchase order item): 00010 REF_DOC (Goods receipt document): 500008849 REF_DOC_YEAR (Fiscal year of current period): 2000 REF_DOC_ITEM (Goods receipt document item): 1 TAX_CODE (Tax code): VN NET_AMOUNT (Item amount): 100 QUANTITY (Quantity): 100 PO_UNIT (Unit of measure): PC

ItemData (Dataset with ACCOUNT) Row 1: Change second account assignment item
INV_ITEM (Invoice document item): 0001 SERIAL_NO (Account assignment serial number): 02 TAX_CODE (Tax code): VN AMOUNT (Amount in document currency): 10.00 QUANTITY (Quantity): 10 PO_UNIT (Order unit): PC ACCOUNT (G/L account number): 890000 COSTCENTER (Cost center): 1200

Row 2: Add unplanned account assignment


INV_ITEM (Invoice document item): 0001 XUNPL (Unplanned account assignment in Invoice Verification): X TAX_CODE (Tax code): VN AMOUNT (Amount in document currency): 5.00 QUANTITY (Quantity): 5 PO_UNIT (Order unit): PC ACCOUNT (G/L account number): 890000 COSTCENTER (Cost center): 1200

3.4.1.12.5 Example: Invoice with Planned Delivery Costs This examples shows the header data you need, the item data that you need and the tax information that you need to post an invoice containing planned delivery costs. Purchase order: 100 pieces of material A at $1.00/piece Goods receipt: 100 pieces of material A You receive an invoice for this purchase order refering to purchase order number 4500006986, order item 10, for a quantity of 100 pieces of material A and $136.00, including 16% sales tax and $20.00 planned delivery costs. Enter the following data:

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 342/432

HeaderData
POSTING_TYPE (Post invoice/credit memo): 1 INVOICE_DATE (Document date): 08.10.2000 POSTING_DATE (Posting date): 08.12.2000 COMP_CODE (Company code): 1000 CURRENCY (Currency key): USD AMOUNT (Gross amount): 136,00

ItemData (Dataset with PO_NUMBER) Row 1: Posting the purchase order item
INV_ITEM (Invoice document item): 00001 PO_NUMBER (Purchase order number): 4500006986 PO_ITEM (Order item): 00010 TAX_CODE (Sales tax code): VN NET_AMOUNT (Item amount): 100.00 QUANTITY (Quantity): 100 PO_UNIT (Unit of measure): PC

Row 2: Posting the planned delivery costs


INV_ITEM (Invoice document item): 00002 PO_NUMBER (Order number): 4500006986 PO_ITEM (Order item): 00010 NET_AMOUNT (Item amount): 20.00 QUANTITY (Quantity): 100 PO_UNIT (Unit of measure): PC COND_TYPE (Condition type): FRB1

ItemData ( Dataset TaxData)


TAX_CODE (Sales tax code): VN TAX_AMOUNT (Tax amount in document currency): 16.00

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 343/432

3.4.1.12.6 Example: Incoming Invoice with Withholding Tax This example shows you what header data you can enter in the HeaderData, and what item data and withholding tax information you can enter in order to park an incoming invoice with withholding tax. Purchase order: 10 pieces of material A at $10 Goods receipt: 10 pieces of material A You receive an invoice for this delivery with reference to purchase order number 4500007505, PO item 10, GR document 50010095 2000, Item 1. The invoice is for a quantity of 10 pieces and a gross amount of $100. You have to pay 10% withholding tax for the gross amount. Enter the following data: HeaderData
POSTING_TYPE (Invoice/Credit memo): 1 INVOICE_DATE (Document date): 05.20.2000 POSTING_DATE (Posting date): 05.23.2000 COMP_CODE (Company code): WT01 CURRENCY (Currency key): USD AMOUNT (Gross amount): $100

ItemData (Dataset with PO_NUMBER)


INV_ITEM (Item from invoice document): 00001 PO_NUMBER (PO number): 4500007505 PO_ITEM (PO item): 00010 REF_DOC (GR document): 50010095 REF_DOC_YEAR (Fiscal year of the current period): 2000 REF_DOC_ITEM (Item in a GR document): 1 TAX_CODE (Tax code): V0 NET_AMOUNT (Item amount): $100 QUANTITY (Quantity): 10 PO_UNIT (Unit of measure): PC

ItemData ( Dataset TAX_WITHHOLDING_DATA)


SPLIT_KEY (Grouping key for withholding tax split): 0001 WI_TAX_TYPE (Code for withholding tax type): R1 WI_TAX_CODE (Withholding tax code): 01 WI_TAX_BASE (Withholding tax base amount): 100 WI_TAX_AMOUNT (Withholding tax amount in doc. currency): 10.00

3.4.1.12.7 Example: Incoming Invoice with Amount Split This example shows you what header data you need to enter, what item data you have to enter in order to create an invoice with an amount split. Purchase order: 10 pieces of material A at $10
KGS Activator for SAP R/3 Reference Guide Version 1.75E3 Page 344/432

Goods receipt: 10 pieces of material A You receive an invoice for this purchase order with reference to PO number 4500007505, PO item 10, GR document 50010095, item 1. The invoice is for a quantity of 10 pieces and a gross amount of $100. You want to distribute the gross amount to two vendor lines. 40% of the gross amount should be paid immediately by check, and 60% of the gross amount should be paid within 14 days, taking into account a 3% cash discount. Enter the following data: HeaderData
POSTING_TYPE (Invoice/Credit memo): 1 INVOICE_DATE (Document date): 05.20.2000 POSTING_DATE (Posting date): 05.23.2000 COMP_CODE (Company code): 0001 CURRENCY (Currency key): USD AMOUNT (Gross amount): 100.00

ItemData (Dataset with PO_NUMBER)


INV_ITEM (Item from the invoice document): 00001 PO_NUMBER (PO number): 4500007505 PO_ITEM (PO item): 00010 REF_DOC (GR document): 50010095 REF_DOC_YEAR (Fiscal year for the current period): 2000 REF_DOC_ITEM (Item from a GR document): 1 TAX_CODE (Tax code): V0 NET_AMOUNT (Item amount): 100 QUANTITY (Quantity): 10.00 PO_UNIT (Unit of measure): PC

ItemData (Dataset VENDORITEMSPLIT_DATA) 1st vendor line


SPLIT_KEY (Grouping key for split in the vendor line): 0001 SPLIT_AMOUNT (Gross invoice partial amount in doc. currency): 40.00 ZLSCH (Payment method): S TAX_CODE (Tax code): V0 PTERM(Payment terms key): 0001

2nd vendor line


SPLIT_KEY (Grouping key for split in the vendor line): 0002 SPLIT_AMOUNT (Gross invoice partial amount in doc. currency): 60.00 ZLSCH (Payment method): U TAX_CODE (Tax code): V0 PTERM(Payment terms key): 0003

3.4.1.12.8 Example: Invoice for Ext. Services and Service-Based Invoice Verification.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 345/432

This example shows you which header data you need and which item data to enter in ItemData, in order to enter and post an Invoice for a Purchase Order for Ext. Services and Service-Based Invoice Verification. You receive an invoice with reference to the PO number 4500000191, PO item 10. Two services A and B are invoiced, each with a quantity of six service units. Service A has a gross amount of 580 Euro incl. 16% tax. Service B has 812 Euro incl. 16% tax. Service A has an account assignment of 50% to both cost centers 1000 and 2000. Service B also has an account assignment to cost centers 1000 and 3000. The service acceptance is performed jointly for both services in one service entry sheet number 1000000022. You cannot change the account assignments. Enter the following data: HeaderData
POSTING_TYPE (Post invoice/credit memo): 1 DOC_TYPE (Document type): RE INVOICE_DATE (Document date): 01.10.2002 POSTING_DATE (Posting date): 01.10.2002 COMP_CODE (Company code): 0001 CURRENCY (Currency key): USD AMOUNT (Gross amount): 1392.00 TAX_CALC (Calculate tax automatically): X PTERM(Payment terms key): 0001

ItemData (Dataset with PO_NUMBER) First entry for service A:


INV_ITEM (Item in invoice document): 000001 PO_NUMBER (PO number): 4500000191 PO_ITEM (PO item): 00010 TAX_CODE (Tax code): V1 NET_AMOUNT (Item amount): 250.00 QUANTITY (Quantity): 1 PO_UNIT (Unit of measure): SU SHEET_NO (Service entry sheet number): 1000000022 SHEET_ITEM (Line number): 10

Second entry for service A:


INV_ITEM (Item in invoice document): 000002 PO_NUMBER (PO number): 4500000191 PO_ITEM (PO item): 00010 TAX_CODE (Tax code): V1 NET_AMOUNT (Item amount): 250.00 QUANTITY (Quantity): 3 PO_UNIT (Unit of measure): SU SHEET_NO (Entry sheet number): 1000000022 SHEET_ITEM (Line number) : 10

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 346/432

First entry for service B:


INV_ITEM (Item in invoice document): 000003 PO_NUMBER (PO number): 4500000191 PO_ITEM (PO item): 00010 TAX_CODE (Tax code): V1 NET_AMOUNT (Item amount): 350.00 QUANTITY (Quantity): 3 PO_UNIT (Unit of measure): SU SHEET_NO (Entry sheet number): 1000000022 SHEET_ITEM (Line number) : 20

Second entry for service B:


INV_ITEM (Item in invoice document): 000004 PO_NUMBER (PO number): 4500000191 PO_ITEM (PO item): 00010 TAX_CODE (Tax code): V1 NET_AMOUNT (Item amount): 700.00 QUANTITY (Quantity): 1 PO_UNIT (Unit of measure): SU SHEET_NO (Service entry sheet number): 1000000022 SHEET_ITEM (Line number) : 20

Itemdata (Dataset with ACCOUNT) First account assignment for service A:


INV_ITEM (Document item in invoice document): 000001 SERIAL_NO (Sequential number of the account assignment): 01 TAX_CODE (Tax code): V1 NET_AMOUNT (Amount in document currency): 250.00 QUANTITY (Quantity): 3 PO_UNIT (PO unit of measure): SU

Second account assignment for service A:


INV_ITEM (Document item in invoice document): 000001 SERIAL_NO (Sequential number of the account assignment): 02 TAX_CODE (Tax code): V1 NET_AMOUNT (Amount in document currency): 250.00 QUANTITY Quantity): 3 PO_UNIT (PO unit of measure): SU

First account assignment for service B:


INV_ITEM (Document item in invoice document): 000003 SERIAL_NO (Sequential number of the account assignment): 01 TAX_CODE (Tax code): V1 NET_AMOUNT (Amount in document currency): 350.00 QUANTITY (Quantity): 3 PO_UNIT (PO unit of measure): SU

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 347/432

Second account assignment for service B:


INV_ITEM (Document item in invoice document): 000004 SERIAL_NO (Sequential number of the account assignment): 03 TAX_CODE (Tax code): V1 NET_AMOUNT (Amount in document currency): 350.00 QUANTITY (Quantity): 3 PO_UNIT (PO unit of measure): SU

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 348/432

3.4.1.13 Function DuplicateInvoiceCheck


Check if a Invoice already posted

short DuplicateInvoiceCheck(LPCTSTR ConfigID, LPCTSTR ISearch, BSTR* OutInfo);


Parameter (IN): ConfigID ISearch: Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Searchparameter to identify the invoice. The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: |COMP_CODE=1000|VENDOR_NO=1000|INVOICE_DATE=20090521| INVOICE_NO=XYZ|AMOUNT=100,00|CURRENCY=EUR| Valid Fieldnames:. COMP_CODE VENDOR_NO INVOICE_DATE INVOICE_NO AMOUNT CURRENCY Parameter (OUT): OutInfo: Only if Returncode = 1 SAP_OBJECT SAP_OBJECTID MSG

Company Code Vendor Number Invoice Date Invoice Number Invoice Amount (including TAX) Currency

SAP Objecttyp SAP Object ID SAP Message

Returncode: 1 Invoice probably already posted 0 ok (no invoice found) -1 Connection to SAP System failed -2 Error calling RFC Function

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 349/432

3.4.1.14 Function InvoicePost


This function post an invoice. short InvoicePost (LPSTR ConfigID, LPSTR ContRepID, LPSTR DocID, LPSTR ArchivObj, LPSTR DOCType, LPSTR KeyList, IRWData ItemData, BSTR * outInvoiceInfo) Parameter (IN): ConfigID ContRepID DocID ArchivObj DocType Keyliste Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. SAP ContentRepository Archive-Document ID SAP ArchivObj Mimetyp of the Document Keyliste with additional informations (e.g. invoice information from an OCR). These values can be used at the SAP side for an automatic processing of invoices etc. (There are special ABAP programs available from KGS to enhance SAP with such a functionality) The Keylist has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: | TRANSACTION=FB60|VENDOR_NO=4711| INVOICE_DATE=20020502|INVOICE_NO=0815|AMOUNT=57,11|

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 350/432

TRANSACTION NODLNK

(Mandatory !!)

SAP Processing Transaction =X no document link

The fieldnames are dependent on the used transaction. See chapter Supported Index-Fields for details.

ItemData

Object with detailed purchase order items Each parameter string contains one line item information.

The fieldnames are dependent on the used transaction. See chapter Supported Index-Fields for details.

Parameter (OUT): outInvoiceInfo Textstring with information about the created SAP Object name created SAP-Businessobject SAP_OBJECTID

SAP_OBJECT SAP_OBJECTID

Returncode: 0 ok -1 Connection to SAP System failed -2 Error posting invoice

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 351/432

3.4.1.15 Function PostingDateCheck


This method checks a Posting date for validity short PostingDateCheck(BSTR ConfigID, BSTR PostingData) Parameter (IN): ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Postingdate and componaycode Sample: |POSTING_DATE=YYYYMMDD|COMP_CODE=XXXX|

PostingData

Returncode: 0 ok -1 Connection to SAP System failed -2 Posting period not open

3.4.1.16 Function PostingPeriodGetDetail


This method enables the user to access further information for a posting period of a company code. short PostingPeriodGetDetail(BSTR ConfigID,BSTR Search, IRWData **PeriodDetail)

Parameter (IN): ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Searchparameter to identify the company. The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: |COMP_CODE =1000| Valid Fieldnames:. COMP_CODE Parameter (OUT): PeriodDetail: Object with period details Each parameter string contains following fields COMP_CODE RRCTY MKOAR BKONT VKONT Company Code Record Type Account Type or Masking To Account From Account

Search:

Company Code

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 352/432

FRYE1 FRPE1 TOYE1 TOPE1 FRYE2 FRPE2 TOYE2 TOPE2

Fiscal Year for First Period Allowed (in Interval 1) First Posting Period Allowed (in Interval 1) Fiscal Year for Last Period Allowed (Period 1) Last Posting Period Allowed (in Interval 1) Fiscal Year for First Period Allowed (Period 2) First Posting Period Allowed (in Interval 2) Fiscal Year for Last Period Allowed (Period 2) Last Posting Period Allowed (in Interval 2)

Returncode: 0 ok -1 Connection to SAP System failed -2 not found

3.4.1.17 Function SAPObjDelete


This function deletes SAPObject. This is only possible for parked invoices. (Business Object BKPF or BUS2081). short SAPObjDelete(BSTR ConfigID, BSTR ObjInfo) Parameter:(IN) ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Parameter to identify the SAP Object. The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: | SAP_OBJECT=BKPF|SAP_OBJECTID=100019000001792005| Valid Fieldnames:. SAP_OBJECT SAP_OBJECTID

ObjInfo

SAP Objecttyp SAP Object ID

Returncode: 0 ok -1 Connection to SAP System failed -2 Sapobject could not be deleted

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 353/432

3.4.1.18 Function SAPObjGetDetail


short SAPObjGetDetail (LPCSTR ConfigID, LPCSTR ObjSearch, BSTR *POHeader, IRWData ItemData ) Parameter:(IN) ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Searchparameter to identify the purchase order. The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: | SAP_OBJECT=BKPF|SAP_OBJECTID=100019000001792005| Valid Fieldnames:. SAP_OBJECT SAP_OBJECTID

ObjSearch

SAP Objecttyp SAP Object ID

Parameter:(OUT) Header Result with SAP object details The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator

Example: | INVOICE_NO =1234| COMP_CODE=1000| | Currently supported Fieldnames: COMP_CODE INVOICE_NO CURRENCY EXRATE POSTING_DATE INVOICE_DATE ZLSPR ZTERM ZBD1T ZBD1P ZBD2T ZBD2P ZBD3T VENDOR_NO

Company Code Invoice Number Currency Exchangerate Posting Date Invoice Date Payment block Payment terms Days 1 Disc.percent 1 Days 2 Disc.percent 1 Days 3 Vendornumber

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 354/432

VENDOR_NAME BANKL BANKN BANKS

Name of the Vendor Bank Key Bank Account Number Bank Country Key

HeaderData

only for BUS2081 objects ZUONR ITXT REF_BKPF TAX_AMOUNT only for BKPF objects REF_BUS2081

Assignment Itemtext Referenz BKPF Objectnumber Tax amount

HeaderData

Referenz BUS2081 Objectnumber

ItemData

Line item information TAX_CODE


QUANTITY

Taxcode
Quantity

ItemData

Line item information (only for BUS2081 objects).

PO_NUMBER NET_AMOUNT PO_ITEM IV_ITEM SPGRP SPGRM SPGRT SPGRG SPGRV SPGRQ SPGRS SPGRC ItemData

Purchase order Number Net Amount Purchase order item number Invoice item number Blocking reas. price Blocking reason: qty Blocking reason date Blocking reason:OPQ Blocking reas: proj. Manual block. reason Block.reason: item amount BlockReason quality

Line item information (only for BKPF objects). ACCOUNT Line Item ACCOUNT BUZID BSCHL COSTCENTER PRCTR SORD ORDNO AMOUNT VAL_LOCCUR MATNR VENDOR_NO ANLN1 ANLN2 ANBWA BUZEI BLINE_DATE Account Line item ID Postingkey Cost center Profit center Sales Order Order Number Amount Amount in local currency Material Number Vendornumber Main asset number Asset sub-number Asset transaction type Number of Line Item Within Accounting Document Baselinedate

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 355/432

TAXINFO Line Item MWSKZ HKONT TXGRP SHKZG HWBAS FWBAS HWSTE Returncode: 0 ok -1 Connection to SAP System failed -2 sapobject not found Tax on sales/purchases code General Ledger Account Group Indicator for Tax Line Items Debit/Credit Indicator Tax Base Amount in Local Currency Tax base amount in document currency Tax Amount in Local Currency

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 356/432

3.4.1.19 Function SAPObjRelease


short SAPObjRelease(BSTR ConfigID, BSTR ObjInfo) Parameter:(IN) ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Parameter to identify the SAP Object. The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: | SAP_OBJECT=BKPF|SAP_OBJECTID=100019000001792005| Valid Fieldnames:. SAP_OBJECT SAP_OBJECTID DSHIFT

ObjInfo

SAP Objecttyp SAP Object ID Flag Shift Discountdays (DSHIFT=X)

Returncode: 0 ok -1 Connection to SAP System failed -2 sapobject not found

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 357/432

3.4.1.20 Function SetGlobalOptions


This function initialize some globle option. The option given here overwrites the corresponding parameter in the configuration file sapalinkcom.ini. short SetGlobalOptions(BSTR OptionStr) Parameter (IN): Example: |SAP-USERNAME =MEIER| SAP_PASSWORD =XYZ| Valid Fieldnames: SAP-USERNAME SAP-PASSWORD

SAP Login User SAP Password

3.4.1.21 Function VendorGetDetail Use this method to call detailed data for a vendor.
short VendorGetDetail(BSTR ConfigID, BSTR VendorSearch, BSTR *GeneralDetail, BSTR *CompanyDetail, ,IRWData BankDetails) Parameter (IN): ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Searchparameter to identify the vendor. The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: |VENDOR_NO=1910| COMP_CODE =1000| Valid Fieldnames:. COMP_CODE VENDOR_NO Parameter:(OUT) GeneralDetail Result with general details The textstring has the following structure:

VendorSearch

Company Code SAP Vendor ID

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 358/432

- Separator - Fieldname -= - Fieldvalue - Separator

Example: |VENDOR_NO=1234| VENDOR_NO NAME NAME2 NAME3 NAME4 CITY POSTL_CODE STREET COUNTRY CompanyDetail Result with the Vendor details COMP_CODE CLERK HD_OFFICE BankDetail Company Code Accounting clerk Head office account number SAP Vendor No.. Name 1 Name 2 Name 3 Name 4 City Postal Code House number and street Country key

Object with detailed purchase order items Each parameter string contains following fields BANK_CTRY BANK_KEY BANK_ACCT Bank country key Bank key Bank account number

Returncode: 0 ok -1 Connection to SAP System failed -2 Vendor not found

3.4.1.22 Function VendorFind

This method searches for a vendors in the SAP database and delivers vendor information .

short VendorFind(LPCSTR ConfigID, LPCSTR VendorSearch, BSTR *VendorInfo) Parameter (IN): ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Searchparameter to identify the vendor. The textstring has the following structure:

VendorSearch

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 359/432

- Separator - Fieldname -= - Fieldvalue - Separator Example: |VENDOR_NAME=WIELAND| COMP_CODE =1000| Valid Fieldnames:. COMP_CODE VENDOR_NAME VATRNO

Company Code (Mandatory) Vendorname VAT registration Number

Parameter:(OUT) Vendorinfo Result with the suppliers' information The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator

Example: |VENDOR_NO=1234| Currently supported Fieldnames: VENDOR_NO VENDOR_NAME PSTG_BLK_G PSTG_BLK_C DEL_FLAG_G DEL_FLAG_C

SAP Vendor No.. Vendorname entral posting block Posting block for company code Central Deletion Flag for Master Record Deletion Flag for Master Record (Company Code Level)

Returncode: 0 ok -1 Connection to SAP System failed -2 Vendor not found -3 No unique Vendor found

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 360/432

3.4.1.23 Function PurchaseOrderGetDetail


short PurchaseOrderGetDetail (LPCSTR ConfigID, LPCSTR POSearch, BSTR *POHeader, IRWData ItemData, IRWData ItemHistory, IRWData ItemHistoryTotal ) Parameter:(IN) ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Searchparameter to identify the purchase order. The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: |PO_NUMBER= 414-0202| AC_INFO=X|IT_INFO=X|HI_INFO= | Valid Fieldnames:. PO_NUMBER AC_INFO

POSearch

Number purchase order X = Provide G/L account information If this flag specified, the function provides following addition information (see Itemdata)

G_L_ACCT GR_RCPT ORDERPR_UN COSTCENTER PROJK IT_INFO HI_INFO Provide Itemdata (default) Provide PO History (default)

Parameter:(OUT) POHeader Result with the purchase order details The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator

Example: | PO_NUMBER =1234| CO_CODE=1000| CREATED_ON =| Currently supported Fieldnames: PO_NUMBER COMP_CODE CREATED_ON

Purchasing Document Number Company Code Date on which the order was created

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 361/432

CREATED_BY ITEM_INTVL LAST_ITEM VENDOR_NO DSCNT1_TO DSCNT2_TO DSCNT3_TO CASH_DISC1 CASH_DISC2 CURRENCY SKO1 SKO2

Name of Person who Created the Order Item number interval Last item number Vendor number Cash discount days 1 Cash discount days 2 Cash discount days 3 Cash Discount Percentage 1 Cash Discount Percentage 2 Currency Key Cash Discount in format days/percentage e.g. 10/3,000 Cash Discount in format days/percentage e.g. 15/1,750

ItemData

Object with detailed purchase order items Each parameter string contains following fields PO_ITEM SHORT_TEXT MATERIAL QUANTITY ORDERPR_UN ORDERPR_UN_ISO NET_PRICE PRICE_UNIT NET_VALUE TAX_CODE G_L_ACCT GR_RCPT UNLOAD_PT GR_BASEDIV GR_IND PO_UNIT PO_UNIT_ISO DELETE_IND PROJK COSTCENTER DISTRIB Item Number of Purchasing Document Short text material Material number Purchase order quantity Order price unit (purchasing) Purchase order price unit in ISO code Net price in purchasing document (in document currency) Price unit Net order value in PO currency Tax Code G/L account number Goods recipient Unloading point Indicator: GR-based invoice verification Goods receipt indicator Order unit Order unit in ISO code Deletion indicator in purchasing document - L = this position is marked as deleted WBS Element Cost Center Distribution indicator for multiple account assignment

ItemHistory

Object with History for Items Each parameter string contains following fields PO_ITEM HIST_TYPE PSTNG_DATE QUANTITY VAL_LOCCUR VAL_FORCUR CURRENCY IVVAL_LOC IVVAL_FOR Item Number of Purchasing Document PO history category Posting date in the document Quantity Amount in local currency Amount in document currency Currency Key Entered invoice value in local currency Entered invoice value in foreign currency

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 362/432

DELIV_QTY DELIV_UNIT TAX_CODE MAT_DOC REF_DOC_NO MOVE_TYPE


REF_DOC REF_DOC_YEAR REF_DOC_IT

Quantity in unit of measure from delivery note Unit of measure from delivery note Tax Code Number of material document Number of material document (e.g. delivery note) Movement type (inventory management)
Document no of a reference document Fiscal year of current period Item of a reference document

ItemHistoryTotal

Object with History for Items (totals) Each parameter string contains following fields PO_ITEM VAL_GR_LOC VAL_GR_FOR IV_QTY IV_QTY_PO VAL_IV_LOC VAL_IV_FOR IVVAL_LOC IVVAL_FOR DL_QTY_TOTAL IV_QTY_TOTAL PO_PR_QNT Item Number of Purchasing Document Value of goods received in local currency Value of goods received in foreign currency Quantity invoiced Invoice receipt quantity in order price unit Invoice amount in local currency Invoice amount in foreign currency Entered invoice value in local currency Entered invoice value in foreign currency Goods receipt quantity: Absolute amount Invoice receipt quantity: Absolute amount Quantity in purchase order price unit

Returncode: 0 ok -1 Connection to SAP System failed -2 purchase order not found

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 363/432

3.4.1.24 Function PurchaseOrderFind


short PurchaseOrderFind (LPCSTR ConfigID, LPCSTR POSearch, IRWData POList) Parameter:(IN) ConfigID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Searchparameter to identify the purchase order. The textstring has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator Example: |VENDOR_NO= 1000| DELV_NO=120003945| Valid Fieldnames: VENDOR_NO DELV_NO Parameter:(OUT) POList Object with purchase order information Each parameter string contains following fields PO_NUMBER PO_ITEM
REF_DOC REF_DOC_YEAR REF_DOC_IT

POSearch

SAP Vendor No Number delivery note

Purchasing Document Number Item Number of Purchasing Document


Document no of a reference document Fiscal year of current period Item of a reference document

Returncode: 0 ok -1 Connection to SAP System failed -2 no purchase order found

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 364/432

3.4.1.25 Function WorkItemCreate


Create a SAP Bussiness Workflow Item. short WorkItemCreate (LPSTR ConfigID, LPSTR ContRepID, LPSTR DocID, LPSTR ArchivObj, LPSTR DOCType, LPSTR ExtraData) Parameter:(IN) ConfigID ContRepID DocID ArchivObj DocType ExtraData Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. SAP ContentRepository Archive-Document ID SAP ArchivObj Mimetyp of the Document Parameter to pass attributes to the SAP Workflow Container variables Sample: |CONTAINERVARNAME1=VALUE1| CONTAINERVARNAME2=VALUE2|..

Returncode: 0 ok -1 Connection to SAP System failed -2 Error creating SAP Business Workflow

This function allows you to transfer attributes into the workflow container of an ArchiveLink workflow for entering or assigning business objects with a link to a document. This call starts an ArchiveLink workflow that is associated with the document type in the ArchivObj field. The SAP-ArObj parameter from the configuration file is used, if the parameter ArchivObj field is empty (),. The attributes ContRepID and DocID that identify the document in the Content Repository are used to link the document with the entered or assigned business object. During the call, additional attributes in the ExtraData parameter can be transferred to the workflow container, unless: The name of the attribute only has blank characters or the name is not supplied (error message OA 736) A container element in the workflow is defined as mandatory but does not exist in the attributes table when you call the function (error message OA 737). The container element is not a type D container element (error message OA 736) An attribute appears repeatedly in the ExtraData parameter when you call the function but the relevant container element is not defined in a multilinear way. The ExtraData parameter can consists fields in the format | NAME=VALUE|, where NAME is the name of the attribute and VALUE is its value. Therefore, the NAME field must have a value that corresponds to the name of the element in the workflow container. If this is the case, the value of the VALUE field is transferred to the element in the workflow container. Both fields have the "Character" type, with 255 characters. Procedure: Create a structure in transaction se11 whose fields define the elements (in the workflow container) to be used. The following is an example of a structure name: ZATTRIBUTE ATTRIBUTE1 TYPE CHAR255 ATTRIBUTE2 TYPE CHAR255 ATTRIBUTE3 TYPE CHAR255 Save and activate the structure.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 365/432

Start the ArchiveLink Workflow Wizard in transaction OAWW and create a workflow for entering or assigning data. After you have completed the workflow, go to the Workflow Builder. Switch to change mode in the workflow and activate the workflow to check that the (multistep) workflow does not have any errors. Exit the graphical editor and remain in the workflow overview (transaction pftc). Change to the "Container" function and select "Create element". Give the element the name of an attribute from the new structure (as described above - ATTRIBUT1, ATTRIBUT2, and so on). In addition, specify an ID and a short description for the element. Select ABAP dictionary reference as an element type - for the structure, enter the name of the structure you created above and, for the field, enter the name of the corresponding field for your structure: ZATTRIBUTE ATTRIBUTE1 You must set the properties of the field to "Import", whereby you can set the "mandatory" addition. In this case, the attribute must be transferred. Proceed in the same way to create the remaining attributes to be used. Make sure that the names of the elements correspond to those of the fields for the structure. We recommend that you enter the element names in capital letters. Save and activate the workflow again. Take a note of the technical name of the workflow Example: "WS66600190". To create a document type for this workflow or to assign this workflow to an existing document type, start transaction OAD5 (Customizing wizard for document types). When you execute the Wizard, note the following settings: Use "workflow document type" as the document type. Under "Task" for "Object, method and tasks",use the technical name of your new workflow

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 366/432

3.4.1.26 Function WorkItemCreateData


Create a SAP Bussiness Workflow Item. short WorkItemCreateData (LPSTR ConfigID, LPSTR ContRepID, LPSTR DocID, LPSTR ArchivObj, LPSTR DOCType, LPSTR KeyList, IRWData ItemData) Parameter (IN): ConfigID ContRepID DocID ArchivObj DocType Keyliste Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. SAP ContentRepository Archive-Document ID SAP ArchivObj Mimetyp of the Document Keyliste with additional informations (e.g. invoice information from an OCR). These values can be used at the SAP side for an automatic processing of invoices etc. (There are special ABAP programs available from KGS to enhance SAP with such a functionality)

The Keylist has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator

Example: |VENDOR_NO=4711|INVOICE_DATE=20020502|INVOICE_NO=0815|AMOUNT =57,11| COMP_CODE USR USRDL AMOUNT POSTING_DATE POSTING_TYPE INVOICE_DATE INVOICE_NO VENDOR_NO BLINE_DATE CLERK SCANING_DATE ACDOC_NO ACDOC_TYPE CURRENCY TAX_CODE TAX_AMOUNT Company Code Username workitem receiver Userdistributionlist workitem receiver Amount Posting Date 1=Invoice 2=Credit note Invoice Date Invoice No. Vendor No. Payment baseline date Accounting clerk Scaning Date Accounting Document Number Accounting Document Type Currenykey Tax code Tax amount

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 367/432

TAX_CALC USRF_ nnn NET_AMOUNT DELV_COST DELV_TAXCODE BLART REFTYPE

BKTXT Following fields aren't provided for filling SAP Dynpros ATTR_WIDESC ATTR_USRFxxxx ATTR_ORGT

mark flag calculate Tax in Transaction X= mark Userfields (e.g USRF_FIELD1) Net amount Delivery costs Tax code Delivery cost RE= gross inv receipt RN= net invoice receipt 1=Purchase order/scheduling agreement 2=Delivery note 3=Bill of lading 4=Service entry sheet 5=Vendor 6=Transportation service agent Header text

WorkItem Description Text Userfields (e.g USRF_FIELD1) WF Organizational unit type (default S) A Workcenter O Organizational unit P Person S Positon US User WF Organizational unit type ID

ATTR_ORGID

ItemData

Object with detailed purchase order items Each parameter string contains following fields PO_NUMBER PO_ITEM QUANTITY NET_AMOUNT ACCOUNT TAX_CODE TAX_AMOUNT NET_AMOUNT Number purchase order Item Number of Purchasing Document Purchase order quantity Net Amount Account Tax code Tax amount Net amount

Returncode: 0 ok -1 Connection to SAP System failed -2 Error creating SAP Business Workflow

This function starts an ArchiveLink workflow that is associated with the document type in the ArchivObj field. The SAP-ArObj parameter from the configuration file is used, if the parameter ArchivObj field is empty (),. The attributes ContRepID and DocID that identify the document in the Content Repository are used to link the document with the entered or assigned business object. The Keylist and ItemData attributes are passed to the workflow container table KGS_DOCDATA.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 368/432

Function GetLastErrorMsg Retrieve the error message of the last function call. This Function will be called if a function returns a negative value. BSTR GetLastErrorMsg () Returncode: Textstring last Errormessage

3.4.1.27 Function Close


Terminate the session. Please do this function as the last call of the class in your program.

short Close ()

Returncode: 0 ok

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 369/432

3.4.2

Methods Addons

3.4.2.1 Process Control Center


The Process Control Center Suite is an Add on product and doesnt belong to the standard KGS Activator product.

3.4.2.1.1 PCCEntryCreate
Creates an entry in the Process Control Center Suite. short PCCEntryCreate(BSTR ConfigID, BSTR ProcessID, BSTR KeyList) Parameter (IN): ConfigID ProcessID Keyliste Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Unique ID to identify the process Keyliste with additional informations (e.g. invoice information from an OCR). These values can be used at the SAP side for an automatic processing of invoices etc. (There are special ABAP programs available from KGS to enhance SAP with such a functionality)

The Keylist has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator

Example: |PSTAT=1|SAP_OBJECT=BKPF|SAP_OBJECTID=100019000000682005|DOCID=I MG00001|CREPID=T1| or |PSTAT=1|VENDOR_NO=4711|INVOICE_DATE=20020502|INVOICE_NO=0815| AMOUNT=57,11|. PSTAT SAP_OBJECT SAP_OBJECTID Status information (Traffic lights fct.) 1=red,2=yellow,3=red SAP Objecttyp SAP Object ID

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 370/432

CREPID DOCID INVOICE_DATE SCAN_DATE COMP_CODE VENDOR_NO INVOICE_NO AMOUNT CURRENCY ISTAT PO_NUMBER WFL_STEP WFL_AGENT

Content Repository ID Archive Document ID Invoice Date Scaning Date Company Code Vendor No. Invoice No. Amount Currenykey Internal SAP Status Number purchase order WorkflowStep Current Workflow Agent/Clerk

Returncode: 0 ok -1 Connection to SAP System failed -2 Error creating SAP Business Workflow

3.4.2.1.2 PCCEntryUpdate
Creates an entry in the Process Control Center Suite. short PCCEntryUpdate(BSTR ConfigID, BSTR ProcessID, BSTR KeyList) Parameter (IN): ConfigID ProcessID Keyliste Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Unique ID to identify the process Keyliste with additional informations (e.g. invoice information from an OCR). These values can be used at the SAP side for an automatic processing of invoices etc. (There are special ABAP programs available from KGS to enhance SAP with such a functionality)

The Keylist has the following structure: - Separator - Fieldname -= - Fieldvalue - Separator

Example: |PSTAT=1|SAP_OBJECT=BKPF|SAP_OBJECTID=100019000000682005|DOCID=I MG00001|CREPID=T1| or |PSTAT=1|VENDOR_NO=4711|INVOICE_DATE=20020502|INVOICE_NO=0815| AMOUNT=57,11|.

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 371/432

PSTAT SAP_OBJECT SAP_OBJECTID CREPID DOCID INVOICE_DATE ISTAT SCANING_DATE COMP_CODE VENDOR_NO INVOICE_NO AMOUNT CURRENCY PO_NUMBER WFL_STEP WFL_CLERK

Status information (Traffic lights fct.) 1=red,2=yellow,3=red SAP Objecttyp SAP Object ID Content Repository ID Archive Document ID Invoice Date Internal SAP Status Scaning Date Company Code Vendor No. Invoice No. Amount Currenykey Number purchase order WorkflowStep Current Clerk

Returncode: 0 ok -1 Connection to SAP System failed -2 Error during update PCC Entry

3.4.2.1.3 PCCEntryDelete
Deletes an entry in the Process Control Center Suite. short PCCEntryDelete(BSTR ConfigID, BSTR ProcessID) Parameter (IN): ConfigID ProcessID Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Unique ID to identify the process

Returncode: 0 ok -1 Connection to SAP System failed -2 Error delete PCC Entry

3.4.2.1.4 PCCEntrySearch
Search function to find an entry in the Process Control Center Suite. short PCCEntrySearch(BSTR ConfigID, BSTR Search, IRWData **EntryData) Parameter (IN): ConfigID Search Textstring for identification of the appropriate configuration. Thereby you can address different SAP systems. Searchparameter (.|FIELDNAME=VALUE|.. Valid Fieldnames:. ISTAT

Internal SAP Status C=Entry changed from SAP Process (e.g. SAP Workflow)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 372/432

Example: |ISTAT=C| Parameter:(OUT) EntryData Result with the Entry infos (Format |FIELDNAME=VALUE|..

PID SAP_OBJECT SAP_OBJECTID ISTAT TEXT BSTAT

Unique Process Identifier SAP Objecttyp SAP Object ID Internal SAP Status Text from SAP Workflow SAP Object status P=parked document D=deleted document B=posted document

Sample:
|PID=124214|SAP_OBJECT=BUS2081|SAP_OBJECTID=19000000192005|ISTAT=C| |PID=124215|SAP_OBJECT=BUS2081|SAP_OBJECTID=19000000202005|ISTAT=C|

Returncode: 0 ok -1 Connection to SAP System failed -2 Error accessing PCC Entries

3.5

ARCHSYS (sapalinkcom.ARCHSYS)

Example using Class SAP with VB:. Dim myArchive as Object Set myArchive = CreateObject("sapalinkcom.SAPSYS")

3.5.1

Methods

3.5.1.1 Function Open


This function initialize the class. Function Open has to be called before using other function of the SAPSYS class. short Open (LPCSTR VendorName, LPCSTR ProductName, LPCSTR ProductVersion) Parameter (IN): VendorName Vendorname (of the calling Application ) ProductName Productname ProductVersion Productversion Returncode: 0 ok

3.5.1.2 Function DocumentArchiv

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 373/432

This function stores a document in the Archive system.

short DocumentArchive(BSTR ConfigID,BSTR ContentRepID, BSTR FileName, BSTR DocType, BSTR *pDocID) Parameter (IN): ConfigID ContRepID FileName DocType Parameter (OUT): DocID Returncode: 0 ok Textstring for identification of the appropriate configuration. SAP ContentRepository Documentfile Documenttyp (e.g.. TIF or FAX)

Document ID

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 374/432

3.5.1.3 Function DocumentDelete


This function removes a document from the Archive system.

short DocumentDelete(BSTR ConfigID,BSTR ContentRepID, BSTR DocID) Parameter (IN): : ConfigID ContRepID FileName DocID

Textstring for identification of the appropriate configuration. SAP ContentRepository Documentfile Document ID

Returncode: 0 ok

3.5.1.4 Function GetLastErrorMsg


BSTR GetLastErrorMsg () Returncode: Textstring last Errormessage

3.5.1.5 Function Close


Terminate the session. Please do this function as the last call of the class in your program. short Close () Returncode: 0 ok

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 375/432

4
4.1

KGS Activator Java Classes


ARCHSYS (package com.KGS.Activator) Constructor

4.1.1

4.1.1.1 ARCHSYS() 4.1.1.2 ARCHSYS(CFGParam CFGP[])


You can inittialize the object with configuration parameters if you use this constructor. In that case, the INI File will not be used (see class CFGParam).

4.1.2

Methods

4.1.2.1 Function open


This methode initialize the class. Function open has to be called before using other functions of the this class. void open (String sVendorName, String sProductName, String sProductVersion) throws KGSActivatorException Parameter (IN): VendorName Vendorname (of the calling Application ) ProductName Productname ProductVersion Productversion

4.1.2.2 Function configurationSet


public void configurationSet(CFGParam CFGP[]); You can inittialize the object with configuration parameters if you use this method. In that case, the INI File will not be used (see class CFGParam).

4.1.2.3 Function documentArchive


This function stores a document in the archive system. The document will be stored with component ID data String documentArchive(String sConfigID, String sContRepID, String sFileName, String sContentType) KGSActivatorException Parameter (IN): ConfigID ContRepID FileName ContentType Returnvalue: DocID Textstring for identification of the appropriate configuration. SAP ContentRepository Documentfile Mimetype (image/tiff)

Document ID

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 376/432

4.1.2.4 Function documentDelete


This function removes a document with all correspondig componentes from the DMS System

public void documentDelete(String csConfigID, String csContRepID, String csDocID) throws KGSActivatorException Parameter (IN): ConfigID ContRepID DocID Textstring for identification of the appropriate configuration. SAP ContentRepository Document ID

4.1.2.5 Function documentKeysSet


This function send additional keys for the specified document. The Keylist contains meta-data information and offers the opportunity to map these information to the Document for an independent search with the DMS Client. void documentKeysSet(String csConfigID, String csContRepID, String csDocID,String sKeyList) throws KGSActivatorException Parameter (IN): ConfigID ContRepID DocID KeyList Returnvalue: void Textstring for identification of the appropriate configuration. SAP ContentRepository Document ID Keylist

The Keylist has the following format: Seperator KeyName=Keyvalue Separator KeyName=....... Sepeartor 0x00

Example:
|OBJECT_ID=100019000000152002|SAP_OBJECT=BKPF|AR_OBJECT=FIIINVOICE|KEYNAME1 =KEYVALUE1|KEYNAME2=KEYVALUE2|

4.1.2.6 Function documentRetrieve


This functions retrieves the Component (ID=data) from the archive system. The combination of ContentRepID + DocID is the unique address to the data component. String documentRetrieve(String sConfigID, String sContRepID,String sDocID ,String sFileName) throws KGSActivatorException Parameter (IN):

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 377/432

ConfigID ContRepID DocID FileName Returnvalue: ContentType

Textstring for identification of the appropriate configuration. SAP ContentRepository Document ID Filename where the documentdata should be stored.

Mimetype of the retrieved document

4.1.2.7 Function componentArchive


This function attaches a component to a document. Does the document not exists, the document will be created. String documentArchive(String sConfigID, String sContRepID, String sDocID, String sCompID, String sFileName, String sContentType) throws KGSActivatorException Parameter (IN): ConfigID ContRepID DocID CompID FileName ContentType Returnvalue: DocID Textstring for identification of the appropriate configuration. SAP ContentRepository Document ID Component ID Documentfile Mimetype (image/tiff)

Document ID

The Keyliste has following format: |KEYNAME=KEYVALUE|KEYNAME=KEYVALUE|....

4.1.2.8 Function componentArchive


This function attaches a component to a document. Does the document not exists, the document will be created. String componentArchive(String csConfigID, String csContRepID, String csDocID, String csCompID,InputStream inputStream, String csDocType,ProgressListener progressListener) throws KGSActivatorException Parameter (IN): ConfigID ContRepID DocID CompID inputStream ContentType Listener Returnvalue: DocID Textstring for identification of the appropriate configuration. SAP ContentRepository Document ID Component ID Datastream Mimetype (image/tiff) Progress Listener (see Interface)

Document ID

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 378/432

4.1.2.9 Function componentDelete


This function removes a component from a document. The document remains in the DMS system. public void componentDelete(String csConfigID, String csContRepID, String csDocID, String csCompID) throws KGSActivatorException Parameter (IN): ConfigID ContRepID DocID CompID Textstring for identification of the appropriate configuration. SAP ContentRepository Document ID Component ID

4.1.2.10 Function componentExists


This function examines the existens of a component. boolean componentExists(String csConfigID, String csContRepID,String csDocID,String csCompID) throws KGSActivatorException Returnvalue: true/false

4.1.2.11 Function componentIdsGet


This function returns the ids of all components to for specified document. String [] componentIdsGet(String csConfigID, String csContRepID,String csDocID) throws KGSActivatorException Parameter (IN): ConfigID ContRepID DocID Textstring for identification of the appropriate configuration. SAP ContentRepository Document ID

Returnvalue: Stringarray with all component IDs

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 379/432

4.1.2.12 Function componentMimeTypeGet


This function returns the mimetype of the component. String componentMimeTypeGet(String csConfigID, String csContRepID,String csDocID, String csCompID) throws KGSActivatorException Parameter (IN): ConfigID ContRepID DocID CompID Returnvalue: Mimetype (String) Textstring for identification of the appropriate configuration. SAP ContentRepository Document ID Component ID

4.1.2.13 Function componentRetrieve


String componentRetrieve(String csConfigID, String csContRepID,String csDocID, String csCompID, long lOffset, long lLength ,String csFileName) throws KGSActivatorException This function retrieves a Component from the archive system. The combination of ContentRepID + DocID + CompID is the unique address to the component. Parameter (IN): ConfigID ContRepID DocID CompID Offset Length FileName Returnvalue: ContentType Textstring for identification of the appropriate configuration. SAP ContentRepository Document ID Component ID data offset read length Filename where the component data should be stored.

Mimetype of the retrieved document

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 380/432

4.1.2.14 Function componentRetrieve


InputStream componentRetrieve (String csConfigID, String csContRepID,String csDocID, String csCompID, long lOffset, long lLength) throws KGSActivatorException This function retrieves a Component from the archive system. The combination of ContentRepID + DocID + CompID is the unique address to the component. Parameter (IN): ConfigID ContRepID DocID CompID Offset Length Returnvalue: InputStream with component data. Textstring for identification of the appropriate configuration. SAP ContentRepository Document ID Component ID data offset read length

4.1.2.15 Function componentSize


This function returns the size of the component. String componentSize(String csConfigID, String csContRepID,String csDocID, String csCompID) throws KGSActivatorException Parameter (IN): ConfigID ContRepID DocID CompID Returnvalue: Filesize (textstring) Textstring for identification of the appropriate configuration. SAP ContentRepository Document ID Component ID

4.1.2.16 Function generateUniqueDocID


This function returns a unique document ID. String generateUniqueDocID() Returnvalue: Unique Document ID

4.1.2.17 Function close


Terminate the session. Please do this function as the last call of the class in your program. void close () throws KGSActivatorException

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 381/432

4.2

CFGParam (package com.KGS.Activator)

This Class is used to pass configuration parameters to the KGS Activator. If you use this functionality, the INI File will not be used. Example: you want pass a INI File like this: [KGSActivator] DebugLevel=2 Log-File=c:\KGSActivator.log Log-Mode=7 this is the coding: CFGParam P[] = new CFGParam[3]; i=0; P[i++]=new CFGParam("KGSActivator","DebugLevel","2"); P[i++]=new CFGParam("KGSActivator","Log-File","c:\KGSActivator.log"); P[i++]=new CFGParam("KGSActivator","Log-Mode ","7"); myObj.configurationSet(P);

4.2.1

Constructor

4.2.1.1 CFGParam(String sSection, String sName, String sValue) 4.2.2 Methods

4.2.2.1 Function getSection


public String getSection()

4.2.2.2 Function getName()


public String getName()

4.2.2.3 Function getValue()


public String getValue()

4.2.2.4 Function setSection


public void setSection(String sSection)

4.2.2.5 Function setName


public void setName(String sName)

4.2.2.6 Function setValue


public void setValue(String sValue)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 382/432

4.3 4.3.1

Interfaces (package com.KGS.Activator) ProgessListener

This Interface reports the processing status of a function call

4.3.1.1 Methods
4.3.1.1.1 update

void update(long processed, long total) Parameter: processed total number of finished activities total of activities

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 383/432

4.4 4.4.1

Samples JAVA code Storing a PDF document

ARCHSYS m_myARCHSys = new ARCHSYS(); String sDocID; try { m_myARCHSys.open("KGS","KGSActivatorDemo","1.0"); sDocID =m_myARCHSys.documentArchive("",A1,Doc.pdf,application/pdf); m_myARCHSys.close(); } catch (KGSActivatorException ex) { .... .... }

4.4.2

Retrieving a PDF document

ARCHSYS m_myARCHSys = new ARCHSYS(); String sMimeType; try { m_myARCHSys.open("KGS","KGSActivatorDemo","1.0"); sMimeType =m_myARCHSys.documentRetrieve("",A1,myDOCID,TargetFile); m_myARCHSys.close(); } catch (KGSActivatorException ex) { .... .... }

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 384/432

4.4.3

Storing a document with two components ( 2 TIF files)

ARCHSYS m_myARCHSys = new ARCHSYS(); String sDocID; try { m_myARCHSys.open("KGS","KGSActivatorDemo","1.0"); sDocID =m_myARCHSys.documentArchive("",A1,Doc.tif,image/tiff); // Methode documentArchive creates a document with component-ID data // therefor the second component has the component-ID data1 m_myARCHSys.componentArchive("",A1, sDocID,data1,Doc2.tif, image/tiff); m_myARCHSys.close(); } catch (KGSActivatorException ex) { .... .... }

4.4.4

Retrieving compoents from a document

ARCHSYS m_myARCHSys = new ARCHSYS(); String sMimeType; try { m_myARCHSys.open("KGS","KGSActivatorDemo","1.0"); // use component-ID data if you want to retrieve the component // you have archived with methode documentArchive sMimeType =m_myARCHSys.componentRetrieve("",A1,myDOCID, data1,TargetFile); m_myARCHSys.close(); } catch (KGSActivatorException ex) { .... .... }

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 385/432

4.4.5

Creating Workitem for FB60


String sHdrStr; TLFieldList myFL=new TLFieldList(); RWData myRWData=new RWData();

myFL.addField("COMPANY_CODE", "1000"); myFL.addField("POSTING_DATE","20071029"); myFL.addField("INVOICE_DATE","20071027"); myFL.addField("INVOICE_NO","RE 1847284"); myFL.addField("VENDOR_NO","1000"); myFL.addField("AMOUNT","100"); sHdrStr=myFL.createString(); myFL.removeAll(); myFL.addField("ACCOUNT","113109"); myFL.addField("AMOUNT","60"); myRWData.addString(myFL.createString()); myFL.removeAll(); myFL.addField("ACCOUNT","113110"); myFL.addField("AMOUNT","40"); myRWData.addString(myFL.createString()); try { m_mySAPSys = new SAPSYS(); m_mySAPSys.open("KGS","KGSActivatorDemo","1.0"); } catch (KGSActivatorException ex) { System.out.print(ex.getMessage());}

try { String String String String sContRepID=new String("T1"); sDocID=new String("BAF6972C515A4BBE8C226D52D9F8F37B"); sConfigID=new String("CONFIG_FB60"); sDocType=new String ("FAX");

m_mySAPSys.workitemCreateData(sConfigID, sContRepID, sDocID, "", sDocType, sHdrStr, myRWData); } catch (KGSActivatorException ex){ System.out.print(ex.getMessage());} try { if (m_mySAPSys != null) { m_mySAPSys.close(); m_mySAPSys=null; } } catch (KGSActivatorException ex){ System.out.print(ex.getMessage());}

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 386/432

4.4.6

Reading PurchaseOrder

String sStr; TLFieldList myFL=new TLFieldList(); RWData myRWData=new RWData();

myFL.addField("PO_NUMBER", "4500000012"); myFL.addField("AC_INFO", "X"); sStr=myFL.createString(); myRWData.addString(myFL.createString()); try { m_mySAPSys = new SAPSYS(); m_mySAPSys.open("KGS","KGSActivatorDemo","1.0"); } catch (KGSActivatorException ex) { System.out.print(ex.getMessage());}

try { String sConfigID=new String("CONFIG_XYZ"); Ret=m_mySAPSys.purchaseOrderGetDetail(sConfigID,sStr); if (Ret.getRetCode!=0) throw ....... FL.loadString(Ret.getHdrData()); ....=FL.getFieldValue("COMP_CODE") ....=FL.getFieldValue("VENDOR_NO") myRWData=Ret.getItemData(); for (int i=0;i<myRWData.getCount();i++) { FL.loadString(myRWData.getString(i)); ....=FL.getFieldValue("PO _ITEM"); ....=FL.getFieldValue("ORDERPR_UN_ISO"); .... .... } myRWData=Ret.getItemHistory(); for (i=0;i<myRWData.getCount();i++) { FL.loadString(myRWData.getString(i)); ....=FL.getFieldValue("...."); ....=FL.getFieldValue("....."); .... } myRWData=Ret.getItemHistory(); }

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 387/432

catch (KGSActivatorException ex){ System.out.print(ex.getMessage());} try { if (m_mySAPSys != null) { m_mySAPSys.close(); m_mySAPSys=null; } } catch (KGSActivatorException ex) { System.out.print(ex.getMessage()); }

4.4.7

Posting with DocumentPostExt

String sHdrStr; TLFieldList myFL=new TLFieldList(); RWData myRWData=new RWData(); RWData myRWMsgTab=new RWDate(); myFL.addField("TRANSACTION", "MIR7"); myFL.addField("CURRENY", "EUR"); myFL.addField("COMPANY_CODE", "1000"); myFL.addField("POSTING_DATE","20080826"); myFL.addField("INVOICE_DATE","20080825"); myFL.addField("INVOICE_NO","RE 1847284"); myFL.addField("VENDOR_NO","1000"); myFL.addField("AMOUNT","4807,04"); myFL.addField("TAXAMOUNT","663,04"); myFL.addField("POSTING_TYPE","1"); myFL.addField("REFTYPE","1"); sHdrStr=myFL.createString(); myFL.removeAll(); myFL.addField("PO_NUMBER","450027"); myFL.addField("PO_ITEM","00010"); myFL.addField("NET_AMOUNT","4144"); myFL.addField("QUANTITY","1,0"); myFL.addField("ORDERPR_UN_ISO","HUR"); myFL.addField("PO_UN_ISO","HUR"); myFL.addField("TAX_CODE","D1"); myRWData.addString(myFL.createString()); try { m_mySAPSys = new SAPSYS(); m_mySAPSys.open("KGS","KGSActivatorDemo","1.0"); } catch (KGSActivatorException ex) { System.out.print(ex.getMessage());}

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 388/432

try { String String String String sContRepID=new String("T1"); sDocID=new String("BAF6972C515A4BBE8C226D52D9F8F37B"); sConfigID=new String("CONFIG_MIR7"); sDocType=new String ("FAX");

Ret=m_mySAPSys.documentPostExt(sConfigID,sContRepID, sDocID, "", sDocType, sHdrStr, myRWData); if (Ret.getRetCode==0) { FL.loadString(Ret.getHdrData()); ....=FL.getFieldValue("SAP_OBJECT") ....=FL.getFieldValue("SAP_OBJECTID") } else { myRWMsgTab=Ret.getMsgTab(); for (int i=0;i<myRWMsgTab.getCount();i++) { FL.loadString(myRWMsgTab.getString(i)); ....=FL.getFieldValue("TYPE"); ....=FL.getFieldValue("MSG"); .... .... } } } catch (KGSActivatorException ex){ System.out.print(ex.getMessage());} try { if (m_mySAPSys != null) { m_mySAPSys.close(); m_mySAPSys=null; } } catch (KGSActivatorException ex){ System.out.print(ex.getMessage()); }

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 389/432

5
5.1

Appendix
Testing availability archive system HTTP ContentServer

5.1.1

5.1.1.1 Connection test HTTP ContentServer


Transaction: OAC0

double click your repository (e.g. T1)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 390/432

push button connection test

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 391/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 392/432

5.1.1.2 Function test HTTP ContentServer


Transaction SE38

F8 (execute)

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 393/432

push execute buttons

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 394/432

All lights must be green

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 395/432

5.1.2

RFC Server (ArchiveLink 3.1)

5.1.2.1 Connection test RFC Server

note the name of the RFC destination

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 396/432

Transaction SM59

double click your RFC Destination

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 397/432

push button Test connection

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 398/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 399/432

5.2 5.2.1

Workflow test (ArchiveLink standard) Customizing Content Repository protocol

Transaction: OAC0

note the ArchiveLink protocol name

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 400/432

doubleclick your protocol

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 401/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 402/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 403/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 404/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 405/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 406/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 407/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 408/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 409/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 410/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 411/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 412/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 413/432

5.2.2

Customizing Doctype

Trasnaction: OAD5

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 414/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 415/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 416/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 417/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 418/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 419/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 420/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 421/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 422/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 423/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 424/432

5.2.3

Test scenario

double click SAP menu/Office/Business Documents/Move

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 425/432

double click /Test/Test Archive with Workflow

Enter

Enter

double click Workitem

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 426/432

push button Process

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 427/432

push save button

Enter

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 428/432

Push refresh button Trasnaction FB03

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 429/432

Push button services for object

push button attachment list

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 430/432

double click Attacment

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 431/432

KGS Activator for SAP R/3 Reference Guide

Version 1.75E3

Page 432/432