1 2 3 12 Previous Next

SAP Sourcing

170 Posts

 

Before proceeding with the steps outlined in this blog, I would highly recommend getting familiar with the attached SAP sourcing integration guide ( or get the latest one from sap support portal). Majority of the prerequisites are listed out this document.

 

Prerequisites:

I must say the process to transition away from BDC is anything but straightforward or intuitive and for us it involved tons of regression testing to finally get the exact same behavior as the BDC.

  1. Activate switch MM_SFSW_P2PSE using transaction SFW5. This switch is part of business function LOG_MM_P2PSE_1. This business function forms the backbone of integration with SRM/SAP CLM. I recommend consulting with your software licensing department to ensure turning this switch wont have any unwanted licensing implications.MM_SFWS_P2PSE.png
  2. Implement the following OSS notes ( depending upon current ERP version ), many of these notes have side effects so you need to apply the note which resolves the side effect and hence they go in pairs. These were valid for our ERP system ( Netweaver 7.31 Ehp 5 ), you might need to apply additional/fewer notes based on your current system version.
    OSS NoteDescription
    1769023MEOUT 005: Item category 9 not supported
    1811870Heterogeneous behavior when publishing a Master Agreement
    1834156CCM: SE 377 during the creation of purchase order
    1866215ATC errors in MM-PUR application
    1906685CX_SY_CONVERSION_OVERFLOW in CL_BBP_ES_CONTRACT_UDPATE
    1953816S&041: External currency amount too big - unable to convert
    2002974CCM: Service item contains wrong condition information
    2015642VK 022: Inbound SOA failed with service items(s)
    2020259CCM: Incorrect condition item index for the supplement condi
    2023829Historic condition information are lost when CLM contract is
    2032941Header price conditions are not created for SAP Sourcing Master
    2127266CCM: Central contract change fails with an error message in
    2142004CCM: Scales not created for supplement conditions
    2142245Condition update for Info record result in program termination
    2155192CCM: Condition not updated for the newly added service items
  3. Perform the following configuration Steps as outlined in the configuration guide.
    • Create Cross-System Company codes and Business Area (Step 3.2.2)
      • In transaction SALE. Choose: Modeling and implementing Business Processes>Global Organizational Units>Cross-System Company codes
      • In transaction SALE: Choose: Modeling and implementing Business Processes>Global Organizational Units>Cross-System Business Areas
    • Create a Pseudo Vendor
      • In transaction MK01 create a pseudo vendor. You must pick an account group that allows an external number range.
      • In customizing (SPRO)>Integration with Other mySAP.com components>E-Sourcing>Settings for E-sourcing Integration enter the vendor from step1.
    • Create Text IDs for SAP ERP (5.1.5 in config guide)
      • Header Texts (In SAP ECC ): SPRO>Purchasing>RFQ/Quotation>Texts for RFQs/Quotations>Define Text Types for Header Texts
      • Item Texts (In SAP ECC): SPRO>Purchasing>RFQ/Quotation>Texts for RFQs/Quotation>Define Text Types for Item Texts
    • Block Integrated fields from user changes in SAP ERP ( 5.1.6 in config guide)
      • Importing field selection keys ESSA and ESCO with their related settings into your system usina a Business configuration (BC) set using transaction SCPR20 and entering BC set BBP_ES_CONTRACT_FIELD_CONTROL and activating it.
    • If implementing RFx scenarios check sections ( 5.1.7 and 5.1.8)
  4. The RFC - BBP_ES_OA_UPDATE is what encapsulates the logic for creating outline agreements with service line items and service conditions. Logic in the RFC has checks related to steps outlined above hence trying to use it directly without performing the above steps will not work. If you have experi
    ence with using BAPI_CONTRACT_CREATE before you should be familiar with the RFC update presented below.

          Note the TABLES parameters highlighted below, these are used to pass Service information (Service, texts, conditions, validity periods) during outline agreement creation.

BBP_ES_OA_UPDATE.jpg

  SRV_LINE corresponds to data in ESLL table.

  SRV_COND_VALIDITY corresponds to data in A081 table

  SRV_COND  corresponds to data in KONH table.

 

Logically when preparing data for calling the RFC: SRV_LINE should be filled followed by SRV_COND_VALIDITY followed by SRV_COND. The attached document shows the mapping between the structure fields ( of RFC parameters noted above) and SAP tables. I did use SRV_TEXT and SRV_COND_SCALE_QUAN but it should not be very difficult to figure out how they are mapped

 

The next part  will cover the following topics:

  • How to prepare existing outline agreements for update using BBP_ES_OA_UPDATE
  • Enhancement to resolve issues arising from trying to update existing outline agreements
  • Enhancements to improve performance when using the new RFC for outline agreement update.

 

Resources:

    Integration Guide ( https://websmp103.sap-ag.de/~sapidb/011000358700000270922012E ).

The Global Search feature in SAP Sourcing allows you to find a document by searching on its attributes.  For example, you can find a contract document using supplier, contact name, and item number.

 

 

Review: Security, Configuration settings added in 9 SP 22 / 10 SP 6

 

You can use security settings to control which users are able to use Global Search. Starting in these SP's, the System group has a Global Search permission setting.  As delivered, all users have access to Global Search.

 

If you only need global search capability for certain documents, you can limit Global Search by classid using the system property userinterface$globalSearch.classids.

 

For further information about these features, see the Configuration Guide for your release level at http://help.sap.com/sourcing.

 


New: Reduce Global Search footprint with SAP Sourcing 9 SP 23 / 10 SP 8

 

The Global Search capability requires an index of document data.  To maintain this, each time you create or update a global-search-enabled document, an entry is created in the XML Extract Queue table.  The index is updated by the scheduled task "Search XML Extract," which processes the extract queue and updates the index with the new/changed data.

 

As originally implemented, the XML file includes almost all of the persisted data for a document.  In SAP Sourcing versions earlier than 9 SP 23 or 10 SP 8, the XML for Global Search was causing database administrators to add more and more disk space to support the sourcing application.  In these recent releases, significant changes were made to the preparation of the XML file to reduce the amount of data included, without negatively affecting the usefulness of the feature.

 

  • Several field types were removed from the XML output file, including BOOLEAN, INTEGER, DECIMAL, and FLOAT.
  • Optimizations were made to remove data when the data was for internal use or had little value for search.  Examples of these are the line item formula results, which store a calculated value for a mathematical expression, and Supplier Entered Attributes on line items, when the supplier did not enter a value.

 

These optimizations are expected to reduce the XML size by 50% or more; to reduce the SQL activity during extract processing by 50% or more; and to shorten the Index Refresh processing time by 70% or more.

 

Some of this improvement happens automatically as part of the upgrade.  The XML for three document types, however, is potentially very large:

 

  • Master Agreements
  • Agreements
  • RFx Responses

 

Therefore, to minimize the risk of disruption to daily operations, the re-creation of the index data specifically for these three document types is reserved as a process requiring some manual steps.

 

To gain the full benefit of the optimization, see SAP Note 2251373 for further description of the global search improvements and for details on planning and executing the related manual post-upgrade steps.

In this blog, I will explain how to add predefined web links for all the users. There may be a requirement to add web links which is common to all users and it will be difficult and time consuming for each user to add it manually. Hence we can add this by using the Enterprise ID to the Workbench page Template.

 

Also this template will be applicable only for the new users created after the change is done and not for the existing users in the system. If a existing user requires a change then the web links should be added manually by the user or the Enterprise ID to modify the workbench page template of that particular user.

 

Let me show you the steps for addition of web links to workbench page template:

  • Login to the system with Enterprise ID

     1.png

  • Click on Workbench Page under the category Workbench
  • Select the query All Workbench Page Templates in the query dropdown

     2.png

  • Select the desired Home option. In our case, it is the Home default template for Buy-side

     3.png

  • Select Layout and add Links tab to the channel list available

     4.png

  • Add the set of links in the Link Tab which you require. As an example we have added Google.com

     5.png

  • Click on Done and Save the Workbench Template.

 

The users who are added to the system newly after the template is changed will be able to get the Links tab with the links added to them. For users already existing in the system, they have to navigate to their own workbench page template and modify as given below to get the options.

Today we'll try to provide a (better) alternative to one cumbersome SAP standard process - deploying custom jars to SAP Sourcing.

 

I've always wondered who would go to such pain just to add one .jar to the classpath, when even standard Java has better options. And why?!


For example, my code breaks about 100 times before it's ready to be fully tested. That means I would need about 1 year of BASIS time just to do 100 repacks and redeploys to test a piece of code.


 

So, let's keep it simple:

 

 

STEP 1 - You'll obviously need a jar . Nothing better than a Hello World

1.png

 


STEP 2 - Copy jar file anywhere on the Sourcing server

2.png

 

 

STEP 3 - That's ALL there is. We just need to use it now, like this:

 

// load jar before imports - this is where BeanShell beauty comes in
this.interpreter.getClassManager().addClassPath(new File("/usr/sap/xfer/CLM/btoma/Import/Path/HelloWorld.jar").toURI().toURL());
// @bogdan.toma
import com.tnd.eso.addons.playground.HelloWorld;
HelloWorld helloWorld = new HelloWorld();
throw new ApplicationException(session, helloWorld.getWorldStatus());

 

 

>>>>> result from testing STEP 3 on a toolbar script:

3.png

 

Indeed the world is doomed if we have to follow that 'custom jar deployment' process.

 

 

Regards,

Bogdan Toma

 

Check out some other cool topics below.

-------------------------------------------------------

SAP Sourcing scripts - editing and source control maintenance

[ANN] ScriptsRepo - Deploy Tool for SAP Sourcing Scripts

ScriptsRepo is a free and open source application for deploying script definitions to SAP Sourcing. It is designed to aid to the development of SAP Sourcing scripts in a controlled and collaborative process. ScriptsRepo is closely integrated with git and makes use of the powerful commit-hash for versioning scripts.


In 21st century, one should never have to say phrases like:

- what version is this script?

- what did I actually change here 6 months ago?

- where did my code snippet go?

- damn, I forgot to take a backup !!!

- and many more ...

 

 

Once you've gone through this document all you'll ever need to do to get your script definitions into SAP Sourcing system is:

  • java -jar scriptsrepo-0.4.1.jar --deploy

 

 

 

 

ScriptsRepo

 

 

 

 

Note: this document is indended as a placeholder for the release management and high-level detail of the application. If you are not comfortable with the details below please go through the tutorial provided.

 

 

PREREQUISITES

  1. Scripts maintained locally, as recommended in: SAP Sourcing scripts - editing and source control maintenance .
    • File name should be script's EXTERNAL_ID or DISPLAY_NAME, plus your desired file extension.
  2. SFTP access to your SAP Sourcing (DEV) application server
  3. 4 (four) directories created on SAP Sourcing app server (to be used for Data Import Scheduled Task)
    • /.../Upload
    • /.../Queue
    • /.../Archive
    • /.../Data (notice the extra folder, this is not directly used by the SchedTask)
  4. Data Import Scheduled Task configured on the Upload/Queue/Archive directories above (set it at high frequency, <5min)

 

 

 

Installation & Usage

  • Download the app using the link above for latest release.


1. INITIALIZATION

execute this step at first usage and every time your script metadata changes (eg. adding new scripts or inactivating old scripts) - in plain words, if you manually change anything other than the script code in SAP Sourcing, you'll need to re-import.


  • Extract an .oma file with all script definitions (save it as allscripts.oma in the same directory as the jar)
    • easiest way - use export option Object List and select FCI-ScriptDefinition-OML
  • Open Command Prompt (on Windows), Terminal (on Mac/Linux), navigate to the download directory and execute
    • java -jar scriptsrepo-0.4.1.jar --import

 


2. CONFIGURATION

the initialization process above will generate a config.properties file at the first usage in the same directory (if the file already exists, it will not be overwritten)

  • config.properties options
    • REPOSITORY_TYPE
      • GIT       >> (If git is used as SCM. The app will set the script version to the GIT commit hash.)
      • LOCAL  >> (If no SCM used, only local files. The tool will set script version as the last modify date of the script local file.)
    • REPOSITORY_DIR                 >> Location of script files. (on windows use forward-slash for directory separation)
    • REPOSITORY_FILE_ID           >> Metadata of the script definition. (this is used to link the script with the local file. eg: EXTERNAL_ID, where local file is named EXTERNAL_ID+file extension)
    • DATA_FILE_EXTENSION        >> Extension used for script files. (eg .java)
    • ESO_DATA_DIR                             >> 'Data' directory on SAP Sourcing app server - from prerequisites (where to publish script data files)
    • ESO_UPLOAD_DIR                   >> 'Upload' directory on SAP Sourcing app server - from prerequisites (where to publish script import medatada xml)
    • TRANSPORT_PROTOCOL
      • DUMMY  >> Test protocol, doesn't do transport. Displays resulting metadata xml to console.
      • SFTP      >> SSH File Transfer protocol
    • HOST     >> SSH host - irrelevant when TRANSPORT_PROTOCOL is DUMMY
    • PORT     >> SSH port
    • USER      >> SSH username
    • PASS     >> SSH password

 


3. USAGE

execute the deploy action whenever you want to publish your local scripts to SAP Sourcing. ScriptsRepo app will handle the rest.

  • java -jar scriptsrepo-0.4.1.jar --deploy

 

 

 

I am interested in hearing your comments, ideas, hints, questions, code contributions, anything that you could think of.

I'm planning to keep this project active, at least for making my life a lot easier implementing SAP Sourcing enhancements.

 

Some things are missing, and could be enhanced (if SAP agrees to fix some issues)

  • Explicitly Called Scripts - disabled
    • can't work because the SAP standard importer is broken
  • Workflow Scripts
    • no option yet to import; I'm investigating the use of V10 webservices to incorporate this

 

 

 

 

ScriptsRepo is created and maintained by Bogdan Toma and is released under GPLv3.

Scripts are, in short, one of the winning points of SAP Sourcing. As much as I appreciate the technology behind them (myself being a core java dev), they present huge gaps when it comes to methodology of development and maintenance.

 

The methodology in this case translates to either editing scripts directly in SAP Sourcing (yes, some people are masochists) or a low-level copy-paste. I cannot stress enough about the issues that can arise out of this.

 

This blog post will cover my recommendations for scripts on:

  • Editing - editor, formatter
  • Maintaining - source control maintenance, git, SourceTree app

 

 

 

Editing SAP Sourcing Scripts

 

When I’m not coding in Eclipse, my editor of choice for SAP Sourcing scripts (for Windows) is SynWrite (download here).

 

After installing SynWrite, we’ll add two plugins for it:

  • Java lexer
  • Code formatter

 

Adding java lexer

    • Open SynWrite and follow menu Options -> Add-ons manager -> Install
    • Search for Lexer: java and double click, confirm installation.
    • ***Optional*** - Configure java lexer to parse .bsh files (if you prefer to keep your scripts with .bsh extension instead of .java)
      • Options -> Customize lexers library -> Java -> File extensions: java jav bsh

 

Installing code formatter plugin

    • The formatter I'm using is a customised jsbeauty plugin.
    • To install, simply open the formatter zip file plugin.Alexey.extended.JsFormat.zip (download here) in SynWrite and confirm installation. File -> Open
    • Format your code using Ctrl+Alt+F or Plugins -> JS Format -> Format

 

 

 

Maintaining SAP Sourcing Scripts


Now that we have an editor that can ensure the formatting is consistent, and will not impact our SCM, my recommendation is to:

 

  • Download all your scripts from SAP Sourcing, and maintain them locally on your system
    • Use either script's EXTERNAL_ID or DISPLAY_NAME as file name (with extension .java or .bsh) for easy identification.

 

  • Install a SCM tool of your preference and keep your scripts version-controlled
    • My recommendation is to use only the best available: git
    • For an easy-to-use program you can simply download SourceTree which will handle everything for you with an excellent GUI.

 

 

The result:

 

 

  • EDITOR

I like SynWrite a lot compared to other alternatives (Notepad++ etc), because of the option to have a good formatter and a neat tree structure which shows all your functions in the script (cool!).

 

Screen Shot 2016-02-21 at 12.16.12.jpg

 

 

 

  • SOURCE CONTROL MANANGEMENT

Just compare what ever you are using as methodology (manual backups, oma extracts, attachment blobs etc) with the screenshot below.

 

SourceTree.jpg

 

 

If you've followed on to this point you might be having two questions:

 

  • Can we have code autocomplete and validation like in a full-fledged IDE?
    • NOT in SynWrite or other editors you might be using.
    • YES, it can be done in Eclipse or Netbeans; I am using such options within Eclipse. BUT, coding beanshell in Eclipse is (for the moment) way too complicated to qualify for a public release or recommendation.

 

  • What's the point of all of this, if it doesn't solve the initial problem - having to copy-paste scripts from local files back into SAP Sourcing?
    • This post aims to provide a <<phase-one (the basis)>> for script management - getting the files in a coherent format into a version-control system.
    • In the next couple of days (stay tuned) I will release the <<phase-two>>: A tool that will automatically deploy your scripts from your SCM into Sourcing. So make sure you get your scripts in a local format under version control as soon as possible.

 

 

Bogdan Toma

In this blog, I am planning to show how you can restrict access to queries/reports. The same is applicable to query groups also if you want to restrict access to a group of queries.

 

Access can be given to Users, Groups or Companies. There is a precondition that atleast one of the person in the access list should be having read/write mode else this method will not work as some person should be having edit access.

 

Let me show you the steps for the same.

 

  • Select any query/report to be given access. In this example,  I am taking the test query which i have created.

     1.PNG

 

  • Go to Access List tab and enter the list of collaborators i.e. Users/Groups/Companies. Here we are giving access to only myself which is shown below.

     2.PNG

 

  • Click on Save and then Done to complete the changes.

 

By this way, the users/groups/companies other than the mentioned in the access list will not be having access for the same. They will be getting an error message that they do not have access for that particular object

Introduction

 

Release 10.0 SP08 of the SAP CLM ERP Integration - now available on SAP Service Marketplace - provides new standard functionality to support multiple Price Validity Date Periods on CLM Agreements published to ERP as Outline Agreements.

 

For additional details on this new feature, please refer to SAP Knowledge Base Article 2231435 - Price Validity Feature:

http://service.sap.com/sap/support/notes/2231435

 

Prior to SAP CLM Release 10.0 SP08, in order to create multiple Price Validity Date Periods on an ERP Outline Agreement published from CLM, the application of custom or standard SAP Notes was required or custom development had to be performed.  Although this resulted in ERP Outline Agreements having multiple Price Condition Validity Date Periods on a line item, the corresponding CLM Agreement line item had only one Price Condition Validity Date Period - an out of sync condition.

 

This article provides an overview of the upgrade support in SAP CLM Release 10.0 SP08 to migrate (i.e., synchronize) the Outline Agreement's multiple Price Validity Date Periods to its corresponding CLM Agreement so that after the migration, the two documents Price Validity Date Periods data exactly matches.

 

Migration Process

 

Overview

 

The new migration tool executes via a 2 step process:

  1. New ERP Extract of Outline Agreements Price Validity Date Periods data to an XML file.
  2. CLM import of the XML file.

pvm.png

 

The ERP Extract program provides flexible options for selecting single Outline Agreements, ranges of Outline Agreements, or all Outline Agreements.  It will only extract Outline Agreements that have been published from CLM Agreements.

 

Analysis Phase - Warning Mode Extract/Import


In order to understand what Price Validity Date Periods mismatches exist, the extract/import can be first run in "warning mode".  This allows the mismatches to be reviewed  first in order to verify that the Outline Agreement's multiple Price Condition Validity data is correct vs. the CLM Agreement having unpublished price validity updates that should be published to ERP before the synchronization update occurs from the Outline Agreement.

 

The output of this CLM import is a report identifying the out of sync Outline Agreements/CLM Agreements.

 

Synchronization Phase - Update Mode Extract/Import

 

For any out of sync Outline Agreements/CLM Agreements, once tit has been determined that the Outline Agreement contains the current and correct Price Validity Date Periods data that should be on the CLM Agreement's new Price Validity Date Periods collection, the extract/import can then be run in "update mode" to synchronize the two documents.

 

The output of this CLM import are updated CLM Agreements whose Price Validity Date Periods data matches exactly what is on the ERP Outline Agreement, as well as a report that lists all of the CLM Agreements synchronized.

 

It should be noted that after the upgrade, an alternative to this automatic synchronization is always manual synchronization by using the CLM Agreement UI to update the multiple Price Condition Validity Date Periods.

 

Additional Information

 

For additional details on this new upgrade migration capability, please refer to SAP Knowledge Base Article 2231437 - Price Validity Upgrade Guide:

http://service.sap.com/sap/support/notes/2231437

Introduction

 

After completing a successful round of customer validation testing where customer feedback has been very positive, Release 10.0 SP08 of the CLM ERP Integration provides new standard functionality to support multiple Price Validity Date Periods on CLM Agreements published to ERP as Outline Agreements.  SP08 is now available for download on SAP Service Marketplace.

 

The design goal of this new feature was to replicate, as much as possible in CLM, the standard behavior and use cases supported by SAP ECC's Outline Agreement Price Condition Validity Date Periods functionality in order to enhance the integration between these 2 systems.

 

Line Item Support for Price Validity Date Periods

 

Enhanced Line Items User Interface

pv1.png

 

Header Support for Price Validity Date Periods

 

Enhanced Line Items User Interface

pv2.png

 

Additional Information

 

For additional details on this new feature, please refer to SAP Knowledge Base Article 2231425 - Price Validity Feature:

 

http://service.sap.com/sap/support/notes/2231435

Hello all,

 

    Is it possible to disable import line item button in line item tab of master agreement ? any suggestion is welcome .

 

Thanks a lot .

phan

Workflows tend to be part of the core business in SAP Sourcing and business requirements will most often transform a 'simple' workflow process into a very complex one.

 

Since the introduction of WF in Sourcing (and the TWE 'era') a specific pattern to script workflows has emerged and it has been carried forward into all projects. Today we are going to change that.

 

**WARNINGS**

  • Implementing recommendations in this blog post might make your life easier
  • Throughout this blog post it will be assumed that consultants have following knowledge
    • Workflows definition / update / scripting
    • Java EE/BeanShell

 

 

WORKFLOW TYPOLOGY

The typology used throughout projects is fairly similar:

  • Workflow definition with X number of Approval Steps (total maximum possible steps)
  • Approval Matrix Definition maintained *somewhere*
  • Specific Approval Sequence picked up in PRE-PHASE-CHANGE script and added to the document into an Extension Collection
  • Workflow scripting handles the 'next approver' from the document Extension Collection

 

 

So, WHAT IS THE PROBLEM?

For each approval step the script is required to

  • Check if approval status is APPROVED or REJECTED
    • APPROVED
      • Approval Sequence is complete -> move document to 'Approved' phase
      • If not complete, add next approver
    • REJECTED
      • move document to 'Draft' (or previous phase)

 

Pattern in case of APPROVED for above is:

  • for WF STEP 1:
if(approvalMatrix.size() == 1) {
  //move to Approved
}
if(approvalMatrix.size() >= 1) {
  //add next approver
}

  • for WF STEP 2:
if(approvalMatrix.size() == 2) {
  //move to Approved
}
if(approvalMatrix.size() >= 2) {
  //add next approver
}

  • etc ... for all steps

 

 

WHY IS THAT A PROBLEM? And why is it complicating our lives?

The pattern above implies that:

  • there is one distinct version of PRESCRIPT for EACH workflow step
  • similarly, there will be one distinct version of POSTSCRIPT for EACH workflow step

To maintain such a workflow, an IT consultant will have to:

  • save/maintain each prescript/postscript version individually
  • do a lot of repetitive work for any minor update
  • be VERY careful when doing updates not to disturb the process

 

 

WHAT IS THE SOLUTION?

The solution is to make scripting GENERIC.

  • Single version of PRESCRIPT for ALL steps
    • the script should be able to 'know' from which step it was executed
  • Single version of POSTSCRIPT for ALL steps
    • the script should be able to 'know' from which step it was executed

 

 

HOW?

 

  • Step 1: Make sure you have a gate identifier. Solution is to 'decode' the current step from the Activity ID (last digit/digits)

Screen Shot 2015-07-30 at 4.41.19 PM.png

 

 

  • Step 2: Use following code to identify gate -> 'current approval step'
    • Script will get ending digit(s) from identifier:
      • 'approval_gate_1' = 1
      • 'approval_gate_12' = 12
      • 'approval_gate_1485' = 1485
import java.util.regex.Matcher;
import java.util.regex.Pattern;
private Integer gate = null;
// btoma - Get the step No. from gate NativeID - last digit(s)
// btoma - to facilitate PRESCRIPT on all steps
void getGate() {
  Pattern p = Pattern.compile("\\d+");
  Matcher m = p.matcher(nativeName);
  while(m.find()) {
  gate = Integer.valueOf(m.group());
  }
}
getGate();


  • Step 3: Update WF script code, to use gate instead of hardcoded numbers
if(approvalMatrix.size() == gate) {
  //move to Approved
}
if(approvalMatrix.size() >= gate) {
  //add next approver
}


  • Step 4: Copy-Paste your PRESCRIPT on rest of WF steps

 

  • Step 5: Repeat 1-4 for POSTSCRIPT

 

 

OTHER RECOMMENDATIONS?

  • Maintain scripts locally, in a source control sistem (SVN, GIT).
  • Perform changes locally, and copy-paste your script to all WF steps in one go.
  • Don't forget about logging and error reporting

 

The end.

Bogdan Toma

As promised, this is the sequel to Working with FTP folders in SAP Sourcing 9.x

 

SAP Sourcing 10 introduces the FileTransferConfiguration BO which allows for a "more configuration, less coding" approach in working with FTP folders.

 

**WARNING**- this blog post will make use of Internal APIs. Even if I have tested and confirmed them working in 10.x versions, great care should be taken while implementing and supporting these APIs.


  • Prerequisites
    • Define your File Transfer Configuration (FTP location for file exports)

Screen Shot 2015-06-12 at 12.23.41 PM.png



SCRIPTING part


  • Required imports
import java.io.File;
import com.sap.odp.common.platform.HomeLocator;
import com.sap.odp.doccommon.filetransfer.FileTransferConfigBo;
import com.sap.odp.util.filetransfer.FileTransferClientIfc;

 

  • Prepare file
    • For example let's extract the first attachment in the document
File exportFile = doc.getAttachments().get(0).getAttachment().getFileData(session);

 

  • Write file to FTP
ftcHome = HomeLocator.lookup(session, "odp.doccommon.FileTransferConfig");
FileTransferConfigBo ftCfg = ftcHome.findByExternalId("EXPORT_EXT_SYSTEM");
FileTransferClientIfc ftc = ftCfg.getClient();
try {
     // if you plan to export multiple files with loops, implement them here, aka build your FTC client only once
     ftc.putFile(exportFile, ftCfg.getUrl() + exportFile.getName());
} finally {
     ftc.close(); //always make sure you close the client
}

 

Bogdan Toma

One of the recurring inquiries in SAP Sourcing has been the use of FTP within scripts. While this might be a simple task in Java, the biggest problem is that Sourcing 9.x doesn't use the all-too-familiar Apache Commons FTPClient.

 

In this blog post I will explain how to make use of the internal functions available in SAP Sourcing 9.x to facilitate working with FTP folders.

 

**WARNING**- this blog post will make use of Internal APIs. Even if I have tested and confirmed them working in 9.x versions, great care should be taken while implementing and supporting these APIs.

 

  • Prerequisites:
    • Check and confirm that your FTP integration System Properties are defined and access is granted to respective directory.

Screen Shot 2015-06-02 at 12.13.04 AM.png

 

 

The fun part: scripting

 

  • Import some classes
import java.io.*;
import java.util.*;
import com.sap.eso.sapintegration.util.SapIntUtil;
import com.sap.odp.doc.integration.IntegrationConfig;

 

  • Define your FTP Server
//CONSTANTS
String FTP_SERVER = "10.10.10.10";
String FTP_USER = "MyFtpUsername";
String FTP_PASSWORD = "MyFtpPassword";
String FTP_OUTBOUND_DIRECTORY = "my/outbound/directory";

 

  • Prepare your file
    • Let's assume you have an AttachmentIfc you want to push to FTP location
File exportFile = attachmentIfc.getFileData(session);
String xmlString = "sample XML text";
tempDirectory = IntegrationConfig.getEnterpriseProperty(session, "ftp.temp_dir");
File exportFile = new File(tempDirectory + File.separator + "my_file.xml");
writer = new OutputStreamWriter(new FileOutputStream(exportFile), "UTF-8");
writer.write(xmlString);
writer.close();

 

  • Finally, write your File to FTP
SapIntUtil.instance().ftpFile(session, exportFile.getParent(), FTP_OUTBOUND_DIRECTORY, FTP_SERVER, FTP_USER, FTP_PASSWORD, exportFile.getName());

 

**PS** For SAP Sourcing 10.x a different post will follow because the changes introduced allow for a better implementation with the use of File Transfer Configuration

 

Bogdan Toma

The following is summary by release, of the Internet Browsers that SAP Sourcing/CLM Supports:

 

  1. In release 7.0 SPX we are compatible with: Internet Explorer version 6, 7, 8, 9, 10 or 11.  IE 10 and IE 11 are only supported in Compatibility View mode.

 

    1. As part of 7.0 SP9 we updated the warning message when users login with unsupported browsers to clarify that IE 10 (compatibility view) is also supported.
      • If users are using IE 10 in compatible view in earlier versions of 7.0 SPX there should be no problems.
    2. As part of 7.0 SP12 we updated the warning message when users login with unsupported browsers to clarify that IE 11 (compatibility view) is also supported.
      • If users are using IE 11 in compatibility view in earlier versions of 7.0 there should be no problems.
      • As part of 7.0 SP12 we also added the warning message for when users navigate to the Supplier Registration pages using an unsupported browser.

 

  1. In release 9.0 SPX we are compatible with: Internet Explorer version 6, 7, 8, 9, 10 or 11, Safari, Firefox, or Chrome.

 

    1. A warning message appears when users attempt to login or when users are navigated to the Supplier registration pages to let them know they are using a browser that is not compatible.
    2. As part of 9.0 SP14 we updated the warning message when users login with unsupported browsers to clarify that IE 10 is also supported.
      • Additionally 9.0 SP14 and SP16 address some minor rendering issues when users are using IE 10 without compatibility view.
      • If users are using IE 10 with earlier versions of 9.0 SPX that is fine but we recommend compatibility view.
    3. As part of 9.0 SP21 we updated the warning message when users login with unsupported browsers to clarify that IE 11 is also supported.
      • Additionally 9.0 SP21 and SP22 address some minor rendering issues when users are using IE11 without compatibility view mode.
      • If users are using IE 11 with earlier versions of 9.0 SPX that is fine but we recommend compatibility view.

 

  1. In release 10.0 SPX we are compatible with: Internet Explorer version 6, 7, 8, 9, 10 or 11, Safari, Firefox, or Chrome.  Safari iOS on the iPad is also supported.

 

    1. A warning message appears when users attempt to login or when users are navigated to the Supplier registration pages to let them know they are using a browser that is not compatible.
    2. As part of 10.0 SP4 we updated the warning message when users login with unsupported browsers to clarify that IE 11 is also supported.
      • Additionally 10.0 SP4 and SP6 address some minor rendering issues for when users are using IE 11 without compatibility view mode.
      • If users are using IE 11 with earlier versions of 10.0 SPX that is fine but we recommend compatibility view.

 

Please contact me with any questions.

Anne McClelland

Product Management

One of the gaps found in SAP Sourcing and constantly requested by customers is the possibility to archive the processed messages list for more than the system configured number of days.

 

While email archiving does not come standard with SAP Sourcing, it is an easy task to implement with a custom process.

 

In this blog post I will detail the configurations required to archive the processed messages (emails) in Wave 10.

**similar configuration is also possible in other versions, with adaptation for the Integration Export Task**

 

Prerequisites

  1. FTP server with preconfigured email archive directory
  2. ACL to create Report
  3. ACL to create Scheduled Task
  4. ACL to create File Transfer Configuration **for Wave 10**

 

 

Step 1: Create custom report based on query definiton FCI-AllSentMessages

               **extra: standard query definition can be duplicated and enhanced to also archive email contents**

Screen Shot 2015-04-09 at 5.01.44 PM.png

Screen Shot 2015-04-09 at 5.04.44 PM.png

 

Step 2: Create File Transfer Configuration (**only for Wave 10**)

Screen Shot 2015-04-09 at 5.09.48 PM.png

 

Step 3: Check value of System Property messaging.savesentmsgsdays

               **this will be the basis number of days for setting the periodicity of the scheduled task**

Screen Shot 2015-04-09 at 5.16.08 PM.png

 

Step 4: Create Integration Export Scheduled Task

 

Screen Shot 2015-04-09 at 5.24.32 PM1.png

Screen Shot 2015-04-09 at 5.24.15 PM.png

 

 

Final result:

Full archive of processed messages (emails) list:

Screen Shot 2015-04-09 at 5.36.06 PM.png

 

 

 

Bogdan Toma

Actions

Filter Blog

By author:
By date:
By tag: