Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
AJAYTR_ATR66
Participant

#ATR(16)

Informative note:

[ 2 in 1 COMBO]

  • Establishing connection between Gitlab and S4HANA System
  • Steps to provide access to Fiori apps which doesn’t have business roles/group.

   Created this blog to provide information on how to establish connection to Gitlab from our S/4 HANA System. Consider, I’m having on-premise Gitlab and newly installed S4HANA System(On-Premise) which GIT connection needs to be established for sharing/cloning GIT repositories. This method will be similar for any type of Git sources – Github, Innersource(Cloud) as well.

  You can also refer this blog on how to provide access to user for specific Fiori app which doesn’t have corresponding Fiori business roles/group.

   Pre-requisites: Knowledge on ABAP System and Git

Connection steps:

Step 1: Fiori Launchpad Configuration

Make sure you have enabled Fiori on S/4 HANA System. Please refer my blog to configure Fiori manually.

Manual Fiori Basis Configuration - S/4 HANA System #ATR

AJAYTR_ATR66_0-1709834131551.png

Step 2: GIT Fiori App INFO

AJAYTR_ATR66_1-1709834131556.png

Information:

  • ODATA - SCTS_GCTS_SRV
  • UI5 - /sap/bc/ui5_ui5/sap/bc_cts_git & additional CTS_ABAPVCS
  • Technical Catalog - SAP_BASIS_TCR_T
  • No Business roles exists like other Fiori apps
  • No Business catalog exist
  • No Business group exist

Step 3: Creation of TEST user

  • Create ‘TESTING’ user with standard Fiori roles and assign ODATA service.

AJAYTR_ATR66_2-1709834131558.png

  • None of the Fiori apps assigned yet.

AJAYTR_ATR66_3-1709834131562.png

  • We have also assigned SAP_BC_GCTS_ADMIN role to ‘TESTING’ user which consists of all gCTS authorizations and Git ODATA service. Make sure to generate profile if not yet generated.

AJAYTR_ATR66_4-1709834131567.png

  • Note 2827411 not relevant to S4HANA 2022. It will be suitable for S4HANA 1909.

AJAYTR_ATR66_64-1709834437036.png

Step 4: SICF Service check

  • Check SICF service - sap/bc_cts_git & cts_abapvcs

AJAYTR_ATR66_5-1709834131574.png

Step 5: FLP CUST – Git Apps Configuration

AJAYTR_ATR66_6-1709834131585.png

  • (Additional) You can also use Fiori Content Manager GUI itself for dealing with Catalogs. But usual UI is preferred since we need to deal with groups as well.

AJAYTR_ATR66_7-1709834131589.png

  • Search with Technical Catalog “SAP_BASIS_TCR_T” and check whether Git Apps are reflecting.
  • We have two apps for Git in latest S/4 HANA Systems. Usually, we will have Git Enabled CTS – Manage Repository App alone in older versions.

AJAYTR_ATR66_8-1709834131592.png

Git Enabled CTS:

AJAYTR_ATR66_9-1709834131595.png

Git Enabled CTS Manage Repository:

AJAYTR_ATR66_10-1709834131601.png

  • Repository App contains correct target mapping.

AJAYTR_ATR66_11-1709834131603.png

  • No need to edit anything in existing Git configuration in S4HANA Systems since it will be SAP Defined. You can change/add parameter accordingly for other fiori apps based on your scenarios.
  • Create User defined Z_CATALOG.

AJAYTR_ATR66_12-1709834131615.png

  • Once created, Drag and drop your required apps to create reference for both GIT Apps.

AJAYTR_ATR66_13-1709834131621.png

AJAYTR_ATR66_14-1709834131625.png

  • Do the same procedure for ‘Target Mapping’ as well.

AJAYTR_ATR66_15-1709834131627.png

AJAYTR_ATR66_16-1709834131629.png

  • Both GTS apps and Target Mapping copied to Z_GITLAB catalog.

AJAYTR_ATR66_17-1709834131632.png

  • Create user defined group

AJAYTR_ATR66_18-1709834131637.png

  • Add -> Select our Gitlab Apps from created Z_GITLAB Catalog.

AJAYTR_ATR66_19-1709834131640.png

AJAYTR_ATR66_20-1709834131642.png

  • You can also create group and add apps directly from Technical Catalog instead of creating user defined catalog but it’s not recommended to touch technical catalog apps directly by reference.

Step 6: Assign Git catalog and group to our ‘TESTING’ user.

  • We have successfully created Gitlab catalog/group which can be assigned in our ‘TESTING user’
  • I’m adding to default “SAP_BC_GCTS_ADMIN” role itself.

AJAYTR_ATR66_21-1709834131643.png

  • Make sure to generate profile. If any authorization object meant to be deleted, Add manually again. You can also prefer to create separate role for Git apps alone if you don’t want to be confused. I have used same role for easy pickings.

AJAYTR_ATR66_22-1709834131654.png

  • Generated -> Added S_GCTS_SYS and generated once again. I’m not sure – how catalogs and groups affect Auth objects to delete it.
  • Check in “TESTING” user launchpad now.

AJAYTR_ATR66_23-1709834131656.png

Step 7: Git App check

Error 1:

AJAYTR_ATR66_24-1709834131660.png

AJAYTR_ATR66_25-1709834131661.png

  • We have an SICF service for GTS, but no ODATA service created for the same.
  • Create ODATA service -

AJAYTR_ATR66_26-1709834131662.png

AJAYTR_ATR66_27-1709834131663.png

AJAYTR_ATR66_28-1709834131664.png

AJAYTR_ATR66_29-1709834131665.png

AJAYTR_ATR66_30-1709834131666.png

  • ODATA will be SICF service scts_gcts_srv which already in running state.
  • Reload Fiori launchpad
  • Git app launched fine.

AJAYTR_ATR66_31-1709834131670.png

  • You can follow steps which mentioned till now for any kind of Fiori apps access.

Step 8: Git Configuration

  • Even if you create separate role for Git Apps and specific ODATA service ‘SCTS_GCTS_SRV’, you can able to launch Git app but ‘Enable gCTS’ option won’t be available if you didn’t provide ‘SAP_BC_GCTS_ADMIN’ role which have all GIT authorization objects.
  • Start “Enable gCTS” wizard

gCTS Directory:

AJAYTR_ATR66_32-1709834131672.png

  • I’m creating ‘gcts with ABAPSIDADM’ directory in suggested path itself. Make sure to check free space of your directory as well.

AJAYTR_ATR66_33-1709834131676.png

JAVA RUNTIME:

AJAYTR_ATR66_34-1709834131678.png

  • By default, All SAP Systems (ABAP) will have SAPJVM installed on the below path.
  • /sapmnt/SID/exe/uc/linuxx86_64/sapjvm_8/jre/bin    
  • Alias - > /usr/sap/SID/SYS/exe/uc/linuxx86_64/sapjvm_8/jre/bin
  • We can also download and use latest SAPJVM from SAP Development tools site.
  • Link-> https://tools.hana.ondemand.com/#cloud

AJAYTR_ATR66_35-1709834131680.png

  • I’m using existing SAPJVM itself – Version – 8.1.044

AJAYTR_ATR66_36-1709834131683.png

GIT Client:

  • By default, All ABAP Kernels will have abap2vcs.jar file.

AJAYTR_ATR66_37-1709834131683.png

AJAYTR_ATR66_38-1709834131686.png

Git Enabled CTS:

  • By default, Git program scheduled to run in current application server which we used to launch Fiori launchpad.
  • Select “Initialize System”

AJAYTR_ATR66_39-1709834131696.png

Summary:

AJAYTR_ATR66_40-1709834131699.png

Health Check Error:

  • File Access – Added “SAP_BC_GCTS_REPO_DEVELOPER” role to my “TESTING” user. Generate role without fail.

AJAYTR_ATR66_41-1709834131705.png

  • Even though, we assign mentioned GCTS Developer role, it won’t have full authorizations.

AJAYTR_ATR66_42-1709834131707.png

AJAYTR_ATR66_43-1709834131709.png

  • Edit role and provide full authorizations to S_DATASET.
  • Once provided, File Access check got successful.

AJAYTR_ATR66_44-1709834131714.png

  • Make sure to open SSH 22 and HTTPs 44300 port for Outgoing communication.
  • Git configuration completed successfully.

Step 9: Create Gitlab Project

  • I’m creating new empty project for testing.

AJAYTR_ATR66_45-1709834131715.png

AJAYTR_ATR66_46-1709834131717.png

AJAYTR_ATR66_47-1709834131722.png

AJAYTR_ATR66_48-1709834131723.png

Step 10: Create and Clone Repository:

AJAYTR_ATR66_49-1709834131726.png

Clone Repository:

AJAYTR_ATR66_50-1709834131730.png

AJAYTR_ATR66_51-1709834131731.png

Error 1: Unable to find valid certification path

AJAYTR_ATR66_52-1709834131740.png

  • To make ABAP system to trust Gitlab site, we need to upload Gitlab Root Certificate in JAVA RUNTIME cacerts file.
  • Keytool path: /sapmnt/SID/exe/uc/linuxx86_64/sapjvm_8/jre/bin
  • Java_runtime - cacerts path: /sapmnt/SID/exe/uc/linuxx86_64/sapjvm_8/jre/lib/security/cacerts

AJAYTR_ATR66_53-1709834131741.png

AJAYTR_ATR66_54-1709834131741.png

  • Most of them will upload certificate on ABAP STRUST and check GIT connection. But actual SSL connection checks undergo via GIT JAVA Trusted CA only. As an additional, you can also import Git Root certificate additionally in ABAP STRUST - Anonymous as well.
  • Git connection is working fine after uploading Root CA in Java cacerts list.

Error 2: Authentication Error:

AJAYTR_ATR66_55-1709834131746.png

  • We can add Git Username and Password parameter in Configuration.

AJAYTR_ATR66_56-1709834131749.png

  • Git Repository cloned fine.

AJAYTR_ATR66_57-1709834131754.png

  • We can also set Token (key) Authentication instead of Username and Password. Token Expiration date – 1 year. Once token generated, make sure to save it. We can able to see token key only once.

AJAYTR_ATR66_58-1709834131759.png

  • We should create token with atleast ‘Maintainer’ role to connect our repository from S4HANA System.

AJAYTR_ATR66_59-1709834131761.png

  • Add “Token” and remove “User and Password” parameter.

AJAYTR_ATR66_60-1709834131762.png

  • Git commit/Connection to Repository is fine via token authentication as well. I have manually done commit – using “Update to latest commit” option.

AJAYTR_ATR66_61-1709834131764.png

AJAYTR_ATR66_62-1709834131766.png

  • If you provide incorrect password or token (key), connection will fail with “git-upload-pack not permitted error while cloning”. I have provided wrong token just for testing.

AJAYTR_ATR66_63-1709834131772.png

  • We can use proxy parameter for S4HANA Cloud. It’s not available for On-premise S4HANA System.

We have successfully established connection between our S4HANA system and On-premise Gitlab Repository.

 

Thanks for Visiting!

Please do connect and follow my Linked In Profile

https://www.linkedin.com/in/ajaytr66/

AJAY TR - ATR - SAP BASIS ADMINISTRATOR

Labels in this area