Useful reports

ReportDescription
RS_REPAIR_SOURCEABAP Editor Call
RDDIT076Change request/task status
RS_STREE_OBJECTS_TO_REQ_GETAuto adding related objects to request
SPROX_LOG_TRANSP_OBJ_INSERTInsert missing logical objects to request
RFSEPA01Fill BSIS table after enabling line item display in FS00.
SPROX_XSD2WSDLConvert schema (XSD) to WSDL

hybris system requirements

hybris minimum requirements by versions. Preferred DB charset is utf8 and collation is utf8_bin.

JVMDBSolrImageMagickTomcat
2205SapMachine 17.0MySQL 8.0 (jdbc 8.x)8.11.16.7.3-58.5.78
2105SapMachine 11.0MySQL 5.7 (jdbc  5.1.x), 8.0 (jdbc 8.x)Patch 1 <= 8.9.0,
Patch 2 = 8.10
Patch 3 >= 8.10.1
6.7.3-58.5.69
2011SapMachine 11 or Oracle JDK/JRE 11MySQL 5.7 (jdbc  5.1.x), 8.0 (jdbc 8.x)8.66.7.3-58.5.56
2005SapMachine 11MySQL 5.7 (jdbc 5.1.x), 8.0 (jdbc 8.x)8.4.06.7.3-58.5.51
1905SapMachine 11MySQL 5.6, 5.7 (jdbc  5.1.x), 8.0 (jdbc 8.x)7.76.7.3-58.5.40
1811Oracle 8.0 or SAP JVM 8.1MySQL 5.6, 5.7 (jdbc  5.1.x) )7.56.7.3-58.5.40
1808Oracle 8.0 or SAP JVM 8.1MySQL 5.6, 5.7 (jdbc  5.1.x) )7.46.7.3-5

hybris installer failed

If you are getting error while installing receipt like below, although you have set the parameter, check your maven settings for central repositories URLs start with HTTPS.

********************************************************************************************************
Either platform properties or system environment does not have the required property 'initialpassword.admin' set.
Please make sure to provide it in the recipe or in the system environment.

If you are running recipe using installer application you can set required property via option
-A local_property:initialpassword.admin=property_value

If missing property is initialpassword.admin then you can set it up using
shortcut -A initAdminPassword=admin_password
********************************************************************************************************

Maven disabled HTTP repositories. You can use below sample maven config file at <user-home>\.m2\settings.xml.

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <profiles>
    <profile>
      <id>default</id>
      <repositories>
        <repository>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <id>central</id>
          <url>https://repo1.maven.org/maven2</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <id>central</id>
          <url>https://repo1.maven.org/maven2</url>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>default</activeProfile>
  </activeProfiles>
</settings>

Source: https://stackoverflow.com/questions/59972570/why-does-hybris-ship-insecure-http-maven-repository-url-and-why-cant-we-overri

Useful ABAP Functions

Function Description
POPUP_TO_SELECT_MONTHSelect month and year.
GUI_RUNRun command on the client side.
DAYS_BETWEEN_TWO_DATESTotal days between dates.
HRVE_CONVERT_TIME Convert time between 24h and 12h
SEO_CLASS_GET_METHOD_INCLUDESFind includes which are created by class
TH_POPUPSend a message to the user
RP_CALC_DATE_IN_INTERVALAdd or remove days, months, and years to date
HR_EFI_CONVERT_STRING_TO_TABLEConvert string to itab with a given row length
MCS_BIW_DROP_CREATE_TABLEDrop and re-create a database table
CONVERT_DATE_TO_INTERNALConvert string to date with check
ARCHIVFILE_CLIENT_TO_SERVERCopy a file from client to server (upload)
ARCHIVFILE_SERVER_TO_CLIENTCopy a file from server to client (download)
ALINK_CALL_TRANSACTIONCall t-code without authorization.
POPUP_GET_VALUESAsk for values to user.

SSL / TLS settings for SAP NetWeawer

A lot of SAP product such as NetWeaver using sapcrypto / commoncrypto library (sapcryptolib.dll or sapcryptolib.so) for SSL / TLS and encryption.

SSL / TLS client configuration.

ssl/client_ciphersuites = 150:PFS:HIGH::EC_P256:EC_HIGH

SSL / TLS server configuration.

ssl/ciphersuites = 135:PFS:HIGH::EC_P256:EC_HIGH

You need at least 8.4.40 sapcrpytolib for SNI (Server Name Indication) support. Before SNI protocol client request certificate with domain IP instead of domain name. SNI used for hosting multiple site on same port with encryption.

ssl/client_sni_enabled = TRUE

We need updated kernel for using this parameter, details are in this note.

Also you can set these parameters as OS environment variable.

SAPSSL_CLIENT_CIPHERSUITES = 135:PFS:HIGH::EC_P256:EC_HIGH
SAPSSL_CLIENT_SNI_ENABLED = TRUE

sapcryptolib versions for protocols

In below table you can find minumum sapcryptolib version for protocols.

ProtocolVersion
TLS 1.05.5.5 PL 28
TLS 1.28.4.31
SNI8.4.40

Split string to lines for displaying

DATA: lv_content TYPE string,
      lv_pos     TYPE i,
      lv_len     TYPE i.
lv_content = 'dummy string'.
lv_pos = 1.
WHILE lv_pos LE strlen( lv_content ).
  lv_len = 80.
  IF lv_pos + lv_len GT strlen( lv_content ).
    lv_len = strlen( lv_content ) - lv_pos.
  ENDIF.
  WRITE lv_content+lv_pos(lv_len).
  lv_pos = lv_pos + 80.
ENDWHILE.



If SOAMANAGER not exists

Some old system hasn’t got SOAMANAGER for configuring/creating logical port or service. We can use below t-codes for same operation.

LPCONFIG
WSCONFIG
WSADMIN

My hybris development environment test

I am using my company mac pro 2015 for a lot of thing. So I need different environment look like C#, hybris, ABAP, etc. These environment needs service look like db. These service using my ram always. So I am using VM for environment which are not used often. I created VM for new hybris versions for testing (docker cannot pause / resume systems yet). I try some scenarios for my best hybris development environment.

VM: OS version Centos 7, Java 8 u162, MySQL 5.7.21 and hybris version 6.6.

Enviroment Compile time (ant clean all)
Hybris files in host shared with guest vm 21 minutes 9 seconds
Hybris files in guest vm 3 minutes 8 seconds
2 minutes 29 seconds
Hybris files in guest vm and shared with host (without nfs optimization)  5 minutes 44 seconds

 

Creating history for item

If you want create history for item look like backoffice, you can use below example.

public void updateConsignmentStatus(String userUid, ConsignmentModel consignment, ConsignmentStatus status) {
  Map<string, object=""> originals = new HashMap();
  originals.put(ConsignmentModel.STATUS, consignment.getStatus());

  consignment.setStatus(status);

  Map<string, object> news = new HashMap();
  news.put(ConsignmentModel.STATUS, consignment.getStatus());

  final SavedValues savedValues = JaloConnection.getInstance().logItemModification(consignment.getPk(), news, originals, false);
  savedValues.setUser(UserManager.getInstance().getUserByLogin(userUid));
  modelService.saveAll();
}

Creating,updating or deleting other items in interceptor

public class MyCustomerPrepareInterceptor implements PrepareInterceptor {
private static final Logger LOG = Logger.getLogger(MyCustomerPrepareInterceptor.class);

@Override
public void onPrepare(CustomerModel customerModel, InterceptorContext interceptorContext) throws InterceptorException {
  . . .
  final MyItemModel myItem = 
  interceptorContext.getModelService().create(MyItemModel.class);
  interceptorContext.registerElement(myItem);
  //interceptorContext.registerElementFor(myItem, PersistenceOperation.DELETE);
  . . .
}