Intercopmany Idoc

of 27 /27
Inter-Company Billing - Automatic Posting To Vendor Account (SAP-EDI) Automatic posting to vendor account is done by EDI. In our case where both companies are proccessed in the same system (& client), it is sufficient to create Idoc. This proccess requires several steps: 1. Creating a Customer to represent the receiving Company. 2. Creating a Vendor to represent the supplying company. 3. Creating a Port 4. Maintain an Output Type 5. Creating a Logical Address 6. Creating a Partner Profile for both Customer & Vendor 7. The relevant MM customizing is maintained. 8. The relevant FI customizing is maintained. 1. Creating a Customer to represent the receiving Company. The customer has already been created (XD01) for the purpose of Intercompany processing and entered in the approperiate transction in customizing (Sales and Distribution à Billing à Intercompany Billing à Define Internal Customer Number By Sales Organization). Note: The cutomer has been created in the supplying company code. The organizational data in this case is: Supplying Company Code: 1180 Supplying Plant: 1180 Supplying Sales Organization: 1180 Supplying Distribution Channel: 01 Supplying Division: 00 Receiving Company Code: 3100 Customer representing the receiving Company Code: P3100 2. Creating a Vendor to represent the supplying company. The Vendor is created with the standard transaction (XK01). Note: The Vendor is created in the receiving Company Code. The organizational data in this case is the same as above. Vendor representing the supplying Company Code: P1180 NOTE: There is NO need to “connect” vendor to customer in the control screen. 3. Creating a Port Tools à Business Communication à IDoc Basis à Idoc à Port Definition (T. Code WE21) Maintain Transactional RFC: (Choose Transactional RFC and press the create icon). A dialog box will open asking whether you want the system to generate an automatic name or whether you wish to use your own name. Port name: Automatically generated Version: 4.x

Embed Size (px)



Transcript of Intercopmany Idoc

Inter-Company Billing - Automatic Posting To Vendor Account (SAP-EDI)

Automatic posting to vendor account is done by EDI. In our case where both companiesare proccessed in the same system (& client), it is sufficient to create Idoc.This proccess requires several steps:1. Creating a Customer to represent the receiving Company.2. Creating a Vendor to represent the supplying company.3. Creating a Port4. Maintain an Output Type5. Creating a Logical Address6. Creating a Partner Profile for both Customer & Vendor7. The relevant MM customizing is maintained.8. The relevant FI customizing is maintained.

1. Creating a Customer to represent the receiving Company.The customer has already been created (XD01) for the purpose of Intercompanyprocessing and entered in the approperiate transction in customizing (Sales andDistribution Billing Intercompany Billing Define Internal Customer Number BySales Organization).

Note: The cutomer has been created in the supplying company code.The organizational data in this case is:Supplying Company Code: 1180Supplying Plant: 1180Supplying Sales Organization: 1180Supplying Distribution Channel: 01Supplying Division: 00Receiving Company Code: 3100Customer representing the receiving Company Code: P3100

2. Creating a Vendor to represent the supplying company.The Vendor is created with the standard transaction (XK01).Note: The Vendor is created in the receiving Company Code. The organizational data inthis case is the same as above.

Vendor representing the supplying Company Code: P1180NOTE: There is NO need to connect vendor to customer in the control screen.

3. Creating a PortTools Business Communication IDoc Basis Idoc Port Definition (T. Code WE21)Maintain Transactional RFC: (Choose Transactional RFC and press the create icon).A dialog box will open asking whether you want the system to generate an automaticname or whether you wish to use your own name.

Port name: Automatically generatedVersion: 4.xRFC destination: PLD (This was defined by the basis people).

4. Maintain output type Output Type RD04 - Invoice Receipt MM is a special function, responsible for the execution of the Idoc and will be entered in the Partner Profile later on.

Output type RD04 is maintained: Img: Sales and Distribution -> Basic functions -> Output control -> Output Determination -> Output Determination Using the Condition Technique -> Maintain Output Determination for Billing Documents Maintain Output Types (T. Code V/40).

Partner functions

Sales and Distribution -> Basic Functions -> Output Control -> Output Determination Output Determination Using the Condition Technique -> Maintain Output Determinationfor Billing Documents.

Assign Output Types To Partner Functions

