SAP EDI IDoc+workflow实例

合集下载

IDOC实例详解(阵全)

IDOC实例详解(阵全)

IDOC实例详解IDOC是用于在不同的SAP系统之间或SAP系统与外部系统之间传输信息的一种文档表示形式。

本实例讲述从SAP客户端:SAPDEV 200传送自定义表中的内容至SAPPROD 700。

其中SAPPROD 700的在200中逻辑系统名称为:DEVCLNT700200的在200中逻辑系统名称为:DEVCLNT200SAPDEV传送的表结构如下:此表在DEV200和PRD700中均存在。

本实例中在讲述DEV200和PRD700之间的通讯设置中,如有不明白之处,还请参考本人的另一个文档“ALE配置及操作详解(阵全)”。

本实例讲述的是不通过消息控制的,处于不同物理地址的SAP系统间的数据传输。

一、使用TCODE:WE31创建一个段,该段须在DEV200和PRD700同时存在。

该段中只包含一个字段。

二、使用TCODE:WE30创建一个IDOC基本类型,该类型须在DEV200和PRD700同时存在。

三、使用TCODE:WE81创建一个逻辑消息类型。

只需在DEV200中创建。

四、TCODE:WE82在DEV200中指定逻辑消息类型和IDOC基本类型的对应关系。

五、使用TCODE:BD64在DEV200中添加消息类型ZMSGDEPARTMENT,并产生合作伙伴文件及分配,详细操作请见“ALE配置及操作详解(阵全)”。

如下图:BD64界面。

在DEV200中产生的对应于PRD700的RFC端口。

通过TCODE:WE21查看。

在DEV200中产生的对应于PRD700的合作伙伴参数,消息类型为ZMSGDEPARTMENT,可使用TCODE:WE20查看。

六、TCODE:SE38在DEV200中写该IDOC的出站处理程序。

代码如下:*& Report ZCREATEMATARIALIDOC*&*&---------------------------------------------------------------------* REPORT ZCREATEDEPARTMENTIDOC.DATA: G_IDOC_CTL LIKE EDIDC,ZSEGDEPARTMENT LIKE ZSEGDEPARTMENT.DATA: GI_RET_CTL LIKE EDIDC OCCURS 0,GI_IDOC_DATA LIKE EDIDD OCCURS 0 WITH HEADERLINE.PERFORM BUILD_IDOC_CTL.PERFORM BUILD_IDOC_SEG.PERFORM CREATE_IDOC.*&---------------------------------------------------------------------* *& Form CREATE_IDOC*&---------------------------------------------------------------------* * textFORM CREATE_IDOC.CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'EXPORTINGMASTER_IDOC_CONTROL = G_IDOC_CTLTABLESCOMMUNICATION_IDOC_CONTROL = GI_RET_CTLMASTER_IDOC_DATA = GI_IDOC_DATAEXCEPTIONSERROR_IN_IDOC_CONTROL = 1ERROR_WRITING_IDOC_STATUS = 2ERROR_IN_IDOC_DATA = 3SENDING_LOGICAL_SYSTEM_UNKNOWN = 4OTHERS = 5 .IF SY-SUBRC <> 0.MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNOWITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.ELSE.COMMIT WORK.ENDIF.ENDFORM. " CREATE_IDOC*& Form BUILD_IDOC_CTL*&---------------------------------------------------------------------* * text*----------------------------------------------------------------------* * --> p1 text* <-- p2 text*----------------------------------------------------------------------* FORM BUILD_IDOC_CTL.* TYPEG_IDOC_CTL-IDOCTP = 'ZTYPDEPARTMENT'. "IDOC TYPEG_IDOC_CTL-MESTYP = 'ZMSGDEPARTMENT'. "MESSAGE TYPE* RECEIVERG_IDOC_CTL-RCVPRT = 'LS'. "PARTNER TYPEG_IDOC_CTL-RCVPRN = 'DEVCLNT700'. "PARTNER NOG_IDOC_CTL-RCVPOR = 'A000000017'. "PORT* SENDERG_IDOC_CTL-SNDPRT = 'LS'. "PARTNER TYPEG_IDOC_CTL-SNDPRN = 'DEVCLNT200'. "PARTNER NO* G_IDOC_CTL-SNDPOR = 'A000000017'. "PORTENDFORM. " BUILD_IDOC_CTL*&---------------------------------------------------------------------* *& Form BUILD_IDOC_SEG*&---------------------------------------------------------------------* FORM BUILD_IDOC_SEG.* HEAD DATAGI_IDOC_DATA-SEGNAM = 'ZSEGDEPARTMENT'. "SEGMENT NAMEGI_IDOC_DATA-SEGNUM = 1. "SEGMENT NOZSEGDEPARTMENT-DEPT_NAME = '资讯部'. "部门名称MOVE ZSEGDEPARTMENT TO GI_IDOC_DATA-SDATA.APPEND GI_IDOC_DATA.ENDFORM. " BUILD_IDOC_SEG七、PRD700中,使用BD64查看在本文档中第五步产生的分配模型。

SAPIDOC配置步骤

SAPIDOC配置步骤
05
CHAPTER
集成其他模块实现业务协同
SAP ERP集成
通过SAP ERP系统与其他SAP模块(如SAP HR、SAP FI/CO等)进行集成,实现业务流程的自动化和协同工作。
SAP S/4HANA集成
将SAPIDOC与SAP S/4HANA系统进行集成,利用S/4HANA的先进功能和性能,提升业务处理效率和数据准确性。
SAPIDOC配置步骤
目录
SAPIDOC简介与前期准备 基础设置与参数配置 文档管理功能使用指南 报表生成与数据分析功能介绍 集成其他模块实现业务协同 系统维护与故障排除方法
01
CHAPTER
SAPIDOC简介与前期准备
1
2
3
SAPIDOC能够自动生成SAP系统的技术文档,包括数据字典、程序文档等,方便开发人员和系统管理员查看和维护。
SAP Cloud Platform集成
通过SAP Cloud Platform将SAPIDOC与其他SAP云应用进行集成,实现云上云下业务的无缝连接和高效协同。
与SAP其他模块集成方案讨论
数据同步策略制定
制定合理的数据同步策略,确保不同系统间的数据实时性和一致性。
数据安全保障
在数据传输和同步过程中,采用加密、身份验证等安全措施,确保数据的安全性和完整性。
操作演示
提供数据备份和恢复的详细操作步骤和演示,让用户能够熟练掌握操作方法。
数据备份恢复操作演示
用户培训
针对系统的功能和操作进行培训,让用户能够充分了解系统的使用方法和注意事项。
技术支持服务
提供全天候的技术支持服务,解答用户在使用过程中遇到的问题,确保系统的稳定运行。
服务介绍
详细介绍用户培训和技术支持服务的内容和方式,让用户能够了解并享受到完善的服务保障。

SAP Business Workflow教程说明书

SAP Business Workflow教程说明书

About the T utorialSAP Business Workflows are predefined in SAP R/3 system. It is a key component of SAP system wherein they help design the business processes - it can be a simple release or a complex repeated business process, such as creating a material master, etc.This is a brief tutorial that introduces the readers to the basic features and usages of SAP Business Workflow. This tutorial will guide the users on how to manage business processes in an efficient manner such that it can be aligned with compliance.AudienceThis tutorial is suitable for readers who want to gain some knowledge about SAP Business Workflow such as how Business Objects are created, how to make use of the Workflow builder, Universal Worklists and how to set up notification for Workflows. PrerequisitesBefore you go through this tutorial, we expect readers to have good knowledge of SAP ABAP and SAP Business processes. If you don’t have the required knowledge, we recommend you go through our tutorial on SAP ABAP and also get acquainted with SAP Business Process.Copyright & DisclaimerCopyright 2018 by Tutorials Point (I) Pvt. Ltd.All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher.We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at **************************iT able of ContentsAbout the Tutorial (i)Audience (i)Prerequisites (i)Copyright & Disclaimer (i)Table of Contents............................................................................................................................................. i i1.SAP BUSINESS WORKFLOW - INTRODUCTION (1)2.SAP BUSINESS WORKFLOW - CHALLENGES (3)3.SAP BUSINESS WORKFLOW - BENEFITS/FEATURES (4)4.SAP BUSINESS WORKFLOW - LAYERS (6)5.SAP BUSINESS WORKFLOW - ARCHITECTURE (8)6.SAP BUSINESS WORKFLOW - LINKING PROCESS, BUSINESS LOGIC & PEOPLE (10)7.SAP BUSINESS WORKFLOW - BUSINESS OBJECT (12)Components of Business Object in SAP System (12)Create a Business Object (13)Delegate a Business Object (19)8.SAP BUSINESS WORKFLOW - START & TERMINATION (20)Start Conditions for Workflows (24)9.SAP BUSINESS WORKFLOW - CONDITION EDITOR (26)10.SAP BUSINESS WORKFLOW - ADMINISTRATION (28)11.SAP BUSINESS WORKFLOW - EVENT MANAGER ADMINISTRATION (30)12.SAP BUSINESS WORKFLOW - WORKFLOWS WITH ERRORS (36)ii13.SAP BUSINESS WORKFLOW - WORKFLOW CONFIGURATION (38)14.SAP BUSINESS WORKFLOW - WORKFLOW BUILDER (41)15.SAP BUSINESS WORKFLOW - IMPORT/EXPORT (45)16.SAP BUSINESS WORKFLOW - CREATING STEPS (48)17.SAP BUSINESS WORKFLOW - BUSINESS OBJECT BUILDER (52)18.SAP BUSINESS WORKFLOW - ABAP CLASSES (55)19.SAP BUSINESS WORKFLOW - EXTENDED NOTIFICATIONS (57)20.SAP BUSINESS WORKFLOW - NOTIFICATIONS CONFIGURATION (60)21.SAP BUSINESS WORKFLOW - INTEGRATION WITH NON-SAP WORKFLOW APPS (63)22.SAP BUSINESS WORKFLOW - UNIVERSAL WORKLIST (66)23.SAP BUSINESS WORKFLOW - CREATING WORKFLOWS (68)24.SAP WORKFLOW - ARCHIVING WORKITEMS (79)25.SAP BUSINESS WORKFLOW - USING SWI2_DIAG DIAGNOSIS (83)26.SAP BUSINESS WORKFLOW - USING THE EVENT TRACE (85)27.SAP BUSINESS WORKFLOW - TRANSACTIONS (88)28.SAP BUSINESS WORKFLOW - FUNCTION MODULES (94)29.SAP BUSINESS WORKFLOW - JOB RESPONSIBILITIES (96)iiiSAP Business Workflow 1In SAP system, Business Workflows are used to execute business processes in applications. Workflows are a key component of SAP system wherein they help design the business processes - it can be a simple release or a complex repeated business process such as creating a material master, etc.SAP Business Workflows are predefined in SAP R/3 system and the users can also create their new workflows. The workflow allows the users to manage business processes in an efficient manner such that it can be aligned with compliance.Workflows ensure that right information is sent to the right person at the right time in a correct sequence.To perform a complex task in SAP system such as invoice approval, purchase request, etc. involves going through different steps. These steps can be performed manually or by using some formal communication such as email, notes, etc. When the tasks are performed manually, there are some common problems associated with it, such as:∙Difficulty tracking the task status ∙Dealing with inefficiency ∙Difficulty tracking formal communications ∙ Managing a deadline1.SAP Business Workflow The above image depicts a SAP Workflow process. It is a tool for automating business processes and works uniformly across all the applications. As you can see, it is suitable where the business processes involve multiple people or a group of people.Business workflows can easily be integrated with Organization Management and SAP NetWeaver BI for analysis purposes so it can easily determine the business processes that suits your organization.2SAP Business Workflow 3There are different reasons why we need Workflow in business process in SAP system. The longest duration in any business process is the wait time.The above image shows a standard Purchase Requisition process. It shows that each step involves wait time in the business process and with the use of a standard SAP Workflow, this wait time can be eliminated.Following challenges are involved in the business processes of an organization:∙ Raising PO, Invoice, and Sales Order - All require approval from specificstakeholders and involves multiple steps. Hence, a lot of wait time is added to the cycle.∙ Auditing and Compliance - Areas where auditing is required or any specific compliance has to be based on courtly laws, SOX, etc. They are tough to manage using manual business process.∙Specific Processes - Processes which involve standard repeated steps and follow specific business rules. Example: When a new BP is created, you need to define contact information, credit limit, and other information for managing process. It is recommended to manage these specific processes using SAP Workflow.With the use of SAP Workflows, organizations can easily overcome these challenges and can also perform detailed reporting such as executing time, wait time, etc.2.SAP Business Workflow4 In SAP system, the workflow ensures that right information is sent to the right person at the right time. SAP Workflows are available with SAP applications such as ERP, CRM, and others. Users can easily use these workflows to map the business processes or these can also be edited using the workflow builder.Note : The Workflow wizard creates workflows, which are not complete and is used only as a framework.To create the workflows which meets your business process requirement, you should use the Workflow Builder.Following are the benefits of using SAP Workflow:∙Workflow provides automation of business processes that consist of sequence of tasks, activities and steps.∙Using workflows, it is easy to manage task dependency and to send notifications in SAP mailbox about pending actions.∙ With the use of SAP Workflows, it is easy for users to know what tasks have to beperformed. Work items are sent to the user in notifications and with a single click, it calls the correct T-code and navigates to the required screen in the application. ∙SAP applications contain workflows, which are ready to use. Users can also edit the predefined business workflows to map them with the organization’s processes.3.SAP Business Workflow ∙With the use of different workflow wizards, users can also create a specific part of Business workflows. The workflow builder can be used to display and to make changes to the existing workflows.∙Workflows are not bound to specific SAP applications and it can be customized.∙One of the main benefit of using SAP Workflow is that it is similar across all SAP applications.∙Workflows are useful for processes that include several people or group of people, sequence of tasks, and coordination between different objects.Following image shows a sample Workflow for notification of absence in the Workflow Builder.5SAP Business Workflow 6 SAP Workflow architecture in SAP Application system consists of the following layers:∙Business Object ∙Business Process ∙ Organization ModelA Business Object in SAP Business Workflow is defined as a collection of methods or events for an entity in the business process. Few common Business Objects in the SAP system include: Customer, Material, and Vendor.In SAP Workflow, business processes are defined in the Workflow Builder. Each work process is termed as an activity and contains a single step task or workflow template. Business logic using ABAP code are defined in Business Objects.The organization model contains people or group of people, who are responsible for taking actions in a Business Workflow. People who are responsible for taking an action is also known as an actual agent and they are defined in the workflow activity in the Business Workflow.Actual agents are agents that actually take an action in the Workflow such as approving a business document, sending email notifications or creating some document in the Workflow.SAP System contains different predefined business objects, events, and methods. Following are the common Business Objects in SAP PLM:For each object in SAP system, it comes with a standard set of events and methods to take action on that object. Most common methods and events are:Methods: Change, Display, Get Details, CreateEvents: Created, Changed4.SAP Business Workflow In SAP system, Business Objects are known to reduce the complexity of SAP system by dividing it into smaller units. Each business object is commonly defined with these properties:∙Object Type ID: It is used for internal identification of the business object.∙Object Name: It is used for external identification of the business object. Using this property, the external system can interact with SAP system.∙Super Type: It is the parent object from which all the components of the BO are inherited.∙Name: It is a descriptive name of the BO.∙Description: It is a brief description of the business object type.∙Application: The application component to which the BO belongs to.∙Program: Program contains the ABAP code of the BO.7SAP Business Workflow8As mentioned in the previous chapter, SAP Workflow has a three-layered architecture. Following are the three layers in SAP Workflow architecture:∙ Business Object ∙ Business Process ∙Organization ModelIn SAP Workflow architecture, business object is the smallest unit and is at the bottom level. Business Object in SAP Business Workflow is defined as a collection of methods or events for an entity in the business process. Few common Business Objects in SAP system include: Customer, Material, and Vendor. With the use of Business Objects, all services are provided in the form of executable methods.There is a Business Object Repository, which is an object-oriented approach used to model Business Objects and Processes. It is a collection of Business Object types and Interface types with their components such as attributes, methods and events.In the Workflow architecture, business processes are at the middle level and they define the steps to be performed as part of the Workflow. Business processes are defined in the Workflow Builder. Each work process is termed as an activity and contains a single step task or the workflow template. Business logic using ABAP code are defined in Business Objects.5.SAP Business Workflow In SAP Workflow architecture, organization model is the top layer. Organization model contains people or group of people who are responsible for taking actions in a Business Workflow. People who are responsible for taking an action is also known as actual agent and they are defined in the workflow activity of the Business Workflow.You can create new Business Object using Business Object Builder. Events in Business Object are responsible for the initial start of the workflow and also for the termination of the workflow. Events are also used to call subsequent tasks in the workflow. All the tasks defined under the Workflow will be executed in the mentioned order as per the Workflow definition.Common task examples include:∙Release Document∙Post Invoice∙Approve Absence∙Run Report∙Change Material∙Call∙Check Work and many moreThe following image depicts how a task is performed in SAP Workflow and how it interacts with object type and object methods, organization model, events and texts.9SAP Business Workflow10In SAP Workflow, business processes are defined in the Workflow Builder. Each step is defined in the Workflow builder and is called an activity. A single step task or workflow template is defined in each of the activities.Following table shows the components of SAP Workflow.Business logic is defined in business object and Business Object contains attributes, events and methods in the workflow. Methods contain ABAP code to define tasks. Each and every standard task in the Workflow is linked to a method and a Business Object.6.SAP Business Workflow In the organizational model, people/group of people are responsible for performing actions as per the organizational structure. All these are defined in the Workflow Builder. You can view or create Workflow using T-Code: SWDD (Workflow Builder).11SAP Business Workflow12Business Object in SAP Business Workflow is defined as a collection of methods or events for an entity in business process. Few common Business Objects in SAP system include: Customer, Material, and Vendor. With the use of Business Objects, all services are provided in the form of executable methods.An object in the Workflow represents a Business entity in SAP system. Common entity example includes: Purchase Order, Material, Vendor, etc. An Object in SAP system performs the following functions:∙A Business Object reduces the complexity of SAP system by dividing it in small units.∙With the use of Business Objects, different components in SAP system can communicate with each other.∙ Business Objects can be used in RFCs and Workflows.∙With the use of BAPI’s and Business Objects, SAP system can communicate with non-SAP system.Components of Business Object in SAP SystemEach Business Object in SAP system contains the following five components:∙Key Fieldso Specification of a unique object key - to access a specific instance of a BO o Key field is represented as a combination of one or more fields o Shows a reference to underlying application table o Character basedo You can read a Business Object from other non-SAP system o You can’t change a Business Object from outsideo Maximum length of concatenated key field can be 70 characters∙Attributeo Two types of attributes - Virtual (Set by a BO program) and DB Field (Loadedby database)o An attribute can be read from out of SAP system but it can’t be changed o An attribute of a BO shows properties and characteristics of the object o An attribute can be shown as one line or multi-lineo You can have an attribute which is instance independent or instancedependent7.∙Eventso Events contain listener outside the BO like SAP Workflowo It is used to trigger or terminate a SAP Workflowo It also shows change in occurrence of a Business Object ∙Methodso Method can be of two types - synchronous (result is returned to calling program) and asynchronous (result can be returned to calling programusing an event)o Method can be instance dependent or instance independento Method consists of exceptions and parameters such as single/multiline, optional/mandatory, etc.∙Interface Typeso A Business Object in SAP system can inherit one or more interfaceso You can have methods defined in an interface that can be redefined in Business Object type in the WorkflowStatus of Business Object ComponentA BO in development can have different development statuses:∙Modeled: This status shows a BO as only defined - i.e. method and its signature ∙Implemented: This status shows that ABAP implementation is done and you can use BO for testing purposes∙Released: This shows that the method is ready to use∙Obsolete: This shows that the method/event shouldn’t be used anymoreCreate a Business ObjectStep 1: To create a Business Object, use the Business Object Builder (T-Code: SWO1). The following screenshot pops up.13Step 2: Click Create. The following window opens. Define the object Supertype.14SAP Business WorkflowEnd of ebook previewIf you liked what you saw…Buy it from our store @ https://15。

