SAP 20.01 Transfer Jobs - Intergraph Smart Materials - Version 10.1 - Administration & Configuration - Hexagon

Intergraph Smart Materials Integration (10.1)

Language
English
Product
Intergraph Smart Materials
Subproduct
Classic
Search by Category
Administration & Configuration
Smart Construction Version
8
Smart Materials/Smart Reference Data Version
10.1

On this screen, the data transfer can be started. For this transfer, jobs will be defined for each interface. They will transfer the idents to the SAP system.

Each job is given a unique name. Short Desc and Description are optional fields and can contain additional information to describe the particular job.

The set of idents to be transferred will be determined by a so-called "where condition", which can be defined on screen A.60.06 Where Conditions. If the user has the respective rights, they are available in the LOV for the Where-Condition field.

In addition, all idents that have changed after a transfer job can be transferred. In addition, a single ident can also be transferred to SAP (radio button group in Data Options).

Also, there is the option all idents belonging to a list of selected workloads to transfer to SAP. When starting the job, a Where Condition will be created automatically in A.60.06. There is no need for the user to maintain this where condition manually.

After defining an interface, determining a job name and choosing a where condition, the job can be started by clicking the Start button.

The transfer can be either in online or batch mode. If it is started in online mode, the user must wait for the job to finish. In this case a progress bar will be displayed. The user name as well as the start and end time of the job will be saved in a log file. Furthermore, the user will get feedback in the Job Return Code field with information about errors that occurred.

The job cannot be started twice.

Block 1

SAP Interfaces - In this block, the interface that was defined on SAP 10.01 is selected. This interface is the interface for which SAP transfer jobs will be defined.

Interface - Name of the SAP interface.

Short Desc and Description - Language-dependent description of the SAP interface.

Block 2: TAB page SAP Jobs

SAP Plants - Here the necessary parameters to start a job must be defined.

Job - The name of the transfer job. It must be unique.

Short Desc and Description - Language-dependent description of the transfer job.

Where Condition - A where condition (valid for screen SAP 20.01) can be selected via LOV. This where condition can be defined on screen A.60.06 Where Conditions. The condition provides an easy way of restricting the total number of idents in accordance with certain criteria.

Ident Code - Select an ident that will be transferred to SAP separately.

From Date/To Date - Complete these fields if you want to transfer idents that have been modified after a transfer.

Radio Group Transfer Mode - These options define how to determine the set of idents that will be transferred.

Short Desc and Description - Language dependent description of the where conditions.

Comment - Display of the Comment field on screen A.60.06.Where Condition.

Workload - This button allows the selection of one or more CMS Workloads defined in Smart Reference Data Plus. All idents belonging to the workloads will be transferred to SAP.

Workload Idents – This button will show a list of all idents belonging to the selected workload(s).

Job Start User - Name of the user who has started this job.

Job Status - Status of this job. There are the following possible statuses:

  • OK - The job has finished successfully.

  • Failed - The job stopped with an error. The exact error message is displayed in the Job Return Code field and can be looked up in the error file.

  • Ready to run - The job was already defined but not run until now.

Job Start Date - Start date of the job.

Job Finish Date - End date of the job.

Logfile - Name of the log file for this job. The log file will be created in the directory specified by the DBA setting LOG_FILE_DEST or the project default ZX_MAR_LOG. The content of the log file is dependent on the ‘Message Level’ setting in A.60.61 User Preferences. Recommended values when running SAP transfer jobs are

  • 5 – includes basic information

  • 20 – includes standard information

  • 99 – includes all log information available for the transfer

Job Return Code - In this field, the result of the transfer job is displayed. If there has been an error during the job, it will be displayed in a shortened form.

Job Summary - This is a summary about the number of transferred idents and attributes and the errors that occurred.

Send To SAP: There are four possibilities for starting a job:

  • only build the IDocs and store them as XML files or in the interface tables

  • build and store IDocs and execute SAP procedures

  • build and store IDocs and transfer the XML files using FTP to the SAP server

  • build and store IDocs, execute procedures, and transfer the XML files to the SAP server