Maintain Output Determination Procedure

Assign Output Determination Procedures

Master DataMaintain output Master DataLogistics -> Sales and Distribution -> Master Data -> Output -> (T. Code VV31)

5. Create Logical AddressImg: Sales and Distribution -> Billing Intercompany Billing -> Automatic Posting ToVendor Account (SAP-EDI) -> Assign vendor. (T. Code WEL1)

Logical address 1180P3100 is made of the supplying Company Code (1180) and thereceiving Customer (P3100).

Note: If the receiving Customer is a numeric number you must add zeros between theCompany code and Customer number so the Logical Address will be 14 digits.E.g if the customer number was 3100, than the logical address would have been11800000003100 as can be seen in the second line.(In our case the customer is an alpha numeric number so the second line was not necessary. It was created just for this documentation and was not saved)

The Logical address is completed when the receiving Company Code and the Vendor areentered in the detail screen.

It is also necessary to activate the account assignment.

IMG: Sales and Distribution -> Billing Intercompany Billing -> Automatic Posting ToVendor Account (SAP-EDI) -> Activate account assignment.

6. Creating a Partner Profile for both Customer & VendorTools Business Communication -> IDoc Basis -> Idoc -> Partner Profile (T. CodeWE20)

Customer:Put cursor on Partner type KU and press create.Enter typ, Agent & Lang,SAVE

Press in outbound paratrs. Section, to maintain detail screens The following screen will appear.

Enter the following data in the appropriate fields:Partn.funct. BPMessage type INVOICMessage Code FIReceiving port A000000001Basic Type INVOIC01

Press enter and the screen will change to the following: Enter PacketSize 1

Go to the Message Control tab press and enter the data as specified in the followingscreen.

You can repeat the process for cases where invoice verification is done against purchaseorder. in this case enter MM in message code field.

As you can see the only difference between the FI & MM invoice is in the message codeand output type.NOTE: You cannot use output type RD04 again therefore you must copy it incustomizing to another output type (in this case RD00)

VendorFollow the same procedures but maintain the inbound parameter Screen as follows:

7. FI CUSTOMIZINGFinancial Accounting Accounts Receivable and Accounts Payable BusinessTransactions -> Incoming Invoices/Credit Memos -> EDI -> Enter Program Parametersfor EDI Incoming Invoice (T. Code OBCE)

Make sure to maintain posting types, tax code and invoice doc.type. Use KR when not using purchase order & RE when using purchase order.

Assign Company Code for EDI Incoming Invoice

By leaving the field CoCD blank, all company codes are available.Assign G/L Accounts for EDI Procedures (T. Code OBCB)

P1180 = Vendor 3100 = Company Code of receiving company (of customer)

NOTE:G/L account should not be connected to CO. Assign Tax Codes for EDI Procedures (T.Code OBCD) It is necessary to match the output tax from the sales order to the input tax. Tax type = Output Tax Tx = Input Tax

Accounting -> Financial Accounting -> General Ledger -> Master Records -> IndividualProcessing -> Centrally (T.Code FS00)

G/L account no. = account number that was entered in transaction OBCB (page 24)Tax category must allow for input tax.

Make sure manual posting is allowed for the G/L account. (Create/Bank/Interestscreen).

TEXTIn many cases the G/L account has been configured so that text is mandatory. This couldbe either Header Text or Item Text.Header TextNo special configuration is necessary. Just enter text in the Header note. You may usethe following access sequence.

Item TextIt is necessary to implement a userexit in order to fill the item text field. Detailedinstructions are found in note 39503

8. MM Customizing:Make sure the Unit of Measures ISO Codes are configured correctly.General Settings Check units of measurement (T. Code CUNI)

Optional MM Customizing:NOTE: This is only necessary for logistics invoice verification.Materials Management Logistics Invoice Verification EDI Enter ProgramParameters

MonitoringThere are several transaction that allow you to monitor the IDoc. First you need to knowthe IDoc number. You can see the IDoc number in the processing log in the Headeroutput screen in the billing document.

You can use transaction WE02 or WE05. Enter the IDoc number in the selection screen. If you have an error in the IDoc, you could analyze it with transaction WE19