sap edi实施方案

sap edi实施方案

sap edi实施方案SAP EDI实施方案主要包含以下几个步骤:1.需求分析阶段在这个阶段,需要与客户合作,了解他们的EDI需求、业务流程以及现有系统。

需要对现有的业务流程进行评估,确定哪些业务流程适合使用EDI来实现自动化。

同时,也需要考虑与供应商和其他合作伙伴之间的EDI接口,确定需要建立的EDI连接。

2.系统设计阶段在这个阶段,需要根据需求分析的结果,设计EDI系统的架构和流程。

需要确定如何将EDI系统与客户的现有ERP或其他系统集成,以及如何实现EDI消息的传输、转换和验证。

还需要设计EDI消息的模板和数据映射规则,确保各个EDI消息的格式、内容和结构符合相关标准和规范。

3.开发和测试阶段在这个阶段,需要进行EDI系统的开发和测试工作。

首先,需要开发EDI系统的各个组件和模块,包括EDI消息的生成、转换和验证功能。

然后,需要对EDI系统进行各种测试,包括单元测试、集成测试和系统测试,以确保EDI系统的稳定性和可靠性。

4.培训和上线阶段在这个阶段,需要对客户的相关人员进行EDI系统的培训,包括EDI系统的操作、维护和故障排除等。

同时,还需要与供应商和其他合作伙伴进行相关的连接测试和交互测试,以确保EDI系统的正常运行。

最后,EDI系统正式上线,开始实际使用。

5.运维和支持阶段在EDI系统正式上线后,需要进行系统的监控、维护和支持工作,确保EDI系统的稳定性和可靠性。

同时,还需要不断改进和优化EDI系统,以满足客户日益增长的EDI需求。

此外,还需要提供相关的技术支持和培训,解决客户在使用EDI 系统过程中遇到的问题和困难。

总结SAP EDI实施方案主要包括需求分析、系统设计、开发测试、培训上线以及运维支持等阶段。

通过这些步骤,可以实现客户的EDI需求,实现业务流程的自动化和标准化,提高工作效率和准确性。

同时,也需要不断改进和优化EDI系统,以满足客户不断变化的EDI需求。

SAP-公司间开票Idoc配置项

SAP-公司间开票Idoc配置项

Idoc实战-公司间开票业务公司间开发票,在调拨业务已经统销业务中最常用的就是一方开发票,另外一方自动收发票进行发票的校验工作;自动产生凭证业务会越来越多的应用到各个业务场景中,Idoc的基本业务介绍网上好多资料,在此就不足一详细介绍了,下面结合配置来介绍下Idoc业务配置分为的四大部分分别为1.Message type配置;2.Idoc配置;3.公司间发票配置;4.FI入账配置;1.Message type配置这是个典型的条件技术的应用;在sap中这种应用非常多,也算是sap的一大特色,首先根据凭证类型来确定输出的过程,过程中有许多输出类型,比如我们用的rd04输出类型,同理输出过程中包括requer和vv31的条件类型限制,必须同时满足这两个才能在输出的时候自动选择输出;如下图;这个表示合作伙伴类型的输出配置,在输出的配置过程中合伙人类型也就是输出的合作伙伴类型这个很重要;就是系统会把生产的idoc文件输出给合伙人中的那种类型,是收票方,还是收货方,还是xx;等;用vv31Tcode可以根据条件技术来维护输出的合伙人的数据,但是如何不维护,则系统会自动从主数据中获取;也就是优先条件,如果条件技术中没有则从主数据中合伙人类型的数据获取;前台用vv31来维护条件表里面的数据;总结:维护好这些后,则系统会自动调用消息类型中的程序,来触发ied的出站程序,生产idco文件;2.IDoc配置Idoc的配置在前台,是sap标准的功能;操作步骤是首先要创建一个RFC的连接,然后在创建一个端口号,给端口号分配一个RFC的连接,;一个连接可以有多个端口号,后台维护逻辑系统维护和添加逻辑系统如下图,1)这个客户表示收票方,也就是咱们在配置消息类型输出的时候合作伙伴的类型的一个具体客户编码,这个是站在发货工厂的角度去看的,也就是IED输出的BP合作伙伴的编号;如果站在收票方的角度,要根据这个收票方找到具体记账的公司代码才行,也就是一定会有一个对照关系转换表;同理,收票方要根据发票的出具方找到供应商编码才行,也就是开票方才行,这样的对照关系一定有,并且在产生的idoc文件里面有字段来标记;收票方会自动从idoc文件的相关字段里面获取;2)消息类型和消息代码:这个可以自己开发,sap有标准的,标准一个idoc文件的具体行为,比如IOVOIC表示SD开票行为,生成Idoc文件,3)这个就是我们建立的端口号,idoc文件中存在此处的端口号;4)Idoc基本类型,这个也可以自己建立,sap本身也有建立好的;5)这个RD04就是我们建立的输出类型,处理代码就是生产Idoc的代码;RD04对应的消息类型INVOIC(FI);RD05对应的消息类型是INVOIC(MM)消息代码:,如果几个IDoc 类型有相同的消息类型,可以通过消息代码维护唯一的分配。

