воскресенье, 9 января 2022 г.

Starting the Script Server

To use Application Component LO-VCH Advanced Variant Configuration most probably you need to start scriptserver.

1650957 - Starting the Script Server

2517761 - How to add SYSTEMDB to HANA Studio in a Multitenant Database Containers (MDC) environment

2987015 - Manual installation of VCH AFL for S/4 HANA Advanced Variant Configuration S/4 Release 1909OP and following

Go with database user to terminal and run command hdbsql:


Inside enter the command:

ALTER DATABASE sd1 ADD 'scriptserver';

ALTER DATABASE SYSTEMDB ADD 'scriptserver';

ALTER SYSTEM ALTER CONFIGURATION ('daemon.ini', 'host', ' s42021') SET ('scriptserver','instances') = '1' WITH RECONFIGURE;

In case on the error

feature not supported: ALTER database command on SYSTEMDB only SQLSTATE: HY000


The next note is applicable:

2804287 - feature not supported: Create database command on SYSTEMDB only

Resolution

Connect to the system database for creating the tenant database.

On SAP HANA Studio:

Create a connection to SYSTEMDB

Retry the command.

With HDBSQL:

Connect to hdbsql by using the parameter "-d SYSTEMDB"

Confirm that it's connected to the SYSTEMDB by checking the hdbsql prompt:

hdbsql SYSTEMDB=>

Retry the command.


In my case the command looks like there (run after hdbsql):

hdbsql=> \c -d SYSTEMDB -u SYSTEM -p <PASSWORD_HERE>

Add SYSTEMDB to SAP HANA Studio











Related topics

Create Tenant Database for SAP HANA Express – by the SAP HANA Academy | SAP Blogs

https://youtu.be/DbaO_-Hlq98


пятница, 24 декабря 2021 г.

Migrate Your Data App - WTF ???

S4 HANA 2021 MD migration story...

Try to run that you think, should be Migration Cockpit, having those part of URL:your part
sap/bc/webdynpro/sap/dmc_wda?WDCONFIGURATIONID=DMC_WDA_APP&sap-client=999&sap-language=EN#
Brings some errors:

It is no longer possible to migrate data using transaction LTMC. It is still possible to display existing projects, but new projects cannot be created.
You can use the app Migrate Your Data – Migration Cockpit to migrate data to SAP S/4HANA. You can access this app in the Fiori launchpad.


Try to find something mentioned:


Trying to launch this new stuff...

S/4 HANA Migration Cockpit - 2021 Role -- SAP_BR_CONFIG_EXPERT_DATA_MIG Brings some Cloud shit - F3473 (Cloud??? WTF???)

 

Staging tables, sure...


Updated 2022.08.17


Migrate Your Data app works with ala-Excel tables but of course, not everything is so simple...
The app can only work if settings in SCC4 and SE06 configured according SAP note 
3104790 - Modifiable Systems and Transport Concept, SAP S/4HANA Migration Cockpit - Migrate Data Using Staging Tables
3039598 - SAP S/4HANA Migration Cockpit Fiori App - Cannot Create Project
And some bonus from me - below you can find pictures about the topic:

Migrate Your Data app have button "Create". Having those mode, you can't create new objects inside created project, you can only change (upload) existing objects.


It possible with the next settings:

SCC4


SE06 -- System change option
  • The software component assigned to the development package is set to Modifiable. (MARA table, for example)
  • The namespace assigned to the development package is set to Modifiable


Migrate Your Data app doesn't have button "Create"


SCC4


To include migration project to transport request, use transaction LTMOM.
You also can export / import migration project via file using program /LTB/MC_PROJ_Q2P.

среда, 13 октября 2021 г.

How to make oData service working from outside

 At first, select oData service you want to check, for example, something with business partner.

 Here is API_BUSINESS_PARTNER service - need to activate in /IWFND/MAINT_SERVICE


Then, go to "Call Browser" button:

URL with this format will be opened: 

https://s4host.net:8070/sap/opu/odata/sap/API_BUSINESS_PARTNER/?$format=xml

Here you can see some collections, which starts from "A_" patterns:


Copy such collection (A_BusinessPartner) and put it after basic service name:

https://s4host.net:8070/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner

It brings the list of business partners from the system:


To have information about exact BP, put BP number in such format to URL:

https://s4host.net:8070/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('300000')


You can do the same from Postman for example:


To expand business partner data for some particular directions, you can add such extension (in blue):

https://s4host.net:8070/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('300000')/to_BusinessPartnerAddress


To have all API structure, you can append URL by $metadata extension:
https://s4host.net:8070/sap/opu/odata/sap/API_BUSINESS_PARTNER/$metadata


To create Sales Order, you can use Postman with those POST request:

https://s4host.net:8070/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder

Put your POST-URL and request X-CSRF-Token=fetch through GET request:


Then put the received result in header value of POST request:



More-or-less minimum POST request JSON payload looks like that (values coloured by blue)