What is ALE?Application Link Enabling (ALE) is a set of business processes and tools that allow applications on different computer systems to be linked. This can be done between different SAP systems as well as between SAP and non-SAP systems. In a single SAP system different applications are integrated via a single database (e.g. finance, sales, production, human resources). However, many companies do not have just one integrated system but a distributed environment with different applications running on different systems. To run the whole business in such an environment, the distributed applications have to be linked. This can be done through Application Link Enabling (ALE). ALE provides distributed business processes that can be used to link the applications on different platforms. There are some ALE business processes delivered in the standard SAP system. Furthermore, there are tools that can be used to change the existing ALE business processes or to implement new distributed business processes. Besides the business processes, there are special ALE services that are required to set up and control a distributed environment. These services include a distribution model, business object synchronization, and tools for monitoring or error handling. ALE is a major part of SAP's Business Framework Architecture. Besides the basis middleware, that provides the communication between components, and the interfaces (BAPIs), ALE business processes and ALE services enable the cooperation of the single components within the framework. That makes ALE the glue of the Business Framework. What are the benefits of ALE?With ALE, companies get the opportunity to improve business performance and to solve organizational or technical issues by: Increasing Flexibility: Through distribution you can decentralize your business, enabling local units to operate independently from each other. This flexibility enables the local units to return better business results than in a centralized environment. They have the necessary flexibility to optimize business processes in different organizational units and can ensure that information systems can handle the speed of change in rapidly expanding markets. Distribution allows a high level of freedom, provided that this level of freedom has been clearly defined. On the other hand, some companies, that already have a distributed organization with different computer systems in the local units, have the opportunity to link their units through ALE business processes. This enables them for example to provide a 'one face to the customer' approach. Another area that can benefit through ALE are virtual organizations (partnerships between independent companies, joint ventures and mergers and acquisitions). Of course, in many cases an integrated solution based on a single system is not possible at all. Some applications used by a company cannot run on the same computer system. This includes legacy systems or complementary software. It may also be possible that a company uses different SAP industry solutions or specific country solutions, which do not run on the same SAP System. If these applications run on different systems, they cannot be linked by a central database but have to use a special integration mechanism like ALE. In this way, ALE also links SAP Core Systems to other SAP components like CRM, Business Information Warehouse or APO. Reducing Costs: Besides the benefits of having an improved flexibility in setting up the whole business processes, ALE may also reduce costs, in particular costs of upgrading. If the whole business is run on one integrated system you have to upgrade the whole system, even if only one part of your company (e.g. human resources) requires an update. So the entire company is affected by the upgrade project and all users have to be trained for the new release. Within a distributed environment with release independent interfaces, like those provided by ALE, you can focus the upgrade project on that part of the company that has to be upgraded. The other parts of the company are not involved and need no training. This can save a lot of money. Furthermore, existing investments are protected. Another cost factor for distribution might be communication costs. For an overseas connection, it can be more expensive to provide online access to one central system (T1) than to connect distributed systems to each other (64K line). Increasing Security and High Availablity: There might also be some technical reasons for distributed systems. If some parts of the business have special requirements for security of data access (e.g. human resources), this can be set up much safer on a standalone system, which is, however, linked to other parts of the company through distributed business processes. A similar example is high availability. High availability is usually required by the operations part of the company (production, logistics), but not by other areas (e.g. financials, human resources). In a distributed environment high availability can be set up for specific parts of the environment instead of for the whole business. This can also reduce costs. In a distributed environment, you can not decrease the overall workload of the systems but you can separate the user workloads on different systems. Through this scalability you can improve performance. Another benefit of distributed systems is that if a technical failure occurs on one system, all other systems continue to operate. Only a small part of the business is disrupted by the error. On one central system such an error would disrupt the entire business. When should ALE be used?Besides the benefits of ALE there are also reasons not to distribute: The functional scope in a distributed environment is restricted. Not all functionality that is available in an integrated SAP system can be used with distributed systems in the standard yet. Although ALE provides tools to create new ALE business processes or to enhance existing business processes, this does involve additional expenditure. Each company needs some organizational standards and data harmonization. In a distributed environment, less standards are required than on a single integrated system. However, in a distributed environment the maintenance of the standards and the data harmonization is more difficult than on a single system. The administration of decentralized systems is more expensive. Support and service costs for hardware and software in decentralized systems are higher than these costs in a single centralized system. ALE should be used in a company if the benefits of ALE for this company outweigh the reasons against distribution. For this you always need to carry out a company specific investigation, in which you also should consider the culture of the company. ALE is good for some companies, but not for all. What is the relationship between ALE and Middleware?There are many such messages, the most common of these include a customer sending a purchase order message to a vendor, or a vendor sending an invoice message to a customer. Classic EDI is mainly restricted on the exchange of transactional data, no master data or configuration data. In most cases, EDI replaces the transfer of paper copies of these documents. Via the messages ALE business processes can be implemented between business partners. The EDI messages also use the ALE services. For the communication between different types of systems special EDI messages are defined as standards for inter company communication. There are many standards for these messages - in the United States, the ANSI X.12 standard is the most prevalent, in Europe, the UN/EDIFACT standard is used. For sending EDI messages the information has to be converted into an EDI standard. With SAP systems this is done by EDI subsystems. This conversion is the only difference between EDI messages and other messages used in ALE business processes. The processing of these messages on the SAP System is the same as the processing of other ALE messages. Which ALE business processes are available?ALE business processes are integrated business processes that run across distributed systems. This can be two different SAP systems, links between SAP and non-SAP systems, SAP and Web-servers (Internet Application Components) or SAP and desktop applications. The links between the systems may be loosely (asynchronous) or tightly (synchronous) coupled. These business processes are release-independent and can run between different release levels of the systems. Many SAP applications offer ALE distribution processes, for example Master Data Replication, Accounting, Logistics and Human Resources. When should synchronous or asynchronous links be used?When distributed applications are linked by ALE business processes, the question often arises as to how tight the link should be. Synchronous and asynchronous links have both advantages and disadvantages: Synchronous links have the advantage that the sub-process on the server can return values to the sub-process on the client that has started the link. Problems with synchronous links occur if the communication line or the server is temporarily not available. If this happens, the sub-process on the client can not be finished (otherwise there would be data inconsistencies). (Example: There is a logistics system and a financial system. Every stock movement in logistics has to be posted in the general ledger of the financial system. If the link between logistics and finance is synchronous, no stock movement can be recorded in the logistics system if the communication line to the financial system is down.) Because of this, synchronous links are usually used if the client only wants to get some data from the server and the sub-processes on the server do not have to write any data to the database. With asynchronous links the sub-process on the client can be finished even if the communication line or the server is not available. In this case the message is stored in the database and the communication can be done later. The disadvantage of asynchronous links is that the sub-process on the server can not return information to the calling sub-process on the client. A special way for sending information back to the client is required. In addition, a special error handling mechanism is required to handle errors on the receiving side. Asynchronous links are used if a synchronous link is not applicable. For the problems with sending return information to the client and with error handling there is some support from the ALE services. Why does SAP use ALE instead of database replication or distributed databases?Database replication is another possibility for doing business object synchronization. However, there are some major disadvantages with database replication. At the moment database replication is database dependent and release-dependent within one database. This makes database replication impossible for the use with non-SAP systems and even for the replication between SAP systems, you have to make sure that all systems are running on the same SAP release and the same database release of a single database vendor. Furthermore, with database replication you cannot do things like field conversions or version changes. ALE does not have these shortcomings because it offers application driven data replication independent of the underlying database. Another technology, distributed databases, is no alternative for ALE at the moment, either. There are some good results of distributed databases available, but the performance is far from sufficient for using it with larger applications like SAP. How can I serialize IDoc processing?There are various procedures for processing IDocs in a serialized way, that is to process them or transfer them to the application in a certain sequence. Depending on your respective requirements, one of the methods proposed in note 752194 may be suitable for the required purpose.