培训材料_SAP workflow_工作流开发详细示例

培训材料_SAP workflow_工作流开发详细示例

工作流开发示例(工单服务采购申请审批流程)1 流程概述 (2)2 业务对象设计 (3)2.1 创建业务对象 (3)2.2 创建业务对象的关键字 (5)2.3 创建业务对象的属性 (7)2.4 为业务对象创建方法 (10)2.5 创建事件 (15)2.6 更改业务对象及其组件的状态 (16)3 创建任务 (20)4 根据业务流程构建工作流 (22)4.1创建一个新的工作流 (22)4.2维护工作流的基本属性 (23)4.3设置工作流的开始事件 (24)4.4 建立工作流的容器元素 (25)4.5 流程起始数据绑定 (27)4.6 工作流作业节点的创建 (28)4.6.1 采购策略及采购方式节点的创建 (28)4.6.2 创建采购申请审批的作业 (34)4.6.3 创建通知 (35)4.6.4 创建修改采购申请的作业 (37)4.6.5 创建循环节点 (38)4.6.6 调整流程走向 (43)5 事件的触发 (45)1流程概述PM工单下达后,自动产生服务采购申请,要求同时触发工作流,产生维护采购策略及采购方式的待办,发送给工单的创建人进行维护。

维护完毕后产生采购申请审批的待办发送给相关领导进行审批。

审批通过,发通知给工单创建者;不通过则返回给工单创建者进行修改。

流程示意图如下:2业务对象设计由于每张工单下达后仅产生一张采购申请单,每个采购申请产生一个审批的待办,因此使用采购申请号作为业务对象的关键字。

2.1创建业务对象事务码:SWO1输入业务对象的名称,必须以’Z’或’Y’开头,以区分系统原有的标准业务对象。

然后点击【创建】在弹出的窗口输入创建业务对象所必须的基本信息:◆超级类型如果需要继承某一个已经存在的业务对象,可在此指定其父类型的业务对象名称◆对象类型本业务对象的ID◆对象名称本业务对象的名称,命名规则同【对象类型】◆名称业务对象的描述◆说明更详细的描述◆程序存放本业务对象实现代码的程序名◆应用程序指定本业务对象的应用目录2.2创建业务对象的关键字关键字段用于唯一确定一个业务对象类型的实例,在本流程中选择采购申请号作为关键字。

IDOC接口SAP间数据传递

IDOC接口SAP间数据传递

下面,咱们以SAP与SAP自概念数据传输的方式为例,向大伙儿说明如何利用IDOC。

本例中,咱们从一个系统(BI5CLNT202)将SFLIGHT的数据传输到另一个系统(BT3CLNT800)。

第一,从网上贴了下大体步骤,下面咱们依照那个步骤来操作:创建IDOC:第一步:WE31 创建IDOC所包含的字段.第二步:WE30 创建IDOC 把Segment分配给IDOC第三步:WE81 创建信息类型第四步:WE82 把IDOC类型与信息类型对应.第五步:WE57 Assign Message & Idoc Type to a Function Module for Process 第六步:SM59 Define a RFC connection for Idoc transfer第七步:WE21 Define a Port ( Assign a RFC destination which created in SM59 ) 第八步:WE41/42 Creat Process Code第九步:WE20 Define a Partner Profiles( Also creat a Outbound parameters with Port, or Inbound parameters with Process code )管理IDOC:WE02 显示IDOC,可以根据时间,IDOC类型查找IDOC,查看成功,出错信息。