Check Pipe - A click on this button checks some fundamentals necessary to start a transfer job; the results of these checks are written into a log file. After the check, the log file is opened automatically to display the results (to make sure that the procedure can open and write into a log file, DBA setting (A 60.04) LOG_FILE_DEST must specify the UTL directory).

First, the interface settings are checked for existence and, if found, the value is written into the log file. In the next step, the software checks that at least one language is inserted on SAP 10.02 SAP Language. Next, the software checks whether it is possible to work with a pipe and to work with jobs.

Start - Clicking this button starts the job online so that the user has to wait until the job has finished. The progress of the job is displayed by a special "progress screen," which informs the user about the transfer time, the estimated remaining time, and about how many idents have been transferred.

Show Protocol - After the job has finished successfully or stopped with an error, the user can display the protocol of the job by clicking this button. He will get more detailed information about the processing of the job.

IDocs are always stored in M_SAP_TRANSFER_JOB_IDOCS before (or not) they are sent to SAP and are displayed (after the job has finished) on the next window of SAP 20.01, called SAP 20.01 SAP IDoc Segment Strings.

SAP transfer using XML files

The following files are created when the transfer type XML has been selected in SAP 10.01:

MATMAS_jobnr_seqnr.XML

XML file of IDOC type MATMAS

MATMAS_jobnr_seqnrN.XML

XML file of IDOC type MATMAS for SAP without line feed and leading blanks (only this file will be transmitted by ftp)

CLFMAS_jobnr_seqnr.XML

XML file of IDOC type CLFMAS

CLFMAS_jobnr_seqnrN.XML

XML file of IDOC type CLFMAS for SAP without line feed and leading blanks (only this file will be transmitted by ftp)

The import of the XML files into SAP is described in a separate section.

SAP transfer using database tables

The SAP transfer for material and requisition data now allows you to use the following transfer modes:

  • Generation of XML files

  • Export into database tables

Use SAP 10.01 SAP Interface Parameter to select the desired mode.

Interface tables will be created the first time the export for database tables is started.

The tables are created in the M_SYS schema.

The system will generate a table for each segment defined in SAP 10.03 SAP IDocs for the SAP version defined in SAP 10.01. The name of the tables will be ‘XI_’+<Segmentname>.

The tables (called from now on XI-tables) will include as columns the fields defined for the segment.

Before each run of the export for database tables a check is performed whether the table definitions still match the IDOC definitions in SAP 10.03. If this is not the case, then missing fields will be added as new columns to the table. Also, the column size will be increased accordingly.

The ID field of each table is used to identify all segments of an IDOC.

Additional fields ID1, ID2, ID3 (depending on the IDOC definition) represent the sequence and hierarchy of the IDOC because the IDOC information is distributed over different tables.

The fields always start with 1 and are increased for each segment on the same hierarchy level.

Example 1

1 1

1 2

2 1

2 1 1

2 2

2 2 1

To control access to the tables, you can use the column STATUS. This is filled by default with the value ‘01’.

A new user SAP_XI will be created the first time when the transfer for tables is started. This user will have access to all interface tables.

Block 2: TAB page SAP Procedures

Assign your SAP procedures for this transfer job here (after committing the new job on the other TAB page). These procedures can be executed between building and storing the IDoc and sending the IDoc to SAP.

SAP 20.1

You must create the SAP procedures on SAP 10.09. On the SAP 10.01, window 2, you can assign some (or all) of these procedures to your SAP interface(s). If you create a new transfer job (TAB page SAP Jobs), you can find the procedures of SAP 10.01 here. If you duplicate an existing job, you can find the procedures of the old job here. After committing the new job and before starting the job, you can make changes to the assigned procedures.

Clicking the Start Procedure button starts the corresponding SAP procedure.

Block 3: Page SAP IDoc Segment Strings

