Friday, September 18, 2015

SAP LSMW vs BDC

Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.

BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The transaction is then started using this internal table as the input and executed in the background.

In Call Transaction, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling. It can also be used for real-time interfaces and custom error handling & logging features. Whereas in Batch Input Sessions, the ABAP program creates a session with all the transactional data, and this session can be viewed, scheduled and processed (using Transaction SM35) at a later time. The latter technique has a built-in error processing mechanism too.

Batch Input (BI) programs still use the classical BDC approach but doesnt require an ABAP program to be written to format the BDCDATA. The user has to format the data using predefined structures and store it in a flat file. The BI program then reads this and invokes the transaction mentioned in the header record of the file.

Direct Input (DI) programs work exactly similar to BI programs. But the only difference is, instead of processing screens they validate
fields and directly load the data into tables using standard function modules. For this reason, DI programs are much faster (RMDATIND - Material Master DI program works at least 5 times faster) than the BDC counterpart and so ideally suited for loading large volume data. DI programs are
not available for all application areas.


LSMW is an encapsulated data transfer tool. It can provide the same functionality as BDC infact much more but when coming to techinical perspective most the parameters are encapulated. To listout some of the differences :
  • LSMW is basicaly designed for a fuctional consultant who do not do much coding but need to explore the fuctionality while BDC is designed for a technical consultant.
  • LSMW offers different techinque for migrating data: Direct input ,BAPI,Idoc,Batch input recording. While bdc basically uses recording.
  • LSMW mapping is done by SAP while in BDC we have to do it explicitly .
  • LSMW is basically for standard SAP application while bdc basically for customized application.
  • Coding can be done flexibly in BDC when compared to LSMW

SAP VIM basic configuration

Audience: This is for those who are familiar with OpenText VIM.

Introduction
OpenText VIM is packaged solution for managing invoices. With OpenText VIM one can better manage the workflow of the invoices, pay correct amount to vendors, create various types of invoices, get the aging report, keep check and various validations (document type, invoice information etc.), elimination of errors and duplicate check. Having a highly configurable design allows VIM to accommodate various business scenarios and cater needs to various organizations.
VIM preprocess data before creating SAP document. Once system validates all the business rules and pass the document then document in SAP is created. DP comprises of following:
Components
Description
Document Type
Highest level attribute. It determines screen layout and SAP transaction to be called.
Process Type
Each document type needs at least one process type. It affects the process flow. It determines initial actors and collaboration options available to actors.
Business Rules
Sets of logical conditions required for validating data from external systems.
Roles
Grouping of actors in various categories
Options and option types
The two basic options are: Actions and Referrals. Actions are based on transactions or workflow tasks.
Duplicate Check infrastructure
For configuring different duplicate check logic

Configuring DP document types
OpenText provides standard document types for most of the scenarios however one can create a custom document type by following below steps:
1. Create SAP ArchiveLink Doc Types: Go to T-Code OAC2 and create new SAP ArchiveLink document type by providing values for Document Type, Description and Document Class.
Pic1.jpg
It is recommended to maintain one SAP ArchiveLink for each DP doc type even if the process is same as it allows separation of database and custom functions.
2. Create new DP Doc Type:
    a. Go to T-code /n/OPT/VIM_1CX1
    b. Click on 'New Entries' button (In case you wish to edit existing one then double click on the document type)
    c. Enter following details: Description, Document Index Type (Indexing using OCR, Online Indexing, No Indexing, and Indexing using IDOC), Invoice Type, Number Range, SAP FI Doc type, Archive Doc Type, Line Item Data, Duplicate Check Group, Duplicate Check Role, Default Process type, Posting Role, Rescan Role, Check Display Index Data checkbox, Check Skip Dashboard checkbox and Check Display Image checkbox.
Pic2.jpg
NOTE: Indexing is a process of filling up the invoicing details in the DP document.
3. Define Process Type:
    a. Got to T-Code /n/OPT/VIM_1CX1. Select the created DP Document Type
    b. Double Click on Document Process and select the process type. Click on Details button
Pic3.jpg
    c. Check the Active checkbox button. Select the value of BDC transaction ID and Background Tran ID (BDC transaction ID is used to process an SAP transaction to create SAP document in user context. Background Tran ID is used to process SAP transaction to create SAP document in background). Enter value of Autopost flag (X: for background processing) and parking reason.
Pic4.jpg
4. Configure Index screen option:
    a. Go to T-Code /n/OPT/VIM_1CX1. Select the created DP Document Type.
    b. Double click on Index Screen Option and click on New Entries Button.
    c. Provide following details: Process Type, Description, Current Role (Role which processes the Work Item), Check on Allow Changes check box, check Show Duplicates check box, select Initial Tab (Dashboard and Index Data), Select Enable Simulate in case you want to skip certain business rules, check Disable Obsolete check box in case you want to hide obsolete button in dashboard and check Disable Rescan check box in case you want to hide Rescan button in dashboard.
Pic5.jpg
5. Configure Automatic Image Display:
    a. Go to T-Code SM30 and enter /PTGWFI/Z_CONST in Table/View and Click Maintain.
    b. Under product code 005 double click constant DASHBOARD_IMAGE_AUTO. Enter value X and save.
6. Define Process Type determination sequence:
    a. Go to T-Code /n/OPT/VIM_1CX1. Select the create document type and double click on Proc. Type. Det. Sequence.
    b. Enter following details: Step Id, Process type, check Exclude from Simulate checkbox to exclude business rule from simulation and check Bypass      possible checkbox to enable bypass of business rule
Pic6.jpg
    c. Select the step and double click on Sequence Steps. Enter value for Step Sequence, Field Name for the field that needs to be validated, check type (Table Field, Check Function, Constant Value, Required Field)
Pic7.jpg
7. Maintain PO line Determination: When data is captured from external system then PO line number might not be supplied thus this step helps to determine the PO line number in such scenario.
    a. Go to /n/OPT/VIM_POL
    b. Enter PO Line Det. ID (should start with 1), Check Function (custom function to determine PO line number. It is blank by default and OpenText standard function module is used).
    c. Double click on PO Line Determination Fields and maintain fields you to bed used for PO line determination and save.
Pic8.jpg
    d. Go to /n/OPT/VIM_1CX1. Double click on Document Type and enter the value for Determination Logic ID. Save.
8. Maintain Tax Code Determination:
    a. Go to T-Code /n/OPT/VIM_1CX1. Double click on Document Type and select the radio button for required option. In order to get the tax code from vendor master then select 'Tax Code from Vendor Master'.
    b. In case tax is determined using OpenText tax table (table: /OPT/VIM_TAX_CFG) use t-code /n/OPT/VIM_BL_TAX_CFG
    c. Select applicable checkbox for tax calculation (Auto Calculate Tax, Allow Zero Tax Rate, and Allow without Rate).
Pic9.jpg
9. Configure Duplicate Check: This is to check in case a duplicate document is created. After identifying the document can be routed back to the predefined role for further processing.
    a. Go to T-Code /n/OPT/VIM_1CX5
    b. Click on New Entries button and enter the Duplicate Check Group number, Description, Duplicate Check Type (Function Module and Index Data Field) and Ext. Dup. Check Function. Select Run Duplicate Check in Central System
Pic10.jpg
    c. Select the created group and double click on group field and mention the fields for duplicate check
Pic11.jpg
10.  Determine PO invoices by Vendor Table: Table /OPT/VT_DOC_DET contains vendors that send PO based invoices. Vendor can send invoices without providing PO number. If vendor is not found in this table then system checks for PO number.