WE46 IDOC管理(出\入)WE60 IDOC类型文档(可以查看IDOC结构,和每个字段的描述.WE19 根据IDOC号进行IDOC处理,可以修改IDOC值进行补发动作,处理分为内向和外向。

消息配置:WE20 配置伙伴消息进和出IDOC类型WE21 配置伙伴。

以下操作在发送方:1.创建IDOC类型的段(WE31)IDOC类型的字段,是组成MESSAGE的大体单位,咱们那个地址按关键值和非关键值分为2部份:ZSEG_FLY01ZSEG_FLY02:创建完成后,能够通过菜单:EDIT->Set Release来发布SEGMENT。

SAPIDOC的配置步骤

SAPIDOC的配置步骤
根据目标SAP系统的特点和要求,确定与 SAPIDOC的集成方式,可以是基于RFC(远程函 数调用)、BAPI(业务应用程序编程接口)或其 他适用的集成技术。
定义数据交换格式
确定与SAPIDOC进行数据交换的格式和标准,例 如XML、JSON或CSV等。确保数据格式的一致性 和准确性。
开发集成接口
在目标SAP系统上开发与SAPIDOC的集成接口, 实现数据的传输和交换。这可能涉及编写ABAP代 码、配置中间件或使用其他集成工具。
在SAPIDOC中,定义销售订单的类型,如标准订单、退货订单 、免费订单等。
建立和维护客户主数据,包括客户的基本信息、地址、联系方 式、信用控制等。
定义销售订单中的项目信息,如物料、数量、价格、交货日期 等。
根据企业实际需求,配置销售订单的审批流程、自动创建后续 文档(如发货、发票等)的规则。
实例三:发票配置演示
创建文档模板
使用SAPIDOC的模板设计器创 建适用于SAP S/4HANA的文 档模板,根据需求定义文档的 布局和样式。
配置数据映射和数据处理 逻辑
将数据从SAP S/4HANA的 OData服务映射到文档模板中 的对应字段,并配置必要的数 据处理逻辑,以满足业务需求 。
与其他SAP系统集成
确定集成方式
确定业务需求
明确需要实现的业务功能
根据企业或组织的实际需求,明确需要通过 SAPIDOC实现的具体业务功能,例如数据 交换、系统集成等。
分析业务流程
对需要实现的业务功能进行深入分析,了解业务流 程、数据流向以及涉及的系统和应用。
制定技术实现方案
根据业务需求和分析结果,制定技术实现方 案,包括系统架构、技术选型、数据交换格 式等。
测试输出和打印
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

IDOC and Workflow 实例一、业务场景(Business Scenario):公司的采购部门在SAP系统创建了一份询价单(RFQ),通过EDI消息实时发送给了供应商Vendor;供应商的销售部门会得到工作流workflow通知,从而及时处理接收到的客户询价。

Own company –RFQ(EDI) ---- > Vendor (Sales)---- > received the notice of workflow Create a RFQ in own SAP system ----EDI----> Vendor (Sales dept) ----> received the notice of workflow in Vendor side二、技术分析:SAP标准为MM和SD的单据预定义了基于Message的EDI处理方式。

IDoc是EDI的一种具体实现,基于ALE架构传递,我们可以用来处理SAP系统之间的数据交互,从而实现我们的业务需求。

(ALE ---- > EDI ----- > IDOC)ALE is working between different R/3 systems . And EDI is working between non-SAP and SAP system .三、实现步骤:在本公司的SAP系统(记为系统A)创建物料(1-01-01)和供应商(11001)主数据:TCODE: MM01保存,物料创建OK。

TCODE:MK01保存,供应商创建OK。

TCODE:ME41(create RFQ)Header=>vendor address工具栏=>overview, 返回后点选工具栏的messages到达这一步后,需要创建一个EDI类型的Medium,partner function为LS(逻辑系统),partner为11001(对应供应商)的输出类型(先保存次RFQ,编号为6000000019,登配置好了,再通过ME42修改次RFQ的输出类型)。

Create two logical systems (one is for own company , the other is configure to connect to vendor’s SAP )创建2个逻辑系统,一个用来标识公司SAP系统中创建RFQ的Client对应的逻辑系统,这将作为供应商系统接收IDoc时的标识;另一个是用来配置连接供应商SAP的。

(Client[RFQ-11001]----- > Logical system(vendor) , Logical system [21001]----connect to -- > Vendor’s SAP)TCODE:SALENew Entries:11001 ---- OWN Company (GPS vendor A ) RFQ’s LS /vendor /partner / logical system 21001 ---- Vendor’s logical system (4S shop A ) connect to vendor’s SAP & 21001 assigned to client 800 , meanwhile , 21001 will be created at the vendors’ side保存后,21001分配给RFQ的Client,assign logical system to client双击800进入,把Logical system 改成刚才创建的。

保存,需要挂一个请求(TR)逻辑系统创建OK。

TCODE:WE20,创建partner profile保存后,在此partner 11001 中创建一个Outbound pamtrs.用来发送RFQ:到这一步后,需要提供一个Receiver Port,需先创建好。

TCODE:SM59 Receiver Port used in Outbound parameters of Partner Profiles创建一个ABAP Connection到供应商SAP系统的连接(系统B):RFC -----> Tab Technical Settings ----> Target Host and IP AddressTarget Host输入供应商系统的服务器IP address (Vendor Target Host)SM59 ---> RFC ---> Logon & security输入系统B(vendor R3 system)的客户端,用户名,密码。

保存后,RFC Definition定义完毕,Port Definition ------ WE21TCODE:WE21,创建上面outbound要用到的receiver port ( Port in IDoc processing ) Transactional RFC ( TRFC is used for ALE communication)WE21 --- Port in IDoc processing ----> transactional RFC选中transaction RFC,点创建,回车RFC destination 输入刚才创建的11001。

保存,receiver port创建OK。

返回到outbound创建,输入刚创建的port,记得output mode选为立即传送Transfer IDOC immediately:选中message control标签页,添加message的处理:到这一步,需要先维护condition type。

TCODE:NACE选output type选中NEU,再点击左面的partner function点修改,新建一个EDI类型:Create a new partner function – EDI and function is LS (name: Logical system ) (Medium – 6 EDI and function is LS )保存到TR回到上面message control的添加ME12为outbound中对RFQ的标准处理,可以在WE41中找到。

保存后,outbound设置完成,现在可以输出EDI到供应商SAP系统了。

现在去为刚才创建的RFQ添加一个EDI消息。

TCODE:ME42跳过警告,选择工具栏中的further dataDispatch processing选为4,立即发送。

然后保存,此RFQ的EDI消息就已经开始发送了。

再次进入此RFQ时,输出状态已经变成绿色可以在IDoc列表中查看到刚才发送消息的状态。

TCODE:WE02双击行进入,可以看到具体状态:可以看到此RFQ的相关数据已经打包成IDoc,成功passed 到了receiver port中,即供应商的SAP系统。

Outbound完成后,转到供应商SAP系统,作对应的接受IDoc的动作,也就是Inbound过程。

登录供应商SAP系统,查看接收到的IDoc消息。

TCODE:WE02但看到状态是红色的,双击进去可以看到错误信息可以看到数据已经接收到了,但是partner profile没有配置好,下面会做一系列的inbound 相关的配置。

这样才能保证正确的处理接收到的IDoc,并生成SD中的RFQ。

TCODE: SALE,配置客户的逻辑系统(即上图中的21001)。

逻辑系统创建OK,然后创建partner profile。

TCODE:WE20保存后,为其添加一个Inbound pamtrs.用来处理接收到的IDoc。

Incoming IDOC handling注意选为立即传送,保存,partner profile创建完毕。

下面创建供应商系统中的成品物料(F-01-01)和客户(21001)的主数据(customer master)。

TCODE:MM01 (material master and customer master data )把物料挂在工厂3000中:保存,物料创建OK。

创建客户,TCODE:VD01填写与物料对应的销售组织和分销渠道选Sales Area Data保存,客户创建完毕。

这时,我们可以重新从客户那边的SAP系统发送一个RFQ过来。

但是接收时Idoc的状态还是有误。

根据状态信息,可以判断,在创建SD中的询价时,找不到销售组织、销售渠道和产品组。

还有,供应商物料编码和本公司物料编码的对应关系,也是需要额外处理的。

这是因为这些信息的确不在接收的IDoc中,也不应该在其中。

这完全是由供应商这边的系统自己定制的。

为此,我们通过WE42找到Inbound中对应的处理Function Module:IDOC_INPUT_REQOTE,需要对它做出口增强,使在创建询价根据一定规则赋值上销售组织、销售渠道和产品组等定制参数。

通过查看此函数的源代码,很快找到了出口增强:VEDQ0001。

了解此出口,找到处理代码作用处。

TCODE:SMOD经过分析,可以把处理代码加在User Exit 007 中,下面去创建增强实现。

TCODE:CMODEnhancement assignments:在function module:EXIT_SAPLVEDQ_007的Include (ZXVDQU07)中添加如下代码:Field-symbols: <fs_vbak>,<fs_vbap>,<fs_field>.If cntrl-rcvprn = '0000011001'. "customer numberassign dxvbak to <fs_vbak>.Assign component'kunnr'of structure <fs_vbak> to <fs_field>.<fs_field> = '0000021001'."sales param. Mapping between vendor and cuostmer assign component'vkorg'of structure <fs_vbak> to <fs_field>.<fs_field> = '3000'.Assign component'vtweg'of structure <fs_vbak> to <fs_field>.<fs_field> = '10'.Assign component'spart'of structure <fs_vbak> to <fs_field>.<fs_field> = '00'.Loop at dxvbap assigning <fs_vbap>.Assign component'kdmat'of structure <fs_vbap> to <fs_field>.If <fs_field> = '1-01-01'. "material no. Mapping between vendor and cuostmer assign component'matnr'of structure <fs_vbap> to <fs_field>.<fs_field> = 'f-01-01'.Endif.Endloop.Endif.激活增强项目后,再测试一个从客户传来的RFQ,可以看到这回已经成功创建了RFQ可以查看生成的RFQ:这里算出的价格是0,这是因为没有维护销售价格的原因。

相关文档
最新文档