ALE IDOCCheat sheetPosted by sapmm on April 16, 2009Here is the complete list of all the transaction codes you need to know for ALE & IDOCS. keep it handy, always useful Main Transaction CodesMain MenusWEDI EDI Related ActivitiesBALE ALE Related ActivitiesSWLD Workflow Related ActivitiesSALE ALE ConfigurationNACE Message Control ConfigurationIDOC DefinitionSE11 Data DictionaryWE30 IDoc type editorWE31 Segment editorBD53 Reduction of IDoc typesWE60 Documentation for IDoc typesWE61 Documentation for IDoc record typesIDOC MonitoringWE02 IDoc displayWE05 IDoc ListsWE06 Active IDoc monitoringWE07 IDoc statisticsConfiguration(ALE and EDI)BD54 Maintain logical systemsBD64 Maintain distribution modelBD71 Distribute Customer ModelBD82 Generate partner profilesFILE Logical File PathsPFTC Task DefinitionPPOC Maintain Organization StructureSM59 Maintain RFC DestinationsSWE2 Event LinkageSWU3 Basic Workflow SettingsWE20 Partner profilesWE21 Port definitionRun Time WorkflowSO01 SAP InboxSWEL Event LogSWI1 Workflow LogSWI2 Work Item AnalysisSWI5 Workload AnalysisMessage ControlNACE Condition Record MaintenanceVOK2 SD Message Control ComponentsVOK3 Purchasing message Control ComponentsVOFM View Message RequirementsV/86 Condition Table Field CatalogWE15 IDoc test: Outbound from MCTestingWE19 Test toolWE12 IDoc test: Inb. Procg of Outb. FileWE16 IDoc test: Inbound FileWE17 IDoc test: Inbound status reportReprocessing IDOCSBD87 Process inbound IDocsBD88 Process outbound IDocsSystem MonitoringSM12 Locked EntriesSM13 Update MonitoringSM21 System Log DisplaySM58 Transactional RFC LogSM66 Debug Async Update TasksST22 Dump AnalysisOther Relevant Transaction CodesAL05 Monitor current workloadAL11 Display SAP DirectoriesAL18 Local File System MonitorAL19 Remote File System MonitorAL21 ABAP Program analysisALO1 Data Relationship BrowserANA_VAR Table Analysis: Analysis VariantsBA10 Subsystem Config.BA11 Channel Definition for TransceiverBD10 Send MaterialBD100 IDoc display object channel viewBD101 Consistency checkBD102 Outbound registryBD103 Inbound registryBD104 maintain tbd53BD105 maintain tbd54BD11 Fetch MaterialBD12 Send customerBD13 Open customerBD14 Send vendorBD15 Open vendorBD16 Send Cost CenterBD17 Get Cost CenterBD18 Send General Ledger AccountBD19 Get General Ledger AccountBD20 IDoc passed to applicationBD21 Select change pointerBD22 Delete change pointersBD23 Delete serialization dataBD24 Send Cost ElementsBD25 Send Activity TypeBD26 Get Activity TypeBD27 Send cost center activity pricesBD28 Send obj/cost element control dataBD30 Distribute material object listBD31 Distribute document object listBD32 Distribute plant allocations(matBOM)BD40 Read change pointer for groupBD41 Dispatch IDocs for groupBD42 Check IDocs for groupBD43 Post IDocs for groupBD44 Assign message types to ser. groupBD47 Dependencies between methodsBD48 Dependency method messageBD50 Activ. change pointer for mess.typeBD51 Maintain function modules (inbound)BD52 Activ.change pointer per chng.doc.itBD53 Reduction of IDoc typesBD55 Maintain IDoc conversionBD56 Maintain IDoc segment filteringBD57 Maintain link and serialization ty.BD58 Convert Org. unitsBD59 Allocation object type -> IDoc typeBD60 Additional data for message typeBD61 Activate change pointerBD62 Define segment conversion ruleBD63 Transport ALE tables to message typeBD65 Maintain IDoc type required fieldsBD66 IDoc type field -> change doc.fieldBD67 Maintain input methodsBD68 Maintain listsBD69 Assign message type to IDocBD70 Adjust number rangesBD72 Activate eventsBD73 Reposting of IDocs (ALE)BD75 Convert IDoc statusBD76 Model upload/download monitoringBD77 Distribution of control dataBD78 Monitoring control data distributionBD79 Maintain IDoc conversion rulesBD80 Conversion pre-production/productionBD81 Filter objects parameter filteringBD83 Send IDocs after an ALE errorBD84 Post IDocs after ALE errorBD85 Consistency check for transferBD86 Consistency check for salesBD89 Control data model. initial screenBD90 Start DA-OUBD91 Send characteristicBD92 Send classBD93 Send classificationBD94 OA file transferBD95 Specify ALE object typesBD96 filter objects of receiver determin.BD97 Assign RFC dest. to logical systemsBD98 ALE consistency check activeBD99 Message type dependenciesBDA1 Call RSARFCEXBDA4 Specify ALE object typesBDA5 Distribute documentsBDBG Generate ALE interface (BAPI)BDBP Hierarchy maintenance of BAPI param.BDBS Generate coding for mappingBDCP Number range maintenance: ALE_CPBDLS Mapping Logical System NamesBDM2 Monitoring: IDocs with receiverBDM5 Consistency checkBDM6 Monitor: Check input workflowBDM7 ALE Audit: statistical analysesBDM8 ALE Audit: Sending the confirmationsBDM9 Reorganizing the audit databaseBDMC Upload info structuresBDR1 Display application log for recoveryBDR2 Reorganization of recovery dataBDRC ALE: Determine recovery objectsBDRL ALE: Process recovery objectsOE2C Process Code InboundOYE0 EDI: Maintain Port Def. arfcOYE3 Display EDI PortsOYE4 Display ALE PortsOYED Maintain Port DefinitionsOE3C System Process CodeOE1C Process Code (OutB)OYEL Display EDP21 (InB Partner Profile)OYEX Create EDP21 (InB Partner Profile Overview)OYEH Display EDP12 (Msg Control)OYER Create EDP12 (Msg Control Overview)OYEI Display EDP13 (OutB Partner Profile)OYEU Create EDP13 (OutB Partner Profile overview)OYSM Number Range Port DefinitionOYSN Number Range For IDOCSOYSO Number Range IDOC TypesWE08 EDI: File Processing Status (EDFI2)WE09 IDoc lists enhancedWE10 IDoc lists enhancedWE14 IDoc test: Outb. from IDocWE30 IDoc type editorWE32 View editorWE33 Value tables for IDoc documentationWE40 System process codesWE41 Process codes, outboundWE42 Process codes, inboundWE43 Funct.module: Status record displayWE44 Partner Types and selection reportsWE45 Forward (inbound) (V3, EDILOGADR)WE46 IDoc administrationWE47 Status MaintenanceWE48 Inbound process codes: TextsWE49 Inbound process codes: Change textsWE50 System process codes: TextsWE51 System process codes: Change textsWE52 Outbound process codes: TextsWE53 Outbound process codes: Change textsWE54 FMs for changing file namesWE55 FMs for path namesWE56 Status process codesWE57 Messages and application objectsWE58 Status process codes: TextsWE59 Change status process codesWE62 Documentation for segmentsWE63 Parser for IDoc types and rec.typesWE70 Conversion: Basic typesWE71 Conversion: ExtensionsWE72 Conversion: IDoc typesWE73 Conversion: Logical messagesWE80 IDoc types: OverviewWE81 Logical message typesWE82 Assignment IDoc type MessageWE83 Extensions: Overview (EDCIM)WE84 Assignment of IDoc and appl. fieldsWECP Display CPIC interface status (R/2)WEL0 Forward (inbound) (EDILOGADR)WEL1 EDI: Interface Invoice for EDILOGADRWENA Messages on basis of changesWorkFlow ConfigurationOOAW & SWLV Subordinate And Peer DefinitionPFAC Standard RolesPO13 Maintain SubstitutesSWO1 Business Object BuilderIf you like this post, you may as well like these too: 1. How to Populate extended IDOC File segments? Once you extend the IDOC, it is an enhancemnet of the standard IDOC. Write some coding in the USER-EXIT for each outbound/inbound message. Go to CMOD and search for 2. Archieving IDOC Nice article from a guy in Infosys showing the clear steps on archeiving IDOC. Here is the link to sdn. Download the Archieving IDOC(PDF File) from sapdb. 3. IDOC Creation (Step by Step) This Idoc Creation Procedure (Step by step Guide) will teach you with all the instructions on creation of Inbound and Outbound IDOC with screen shots for better understanding. 4. ALE Configuration To develop and configure a new custom ALE scenario, comprises 5 steps: 1. Design and develop the custom IDoc with it s segments and a new message type 2. 5. Learn ALE Implementation and IDOC creation in Simple Steps Here is a nice little article giving you simple steps as to how to Implement ALE and to create IDOC. ALE Implementation Guide and IDOC Creation Thanks to Menon