If you choose a transfer job that has already been executed, you can view the IDocs if you switch to the next window.

SAP 20.1_2

If you start a transfer job for every IDENT within the WHERE condition, one IDoc is built. As an intermediate step, the IDoc is inserted into the table M_SAP_TRANSFER_JOB_IDOCS.

If you choose the possibility of building, inserting, executing the SAP procedure(s) for this job, and sending to SAP, the IDocs will read out of M_SAP_TRANSFER_JOB_IDOCS before they are sent to SAP, so that changes done by the procedures will be seen.

One other way of working is to first create and store the IDocs without sending them to SAP. You can view the IDocs before sending them by clicking the button ‘Send to SAP’ (window SAP IDoc Segment Strings). The real segment string is a concatenation of ‘Segname,’ ‘Client,’ and so forth; the string is divided into the visible elements and each element is shown in its own item.

If you have an order sequence, a sequence is also inserted into this table and displayed on the screen. ‘Typ’ gives you information about this segment string of a MATMAS- or a CLFMAS IDoc.

If you want, you can make changes to one or more segment strings. You can do this manually in this window, but you also can do this with your SAP procedures. You can execute each of the SAP procedures by clicking the Start Procedure button on TAB page SAP Procedures.

SHARED Tip Before executing a SAP procedure, copy the original (cut and paste) into an editor or a file. If the procedure does not show the result that you want, it is easy to rebuild the original segment string again.

If you then want to send the IDoc(s) of this job to SAP again, click the Send to SAP button in this window. The IDocs are then built again from the (changed) records of the table M_SAP_TRANSFER_JOB_IDOCS and then sent. In this way, you can send the IDocs, built by one transfer job, to SAP several times.

A log file is written, and you can open it by clicking the Show Protocol button in this window. For details about the directory and content, see the description for window 1 of SAP 20.01.

Choosing between online and batch mode:

You can use the project default ZX_BTH_OPT to determine the desired behavior:

ONLINE

Job is run as an online process

BATCH

Job is run immediately as a batch process

CHOOSE

A dialog is displayed where you can choose to run the job in online or batch mode

When starting a job in batch mode, after completion of the job, an email is sent automatically to the user who started the job. This functionality requires to be set up as described in the section about the mailing functionality of Smart Materials.

Using the change history for the SAP material transfer

This functionality is available from Smart Materials 6.3.4 on. It can only be used if in SAP 10.01 the transfer type ‘Database’ is selected. To activate this functionality, define the interface setting CRE_DELTA in A.70.11 for your SAP interface and assign the value Y to it. This will cause the SAP transfer to check the entries in the interface tables (XI_...) for a previous transfer of the same material which was successfully transferred to SAP (status > ’01 and status < ‘99’).

Identification of the material:

MATMAS Idoc: The field MATNR in the E1MARAM segment is regarded as the unique identifier for the material

CLFMAS Idoc: The field OBJEK in the E1OCLFM segment is regarded as the unique identifier for the material

If the program detects differences for a segment/field, then this information will be stored in the table M_SAP_TRANSFER_DELTAS. This table has the following structure:

SATD_ID

Unique identifier of each record

STJ_ID

ID of the current SAP transfer job

STJ_ID_OLD

ID of the previous SAP transfer job which has already been transferred

SAP_KEY

Either the value of MATNR or OBJEK

IDOC_NAME

CLFMAS/MATMAS

SEGMENT_CODE

Segment code from SAP 10.03

FIELD_NAME

Idoc field name from SAP 10.03

ID1

ID1 of the record from the interface table

USR_ID

Internal Smart Materials field

LMOD

Internal Smart Materials field

INT_REV

Internal Smart Materials field

OLD_VALUE

Value from the previous transfer

NEW_VALUE

Value from the current transfer

ID2

ID2 of the record from the interface table (empty if ID2 doesn’t exist)

ID3

ID3 of the record from the interface table (empty if ID3 doesn’t exist)

Information about the delta processing is also written to the log file.