{
    "SalesOrderType""OR",
    "SalesOrganization""RU01",
    "DistributionChannel""01",
    "OrganizationDivision""01",
    "SoldToParty""2",
    "PurchaseOrderByCustomer""Created via OData Service",
    "CustomerPaymentTerms""0001",
    "to_Partner": [
        {
            "PartnerFunction""SH",
            "Customer""2"
        }
    ],
    "to_Item": [
        {
            "Material""2000000010",
            "RequestedQuantity""2",
            "to_PricingElement": [
                {
                    "ConditionType""PR00",
                    "ConditionRateValue""125"
                }
            ]
        },
        {
            "Material""2000000011",
            "RequestedQuantity""10",
            "to_PricingElement": [
                {
                    "ConditionType""PR00",
                    "ConditionRateValue""230"
                }
            ]
        }
    ]
}



Here are some useful links:

SAP API Business Hub

How to find an API on SAP S/4HANA OP (EN) | SAP Blogs

Create Sales Order - SAP Help Portal

https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/1dad2180e6f34b75ac77afce5cb5eda1/7ab0bcc20b1611da1503000bcddc2565.html?&version=2020.001 

Other API-s examples

API_VMSVEHICLE

API_VMSVEHICLELOCATION

Operations for Vehicle Management System for Vehicle - Read - SAP Help Portal

Converting UUID between hyphened representation and RAW16 | SAP Blogs

Request syntax for vehicles


вторник, 15 декабря 2020 г.

Frequently happened issues during Fiori apps activation

How to resolve Vocabulary Annotation File 'xxxxxx' version '0001' not found?

Resolution (note 2826598)


 Login to SAP NetWeaver and execute /n/IWBEP/REG_VOCAN t-code

 Search for the Annotation File from the list (1) and click on the Annotation Model

 In the below screen you will get OData Service name (2)


 Add the OData service in /n/IWFND/MAINT_SERVICE t-code

Clear the metadata cache by running the below t-codes

/n/IWFND/CACHE_CLEANUP

/n/IWBEP/CACHE_CLEANUP

 Load the metadata of OData Service "CATALOGSERVICE" version 2 

Make sure the system alias of CDS service in SPRO settings has unchecked "OData on Backend" check box 

You can ignore this error in error log when you ran the report /UI5/UPD_ODATA_METADATA_CACHE 

 In Production System you can run this report daily or after importing transports  


Failed to load UI5 component for navigation intent

In case of such an error: Failed to load UI5 component for navigation intent "#InspectionCharacteristic-recordMltplResults"

Copy those text to clipboard


And put it to text editor, where you can find key words to activate:

Having that, go to SICF and activate it:


    



пятница, 27 ноября 2020 г.

How to provide custom number range for Serial Numbers

In standard way, when you generate serial number (for example in purchase order), system gives you very simple SNs, like 1, 2, 3 etc.
To have your own number range, proceed the next steps.

In t-code OIET (or SPRO: Plant Maintenance and Customer Service -- Master Data in Plant Maintenance and Customer Service -- Technical Objects -- Equipment -- Equipment Categories -- Maintain Equiment Category) create new equipment category (X for ex., copy from S)


In t-code OIEN (or SPRO: Plant Maintenance and Customer Service -- Master Data in Plant Maintenance and Customer Service -- Technical Objects -- Equipment -- Equipment Categories -- Define Number Ranges) define group and NR for group for object EQUIP_NR:


Assign group with NR to equipment category


In t-code OIS2 - create new serial number profile with equipment category X (SPRO: Plant Maintenance and Customer Service -- Master Data in Plant Maintenance and Customer Service -- Technical Objects -- Serial Number Management -- Define Serial Number Profiles) :



Inside profile, define Serializing procedures, where you will be generate SN, with Equipment Requirement = 02 always with equipment:


Create new material master with SN profile X001, Serialization Level = 1 Keep equipment number and serial number synchronous:


So, now in Purchase Order you can generate Serial Number from defined number range:


After PO save Serial Numbers keep in table EQUI.

If you do not see the button Create Serial Number Automatically, just check if Indicator: Serial Number Existence Requirement is OFF (OIS2 t-code):


If you create Purchase Order through  BAPI_PO_CREATE1 just populate SERIALNO field (SERIALNUMBER structure) by SN from external number range:


PO will be created with this Serial Number:


In case you populate UII in BAPI, system requires populate the batch and raises an error:

Serial number: maintain batch for batch management requirement
Message no. MEEXTFU021

Clean up UII and save PO.

Some additional info about the matter is here

http://saphelp.ucc.ovgu.de/NW750/EN/78/0eb753128eb44ce10000000a174cb4/frameset.htm







четверг, 26 ноября 2020 г.

How to activate Fiori service


If you've added some Fiori launcher role, some app services might not be activated.

For example, in Sales Orders chapter I have Sales Order Fulfillment Resolve Issues app


where I want to select follow-up activity:


And have an error with key-words App could not be opened either due to an incorrect SAP Fiori launchpad configuration or a missing role assignment and Failed to resolve navigation target:


After that, go to transaction /IWFND/ERROR_LOG - SAP Gateway Error Log  where you can see the service name (CB_SALES_ORDER_SRV)


Having the name of service, go to transaction /IWFND/MAINT_SERVICE where pass the procedure below: 

Add service


Put service name in search field of Technical Service Name, find the service, add them:


Confirm Package assignment:


After service activation, instead of error we see the beautiful screen of sales order overview app: