JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for...

56
SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 1 JSM IDOC LSMW User Guide for Job Documentation Applies to: SAP Solution Manager 7.1 SUPPORT PACKAGE 09 or higher Summary As many customers use excel as Job Documentation tool. There is a need that JSM provide functionality to import job data from excel files into Job Documentation. As now JSM provide a standard IDOC definition for data transfer. This document gives you a quick overview of IDOC definitions for job scheduling management. After a quick overview, it will guide you through LSMW to import excel data into Job Documentation. Author: Ji,Ody Company: SAP Created on: 16.10.2012 Author Bio Developer for Job Scheduling Management who mainly focus on Job Scheduling, Job Monitoring, IDOC, Job Control, Job Analysis.

Transcript of JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for...

Page 1: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 1

JSM IDOC LSMW User Guide for

Job Documentation

Applies to:

SAP Solution Manager 7.1 SUPPORT PACKAGE 09 or higher

Summary

As many customers use excel as Job Documentation tool. There is a need that JSM provide functionality to import job data from excel files into Job Documentation. As now JSM provide a standard IDOC definition for data transfer. This document gives you a quick overview of IDOC definitions for job scheduling management. After a quick overview, it will guide you through LSMW to import excel data into Job Documentation.

Author: Ji,Ody

Company: SAP

Created on: 16.10.2012

Author Bio

Developer for Job Scheduling Management who mainly focus on Job Scheduling, Job Monitoring, IDOC, Job Control, Job Analysis.

Page 2: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 2

Table of Contents

1. Introduction ............................................................................................................................................ 4

2. IDOC (Intermediate Document) ............................................................................................................. 4

2.1 IDOC Defintion ....................................................................................................................................... 4

2.2 Segment Definition ................................................................................................................................ 6 E1SM_JOBDOC_710 .................................................................................................................................................. 6

E1SM_BUSINESS_REQUIREMENTS ...................................................................................................................... 10

E1SM_ORGANIZATION ............................................................................................................................................ 11

E1SM_JOBDOC_ERROR_ANALYSIS ...................................................................................................................... 12

E1SM_JOBDOC_ERROR_RESTART ....................................................................................................................... 12

E1SM_JOBDOC_ERROR_CANCEL ......................................................................................................................... 13

E1SM_JOBDOC_ERROR_CONTINUE ..................................................................................................................... 13

E1SM_JOBDOC_ERROR_REPEAT ......................................................................................................................... 14

E1SM_JOBDOC_ERROR_NOTES ........................................................................................................................... 14

E1SM_JOBDOC_RESTRICTION .............................................................................................................................. 15

E1SM_JOBDOC_CONTACT ..................................................................................................................................... 15

E1SM_JOBDOC_AUTH ............................................................................................................................................ 17

E1SM_JOBDOC_DOCUMENTS ............................................................................................................................... 17

E1SM_JOBDOC_STEP ............................................................................................................................................. 18

E1SM_JOBDOC_SYSTEM ........................................................................................................................................ 19

E1SM_JOBDOC_SCHED_DATETIME ...................................................................................................................... 20

E1SM_JOBDOC_CRM_TRANSACTION .................................................................................................................. 20

3. Importing through LSMW ..................................................................................................................... 21

3.1 Initial Situation ..................................................................................................................................... 21

3.2 Data preparation .................................................................................................................................. 21

3.3 Activate IDOC Inbound Processing ..................................................................................................... 22 Define File Port through Maintain Ports button or transaction WE21 ......................................................................... 24

Define Process code through transaction WE42 ........................................................................................................ 25

Define Partner Profile through transaction WE20 ...................................................................................................... 26

3.4 Creating project in LSMW .................................................................................................................... 29

3.5 Runing the project ................................................................................................................................ 29

3.6 Maintain Object Attributes ................................................................................................................... 30

3.7 Maintain Source Structures ................................................................................................................. 30

3.8 Maintain Source Fields ........................................................................................................................ 31

3.9 Maintain Structure Relations ............................................................................................................... 34

3.10 Maintain Field Mapping and Conversion Rules ................................................................................... 34

3.11 Maintain fixed values, translations, user-defined routines ................................................................... 44

3.12 Specify Files ........................................................................................................................................ 44

3.13 Assign Files ......................................................................................................................................... 46

3.14 Read Data ............................................................................................................................................ 47

3.15 Display Read Data ............................................................................................................................... 47

3.16 Convert Data ........................................................................................................................................ 49

3.17 Display Converted Data ....................................................................................................................... 49

3.18 Start IDOC Generation ........................................................................................................................ 50

Page 3: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 3

3.19 Start IDOC Processing ........................................................................................................................ 51

3.20 Create IDOC Overview ........................................................................................................................ 53

3.21 Start IDOC Follow-UP .......................................................................................................................... 53

4. Check the Job Documentation in Work Center ................................................................................... 53

Related Content ................................................................................................................................................ 55

Copyright ........................................................................................................................................................... 56

Page 4: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 4

1. Introduction

The intention of this approach is to describe a way to transfer job related documentation that is stored in Excel into the Job Documentation which is available in SAP Solution Manager’s Job Management Work Center.

This way is rather for mass import, because it may take some time to get familiar with the tools and steps to be taken (LSMW and IDoc management).

Technically the way is: you have all information in an Excel. In LSMW you import this data into SAP Solution Manager first. This step requires some preparation in LSMW.

In a second step you generate IDocs carrying the imported data. In order to be able to execute this step successfully, the complete IDoc related definition needs to be in place. It is quite important to ensure the defined fields in IDoc definition match the related fields (columns) in excel source structure. Before you start it is important to examine how exactly the information is stored and what objects (IDoc definitions) can be used in SAP Solution Manager.

Finally, you have to process all IDocs into Job Documentation.

In order to support you in some kind SAP provides standard objects in SAP Solution Manager. They are explained in following chapters. Depending on your source excel you can use them, but you can also develop your own.

2. IDOC (Intermediate Document)

In this part ,we will talk about the IDOC definitions for Job Documentation in detail.

2.1 IDOC Defintion

Here is the Idoc definitions for Job Documentation. You can have a look through transaction WE30.

SM_JOBDOC01 - Before 7.1 SUPPORT PACKAGE 09, created in 7.0 and carry limited information

SM_JOBDOC02 - Since 7.1 SUPPORT PACKAGE 09, created in 7.1 SP09. Cover all information Technically we could not change existing one if it was created in an old release, so we can only create new one.

Page 5: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 5

SM_JOBDOC03 - Since 7.2 ,Cover more information Technically we could not change existing one if it was created in an old release, so we can only create new one.

In SAP Solution Manager 7.1 SUPPORT PACKAGE 09, we did an enhancement to old IDOC definition SM_JOBDOC01 through SM_JOBDOC02.

In SAP Solution Manager 7.2, we did enhancement to IDOC definition SM_JOBDOC02 through SM_JOBDOC03.

Page 6: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 6

Through this new IDOC definition , user can transfer more data to Job Documentation.

2.2 Segment Definition

Here is the detail explaination for each segment defintion included in the IDOC definition SM_JOBDOC03.

It will help you understand how to import data through IDOC into Job Documentation.

E1SM_JOBDOC_710

This segment is used to document Job Documentation general information.

ACTION

This is action for job documentation. It can be C,U,D.

C - Create

U - Update

D - Delete

NAME This is Job Documentation name. User should map the job name to the Job Documentation name.

JOB_CLASS This is Job Classification. It can be three values:A,B,C. A - High Priority, B - Middle Priority, C - Low Priority.

JOBDOC_NO

You can specify job documentation no if you change job documentation.

SCHEDULER_TYPE This is the scheduler type of the Job Documentation. Basically two types: XBP, CPS. User can specify fixed value for this field based on your scenario. XBP means SAP scheduler, CPS means third party scheduler,not only CPS and currently in the UI you will see description as SMSE.

JOBDOC_TYPE This is the Job Documentation type. It has two types: JOB, CHAIN. If user does not specify this value, it will be JOB by default

Page 7: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 7

OWNER This is Job Documentation owner. user should specify a SAP Solution Manager user for this field. The IDOC processing will try to find a Business Partner for this user to assign to Job Documentation as owner. If a Business Partner can not be found for this user, an IDOC Status Record(54) will be added. You can find hte IDOC Status in transaction WE05.

JOB_DESC This is Job Documentation description. It support at most 250 characters.

Page 8: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 8

JOB_SCHEDULING_DESC Job scheduling description. It support at most 250 characters.

Page 9: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 9

JOB_MONITORING_DESC Job monitoring description. It support at most 250 characters.

Page 10: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 10

E1SM_BUSINESS_REQUIREMENTS

This segment is used to document Job Documentation business requirements. You can find it in the Job Documentation Orgnization tab.

Page 11: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 11

PRIORITY Business Priority of the Job Documentation. General values are: 1,2,3,4.

1 means Very High 2 means High 3 means Medium 4 means Low

You can also customizing it through customizing table AGS_BUSNSS_PRIO and AGS_BUS_PRIO_T in transaction SM30.

DESCRIPTION Business requirements description.

BUSINESS_PROCESS Business Process information only for job request. If you are creating Job Documentation, just ignore this field.

E1SM_ORGANIZATION

This segment documents the organization information. you can find it in Job Documentation Organization tab.

Page 12: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 12

You can specify free text for the four fields. But pay attention to the field length.

You can configure org unit with table AGS_ORGUNIT_CUST and AGS_ORGUNITCUSTT.

E1SM_JOBDOC_ERROR_ANALYSIS

This segment documents analysis procedure for typical possible error situations. You can put some text to guide IT users if such case happens. You can find it in Job Documentation Error tab.

E1SM_JOBDOC_ERROR_RESTART

This segment documents the possibility of restarting background processing. You can put some text to guide IT users if such case happens. You can find it in Job Documentation Error tab.

Page 13: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 13

E1SM_JOBDOC_ERROR_CANCEL

This segment documents the conditions under which job should be cancelled. You can put some text to guide IT users if such case happens. You can find it in Job Documentation Error tab.

E1SM_JOBDOC_ERROR_CONTINUE

This segment documents the procedure for continuing job after job cancellation. You can find it in Job Documentation Error tab.

Page 14: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 14

E1SM_JOBDOC_ERROR_REPEAT

This segment documents the possibility of rescheduling cancelled jobs. You can find it in Job Documentation Error tab.

E1SM_JOBDOC_ERROR_NOTES

This segment documents relevant notes , conditions and instructions. It's just a long description.

Page 15: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 15

E1SM_JOBDOC_RESTRICTION

This segment documents the scheduling restrictions and conflicts. You can find it in Job Documentation Restriction tab. You can just specify free text for the restriction name and description.

Restriction type can be customized through table AGS_SCHED_REST_C. By default it contains four values: CONFLICTS(Conflict),DEPENDANCE(Dependency),PREDECESSR(Predecessor),SUCCESSOR(Successor).

E1SM_JOBDOC_CONTACT

This segment is used to document contact persons. it support multiple contact persons for one Job Documentation. You can find the contact persons in Job Documentation Contact Person tab.

Page 16: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 16

USERNAME User in the solution manager system.

AREA We have some fixed values for the AREA.

BUSINESS MONITORING DEVELOP SMSY BACKGROUND ESCALATION JOBDOC

If it is not specified, Background Processing will be the default value. Here are the fixed values from the domain.

Page 17: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 17

EMAIL Email address of the contact person.

If user wants to add contact persons in the Job Documentation,Either USERNAME or EMAIL can be specified.

Only Specify the USERNAME. IDOC processing will find the user in the solution manager system. If user is not found, IDOC status record(54) will be added to tell the user does not exist.

Only Specify the EMAIL. IDOC processing will firstly find a user by the email in solution manager system. If user is found, it will be added as contact person. Otherwise IDOC processing will try to find a business partner by the email in solution manager system. If a business partner is found, it will be added as contact person. Otherwise IDOC status record(54) will be added.

Specify both USERNAME and EMAIL IDOC processing will only consider the USERNAME as contact person.

E1SM_JOBDOC_AUTH

This segment is used to document authorization information. It's just free text.

E1SM_JOBDOC_DOCUMENTS

This segment is used to document URL links for Job Documentation.

Page 18: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 18

E1SM_JOBDOC_STEP

This segment is used to document Job Documentation steps. It supports multiple steps.

STEP_NUM

Page 19: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 19

Step number:,1,2,3,4....

STEP_DESC Each step's description.

PROGRAM ABAP program name

VARIANT ABAP program variant

E1SM_JOBDOC_SYSTEM

This segment is used to document system information for Job Documentation.

It support multiple systems.

It contains system and client information.

SYSTEM IDOC processing will firstly check if this system is defined in solution manager. If not ,an IDOC status record(54) will be added. Otherwise IDOC processing will find all logical components defined for the system and add it to the Job Documentation. User can find it in the Job Documentation Systems tab.

Page 20: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 20

Client If you want to add job scheduling information into the Job Documentation, the client is necessary because job scheduling is client specific.

E1SM_JOBDOC_SCHED_DATETIME

This segment is used to document scheduling information based on date time.

START_DATE It is date format with length 8.

START_TIME It is time format with length 6.

LAST_START_DATE Job will not start after this date.

LAST_START_TIME Job will not start after this time.

UNIT

Job scheduling period unit. The unit values can be 000,001,002,003,004,005.

'000' means minutely

'001' means hourly

'002' means daily

'003' means weekly

'004' means monthly

'005' means uniquely

PERIOD Job start period based on the period unit.

E1SM_JOBDOC_CRM_TRANSACTION

This segment is used to document linked incident or change document.

Page 21: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 21

3. Importing through LSMW

3.1 Initial Situation

Source: Excel

Target: Job Documentation

Transfer structure: IDoc->SM_JOBDOC02(you can find the latest IDoc version)

3.2 Data preparation

You have an excel file containing your job data. But sometimes the data is not in good format.

You need to check it first and considering the data which can be mapped to IDOC defition.

Check if some information is missing in the excel data. Job Documentation Name is necessary in Segment E1SM_JOBDOC_710(NAME). Job Documentation Type is necessary in Segment

E1SM_JOBDOC_710(JOBDOC_TYPE). Job Documentation Interface is necessary in Segment

E1SM_JOBDOC_710(SCHEDULER_TYPE)

Page 22: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 22

SYSTEM and CLIENT information is not necessary. But if you want to import the scheduling information from excel, both SYSTEM and CLIENT information is necessary. You can find the system information in the Job Documentation Systems Tab.

Check if some columns with multi values are with unique rule which can be interpreted by ABAP code. Otherwise it is difficult to transfer those data to IDOC.

3.3 Activate IDOC Inbound Processing

Page 23: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 23

You need input File port, Partn. Type, Partner No. here. If they are not exist, you can create them with following steps.

Page 24: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 24

Define File Port through Maintain Ports button or transaction WE21

You can create a new file port for this system and input Function Module EDI_PATH_CREATE_CLIENT_DOCNUM.

Page 25: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 25

Define Process code through transaction WE42

Page 26: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 26

You can create new process code JSMJOBDOC and input necessary information according above snapshot.

Define Partner Profile through transaction WE20

Page 27: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 27

Page 28: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 28

Create partner profile with type logical system

Add message type and process code into Inbound parameters just like above snapshot

Page 29: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 29

3.4 Creating project in LSMW

You can also import SAP standard LSMW project if you are using SAP Standard Excel.

3.5 Runing the project

You have to go through many steps to import the execel data into Job Documentation. Let's go through each step.

Page 30: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 30

3.6 Maintain Object Attributes

In this step, you should define to use IDOC for data import.

If you are using SAP Solution Manager 7.1 SP09 and higher, you can use IDOC type SM_JOBDOC02.

If you are using SAP Solution Manager 7.2, you can use IDOC type SM_JOBDOC03.

3.7 Maintain Source Structures

In this step, you need to define the excel file structures, just structure names. You can define one structure for the excel file.

Page 31: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 31

You can also define nested structures based on your excel file. Eg: in your execel, you have one row for head data and multiple rows for item data. You can image if you maintain each step information in one row. Then multiple rows refer to one job.

The excel file looks like:

3.8 Maintain Source Fields

In this step, you should define the source structure fields. These fields should reflect the columns in the excel file. Regularly one column one fileds and each after another. Also pay attention to the field length. If you are not sure, you can set length bigger enough. Here is my example, I created many fields for each columns in the excel file.

Page 32: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 32

The excel file looks like:

You can see each filed match to one column and from left to right.

If multiple rows in your excel refers to one job. Eg: You maintain each step/program/variant of the job in one row. You can define your structures like this:

Page 33: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 33

You will find JOBDOC_S_STEP has the same fields as JOBDOC_S. This is because each step row has the same fields as the header row. In JOBDOC_S_STEP and JOBDOC_S, you will find first field is identifier which is used to identify header and item data from excel. In the excel file, the first column should be the identifier column.

The excel file looks like:

Page 34: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 34

3.9 Maintain Structure Relations

In this step you will map the source structure to the IDOC strucutre.

It's just a higher level mapping from source structure to segment definition.

You can map the segment definition to a parent source structure or a child source structure.

Here I mapped them to the parent source structure.

3.10 Maintain Field Mapping and Conversion Rules

This step is important. User need to map source fields to the IDOC fields. sometimes it's not easy to do a mapping due to the data format. In this case, user need to write his own abap code to interpret the data and pass it to IDOC. Here I will list some examples with abap routine.

Change global functions Sometimes you need define some global data or do something in global functions. Click the layout icon and select all checkbox to see global fuctions such as __BEGIN_OF_RECORD__, __END_OF_RECORD__.

Page 35: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 35

You will see in __END_OF_RECORD__ function , there's a default call 'transfer_record'. If you do not want to transfer current segement record, you can delete it.

One - One mapping from IDOC field to source structure field. Data is transfer directly from source structure.

Page 36: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 36

Fix values for some IDOC fields If you do not have some values in your excel file and these values are fixed. you can specify fixed values when doing IDOC mapping.

Page 37: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 37

One to many mapping Here are some examples to add multiple data to IDOC.

Transfer Multiple Contact Person my excel data looks like following:

Multiple contact person emails splited by comma. Here I should define a abap routime to interpret the data.

Page 38: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 38

Here is my routine source code. It's not that complex and just split all the email address and transfer them to IDOC.

Page 39: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 39

The transfer_record is a global funtion which will transfer the segment data to IDOC.

Transfer Multiple Job Steps in different rows,each row one step: My excel data looks like:

Page 40: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 40

My routine source code and mapping.

Page 41: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 41

Transfer multiple System My excel data look like:

Page 42: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 42

Two systems for one line and with client information. My routine source code and mapping.

Mapping values with special format Here is the mapping of scheduling information.

Page 43: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 43

Due to the date special data format, abap routine is used to interpret the data.

Page 44: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 44

3.11 Maintain fixed values, translations, user-defined routines

Since we already maintained it in previous step, we can skip it.

3.12 Specify Files

In this step, you need to specify the files containing the job data. You can save the excel files as a TXT file sperated by TAB. But you may need to delete the excel file column headers because the column header may have different name with the source structure fields. Delete the column header and let LSMW to interpret the data column by column.

The easy principle is first column match to first field in source structure and second column to second field and so on...

Then specify the file in this step.

Page 45: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 45

If you defined multiple source structures , eg. nested structures. You need to check Data for Multiple Source Structures(Seq.File).

Page 46: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 46

3.13 Assign Files

In this step, you need to assign the file to the source structure.

Page 47: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 47

If you defined multiple source structures , eg. nested structures. You need to assign file to both structures.

3.14 Read Data

In this step, LSMW will read data from the assign file. you can specify which lines to read.

3.15 Display Read Data

In this step, you need to check whether the data is read correctly and assigned to source structure correctly.

You will see all the lines read from the file and each field value of the source structure.

Here is my example.

Page 48: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 48

Nested source structure First row refer to structure JOBDOC_S. Second row refer to JOBDOC_S_STEP.

For each line, you can verify if data is correct in source structure.

If you find some data is wrong, then you need to identify and fix the issue, then read the file data again.

Some possible reasons:

The source structure field length is short than the data length.

Page 49: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 49

The source strucutre definition is wrong. It does not match to the excel columns from left to right.

Some hidden columns in the excel file. Eg.from column A to column X,column Y,Z is hidden. column AA is shown after column X.

Source structure field order is wrong which does not match to excel columns.

3.16 Convert Data

In this step, the data will be pre converted to IDOC data. the abap routine defined in field mapping between IDOC field and source structure field will be used.

3.17 Display Converted Data

In this step, you can see the converted data in the IDOC definition. You can see many IDOC segment with data and also many IDOCs sperated by the green line with EDI_DC40.

You should make sure the converted data is correct. If you find some segment data is not correct, then you need to check the following possible root cause:

Field mapping between source field and IDOC segment field. IDOC segment field length is short than the real data. Field mapping rule(eg. ABAP routine) has wrong logic.

Page 50: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 50

3.18 Start IDOC Generation

In this step, you will generate the IDOC. After generation, go to transaction WE05, you can find the generated IDOCs.

You can select one or more IDOCs to check whether the IDOC segment data is correct.

Page 51: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 51

After you make sure all the IDOC data are correct. you can start IDOC processing in next step.

3.19 Start IDOC Processing

In this step, you will process the generated IDOCs. You can specify the IDOC number you want to process or you just process all IDOCs. I will input nothing and process all generated IDOCs.

Page 52: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 52

After processing, a list of processed IDOC list shows. You can see the IDOC status,Green or Yellow or Red.

When it's red or yellow, you can select the IDOC to see detail information.

If error or warning happened, there should be some error or warning status records there.

Page 53: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 53

3.20 Create IDOC Overview

In this step, you will get an overview of processed IDOCs.

3.21 Start IDOC Follow-UP

In this step, you can post again IDOCs with different status.

4. Check the Job Documentation in Work Center

After all IDOCs are processed, you can go to job scheduling management work center to verify generated Job Documentation.

Change/Enhance the Job Documentation data if necessary

Update the logical component data in Systems tab, remove logical component which is not necessary

Update Solution data in Systems tab if you want do job monitoring

Page 54: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 54

Update the job scheduling data using the Copy Job button to make the data up-to-date

Page 55: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 55

Related Content

Overview of Legacy System Migration Workbench (LSMW)

ALE/EDI/IDoc Intro Page

Job Scheduling Management with SAP Solution Manager

Page 56: JSM IDOC LSMW User Guide for Job Documentation - SAP · PDF fileJSM IDOC LSMW User Guide for Job Documentation SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 4 1. Introduction The

JSM IDOC LSMW User Guide for Job Documentation

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 56

Copyright

© Copyright 2014 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.

Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

Java is a registered trademark of Oracle Corporation.

JavaScript is a registered trademark of Oracle Corporation, used under license for technology invented and implemented by Netscape.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.