Download as pdf
Download as pdf
You are on page 1of 142
Entire Examples on ALE Fu. = ass FLA. 5 =3 a) ies) 1.1.1. SUBHENDU MAJUMDAR Technical Consultant, IBM Author : Subhendu Majumdar Page 1 12/1/2005 Entire Examples on ALE Contents 1. Preface 2. Client to Client ALE Setup .. 2.41, Introduction... 2.2. SLEDS rornee 2.2.1. — Defining Logical System 2.2.2. Assign Logical System to Client 2.2.3, Create RFC Destination....... 2.2.4. Prepare Customer Distribution Model 2.25. Generate Partner Profile. 2.2.6. View Partner Profile created in the sender system... 2.2.7. View port information in sender...... 2.2.8. Distribute Customer Distribution Model 2.2.9. Generate Partner Profile in client 777. 2.2.10. Create and Distribute Material Master 3, System to System ALE Setup... Steps 1. Create Logical Systems for both sender and Receiver. 33 2. Assign Logical Systems to Clients. 3. Create RFC Destination....... .1.4, Maintain Customer Distribution Model... .1.5, Generate Partner Profile. 6 7 8 9. BSewastcwe wo Distribute Customer Distribution Model Generating Partner Profile in the Receiving Logical Systems Create /Change Material master records. 9. Distributing Records in the Receiving logical system . .1.10. Checking IDoc status in the receiver system . 3.1.11. Check Material in Receiver System... 4, Two way Server to Server Communication with IDoc.... 4.1. Customizing for Sending Vendor master from Shatadru to PWCSAP ... 4.1.1. — Create Logical system PWCSAP100 and PWCDEV200 both in Shatadru (200) and PWCSAP (100). a 4.1.2. Assign Logical System PWCSAP100 to client 100 in PWCSAP and PWCDEV200 to client 200 in Shatadru .. 4.1.3. _ Create RFC Destination PWCS) PWCDEV200 in PWCSAP. 4.1.4, Creating Distribution Mode! MODELSUB in Shatadru ‘5. Creating Partner Profile in Shatadru... 6. Distributing Customer Distribution Model in Shatadru 7. Generating Partner Profile in PWCSAP. ‘8. Creating Vendor in Shatadru ... 9 1 1 1 3 3 SSSSSRRRRRES in al ru an Creation of IDOC in Shatadru by BD14 0. View Status of IDoc in Shatadru by WEOS. -11. View Status of IDoc in PWCSAP by WEOS.. 2. Vendor Successfully created in PWCSAP .... Author : Subhendu Majumdar Page 2 12/1/2005 Entire Examples on ALE 4.2. Additional customizations to be made for sending material master from PWCSAP to Shatadru .. 54 4.2.1. Create one additional message type in customer distribution model MODELSUB in system Shatadru (200)... 4.2.2. Generate the partner profile in Shatadru 4.2.3. Distribute the customer distribution model MODELSUB from Shatadru 4.2.4, Generate the partner profile from PWCSAP..... 4.2.5. Create Material master in PWCSAP and distribute it using transaction BD10 4.2.6. View Status of the IDoc in PWCSAP (Sender system) 4.3. Customization for Receiving Customer Master into Shatadru from PWCSAP...ccesente 4.3.1. _ Adding one message type with PWCSAP100 as sender and PWCDEV200 as receiver in Shatadru .... 4.3.2. Generate the Partner Profile in Shatadru for the customer model.57 4.3.3. Distributing Customer Distribution Model from Shatadru 58 Generating Partner Profile from PWCSAP 58 Create Customer Master in PWCSAP.. Create IDoc for Customer Master in PWCSAP . 4.3.7. Verify the Customer in the Receiver (Shatadru) system 60 5. Some important topics on IDoc 61 5.1. T-RFC Reporting..... 5.2. Setting up Audit Reporting 5.3. Manually Process |Doc in Receiving System. 5.4. Collect [Doc and Transfer. 5.5. Creating Filter Objects. 5.6. Segment Filtering .... 5.7. Creating Reduced message type 5.8. Change Pointers Technique... 5.9. Reprocessing IDocs not posted due to errors, 5.10. Processing IDocs waiting in the queue 6. Developing and Transmitting New IDoc... 6.1. Prepare data container in both sender and receiver. 6.2. Prepare Segments(WE3})..... 6.3. Prepare IDocs with the segments in both systems (WE30) 6.4. Create new message type in both the systems (WE81)... 6.5. Link new message type with IDoc type in both systems (WE82).. 6.6. Maintain two logical systems, one for sender- another for receiver in both the systems (BD54) 82 6.7. Assign Logical System for Receiver to appropriate client in Receiver system and assign logical system for sender to appropriate client in sender system (SCC4) 82 6.8. Create RFC Destination for Receiver in sender system and for sender in receiver system(SMB9) .... 83 Author : Subhendu Majumdar Page 3 12/1/2005 Entire Examples on ALE 6.9. Create Customer Distribution Model for the Message type in sender systems(BD64) : 6.10. Generate the partner profile in the sender system(BD82) 85 6.11. Distribute the CDM from sender system to the reciver system(BD64) 85 6.12. Create the outbound program in sender system to populate and distribute the Idocs(SE38) 86 6.13. Develop Inbound Function Module in the Receiver System(SE37)...89 6.14. Create new Idoc Object in Business Object Repository(SWO1) in Receiver system 92 6.15. Create a new task based on Application Idoc object(PFTC) in Receiver system.......... 6.16. Allocate Function Module to the Message type(WES7) in Receiver | system 92 6.17. Define settings for Inbound FM in Receiver system(BDS1).. 6.18. Create New Process code for the Inbound process(WE42) in Receiver system. 6.19. Assign Input Methods(BD67) in Receiver System. 6.20. _ Generate Partner Profile in Receiver System(BD82) 7._ Standard SAP Idoc Extensioi 7.1. Steps to be followed 7.2. Assumptions 7.3. Steps in Detail... 7.3.1. Step 1 ~ Build Append Structure ZVENDINFO on database table. LFA1 in both systems 98 7.3.2. Step 2 - Adjust program by screen exit or build custom program to populate fields in the append structure for LFA‘ in the sender system .....100 7.3.3, Step 3 - Create custom segment ZVEND containing the additional fields in step 1 in both systems 102 7.3.4. Step 4 : Create extension CREMSUB of basic Idoc type CREMAS04 with segment ZVEND as child in both sender and receiver...103 7.3.5. Step 5: Maintain the newly created extension linkage with message type and basic Idoc type in Sender system... 106 7.3.6. Step 6: Adjust the Partner Profile for CREMAS of the receiver system in the sender system using WE20... 107 7.3.7. Step 7 : Write code in appropriate user-exit to populate the custom segment in outbound system 7.3.8. Step 8 : Test the Outbound Syste 7.3.9. Step 10: Maintain the Linkage Between Message Type , Basic Idoc type and the New Extension in Receiver System using tcode : WES7.......113 7.3.10. Step 11 : Write Code in Receiver side in user exits to populate database from additional info carried by custom segments... a 7.3.11. Step 12: Test the whole Connection 8. Configurations and Programmings to Maintain Change Documents for new information... 8.1. Steps to be performed . Author : Subhendu Majumdar Page 4 12/1/2005 Entire Examples on ALE 8.1.1, Step 1 - Create Change Document Object using transaction SCDO. 118 81.2. Step 2 — Generate Programs and Includes 120 8.1.3, Step 3 Write a program / modify existing program to call FM to write change documents... 122 9. Configuring and Developing for Change Pointers for a custom message type 128 9.1. Assumptions. 9.2. Things to do... 9.2.1. Activate Change Pointers Globally in Sender System(BD61)......129 9.2.2. _ Enable change pointers for a message type in sender system(BD50)...... 129 9.2.3. Specify Fields for which Change Pointers are to be written (BD52) in Sender System 430 9.2.4. Develop a Function module for Sending Idocs(SE37) 130 9.2.5. Link Message Type to Function Module in Sender System (BD60) 135 9.26. Testing 10. Downloading IDoc into Application server 10.1. Create the file port... 10.2. Change Outbound partner profile. 10.3. Trigger the outbound process 10.4. Check the status of the IDoc from WEO2 .. 10.5. Check the physical text file for the Idoc. 1. Author : Subhendu Majumdar Page 5 12/1/2005 Entire Examples on ALE Preface ‘The purpose of this document is to help the ABAPers get an idea about how to set up all the necessary configurations to send [Doc from one system to another. After studying all the theoretical aspects of ALE/IDoe, a developer often wonders how to start and where to start, This document will provide them a good starting point. Scope of scenarios on EDI systems is outside the scope of this document. Also, sending Idoc by message control mechanism is not described here, Not there is any discussion of sending Idoc using BAPI. All the scenarios discussed over here cover almost 90% of the development/configuration requirements we receive from the client. I plan to modify this document with additional scenarios as I encounter them in future, I will be happy if this document mentors you at the time of your requirement. Contact me at subhendu_mj@hotmail.com in case you have any queries. Author : Subhendu Majumdar Page 6 12/1/2005 Entire Examples on ALE 2. Client to Client ALE Setup 2.1. Introduction ALE technology is used to transfer information from one SAP R/3 to another RV3. Here, information on vendor master is being transferred from SAP system Shatadru, client 555 to SAP system: Shatadru, client 777. All the necessary configurations and settings required are shown below along with adequate screen shots. This documentation assumes that the reader is already acquainted with the tools and terms of ALE:- Logical System REC Destination Customer Distribution Model Port Partner Profile. ‘The purpose of the documentation is to get one beginner a head-start , where he can see how ALE setup is done in SAP R/3 system Author : Subhendu Majumdar Page 7 12/1/2005 Entire Examples on ALE 2.2. Steps The steps to be followed consecutively to accomplish the mission are detailed below with adequate screenshots. 2.2.1. Defining Logical System Th ‘Shatadru 555 Logical systems | SENDSS5, RECEIVE777, Teode ‘BDS4 Purpose “To create Togical systems for the two SAP systems, between which vendor master information will be shared, Procedure: Go to transaction BDS4 . Press the pushbutton as shown below to create new logical systems, eo) I OBE] BH Change View "Logical Systems": Overview New entres Jal A 2 El &) New entries (5) [Loy.syst PiCLNTOOA| le WCLNTAOO Wy Client 100 2 Enter the name and description of the logical systems . Then , press Save. E {Sender system | 555, fe [Recewer system: 777 (e) Please remember, this is an one-time activity. Logical system is built only once for two SAP systems involved. Author : Subhendu Majumdar Page 8 12/1/2005 Entire Examples on ALE 2.2.2. Assign Logical System to Client Th Shatadru 355 Logical systems | FROMS55 assigned to client 555 ‘TOT77__assigned to client 777 Teode SCCH Purpose "To assign the logical systems fo the client, Process Enter into change mode. Display View "Clients": Overview Select a client and choose: Details. Author : Subhendu Majumdar Page 9 12/1/2005 Entire Examples on ALE Change View "Clients verview DS) Newenines (Gl i BD alla Auslieferungsmandantit _ Kundstadt (DEVELOPMENT LEXINGTON “Eariyivatoh alld Change View "Clients": sive" (cm-s) D NewEnties |G bk 2) G/B al Customizing a Enter the name of the logical system which you want to assign. Press : Save, Similarly, enter the name of the logical system for another system( in this case, itis client 1. Change View "Clients sae (ctr) Kolkata Author : Subhendu Majumdar Page 10 12/1/2005 Entire Examples on ALE 2.2.3. Create RFC Destination Tr Shatasa 555 Destination TOIT Teode SMS) in Shatadia, 777 Destination FROMSS5 Teode TsM59 Process Go to transaction : SMS59 in sender system(Shatadru,555). Press the pushbutton : Create from the application toolbar. Dispiay and maintain RFC destinations Change | Delete Find create ¢F)| [aw ro destination Enter the name of the logical destination., same as that of receiver logical system. Select connection type : 3 for R/3 connection, Author : Subhendu Majumdar Page 11 12/1/2005 Entire Examples on ALE 3 Neve Desimation 777) [Secuiyoptone SS Trusted System = @ND OY [Lagen Seren © macy Onc ‘Authorization ST t—“‘“OOOOOO”””COCOCOSC Language en Olient wT User atouser (eurrent user Password ***/**** |g etl blank [_ Unencrypted Paseword (2.0) Go to the tab page : Logon/Security. Enter the logon details. Press Save. RFC Destination Destination client 777 Remote logen | Testconnection | Unicode Test ia enannestion Test the connection by pressing the pushbutton : Test connection from the application toolbar. Author : Subhendu Majumdar Page 12 12/1/2005 Entire Examples on ALE RF C- Connection Test @ | ___Sonnection test Destination client 777 Connection type: | R/3 connection Logon 33 nsec 8 KB 1 nsec 10 KB 2 nsec 28 KB 2 ner 38 KB 3. nsec Similarly, create RFC destination in client 777 for client 555 Author : Subhendu Majumdar Page 13 12/1/2005 Entire Examples on ALE et SSe laa Area RFC Destination FROMB55 sae (cise) | Remoie logon | Testeonnestion | Unicode Tect ‘RFCidestination FROME (3) RiBconnection Description From client 565 Technical settings ” LoconSecurity | Special Options Security Options Trusted Eystam == No 5 Ciogon Seren @ Inactiv O sob, Autnorzation Logon Language en Client 595) User devel operdé (Cicurrent User Password ***°**** jectil blank (lUnenewypted Password (2.0) Save and test. RF C- Connection Test p onnection test FROMBES Connection type: | R/3 connection Logon: 9 nsec 1 KB 2 nsec 10 KB 2 nsec 20 KB 2 nsec 30 KB 3 nsec Author : Subhendu Majumdar Page 14 12/1/2005 Entire Examples on ALE 2.2.4, Prepare Customer Distribution Model In Shatadru , 555) ‘Model name: ‘55STO777 Teode BD64 In the Customer Distribution model, you first define a technical system. Then for that CDM, you add messages those are likely to be shared between systems For each message transferred, you specify the sender and receiver of the message. Process Go to Change mode. Then press the button : Create Model View to create a customer distribution model. Display Distribution Model EH) |S BL FASE Fitermodel cisnlay {C3 Create model view||C) Ado BAPI|/ CD) addr |Deserintian technical name D SBcLiTSS5 <> CLNTTTT auster D 884 customizing Data Synchronization |DONTRLDATA Change Distribution Model 1} Add mesceget salreate new view in cistibuiion model (Chia ‘Dietabirion baw Th Enter the technical name, short text for the new CDM. © Teontinue (Enten ‘STUDMAGLEY Then, select the customer distribution model and press the button : Add message type from the application toolbar. Author : Subhendu Majumdar Page 15 12/1/2005 Entire Examples on ALE 3 i Add message type, sender and the receiver. THTESTSP FROMS0 S EAtocliens777 ‘or7 © fy CREWAS “Vendor master data distibution No filter set | Save. Author : Subhendu Majumdar Page 16 12/1/2005 Entire Examples on ALE 2.2.5. Generate Partner Profile Tr Shatadia 355 Model name 35STO?IT Teode [EDs Partner profile is built for both the systems between which messages are to be transferred. So, for two systems communicating, two partners are to be configured in R/3 . The transaction for setting up partner profile manually is WE20. But, as per the current setup, if you generate partner profile using transaction BD82,, these setups are automatically done by SAP R3. In transaction BD82, you enter the name of the technical system in the selection screen and execute the program. The R/3 system automatically:= 1, Creates partners for the two logical systems. 2. Creates inbound and outbound parameters for different messages in the partner profile for the receiver system. Creates a REC port automatically. Author : Subhendu Majumdar Page 17 12/1/2005 Entire Examples on ALE Process Enter the name of the technical system( that u entered in customer distribution model). Choose to process the [Doc immediately/collect IDoc and transfer by checking the relevant radio buttons in the selection-screen, ‘Then, press Execute. a US User DEVELOFERG? PhD. aredesa DEVELOPEROG 2 Doc resord types from Version $.0 onwards 10 © Transfer Doc immediately C Collect Does and transfor ‘The program does the necessary and furnishes the information, Generating partner profile ENG CED ouccoueTuly ereaoa type SIGH SEARO suressfully eres Author : Subhendu Majumdar Page 18 12/1/2005 Entire Examples on ALE 2.2.6. ‘iew Partner Profile created in the sender system Partner profile is usually created using teode : WE20. This is the place where you have to create two partners - one for the receiver and one for the sender system, In the partner profile of the sender system(in this case,Shatadru 555), the partner profile for the sender system contains only the partner definition. EDCLMTEOS| RMDOLNIDT7 TesT77 TERS neers BESCLNTOSS ZKSCLNTI7T Logs item ZBOLNTOS LeingionLs BstesT ogee! sete‘ p] ua? est TESTS > GaPemernpeus Author : Subhendu Majumdar Page 19 12/1/2005 Entire Examples on ALE In the sender system, the partner profile for the receiver system(Shatadru 777) is maintained as follows: ‘The message to be transferred to the receiver system is maintained as outbound arameter. Parner wr? > (a Paro Protos I D GiPather ype a Bark Bipartner tine a ners rower > GiPamer pe KU customer ost processing asmited agent spr & BiPather ype L Yendor @ Giramerype ts Logialsysiem | Typ us 4 user SACENTHON |B Ghent 00 RE DEVELOPER... PhO. padesp CEVELOPEROS Frowees Fromotorisss | 1 ea a TBNCLNTITY eMSAP- clon 11] LAME SEI RAUBHI RNOCLITS55. Logie System RNOCLNT?TT ROD Chen ?77 TESTI Bhat inl 77 TESTS Teslonical rae EN can Parnfund_essage spe Message v.. MessageFu., [Te Tis THB IBLoGionL CREME. eI Tilom = THAISLOGR srncH a DEEFS SENDER 5 DESCLNTSSS Lovical sated o SCNT Loucal stone) gp Ale ENCLNTO3 LoingtonLs ZLBTEET —Logalsyeiem ‘aunsss Tha asssiogeal TBWNTTT This is 777 loge ePLst——_LesicalSyitent TPL? Lonical Sytem? [eon 8 a esti Testi a THeSTPA Test 6 A © Ba Pater ype UsUser st 0 char = is Then, for that message type, the receiver port, the basic Ido type is mentioned. Also, the packet size of the Idocs( in case they are collected and transferred) are specified too. Author : Subhendu Majumdar Page 20 12/1/2005 Entire Examples on ALE _ Partner profiles: Outbound parameters But, if you generate partner profile using tcode : BD82, these jobs are done by SAP itself. Author : Subhendu Majumdar Page 21 12/1/2005 Entire Examples on ALE Partner profiles: Outbound parameters ‘Oulound Options Receiverport spogoo072[3) TransactionalRFC Destination: 77, Pack. Size 100 © Transfer Doe immed OuiputMode 2 OcoltestiDoss Basic ye SYNCHROW CDurnery [Dae type for synchro Exension view iv) syntax check Author : Subhendu Majumdar Page 22 12/1/2005 Entire Examples on ALE 2.2.7. View port information in sender ‘View the port information from transaction WE21. ‘Anvouauo23 sannonan033 ‘xnoua0031 sannonan033 ‘Anoua0038 sannonan03a ‘angouau03= sannonan033 ‘angouau043 sannonanosa ‘Angouau04s sxnnonan0ss ‘angoua0u047 sxnnonan0s3 ‘angouau089 ‘xonononesa ‘anpo0a0083 sannonnnns4 ‘anno000085 sannonnn0ss ‘an0o000087 ‘annoonnnss ‘an00000060 sannonan062 ‘an00000063 sanonance4 ‘an0000065 sxnnonn008 SUDHA jortts connect [=] Pont ror iemc legacy system | toctna conor | IMyPot Ponorcient7 | foridaccreation| ‘oct doe Testing DOC Thicie £65 20 Thisis he 555 Testor crests Author : Subhendu Majumdar Page 23 12/1/2005 Entire Examples on ALE 2.2.8. Distribute Customer Distribution Model Tn Shatadru Teode BD64 Now, we are ready with customer distribution model, partner profiles, ports in the sender system(Shatadru,555) . But, the customer distribution model is not maintaied in reciver system. We need to maintain CDM in receiver system, too with the same customer distribution model, same message type, sender and receiver. For that, one can distribute the customer distribution model from client 555 . Note, if you do that, the CDM will be replicated in client 777. Picture of CDM(BD64) in client 777 , prior to distribution: Distribution Model © Model views > S58, SOSGSESSSEOS OS BS DEDSOBOS HSH DSRS DENS DEBS DEOSOS OSHS: Note that, our CDM is not there Author : Subhendu Majumdar Descrintion/technical name CONTRLDATA, ZIEMFLOYEE Mi-PUR MM-PUR2 ‘QM-CONTR HRFICOUPLI CLNTI77 INTERNET Logistics: MASTERDATA ZMQDEL. ZMATWAS ‘ZOUSTPB RIDEBMAS STUDMAS ZWvTEST ZTAPAS GETAL TESTI ‘ZTesTaO1 ‘ZSUMITRA, ZEST YTECH ZCREATE ZNEW ‘ZNGTEST TESTING 12/1/2005 Entire Examples on ALE Now, distribute the CDM in client 555 as shown below:~ ao os Ae OB Er ierkay spand cupoo ollae sus Display Distrib Zo ene ‘istbufon Mods Model iews > Bea nea comer ccmesnineF oh ahin-F 2 | [Data Di addinessaneiine ES ‘Business ob Pa - Displavedit details F2 [bien BB a cutor 1__Sancel Fg. Tansson et I BB ovstinunan mares (Select the CDM , then from the menu path, choose :~ Edit->Model View>>Distribute) Reselver of madel view ‘Technical name i t 1) [Losical system t i RECIEVER IDEEPR a RRND Client 000, RNOCLNTOOO I~] | |_IRND client 777 RNDCLNTI77 SENDER lDEcPa | | |_[Shatacru client 655 TESTse6 Shetacru client 77 Testr77 | HIS IS LOGR ZILoG! frig is LocicaL sysTeM Loa | ') Festa rest1 i "rests ZreESTPE |) _[Testleiea stern TESTLS 1 |_his is 555 toaical system (siva) IZSIvass6 | _[This is 777 logieal sysiem (siva) IZsivarT7 | |_ fie eient777 OWT | cl Author : Subhendu Majumdar thoose the destination from the list and press Enter, Page 25 12/1/2005 Entire Examples on ALE Log of Model View Distribution s Targot system TOT7T ovo? viow SSETET7T has beon oraatod ‘The model view now gets created in client 777. Look at the CDM list on client 777 now from transaction BD64. [euten we Deseo ier name (ushess oe SGS5353E2090302U0U2EIE20 26 DE HEDESEBEESEREEDE Sen FO 7 Itis created now. Author : Subhendu Majumdar Page 26 12/1/2005 Entire Examples on ALE 2.2.9. Generate Partner Profile in client 777 In Shatadru 777 ‘Teode BD82 Generating partner profile 2 sso fw | | Us User ALEUSER —Termplate User ALE 2 [Doe record tyoos fom Yorsion 4.0 onwards soo @/tronsrer iboc immesiatayy (© cottert 1Deee and tranerer © Trigger immediately (Origger by background program ‘Generating partner profile p90 SGN STAARON succecaTNTY oroxteN Author : Subhendu Majumdar Page 27 12/1/2005 Entire Examples on ALE Look at the partner profile of FROMSSS and T0777 from transaction WE20 in client De us 2 Ucor From cent 55 ALEVGER Template User BLE NOGLKTESS. Logical Sictur Si cae Torr) Tockent 177 Bpenner ype ususer st 10 ens Author : Subhendu Majumdar Page 28 12/1/2005 Entire Examples on ALE Partner profiles: Quthound parameters a ‘ourtiound Options Receiver port hoceooa010 Pack Size 108 TransattionalRFO From client 666 2 © Transfer Doc inmod. ‘OGaiect Does Culput Modo Basic tne SYNCHROM Dump Doe te fa synenta. Exension Mew Syntax check Author : Subhendu Majumdar Page 29 12/1/2005 Entire Examples on ALE Author : Subhendu Majumdar Page 30 12/1/2005 Entire Examples on ALE 2.2.10. Create and Distribute Material Master All your settings are done, Now, create one material and then use teode: BD14 to distribute the Vendor master by ALE. Then, follow the status of the IDoc from teode WEOS, Go to the receiver system and view the status of the IDoc by WEOS. If successful, view the vendor ereated by XK03. Author : Subhendu Majumdar Page 31 12/1/2005 Entire Examples on ALE 3. System to System ALE Setup ‘You have configured client to client ALE setup previously. Now, let us have a system-to- system ALE setup. The scenario used is tabulated below:- Sender IBMSAP(.182.150.5) Client 111 Receiver Shatadru(9.182.150.33) Client 555 ‘Message MATMAS ( Material master) 3.1. Steps Steps to be followed:- ‘Step no | Process Transaction Code 1 (Create Logical Systems for both sender and Receiver BDS4 2 ‘Assign Logical Systems to Clients SCC4 3 Create RFC Destination for Receiver in the Sender system and | SM59 vice versa) ‘Maintain Customer Distribution Model BD64 5 ‘Generate Partner Profile BDS2 6 Distribute Customer Model to the receiving logical system BD64 7 ‘Generation of Partner Profile in the re BDS2 8 ‘Check consistency of Customer Distribution Model BDCS 9 Create/change Vendor master records XKOUXKO2 10 tributing records to the receiving logical system BDI4 12 ‘Checking for the material in the receiving system MM03 Author : Subhendu Majumdar Page 32 12/1/2005 Entire Examples on ALE 3.1.1. Create Logical Systems for both sender and Receiver Teode | BDS4 Done in| IBMSAP Client 111 and Shatadru Process 1. Login to IBMSAP using client 11T(sender) as: aleuser. Access transaction BDS4. From the Application Toolbar, press the pushbutton: New Entries (F5). Create logical system TOSS, IBMCLNTI1 and save. 2. Login to Shatadru in client $55(receiver) as: developer08. Access transaction BDS4. From the Application Toolbar, press the pushbutton: New Entries (F'5). Create logical system TOSSS, IBMCLNT111 and save, 3. Save and come out 3.1.2. __ Assign Logical Systems to Clients Teode | SCC4 Done in| IBMSAP Client 111 Process 1. Access transaction SCC4, Press the Change (Curl-Fl) pushbutton from the Application Toolbar. It will bring the change mode so that the records can be changed. 2, Select the line for the sender client(1 11) from the table control and press the Details pushbutton (Ctrl+Shift+F2) pushbutton from the Application Toolbar 3. This will bring the Details entry screen for the client. In the field for Logical System, enter the name of the logical system created for the Sender (ALECLNTI11) 4. Save and come out. Do the same for the receiver client also. Teode | SCC4 Done in __| Shatadru Client 555 4. Access transaction SCC4, Press the Change (CtrlFI) pushbutton from the Application Toolbar. It will bring the change mode so that the records can be changed. 5. Select the line for the sender client(555) fiom the table control and press the Details pushbutton (Ctrl+Shift+F2) pushbutton from the Application Toolbar. 6. This will bring the Details entry screen for the client. In the field for Logical System, enter the name of the logical system created for the Sender(TO555). Author : Subhendu Majumdar Page 33 12/1/2005 Entire Examples on ALE 4, Save and come out. Do the same for the receiver client also, 3.1.3. Create RFC Destination CLNTIIL in Shatadru(S85) IBMSAP(111) Teode_| SM59 Done | Create RNDCLNT100 in Shatadru 500 and ALESYS500 in PWCSAP 100 in Process | See the documentation on Client to client communication 3.1.4. Maintain Customer Distribution Model Teode_| BD64 Done | IBMSAP 111 in Process Follow the steps as shown in the documentation : Client to Client communication. Screen Fram 111 to Sratedru 585 T1ITOS5S shot ~ (Alem sener chent111 IBMCLINTI11 Receiver : Shatadru- 655 Tosss fy NaTHAS Waterial master No ter set Author : Subhendu Majumdar Page 34 12/1/2005 Entire Examples on ALE 3.1.5. Generate Partner Profile Teode | BD82 Done | IBMSAP IT in Process | Enter the name of the model in the selection-screen and execute, The report generated will tell you about successful creation of the partner profile( creation of partner,port,outbound, inbound parameters etc) 3.1.6. Distribute Customer Distribution Model Teode_| BD64 Done | IBMSAP 111 in Process | See documentation of : Client to client communication 3.1.7. Generating Partner Profile in the Receiving Logical Systems Teode | BDZ Done in| Shatadru 555 Process |. Enter The name of the customer distribution model and press Execute(F8) button. A report will be published, informing you about the generation of the partner profile in the receiving logical system. 3.1.8. Create /Change Material master records Teode_| MMOI/MMO02 Done | IBMSAP 111 in Process | Create Material (Initial Screen) Select view(s) || Organizational levels | Data TESTHATEOBY Flaw meterials Author : Subhendu Majumdar Page 35 12/1/2005 Entire Examples on ALE © Basic daia 1 Material General ata Base unitof measure Old material number Division Produc\ allocation ! Basic deta 2 TESTHATOROI o a ee Wateril TESTMATOOO1 created Classification | Purchasing ¢ Foreigntrade i fH test material 3 Material croup Edt mat! group Author : Subhendu Majumdar Page 36 12/1/2005 Entire Examples on ALE 3.1.9.___ Distributing Records in the Receiving logical system Teode_| BDIO Done | IBMSAP IIT in Process Send Materiai Server group Numer of materials per proses cmon dt = Author : Subhendu Majumdar Page 37 12/1/2005 Entire Examples on ALE 3.1.10. _ Checking IDoc status in the receiver system Teode | WEOS Done | IBMSAP IIT in aa sw pce nantes 5 SQsinnms eos Be Oe Bn on ers Author : Subhendu Majumdar Page 38 12/1/2005 Entire Examples on ALE 3.1.11, Check Material in Receiver System Tn PwCSAP 555 ] ‘Teode | MM03 | Display Material (Initial Screen) Display Material TESTMATO001 (Raw materials) Author : Subhendu Majumdar Page 39 12/1/2005 Entire Examples on ALE 4. Two way Server to Server Communication with [Doc This documentation assumes that the reader is acquainted with the popular terms for middleware technologies. This also assumes that the reader has gone through the earlier two documentations: Client-to-Client [Doc communication and Server-to-Server [Doc communication. Here, we shall discuss a more realistic approach; both the servers will be sending some message type to other. The details of the servers and the message types and Doc types they exchange are shown below:- CREMAS (Vendor master) [————] { t_ MATMAS. rr _ CREMAS (Material master) (Customer Master) Shatadru PWCSAP 10.31.8.38 40.31.8.180 (Client 200) (Client 100) As details of proceeding through the transactions have been provided in the earlier documentations, we shall mainly mention the steps, transaction code and screen shots for this project. ‘This documentation is mainly divided into three seetions:~ + Customizing for Sending Vendor master from Shatadru to PWCSAP “Additional customizations to be made for sending material master from PWCSAP to Shatadru *% Additional customizations to be made for sending Customer master(DEBMAS) from PWCSAP to Shatadru Author : Subhendu Majumdar Page 40 12/1/2005 Entire Examples on ALE Steps The steps to be followed are outlined below:- 4.1. Customizing for Sending Vendor master from Shatadru to PWCSAP 4.1.1. Create Logical system PWCSAP100 and PWCDEV200 both in Shatadru (200) and PWCSAP (100). Transaction code: BDS4 Create Logical System in Shatadru : Change View "Logical Systems": Overview (ewes (i ‘Sending system : client 500, APOLOSL [APO Client 001 BTIPINTARRIORT Mion 00, Jo New Entries: Overview of A(save_(ctrl-sjjes Similarly, create the two logical systems in PWCSAP Author : Subhendu Majumdar Page 41 12/1/2005 Entire Examples on ALE New Entries: Overview of Added Entries Name cdev2a0 [shatecrusener cle 200 [_Jovesant00 Ct | 4.1.2. Assign Logical System PWCSAP100 to client 100 in PWCSAP and PWCDEV200 to client 200 in Shatadru Transaction Code: SCC4 Assign in Shatadru Display View "Clients": Overview B Toned we shitF2) Custormiaing Assign in PWCSAP Author : Subhendu Majumdar Page 42 12/1/2005 Entire Examples on ALE (Change View "CHents": Détair ie i i) (5) (al Author : Subhendu Majumdar olkate eS Page 43 12/1/2005 Entire Examples on ALE 4.1.3. Create RFC Destination PWCSAP100 in Shatadru and PWCDEV200 in PWCSAP Transaction code: SMS9 In Shatadru In PWCSAP RFC Destination PWCDEV200 Felon | Tete 3 Racometin amet Tae Laslett, es 6 Tagatost 10218100 Spernunber 8 Cameo 3 ieomon Ome fora 0 Hobe © Patess el] | RCTS Tages! 1031838 Stunt Seems Hestone # Fates (a) Tusbissien O15 6 Yo fA] Owe tae Camano seer PHC? cl 1D Language Get 1 User DEVELOPER I loretea ser Geter Teeter? =o fo eee Pes °°" estan nares 0) ‘After creating and saving the RFC destinations, test the connections by pressing the pushbutton Remote Logon from the Application Toolbar. Author : Subhendu Majumdar Page 44 12/1/2005 Entire Examples on ALE 4.1.4, Creating Distribution Model MODELSUB in Shatadru Transaction code: BD64 @ SAB Shoo) A @ 18) Change Distribution Mode! (DR EDF ter model aisptay Distribution Wael S Model views 5a rest QO Between shatadru(200) and pwesap(t oo) (Opel Sue] | (40.04. 2n03| (a1. 12.9899) Create model view ||) add BAP: |) Ad message be Dea [teale new slew in Uitibution moael_ CUFEA) i [3e| Distribution Model Changed 7008) ‘Distbuon Node Destro ethnics nae Soimessagetne (C14 Model ens Beret EST RHR Model HRMODEL, (MODELSUB | (PHCDEV200 | (PWCSAP1O0 | Author : Subhendu Majumdar Page 45 12/1/2005 Entire Examples on ALE 4.15. Creating Partner Profile in Shatadru ‘Transaction Code: BD82 Generating partner profile & NODELSUE Generating partner profile & systen PACED Partner PUCDEN2ON as partner has bean crested syten PRESIPLED Partner PUCAPION as parter has bean crested Systen CUPIEO Por. OHECDRUS th RFC destination PASHPI20 ts ben created syste PACSPIEO Cuteound paraaeters for nessape tne CREHS suuessully created Cutound praneters for nssage type SINGH sucessfully crated Author : Subhendu Majumdar Page 46 12/1/2005 Entire Examples on ALE 4.1.6, Distributing Customer Distribution Model in Shatadru Transaction Code: BD64 . Eile digas cea Display Distrig, ENS" see Expand cubiree Cisgnin-et1 P/G\GFD| cotepse subtee _ctreaninsrt2_ fave [1 AA RAPHY Al massa ‘Model view Add BAP) Create eS Distibuion Nowal Modelviews BB Toot Ade me: oe Create using template Copy jehp> spayed deta Fr e oo Meet | cancel Tansoart 8 Bhi Log of Model View Distribution g istrituton of woe ey MELB Target opeton PASHPIOE Tedel view MELSLE has been crested Author : Subhendu Majumdar Page 47 12/1/2005 Entire Examples on ALE 4.1.7, Generating Partner Profile in PWCSAP Transaction Code: BD82 Generating partner profile ce _ = Default parameters for partner protle Postarocessing: Aulhorized processors Tye US User 1D DEVELOPERE1 develeper01 ‘Outbound parmirs. Version 9 [Dor record types fom Version 4.0 onwards Packetize 103 [Dees Oo Generating partner profile ston renee EJoan PHDEVQD a 6 paren type eroatyovtcte ater AGE cisen PAEHPGD 08 «arte Type slaty evista tes ano Cael paranatera for wessge type SMEN sccenaTiny crated ston ane nono gorsuetro Tor aesog8 type CREMS aoatyox1et Author : Subhendu Majumdar Page 48 12/1/2005 Entire Examples on ALE 4. Creating Vendor in Shatadru ‘Transaction Code : XKO1 4.1.9, Creation of IDOC in Shatadru by BD14 Send vendor ® Sewer aroun Number of vendors per process 20 Author : Subhendu Majumdar Page 49 12/1/2005 Entire Examples on ALE 4.1.10. View Status of [Doc in Shatadru by WE05 ‘Transaction code: WEOS -@ O3Data passed ta po 1 B= {vendor master data sisimauton 4.1.11. View Status of IDoc in PWCSAP by WE05 Sstemuamt 1 ai es Nendormasterdateastituton 4.1.12. Vendor Successfully created in PWCSAP Change Vendor: Address Author : Subhendu Majumdar Page 50 12/1/2005 Entire Examples on ALE 4.2. Additional customizations to be made for sending material master from PWCSAP to Shatadru Once the settings for sending vendor master from Shatadru to PWCSAP is complete, we want to customize the system so that PWCSAP can send material master data to Shatadru. For that, we need to :- + Create one additional message type in customer distribution model MODELSUB “© Generate the partner profile in Shatadru Distribute the customer distribution model MODELSUB from Shatadru * Generate the partner profile from PWCSAP 4.2.1. Create one additional message type in customer distribution model MODELSUB in system Shatadru (200) Transaction: BD64 Distisution model "Desenption/ technical nar “> Model views BS Test ZTeST Db EA ewe shatauru corver 200 PwcDevz00 (MODEL SUB | [PuCSAPTOO | [PUCDEV200 | MATMAS| Author : Subhendu Majumdar Page 51 12/1/2005 Entire Examples on ALE 4.2.2. Generate the partner profile in Shatadru ‘Transaction: BD82 Fill in the selection-screen with the name of the customer distribution model and press Execute Generating partner profile @ Partoer systen Fuvetzen Syste PUEDES a5 partner type areal exist sjeton Fveseien Syston FUEAPIOG ae a partner typo atruay oust art psten Pusuean Port ABCERDREG with EC cestinetion PACHFLORatrenty exists utoura pares. fyaten POGSPON ‘utow pe cutout paran 6 for eeasage tape GENE alresdy eet rs Tr nesane type SICH already anict. nica partes systen FuEScn Tntmund paranters far nesage type MATHS succesfully crested Author : Subhendu Majumdar Page 52 12/1/2005 Entire Examples on ALE 4.2.3. Distribute the customer distribution model MODELSUB from Shatadru Transaction: BD64 c= Dalete iter disalay chera OSs ee Bison os Ha Or Expand sures cuisSmi+F11 DPOB) cotapse supres —_chissninsei2 few [C1 Addsart [D) Add messaue Distibution Medel Madeley HB) Create © Model vows ado BAP Create using terptate 58 Test Ado message pe am e Displayfedit details F2 ‘bute > BRHF model — 83 Cancel F12 | Transport ain iar istribution of aoveT ew NODELSUB Target aysten PuCEAPTOD Mode) view MODELGUD hae been changed Author : Subhendu Majumdar Page 53 12/1/2005 Entire Examples on ALE 4.2.4, Transaction: BD&82 Generating partner profile Generate the partner profile from PWCSAP Default parameters for partner protle Tye iD Postarocessing: Authorized processors US User DEVELOPERO! developer1 ‘Oulbound parts Version Paokatsize Generating partner profiie @ 2 [Dos record types from Version 4.0 onwards 103 [Dave ‘Systun PuEDEV=IG Syoton PUCDEIZA0 a6 a parttor type already oxIste systen PuEsaP100 gsten PUGAPION a6 a portter type elreaay ests Syoten PUEDEWIIG Fort AGSIEOEIT with BFC eeotination PACIEV208 sireade arists ‘ysten PuEDEY200 eters Ton essaye type MUTWAE cusassrutiy creates rareters Tor essage type SINEN slrenty axist Syetun PUREE Truoune paraastors for naceana ty ORENWS stroady ovtet Author : Subhendu Majumdar Page 54 12/1/2005 Entire Examples on ALE 4.2.5. Create Material master in PWCSAP and distribute it using transaction BD10 Then, create a material using MMO1/MMR1 and generate the [Doc using transaction code BD10. For details, you can consult my documentation on : Client to Client Communication by IDoe. 4.2.6. View Status of the IDoc in PWCSAP (Sender system) Author : Subhendu Majumdar Page 55 12/1/2005 Entire Examples on ALE 4.3. Customization for Receiving Customer Master into Shatadru from PWCSAP The steps are similar to that done for receiving material master [Doc from PWCSAP into Shatadru, The steps are: “Adding one message type with PWCSAP100 as sender and PWCDEV200 as receiver + Generating Partner profile in Shatadru Distributing Customer Distribution Model from Shatadru + Generating Partner Profile from PWCSAP Creating a Customer Master “© Generate IDOC in PWCSAP * Verify the status of the [Doc in PWCSAP “Verify the status in Shatadru % Verify the customer in Shatadru Author : Subhendu Majumdar Page 56 12/1/2005 Entire Examples on ALE 43.1. Adding one message type with PWCSAP100 as sender and PWCDEV200 as receiver in Shatadru Transaction: BD64 PUGSAPIO0 | PUCDEV200 4.3.2. Generate the Partner Profile in Shatadru for the customer model Generating partner profile ‘Partaor sisten FUCIEY200 System FUCIEV2GD a5 a partier tyge sTreat erists ‘System PUCSAFIOO ‘System FUCSAPIOD a5 a parteer type sTrean eviets ort fysten PUCEAPIOO Port AOB0080089 vith RFC eastinet'on PACEHPYED sTread) evict ‘utbouns parrers fjsten PUCSAFIO0 Outbound pareneters for nessaye type CHENG stready erist Outbound paranctors for nossayo type SINGH alroaty oxist taoune garatrs. ‘jeten PUCSAFIOO a paranators far Tnscuneparana Author : Subhendu Majumdar Page 57 12/1/2005 Entire Examples on ALE 43.3. Distributing Customer Distribution Model from Shatadru Transaction: BD64 Similar to the processes described earlier for distributing CDM 43.4, Generating Partner Profile from PWCSAP Transaction: BD82 Generating partner profile g Partner Systen PACED Systea PACDEWOD as a partrar type alrzaiy exists Systen PACSILOE Systen PACSIPIOD a5 a partrar type slrzaty svete Part ‘ysten PACDENIE Port: MOEOQEDT with FFL desi nation PACEY2O8 already exists Dutbound parntrs Systen PICIENOE Ciuticus caracters for nossa type DENS sucessTully nested tour GaSe Trees ATELY Set Uuteourd paraneters for recsae type SINOH sTreay exist Inund pars. Syston PICIEVDE Inunt garanetars for tescapa type CRENWS sTreaty exist Author : Subhendu Majumdar Page 58 12/1/2005 Entire Examples on ALE 4.3.5. Create Customer Master in PWCSAP Transaction: XDOL 4.3.6. Create IDoc for Customer Master in PWCSAP Transaction: BD12 Send Customers Press Execute, One Master [Doc and one Communication [Doe will be created in the system. Verify the status of the [Doc in PWCSAP using transaction WEOS Author : Subhendu Majumdar Page 59 12/1/2005 Entire Examples on ALE 43.7. Verify the Customer in the Receiver (Shatadru) system ‘Transaction: XD02/XD03 Pratl Sarr cost = 700837 | 8 Author : Subhendu Majumdar Page 60 12/1/2005 Entire Examples on ALE 5. Some important topics on IDoc 5.1. | T-RFC Reporting Program: RBDMOIND, transaction code: BD75 is scheduled or executed online to determine whether the communication of IDoc from sending to receiving system is successful. If the [Doc is dispatched to the destination system, the status becomes. 12(Dispatch OK) . Else, status remains 03. ‘The selection-screen has two parameters : Toc ereation date (fiom) 1Doc per commit work: Specifies number of IDoc to be checked before a commit is performed. Users are advised to stick with default values. Example : ‘System PwCSAP , client 100 sends customer IDoc( message type DEBMAS) to system : Shatadru, client 200. So, we shall follow the steps defined below:- 1) Create customer master in PwCSAP, 100 using transaction code XDO1. ‘Customer DDUOOOOUDE has been created for company code 0O01 sales 2) Use transaction BD12 to create communication and master IDoc in PwCSAP, 100 Send Customers Author : Subhendu Majumdar Page 61 12/1/2005 Entire Examples on ALE 3) See the status of the [Doc from transaction: WES. §Doc Lists as | {A} |) |=) ts [oa e) Dredtion- Stetus Nu (Selected Docs eg aul5 Si ob dutbox © 03Data passed to port OK 4) Execute the transaction: BD75. Author : Subhendu Majumdar Page 62 12/1/2005 Entire Examples on ALE 5) Execute transaction WEOS to see the status Directior-> Status 'S Gi Selected [Docs FG oubox @ 12 Dispatch OK 5.2. Setting up Audit Reporting After an [Doc is dispatched to a destination system, the sender does not know the state of the process in the destination system. The system however can be configured for cross system reporting, One need to model the ALEAUD message between two systems, For this message type, the sender is the receiver of the previous message and receiver is the sender of previous message. There are two reports which helps in cross-system reporting: RBDSTATE( BDMB) : Is run periodically on destination system. It reports the status of incoming IDoc to sending system, using ALEAUD message and ALEAUDO1 [Doc RBDAUDO1(BDM7) : Executed on sending system. Analyzes the audit log and displays the output as a report. Author : Subhendu Majumdar Page 63 12/1/2005 Entire Examples on ALE Example:- DEBMAS 1 PwCSAP, 100 Shatadru,200 F ALEAUD Consider the customer master information transfer from PwCSAP,100 to Shatadru,200. Now, we will execute program RBDSTATE(tcode: BDM8) in Shatadru,200( receiver of message : DEBMAS) Author : Subhendu Majumdar Page 64 12/1/2005 Entire Examples on ALE Selection-screen 7 BH €@2e SHB HHH AE Send Audit Confinnations Execute the program, Send Audit Confinnations IDocs created, message type MLEAUD, AnaRaanABAZRAADS Shows the [Doc number of the IDoc ALEAUDO1 for message type ALEAUD. Now, let us go to PWCSAP, 100 and execute WEO: FF eltox 1 @ 61¢gpicaion docu = 1 I Confrmafons rntourd Dos Author : Subhendu Majumdar Page 65 12/1/2005 Entire Examples on ALE It shows the arrival of the IDoc. Now, we will execute program RBDAUD0 I (teode: BDM7) in PwCSAP, 100(sender of DEBMAS to Shatadru,200) fminm | 05:35:48 a 0 2 } Double click here. Author : Subhendu Majumdar Page 66 12/1/2005 Entire Examples on ALE It shows a detail of how many IDoc of the specified message type are sent; and what is the current status in the receiver system. ALE Audit: Statistics Report g Yossoye “ype oEOMAG Tulsi nscter data eietrfeution oes fron’ 24.04.2008 4p to tine of ereation 06.35.49 Docs being recessed! in om system atau | tamer | statue toxt | winter ot toaea on avn seater Docs being processed in the receiving syste PUCIEWZOH status | tumor | statue toxt = 2 | error appiteation docunant eat postee 5 1_| ngort eaten sosunaet posts 2 | wuner ot cbacs on rae. syste Author : Subhendu Majumdar Page 67 12/1/2005 Entire Examples on ALE 5.3. Manually Process [Doc in Receiving System In this context, for example, PwCSAP, 100 sends Idocs for customer master to Shatadru,100. If no error occurs, the [Doc is automatically posted in Shatadru. Actually, automatic or manual processing depends on the partner profile in Shatadru for that message type when the sender is PwCSAP,100 This can be viewed by transaction WE20. rarer prunes a GPacnerypee Bank Parertype BP Bene‘ts provider Panetta calcavaret Post processing getrnited agent fe Grarneryp2ti vendor ‘ramerypers Lopiealeystem | yo us 4 user ALESYS500 —Sendngeysem(] agent DEVELOPER. developer01 APaLocL APO Clinta01 z tole BMcUNTID RMD CHertaon | 13" ae PPICDEWzA0 Pi Shatadu sr Pure BAP Sarver4 PARCENTR Power cent Sen RNDCLNTOGO RND Client 00a RNDCLNTION RMD Chont 100 RNDCLTZO0 RMD Clont200 RNDCLNTSOO RMD Chet 00 RNDCLNTADO RMD Chet a END a RNDCLNTSOO RND Client 9 since o RNOTESTANO Test 409 Logical 8 CTSvBCREWAS al -| SUBEVE200 _Recening systern i=] Gi Parnertyne US User Gist 10 char Ce fy) dP i DeBwas o LEAUD o ZZWAT¥WAS-SUB Bs) i] fer rl Look at the partner profile maintained for PWCSAP100 in Shatadru. You see DEBMAS as the message type in the table control for Inbound parameters. Double click on that line. Author : Subhendu Majumdar Page 68 12/1/2005 Entire Examples on ALE 1©G@/FhR Aaaaih Partner profiles: Inbound parameters 2 PussaPia6 Inbound options Teleshory Processcode DED [oeows customermaster as aren Proossing by function module, (© Thigger by background program @ Trigger immadictely ‘You are navigated to the next screen, Notice that the radiobutton for triggering the inbound process automatically is checked, Now, uncheck it and check the radiobutton: Trigger by background program. Now, in PwCSAP, 100, create/change a customer and create the master IDoc by BD12. Now, login to Shatadru,200 and see the status of the [Doc by WE0S IDoe Lists a2 hurbet —| Status 64 Epona (© 02 bts passes oa & Seino * Custarer ator dal istration Ere 1 61 ErorAapiestone Now, note down the IDoc number with status=64(IDoc ready to be transferred to application). Author : Subhendu Majumdar Page 69 12/1/2005 Entire Examples on ALE Now, go to transaction : BD87 in Shatadru,200 and select the [Doc in the selection-sereen and execute the program, Select the node for the status 64 and click Process Pushbutton from application toolbar. The [Doc will be manually processed. Then go to transaction WEOS. You will see the status of the [Doc to be 53(Application Document posted). Author : Subhendu Majumdar Page 70 12/1/2005 Entire Examples on ALE 5.4. Collect [Doc and Transfer While generating the partner profile by transaction BD82, one can set the mode: * Send [Doc immediately * Collect [Doc and transfer Let us take the case of sending IDoc for message type DEBMAS(Customer master) from PwCSAP100 to Shatadru,200. Login into PwCDEV, 100 and go to transaction WE20. Select the line for DEBMAS in the table control for outbound parameters and double click on it. Then, in the Details screen, check the radiobutton: Collect IDoc and transfer for the message type and Save. ‘Then create/change customer master and create the [Doc by tcode : BD12 in PwCSAP, 100. ‘Then, go to transaction WE0S and see the status of the [Doc created. @ ; IHICS6SIOHR BBA! on IDoe Lists aa [ci] [ead] w= Bi2| =| cee [ea =[e= 5) Us| [| [A An| ‘Combined list etd De Se butbo 2 20i0aemaH rts Heseagedession i 1 [Eustener mast de aan So, now, the IDoc is ready for dispatch, but yet not dispatched. Now, to dispatch the IDoc, access transaction WE 14(program : RSEOUTOO) in PwCSAP, 100. Fill in the selection-screen and execute.tt will show you appropriate message signifying that [Doc is dispatched Then, go to tcode: WE0S(PwCSAP, 100) and execute. 18/606/083) 5005) 8R) ‘Status Monitor for ALE Messages G) FE ls F catectia0es ||| vapors} Trove Dac ||@ Frocese| Process selected nade Doce [Doo sta ‘SP love satection B iDoe Nutrber is equal to 202012 [2 Changed on isin tre range 25.04 2003 to 25.04 2003 2 A PwoaaP serer cent 100 1 [BB bers in cubound processing 1 > 30 1 Tt will show you that the [Doc is passed to port. Author : Subhendu Majumdar Page 71 12/1/2005 Entire Examples on ALE Note: ‘When the settings is done as : Send IDoc immediately, program RSEOUTO0 is executed at once. Else, it has to be manually executed 5.5. Creating Filter Objects Often you would prefer selective transfer of information in the form of [Doc from one system to another, Based on some specific values, you would prefer some specific recipient for the information. For example, system PwCSAP, 100 creates customer master and sends it to system PWCDEV,200-Shatadru, We want that only data pertaining to company code = 0001 will come from PwCSAP,100 to Shatadru only. So, for that, we have to set a filter object for the message type DEBMAS in PwCDEV,200( because this was originally the system where CDM was created) using the object for country. Go to tcode BD64 and dig down from the customer distribution model to ultimately select the line for message type DEBMAS exchanged between PwCSAP, 100 and PwCDEV, 200, Sisbibution Model Desciipiony/technicalname todalviews 3G Test rest Gg Between shatscn(200) and pwesag(100) MODELSUB > [J PAC Shetadnu sewer 200 PRCDEV202 @ i Pwe sa server 100 PRCSAPIOD STE PWC Shatacru server 200 PRCDEV202 > fyaleaun, ALE Confirmations for inbound |Docs 9 SE DEBS esto master dais eisitbation No ter sei b ty miarima-sua recuicad massage ype by Sushend D BRHR_Model HR_MODEL Double click on it. A screen will appear:- Author : Subhendu Majumdar Page 72 12/1/2005 Entire Examples on ALE “atributes 0) aa) (A TTY Breate fitter anu | FR EI Select the node : Data Filtering and press Create Filter Group pushbutton from the bottom of the dialog window. Then expend the node : Data filtering when U will view the followin; [DEBWAS Rirbutes [Desere y G Dats filtering | (Filter coun | Hslebaicae Name of Dcreditcontral area Credit con oivsion Division Dsales orcanzaton Sales org) DDistritution channel Distibutio Transportation zone Transport [Dependent on class membership [Dependent on cla... Recuires Author : Subhendu Majumdar Page 73 12/1/2005 Entire Examples on ALE ‘This shows that you can create filter object on one/more of the above fields. Double click on the global company code node. insert tinel Press Insert Line pushbutton from bottom. Write 0001 in the value column and press Enter. Then Save the entry by pressing Save pushbutton from Application toolbar. Now, it will show Distrion Mace Wu that Data filter is active. Dac tit vince Fare [Bisiose abe © Mdsvews BB en "y pemeen snetadnuc200) era pesen(to0> GFW snatacry sore 200 © hPa sah Serer 00 POV Ghatese server 200 > tyacn ‘Dats moraine > in ZveTMAS-3UB NODELSUB PHcbev200 PrCSaPtOD cbeva00 reduced message Woe by Subhendu Then, distribute the customer distribution model so that it affects system PwCSAP,100. ‘You will see the change affecting the view by teode: BD64 in system : PWCSAP, 100. Now, logon to PwCSAP, 100 and create a customer with company code having global im code other than 0001, Customer 0000000014 has been created for company code ARO1 sales area 0001 01 01 Author : Subhendu Majumdar Page 74 12/1/2005 Entire Examples on ALE ‘Then, try to create the [Doc by BD12. IT will create Master [Doc but no communication IDoc. Send Customers DEBHaS So, Idocs with global company code = 0001 will be sent as IDoc to PwCDEV,200 only. Author : Subhendu Majumdar Page 75 12/1/2005 Entire Examples on ALE 5.6. Segment Filtering An IDoc consists of more than one segments and each segment consists of one/more than one fields, It may be possible that while sending an IDoe from one system to some specific system, you do not want to send the information on one segment to that system. For example, you create material master in one SAP system and send that material master to another system. Material master valuation data ( Valuation class, Valuation category tc) is maintained in the receiver system. So, there is no need to send the segment containing material master valuation data from the sender system, So, you need to specify that while sending information on material master message (MATMAS) from system x to system y, you do not need the material master valuation data segment(EIMBEWM) information. For that, you need to access transaction BDS6, specify the message type at the initial sereen and maintain a table field entry, where you specify the :- Partner type of sender Sender Partner type of receiver Receiver ‘Segment type NATHAS Segment Fiters fTyp|Sences (Func. [Tyn[Recelver (Role |Seamentiyne iLs FFNDLNT200, «(LS ANDSLITA99, —_~ETMARNMN Author : Subhendu Majumdar Page 76 12/1/2005 Entire Examples on ALE 5.7. Creating Reduced message type IDoc are instances of message types. It may be possible that you do not all the information of a message type to send to some specific receiver system, You want to omit one/more than one fields which are irrelevant to receiver system/ maintained by receiver system independently. In such a case, you create a reduced message type. For example, let us assume that Shatadru,200_ sends vendor master information to PweSAP,100. But, you do not want to send the vendor's house address to receiver system. So, you create a custom message type(ZSYBCREMAS) copying vendor master message type(CREMAS) where you do not activate the field for vendor's address field. In brief, the steps will be as follows:~ 1. Create reduced message type in sender system by teode BDS3 2. In the customer distribution model(BD64) between the two systems, add the message type : ZSYBCREMAS. Generate the partner profile in Shatadru,200 by tcode : BD82 In Shatadru, from WE20, check the partner profile to see whether the appropriate reduced message type is specified. From Shatadru, distribute the CDM(BD64) Generate the Partner profile in PwCSAP,100 by BD82 In Shatadru, create vendor and distribute by BD14. Observer IDoc status in PwCSAP, 100 by WEOS Check vendor in PwCSAP,100 and see whether the desired unwanted information is successful or not Es 5.8. Change Pointers Technique Change pointers technology helps to create [Doc when any field for which change pointer is set is changed. 1. Make the change pointer globally active by tcode : BD61 2. Activate change pointer for the message type(say, MATMAS) by BDSO 3. Add fields for which change pointers are written , using transaction BDS2( say, for MM master, object : MATERIAL, table : MARA, field : BRGEW) Change the material by MMO02 Check entry in BDCP table Execute BD21 that will create [Doc from change pointers Check the IDoc by WE0S and verify its existence in the receiver system. sane Author : Subhendu Majumdar Page 77 12/1/2005 Entire Examples on ALE 5.9. Reprocessing IDocs not posted due to errors TDocs may not leave the source system successfully or they may not be posted into database in the receiver system due to errors, Such [Does can be seen from transaction WEOS where the erroneous [Docs are shown in Red signal. The reason for unsuecessful posting or unsuccessful transmission to the destination system can be found from the error message. In this case, the developer has to remove the reason for error. Then, he has to manually process those [Docs again. # In source system, use transaction BD73 for reprocessing of Outbound [Docs (IDocs leaving the source system) after removing the reason for failure (of the IDOC posting initially), ‘© In destination system, for inbound posting, use transaction BD84 for reprocessing of Inbound [Docs after removing the reason for failure, 5.10. Processing IDocs waiting in the queue Sometimes, when a huge number of [Docs are sent from one system to another, they remain in queue as not enough work processes are available. To process them, one can use transaction BD20. Author : Subhendu Majumdar Page 78 12/1/2005 Entire Examples on ALE 6. Developing and Transmitting New IDoc Shatadru, client 777 will convey to client 555 information on educational qualification. So, for this scenario, sender is : Shatadru 777 and receiver is Shatadru 55S.The steps are outlined below:~ 6.1. Prepare data container in both sender and receiver Following tables should exist in both the sender and receiver:= Table : ZEMP_MAST Field Data element ‘Mandt ‘Mandt Empid Zempid Empname | zempname Table : ZEMP_QUAL Field Data element ‘mandt ‘mandt ‘empid zempid pyear zyear qual zqual 6.2. Prepare Segments(WE31) Segment Z1EHDR ( with fields empid and empname ) should be there in both the systems as follows:- Author : Subhendu Majumdar Page 79 12/1/2005 Entire Examples on ALE Segment ype stnbutes Z1EHOR Louslified segment Short Description Employee header informstion Z2EHDROOE “DEVELOPERS | Po... [Field Name Data element (80... [Bx + EnPro ZENPID o fe 2 ENPUAHE ZENPHANE Li fs —_ pf Similarly, construct another segment :- Z1QUAL in both the systems as follows:~ Eee Segment hae ZrguaL quate segment Short Description Qualifeaton z2quaL.a0e a ‘DEVELOPEROD | FieldName Data element 4 PYEAR YEAR of cual. ZOUAL Oo fs Author : Subhendu Majumdar Page 80 12/1/2005 Entire Examples on ALE 6.3. Prepare IDocs with the segments in both systems (WE30) Change basie type: ZEMPIDOC ZORXHRS —— Employee into o @EE Eee eel 21 0UaL Qualification 6.4. Create new message type in both the systems (WE81) New Entries: Overview of Added Entries Ve Short txt Message to canty employee qualification Message te 6. Link new message type with IDoc type in both systems (WE82) New Entries: Overview of Added Entries Ve Message ye [Basiotype [Extznsion Release ‘ZENPNESSASE pum ec El & cl Author : Subhendu Majumdar Page 81 12/1/2005 Entire Examples on ALE 6.6. Maintain two logical systems, one for sender- another for receiver in both the systems (BD54) (Sender client 777 _ Receiver client 565 ay 6.7. Assign Logical System for Receiver to appropriate client in Receiver system and assign logical system for sender to appropriate client in sender system (SCC4) Author : Subhendu Majumdar Page 82 12/1/2005 Entire Examples on ALE 6.8. | Create RFC Destination for Receiver in sender system and for sender in receiver system(SM59) 13) RB connestin Cannection to client 777 Technical sottings ' Logon/Socuriy | Spocial Optons Secutity Options 7” Trusted System = @No 8 OY (1Lagon screen @ Inactiv Oacw. Authorzaton Language en Client 7 User aleuser (Current User Paseword ***I***** is ctillblank (Lo Uneneryoted Password (2.0) Author : Subhendu Majumdar Page 83 12/1/2005 Entire Examples on ALE 3 _Riconnestin ‘Cannection to client 555 Technical settings " Logan/Securty | Special Options Security Options 7 Trusted System No at (Logon gereen @ Inactiv Oacty ‘Authorzaton Logon ~ Language en Client 555 User devel opera Cleunentuser Password *7**5*** is stllblank (C1Unencnpted Password (2.0) 6.9. Create Customer Distribution Model for the Message type in sender systems(BD64) 2 ender cient 777 jeri? Receiver cient 955 “Rss thy ZewPmessace | Mescage tv cany employee quatitation Author : Subhendu Majumdar Page 84 12/1/2005 Entire Examples on ALE 6. 0. Generate the partner profile in the sender system(BD82) Execute the program using the name of the technical system in the CDM. Partners for both senders and receivers,ports and partner profiles are automatically created and is informed to the user by a list output:- [Fetocel tr geersting prime prone Syren BS oct ORGAO with WE certinstion BES har ean erated thai parabetars for tessege Ln ZENMESENOE ZERPDGE eueoaePuNTy eeated 6.11. Distribute the CDM from sender system to the reciver system(BD64) From BD64, select the model and follow the menupath :- Edit->Model View->Distribute. Select the reciver system and press enter. Now, this CDM will also be created in the receiver system too. Author : Subhendu Majumdar Page 85 12/1/2005 Entire Examples on ALE 6.12. Create the outbound program in sender system to populate and distribute the Idocs(SE38) the *8& Repo YSUBCLASS_DISTRIBUTE . REPORT ZEMP_OUTBOUND tables : zemp_mast, zemp_gual ata :x_contrl like edide x rlchde like ZIEHDR , xCrlqual lke Z1QUAL dota iL zlqual like z1qual occurs 0 with header Hine ‘t_odidd like edidd occurs 0 with header line ‘t_poatrol like edide occurs 0 with header line selection-sereen begin of block BOOOI with frame. parameters: p_empid like zemp_mast-empid OBLIGATORY. pest Uke tbdls-logsys selection-screen end of block BOO ‘START-OF-SELECTION PERFORM SUB_FETCH_MASTER_RECORDS, PERFORM SUB_FETCH_EMPLOYEE_ INFO. END-OF-SELECTION, PERFORM SUB_POPULATE CONTROL. RECORD. PERFORM SUB_POPULATE-HEADER_[NTO. PERFORM SUB_POPULATE: STUDENT. INFO. PERFORM SUBLCALL, FM. “Spr text sep? text form SUB_FETCH_MASTER_RECORI SI LECT SINGLE * FROM ZEMP_MAST WHERE EMPID = P_EMPID. IF sy-subre ne 0. ‘message 1398(00) with No employee record found! leave list-processing. Author : Subhendu Majumdar Page 86 12/1/2005 Entire Examples on ALE ENDIF ‘ORDS, endfor. ve. — *& Form SUB_FETCH_STUDENT_INFO 'ETCH_MASTER_REt {form SUB_FETCH_EMPLOYEE_INFO SELECT pyear qual FROM Zemp_qual into table it z1qual WHERE EMPID = p_empid IF sy-subrene 0. ‘message 1398(00) with No qualification record for the employe! p. leave lise-processing. ENDIF. endform, SUB_FETCH_EMPLOYEE_INFO empid ound! {form SUB_POPULATE_CONTROL, RECORD X_CONTROL-MESTYP = ZEMPMESSAGE. XCCONTROL-DOCTYP = ZEMPIDOC’ XCCONTROLRCVPRT= LS XICONTROL-RCVPRN = P_DEST endfor, " SUB_POPULATE_CONTROL, RECORD ee - *& Form SUB_POPULATE_HEADER_INFO te ph tet X_ZIEHDR-EMPID = ZEMP_MAST-EMPID. XCZIEHDR-EMPNAME ~ ZEMP_MAST-EMPNAME. IT_EDIDD-SEGNAM = ZIEHDR’ ITEDIDD-SDATA = X_ZIEHDR. AFPEND IT_EDIDD. CLEAR IT_EDIDD, endform, " SUB_POPULATE_HEADER_INFO ee * *& Form SUB_POPULATE_STUDENT_INFO Author : Subhendu Majumdar Page 87 12/1/2005 Entire Examples on ALE = pl text sep text {form SUB_POPULATE_STUDENT_INFO LOOP AT it zIqual x rlqual-pyear ~it_z1qual-pyear. sCelqual-qual~it1qual-gual | edidd-segnam = Z1QUAL! ‘tcedidd-sdata = X_ZIQUAL, APPEND IT_EDIDD, CLEAR IT_EDIDD, ENDLOOP: endform. SUB_POPULATE_STUDENT_INFO Spl tet te ph tet orm SUB_CALL_FM CALL FUNCTION MASTE EXPORTING ‘master idoc_control + OBL TYPE . + cHNUM ; tables communication idoe_control _=it contol rmaster_idoc_data ~it eid EXCEPTIONS ERROR _IN IDOC_CONTROL Al ERROR_WRITING_IDOC_STATUS ERRORIN IDOC_DATA™ SENDING_LOGICAL, SYSTEM_UNKNOWN OTHERS =5 ._IDOC_DISTRIBUTE! x control IP sy-subre <0, ‘message 1398(00) with Problem in ALE service Layee leave list- processing. ELSE loop at it_control write/S TDoe generated :*,i_contrul-docaum enoop omumit work. ENDEE endfor * SUB_CALL_FM. Author : Subhendu Majumdar Page 88 12/1/2005 Entire Examples on ALE 6.13. Develop Inbound Function Module in the Receiver System(SE37) FUNCTION 7, [DOC ‘Local interface "IMPORTING. " ” VALUE(INPUT_ METHOD) LIKE BDWFAP_PAR-INPUTMETHD #"VALUE(MASS PROCESSING) LIKE BDWFAP_PAR-MASS_PROC EXPORTING VALUE(WORKFLOW RESULT) LIKE BDWF_PARAM-RESULT VALUE(APPLICATION_VARIABLE) LIKE BDWF_PARAM-APPL_VAR VALUE(IN_UPDATE_TASK) LIKE BDWEAP_PAICUPDATETASK VALUE(CALL_TRANSACTION_DONE) LIKI” BDWFAP_PAR-CALLTRANS ‘TABLES IDOC_CONTRL STRUCTURE EDIDC IDOC_DATA STRUCTURE EDIDD IDOC_STATUS STRUCTURE BDIDOCSTAT RETURN_VARIABLES STRUCTURE BDWERETVAR SERIALIZATION, INFO STRUCTURE BDI_SER EXCEPTIONS ~ - ‘WRONG_FUNCTION ALLED * Work area for class data data :x_zlehde like ztchde. x Aqua like z1qual [uccess pe i ota :iLempm Tike zemp_must_oecurs O with header line it_ gual like zemp_qual occurs 0 with header line *—Bnd of data declaration ——+ break-point Toop at idoe_contt clear success. if idoc_contrl-mestyp ne ZEMPMES ‘ise wrong_function_called exit endif clear: x_zlehdr, x igual, itlempm it qual refresh :it_empm, it qual loop at idoe_data where donumn eq idoc_contl-docnum. «case idoe_data-segnam ‘when 2 x zlehdr = idoc_data-sdata, Author : Subhendu Majumdar Page 89 12/1/2005 Entire Examples on ALE it empmeempi ‘tkempm-empname append it_empm, clear it_empm, x zlchér-empid x 7lehde-empname shen ‘qual’ x zlgual = idoe_datasdata it_qual-empid —_zlehdr-empid itlqual-pyear = x_zlqual-pyear itCqual-gual = x ZLqual-qual append it_qual clear t_qual endease endloop. sort itempm by empid. sot it_qual by empid pyeat, delete adjacent duplicates from it_empm comparing empid ‘delete adjacent duplicates from itqual comparing empid pyear, Foop atit_empm, SELECT SINGLE * FROM ZEMP_MAST WHERE EMPID ~it_empm-empi. IF sysubre ne 0. ingert into zemp_mast values |Luccess =[_suseess + aif i_eempm, oop at it_qual where empid = it_empm-empid select single * from 2emp_qual ‘where empid = it_qual-empid and pyear= it qual-pyea. ifsy-subre ne 0, inser: into zemp_qual values it_qual. success =I suceess + update zemp_qual from it_gul. success = success + endif endloop. endioop. i _success gt. relum_variables-wf param ~ Processed IDOC®. return_variables-doe, number ~ IDOC_CONTRL-DOCNUM. return_variables-wf param = Appl_OBjects: concatenate x_zichde-empid x_zlchér-empname int retur_variables-doe_mamber. append retum_variables Author : Subhendu Majumdar Page 90 12/1/2005 Entire Examples on ALE idoc_status-docrum ~ idoe_contl-docmm, idoc_status-stalus ~'59. idoc_status-megty = idoc_status-msgid = U0. idoc_status-msjgno ~'398! coneatenate x_7lchde-empid ™ x glehde-empname idoe_staus-mspv. append idoe_status ose ‘workflow_result= 99999" retura_variables-wf_ param ~ "Ertor [DOCS return_variables-doe_nummber ~ IDC_CONTRL-DOCNUM. ret 1vatiables-wf param = "Appl_OBjcts! append retur_variables idoe_status-docnum idoc_status-status ~ 1 idoe_status-msat idoe_ satus idoe_status-msgno coneatenate x_7lchde-empid idoe_contl-docmm, cendfunction Author : Subhendu Majumdar Page 91 12/1/2005 Entire Examples on ALE 6.14. Create new Idoc Object in Business Object Repository(SWO1) in Receiver system Idoc object zemp001 was developed. For details, see the book by A.Nagpal, page no. 660 6.15. Create a new task based on Application Idoc object(PFTC) in Receiver system Done., the task is also for zemp001 6.16. Allocate Function Module to the Message type(WES7) in Receiver system Lh _ l= ______aaBnanaSSSSS Prosessing by Modula 21 doc_input_enp Tye F Doo tee 7 Basic tyne zenpi doe Extension Message 7 Message tyre Zenpmessage Message code Msq function Object 7 Objecttyne P[a) 6.17. Define settings for Inbound FM in Receiver system(BD51) Author : Subhendu Majumdar Page 92 12/1/2005 Entire Examples on ALE New Entries: Overview of Added Entries 6.18. Create New Process code for the Inbound process(WE42) in Receiver system Dialog Stucture © ELinbound orocess code Logical message © Processing wih ALE senice © Provessina wie ALE sence (© Provessing by task @ Provessing by funeion module © Provessing by process Taoesncire © LBtrwouns proves cose Gaines message Meses96 198 TTEWMTESSHEE = _Maseage to aryomplooe a sanses B yaceaze cis Glenda 1 wessge ston Si nctone Author : Subhendu Majumdar Page 93 12/1/2005 Entire Examples on ALE 6.19. Assign Input Methods(BD67) in Receiver System Change View "Function modules for inbound ALE-EDI": Detaiis: D Nowees Function macuile ZIDOC_INPUT_EWP B Nadmum number of repeats End event Doe 7 bjecttype ZENPaa! Stertevent INPUTERROROCCURFED Eng event INPUTF (NISHED Object pe Stertevent Author : Subhendu Majumdar Page 94 12/1/2005 Entire Examples on ALE 6.20. Generate Partner Profile in Receiver System(BD82) Generating partner profile & Generating partner profife S Now, create an outbound record from the sender system using program ZEMP_OUTBOUND. An Idoe will be created and transferred to sender system , which will finally get assimilated into the database tables. Author : Subhendu Majumdar Page 95 12/1/2005 Entire Examples on ALE 7. Standard SAP Idoc Extension Introduction Information on vendor is conveyed from one system to another using message type CREMAS . But, it does not contain the following information on vendors:- 1. Reference of the vendor. 2. Rating of the vendor 3. Mobile number of the vendor. This information is preserved in the sender system and is distributed to the receiver system(s) by extending the standard SAP Idoe. Shatadru, client 777 ( user: aleuser ) is the sender system and client 555 ( developer08 the receiver system over here. 7A. Steps to be followed The steps to be followed to complete configuration and development in both the systems are outlined below in form ofa table, SH] Deseription ‘(Configuration —] Teode Ta No (Dyevelopment (Sender or AR )eceiver T | Create an append structure D SEN Both S and R ZVENDINFO to table LFAI containing the following ficlds:~ Perref ( DE : ZREF) Ratings (DE : ZRATING) MOBILE(DE: ZMOBILE) Z| Adjust program by sereen exit or | D SESE 3 build custom program to populate fields in the append structure for LEAL 3] Create custom segment ZVEND_| © WEST TandR with the additional fields in step 1 | Create extension CREMSUB of | C WESO TandR basic Idoc type CREMASO4 swith segment ZVEND as child Author : Subhendu Majumdar Page 96 12/1/2005 Entire Examples on ALE Sal] Description (Contiguration’ | Teode te No (Dyevelopment (Syender o (Receiver 3. _ | Maintain the newly created c ‘WER? S extension linkage with message type and basic Idoc type % | Maintain the newly created c WE20 3 extension in the partner profile for the receiving system T._| In user exits, write code to D CMODSMODSE |S populate the additional segment 38 attached with basic [doc type 3_[ Test the outbound system BDI, WEOS 3 9 | Maintain the linkage between | © WEST R message type, basic Idoc type, ew extension TO | Find out suitable user-extto _[D SERS ® update LAL from the additional info in the custom segment Ti | Test the whole connection BDI4, WEOS, RandS SELL 7.2. Assumptions ‘This documents assumes that the following basicconfigurations exists on sender and receiver systems to communicate vendor information: % Logical systems for sender and receiver on both systems. + Remote connection for sender in receiver and vice versa. + Customer distribution model and partner profile in both systems. 7.3. Steps in Detail Author : Subhendu Majumdar Page 97 Assignment of logical systems to respective clients in respective systems, 12/1/2005 Entire Examples on ALE The steps outlined above will be documented in this section . Adequate sereen-shots will be provided to explain the scenario. TBA. Step 1— Build Append Structure ZVENDINFO on database table LFA1 in both systems Dictionary: Display Table Click the pushbutton as shown above to ereate append structure on LFAL in display mode of tha table in SEL1. | ct ive ZSUSHENDU Active Wl Newappers ruse FO] a Press : New (Continue (ErtenE P= Enter the name of the new append structure, Press : Enter. Author : Subhendu Majumdar Page 98 12/1/2005 Entire Examples on ALE Dictionary: Maintain Append Structure fells | (723 | | ce) | SB) | | Hietarcry Display | Ancora Suche | -Ackltonalnfrmaton an vendor aukutes ” components | Enyhepxnesk [SCS |S IEBIA| | suitinyp= | show appenting of | a5 (Component |Rt.|Comsonertte _[OTyp___ Longin Dec. [Shon Dseariston | feenaee Cl peer cH 50. GRetereree vendor feat 1 beats june 2 _BPstng ofthe vendor foe ) HOBIE cH 15 Ghote na I io Create the components of the append structure. Create data elements and domains, if necessary. Then, save, activate and come out. Dictionary: Display Table ei) Pals Areas Indeses | Aapend Suche Vendor ast (Deners Section) Dolveryandwaintsnance Feiss | Entyhlehee | Curoreyuantty Folds (HEIRS (PWIA, GL sere] (sates) ia Rejofoae serena Op [gions Foot eacio (ns so Le Fost post ji | Be} sora no Reon as (Prat (Spier rat | of ohonera since ronaneromaion nga Eeaen op pea i Faris ae kane ut | 3} anti |aPrat (vente sre | 2] shart toaton orn Eas Coe pare | ea ae apr bear an [ a} aire poate Pele reg | —15| Spore ‘The append structure is now successfully added to database table LFA Author : Subhendu Majumdar Page 99 12/1/2005 Entire Examples on ALE 7.3.2. Step 2 - Adjust program by screen exit or build custom program to populate fields in the append structure for LFA1 in the sender system as *& Repo. YVENDOR_MODIFY . ** . te on +8 18 REPORT YVENDOR_MODIFY TABLES : Ifa solection-sereen begin of black bOOOL with fame parameters * Parameter for vendor number lif ike Ifa -lifar obligatory , * Parameter to enter reference name elfal-perret, sgof vendor rate like If ratings * Parameter to enter mobile no ‘mobile ike Ifa -mobile selection-tereen skip 2 * Ifthe checkbox far update is checked, then only database able * LFAL will be updated with the user entered info in the selection-sreen, + Else, pony information on reference rating and mobile number ofthe vendor will be * shown as a report. parameters: p_update as checkbox selection-screen end of block bOOOL starcof selection select single * frm If ‘where lif p_line sysubre eg 0 update = 'X' * Ifthe vendor chosen by the user inthe selection-screen exists in the * database andi the user has checked the checkbox to update the vendor with newly * added information in the selection-seroen , then update the database update If set perref™ p_peref ratings = pate smobile = p_mobile where Lif= p life if sy-subre eq 0. message 398(00) with Updation successful commit work ELSE MESSAGE 1398(00) WITH Updation not successful endif clse ‘message i398(00) with ‘See report oaly. endif endif Author : Subhendu Majumdar Page 100 12/1/2005 Entire Examples on ALE ‘end-ofseection * Fetch the updated information from the database forthe vendor after updation and display select single * from Ifat where lfar = if sy-subre eq 0. ‘writes ‘Customer’, 15 fal tifar, 15 Ial-pareat #5 Rating’ "15 al-rating /S Mobile’ | 15 fal-mobile ithe, = Hr. Subhendu Majunder 90301-09677 Author : Subhendu Majumdar Page 101 12/1/2005 Entire Examples on ALE 7.3.3. Step 3 - Create custom segment ZVEND containing the additional fields in step 1 in both systems Development segments: initial screen A aaa ‘Dernnions In transaction WE31, enter the name of the new segment and press : Create from application toolbar. €@2@ 292 Saas) Sh) reate segment definition 2 Development segments. Segmenttype 2VEND (Couaitted segment short Docsrision {tonal information on vendor Seg defniton Lastehangedby ERREF ‘REF O fo + 2 RATINGS zea TN op 3 MOBILE i2noeiLe oh i 4 ol Enter a short description. Then, specify the fields , their details and press : Save. Author : Subhendu Majumdar Page 102 12/1/2005 Entire Examples on ALE 7.3.4, Step 4: Create extension CREMSUB of basic Idoc type CREMAS04 with segment ZVEND as child in both sender and receiver Develop IDoe Types: Initial Screen [iF aa (tw) za [ chance Recuests Ornarien | 2 Devaloprent object (Opasic te In the initial screen of transaction WE30, enter the name of the extension, choose : Extension and choose : Create from Application toolbar. New ewension © Create new Linked basic type cremasb4 O create as cory Copy form oxtonsion Linke wih baste noe (O Create successor Successor of extension ‘Adinistration Person responsible DEVELOPERDE Processing person DEVELOPERDE Ewtension of CREMAS04 Enter as shown above. Press Enter. Author : Subhendu Majumdar Page 103 12/1/2005 Entire Examples on ALE Create extension: CREMSUB a Yao — Extension of cREMaso4 aH Secment for general vendor cata Seonent for standard vendor data - enhancenent verdar taster Basie Dats. Texts, Header Soonsnt Tor company cots cata Ter vondore sno EILFuin Sennen Tor purchasing organization data vendor sn Eilfemy = Segment for bank Getai)s of vendor SMD FILFas# © Seunent. for FU tax munbers vendors Elwitiy Sagan. for vendor suserange MMS SnD oy [eae] Choose the segment under which you want to create your child segment and choose : Create from Application Toolbar. Seoment editor 3% Enter the name of your child segment. Fill in the other details. Press Enter. Author : Subhendu Majumdar Page 104 12/1/2005 Entire Examples on ALE 18) 6@@ SAR ana CREMS|sa%e (crl+9)| ——— Extension of CREHASOS = Segnent for general rendor dat Additional infornation on Fé Segment. for standard vendo EILFMK © Vendor Master Basic Data EILrein = Segment Tor company code ¢ EILFHiN = Segment. far purchaeing org EILFOKN == Segment for bank detaits 0 Segment for EU tax numbers EWYTIN = Segment far vendor sua-ran ‘Your segment is added as a child segment under the chosen segment. Save. Bet release. Cancel release. Object cirestory entry o4e0 cael Development object, O Basic he © Extension Then, transport the extension and the new segment from the initial screen of and WE30 following the appropriate menu paths. Author : Subhendu Majumdar Page 105 12/1/2005 Entire Examples on ALE SE ee Choose : Yes. 7.3.5. Step 5: Maintain the newly created extension linkage with message type and basic Idoc type in Sender system '66e) _ New Entries: Overview of Added Entries ABAD (CRENAS icRENASEa REMSUB 4) y at =) & 7 & iB il Maintain the entry in WE82 of the sender system. Press Save. Author : Subhendu Majumdar Page 106 12/1/2005 Entire Examples on ALE 7.3.6. Step 6 : Adjust the Partner Profile for CREMAS of the receiver system in the sender system using WE20 TBWGLITI7t|BNEAP- clon AMSA cosenr VALEUSERI ED ecevar ciate] a sees RNDCLNTSS5 |Logisal System for) "#8 nuns err Serasrelecr7T rosss ——_|Shatzau 595 ace a Pater Type us sar 0 chr ccaeeaahaemmeeme iaemenliamaeiiinl ieMne a mick uP ESRAGE =o ob no Double-click on CREMAS. Outbound Options, Message Contiol | PostProcessing: Parmittad Agant Reveher port AQNEBAGH18 TransscienalRFC Cannectionte cliant 556 Pack. sizo 1 Output Mode © Transter IDoc immed Oulputmode 2 O collect aes Dac Te Basle ne cemasns Vendor master data ditt Etonsion (rRensue [BetencionorcreMasca View Change the extension. Press : Save. Author : Subhendu Majumdar Page 107 12/1/2005 Entire Examples on ALE 7: Step 7 : Write code in appropriate user-exit to populate the custom segment in outbound system User-exit is available under the enhancement : ALEO00O1 . A project was developed containing the enhancement using teode : CMOD and the custom include was. populated with code for filling up custom segment : ZVEND in sender system. Project Management of SAP Enhance Author : Subhendu Majumdar Page 108 12/1/2005 Entire Examples on ALE Change ZSUBVEND Function exit | ‘The code inside the include is as follows: ~—— *& Include _ZXSBDUOL * th data: Ifalm like ELLFAIM , ‘vend like ZVEND . data: pereike Ifal-perref ‘ratings like Ifal-ratings mobile like Ifal-mobi ind type sytab ata :_val(20) type ¢. tables : ytodel. case idoc_control_in-irect. * Check for Outbound mode when * Check for Vendor information check idoc_control_in-mestyp = ‘CREMAS' Author : Subhendu Majumdar Page 109 12/1/2005 Entire Examples on ALE Joop at ido data ‘case idoc_data-segnam, * From the main segment, get the vendor number and retrieve informs * on reference, ating and cell no to populate the new segment ZVEND ‘when ELLFAIM ind = sy-tabix ‘move ido _data-sdata to Malm, select single peel ratings noble imo (perrefratings mobile ) fiom Ifal ‘where life = Hamline zend-peret = perel ‘zvend-tatings = ratings ‘vend-anobile = mobile endcase, endloop. find = ind + 1. * Insert the data for custom segment ZVEND after the segment idoc_data-segnam = "ZVEND’ rove zvend to idoe_data-sdata insert idoc_data index ind “check segment_name = EILFAIM’ endcase. Author : Subhendu Majumdar Page 110 12/1/2005 Entire Examples on ALE 7.3.8. Step 8: Test the Outbound System ‘Your configurations and developments for the development system is over. Now, it is time for testing. Send vendor Server aroun Numeer or vendors ner prooa6s Distribute a vendor from transaction BD14, Author : Subhendu Majumdar Page 111 12/1/2005 Entire Examples on ALE Go to WEOS and test the newly created Idoc. aya Lor R585 /BREMAGO4 1700 2004 |16.01:74 [CRENAA Outbox ann0nnN Double-click on it Techical shonin [> coc ooocsceoaaz03526 Pec ora Destin 1 ution aie vuneristaue 88 vy Bios esos ‘otelmurrber voooo3}) | Curent ore. > BL EILFatn sogrnartoncooi easton nae tension ensue Seqrertava00s esssgenme CREME = Gi state records Partnerne 85 > &o Detapassedta petal Pat Tipo & > Ba Doe reay tor eens ateoana Bo Doc genersied i530-09677 It shows that the custom segment is appropriately populated and the data is passed to port correctly. Author : Subhendu Majumdar Page 112 12/1/2005 Entire Examples on ALE 7.3.9. Step 10 : Maintain the Linkage Between Message Type , Basic Idoc type and the New Extension in Receiver System using tcode : WES7 FM Name [E:[Basictyne _[Enhanc. IMeseucType |Var|Fct. Objec..|» [Descrpin JEM) 100G_INPUT_CRE.. B/CRECORAT ERECOR BUS10..| [Core vendor [=] 100C_INPUT_cRE.. B/CRECOROT Recor LEAT |B Coro vordor [= 100G_INPUT_cRE.. GRERASOT RERAS S10. Nendor mast 100C_INPUT_cRE.. B|CRENASOL GREHAS LEAT | Bi Mendor mast 100G_INPUT_oRE.. B/CRENABOT hanaos Busi.) 100G_INPUT_cRE.. B/CREMASOT EcREMAS BUSi0.| test 1b0c_INPUT_cnE... BICREHASO EcRenas Lrat_|afest T00G_INPUT_oRE.. (CRENASG2 RERAS LFaT_| Nendor mast 1b0C_INPUT_cRE.. BCRENASO? EcRENAS LFAt_| est T00G_INPUT_oRE.. (CRENASO3 RERAS Lai | Nendor mast 1D0C_INPUT_cRE.. B|CRENASOD EcRENas LFAI_| fost T00G_INPUT_oRE.. B(CRENASBS RERAS Lai | Nendor mast Tb0C_INPUT_oRE..(CRENASOS bcReHas Lat | est 10G_INPUT_RE.. B/CRENASOS LFai_| Nendor mast 7.3.10. Step 11 : Write Code in Receiver side in user exits to populate database from additional info carried by custom segments Enhancement VSV00001 contains call to FM EXIT_SAPLKD02_001 which contains a custom include where the code can be written, A project ZSUBINBD was developed containing the enhancement VSV00001 and the include code was written as follows:~ 7 - * Include ZXVSVUO4 . 4 * ata: Ifalm like EILFAIM, ‘fal like ZVEND 1Lent ype i data: parent like fal-parent, ‘ating like Ha-rating ind type sy-tabix, data :x_val(20) ypee ‘ables: ytodel Author : Subhendu Majumdar Page 113 12/1/2005 Entire Examples on ALE case idoc_controb-direc. When Inbound when 2: * For vendor master only check ide_contrl-mestyp CREMAS’ Toop at idoc_data case doc data-segnam. ‘when EILFAIM move idoe_ datasdata to fam, leat |e + From tie parent segment, get the vendor number and check whether it * exists in the database or aot select count(* into Lent from Ital where lif = Hamline ‘when ZVEND. * For che child segment, ithe vendor exists, update the reference, rating + and mobile number ‘move idoc_data-sdata to 7a iflom a0. UPDATE Ifal sot porte = zlfal-perref ratings ~ fal ratings mobile ~ zlfal-mobile where lifar = ialm-lfn. commit work. comnit work, endif endcase. endloop. endease Author : Subhendu Majumdar Page 114 12/1/2005 Entire Examples on ALE 7.3.11. Step 12 : Test the whole Connection 7.3.11.1. Run program : YYENDOR_ MODIFY in sender system from SE38 to update information for vendor AB. Updayte vendor information =e The report will ensure that updation is successful. Author : Subhendu Majumdar Page 115 12/1/2005 Entire Examples on ALE 7.3.11.2. Distribute the vendor using BD14 in Sender system Send vendor Server group Number ofvendors per process 20 Author : Subhendu Majumdar Page 116 12/1/2005 Entire Examples on ALE 7.3.11.3. See the information for the vendor in receiver system. Data Browser: TableLFA1: tof 1 Hits eo SF BBS chee rave Table LFA Disglayed fields: 5 of § Foyed columns 2 List width 0260 [crient| vendor [Reference of vendor Rating tonite no | ess fpe LaKEsH Fa 2 _[sezcoaerze So, your job is successful. Author : Subhendu Majumdar Page 117 12/1/2005 Entire Examples on ALE 8. Configurations and Programmings to Maintain Change Documents for new information c ‘Table ZEMP_MAST in SAP contains information about employee id and name ‘The requirenvent is that, any new update to this table will create change documents in SAP database, which ccan be used in future for auait trial or for using change pointer techniques. 8.1. Steps to be performed ‘To achieve the goal, following steps are to be performed:- 1. Create Change Document Object using transaction SCDO. 2. Generate Function module and includes for creating change document, 3. Write a Program using the program objects generated in the step above to create change document in the database 8.1.1. Step 1— Create Change Document Object using transaction SCDO. Change Document Objects: Overview (Change |[Create]| Generate update pam. || Generation info XXDBTESTOB: Test 40 Transnortarocedure Go to transaction SCDO. Press Create from application toolbar. zenployee “Conimue | cance [Continue (Enter) Enter a new name for the change document object. Choose : Continue. Author : Subhendu Majumdar Page 118 12/1/2005 Entire Examples on ALE Change Document for Employee inforrnaticn Name of Copy as Doe. for individual Nee ot Name of old Table Internal tab. elds atuelete Ref. tav, field sing zenp_nest| enp_nast OOD OOOO Oo) DOO) [[rsertortcs] [Dats ror] [cancel] Enter a descriptive text for change document object and list the tables which will lie under it, Then lick pushbutton : Insert Entries. @ tt 1 CBE LN ABAD Change Document Objectsie (cits) “New enities || Delete Row || Generation info | ZENPLOYEE Change Document for Employee information Tables Name of Cony as Boo for individual Name of Name of old Table intemal tab. flalds at delet Raf. tab field sting ZEMP_NAST oO Q Save the entries. Author : Subhendu Majumdar Page 119 12/1/2005 Entire Examples on ALE 8.1.2. Step 2 — Generate Programs and Includes Change Document Objects: Overview Senerate upsata pam [Generate update pam. (Shiner 4) Come to initial screen of SCDO. Place your cursor on the change object you have created and click the pushbutton shown above to generate programs. ‘O immediats undate © Delayed update Dialog Specify the following:- * Prefixes for the includes to be generated. + Function group which will contain the function module, which will create change pointer in the database. * Prefixes for the structures which will be created in the database and used by the funetion module. + Error message id and number to flash error message in case of an error. Author : Subhendu Majumdar Page 120 12/1/2005 Entire Examples on ALE Press Enter. Generate Update Pgm. janvnsy2004 Generate Undate Progran to Create Change Docunerts The TolTowing actiene Wi1T be earriee oUt Tor generstion omyoct. ZenPLorEE Inout psraneter TneTuce Wane ZEMPINGL Wil] be crested Function aroup z5UbH6 Wil] be crested Package SF Will be crested Prefix for DIC structures ¥ WT] be crested application area to WIT] be erestan Error number 502 WiTl be erestae Incl. toxt. changes K WI) be crestas Prociyp= 2 wll be crested DATA Generation active Wl) be creates Source generation Data dectaration, TOP FEENPIUCLEDT wT] be created consisting of FLENPINCLEOF WIT] be erestao and FEENPINCLCOY Wi17 be erestao Update tunet modus 2ENPLOYEE_VRITE OUCUYENT 417 he eraatac 311 upsate Tuncticn acute FEENPINCLEDE Wi11 be erestan DIE generat on no actions A pre-action report will be displayed . This shows the following:- Function module ZEMPLOYEE_WRITE_DOCUMENT will be created under function group ZSUBHA. This function module will create change document in the database for change document object ZEMPLOYEE. An include program FZEMPINCLCDC will be created which will contain a call to the function module. Includes FZEMPINCLCDF and FZEMPINCLCDV will contain data declaration for the variables which will be used as interface parameters to the function module, Press Save. The objects will be created and the report will be modified , informing you that the objects are created Author : Subhendu Majumdar Page 121 12/1/2005 Entire Examples on ALE 8.1.3. Step 3— Write a program / modify existing program to call FM to write change documents Now, you have to modify the program which is used to update table ZEMP_MAST In the global section of the program, include program FZEMPINCLCDT and FZEMPINCLCDC. The first one(FZEMPINCLCDT) contains another two includes := FZEMPINCLCDF FZEMPINCLCDV Include FZEMPINCLCDC contains a call to the function module ZEMPLOYEE_WRITE_DOCUMENT Now, in the appropriate section of the code, after updating table ZEMP_MAST, you need to give a call to the function module by calling subroutine : CD_CALL_ZEMPLOYEE This subroutine originally belongs to the include FZEMPINCLCDC and have a call to the function module. Before calling this subroutine, you have to populate all the interface parameters of the function module. ‘The following program is a demo to this idea. It contains two parameters in the selection- sereen , one for employee id and another for employee name New employee ids are inserted and existing ones have the employee names updated. ‘This program creates change documents in CDHDR and CDPOS table. REPORT YSUBDELI23 include frempincledt include frempinclede data :x_mast lke zemp_mast data : x_fag(t) type e x fame like zemp_mast-empname parameters: p_empid Tike zemp_mast-empid obligatory, Author : Subhendu Majumdar Page 122 12/1/2005 Entire Examples on ALE initialization, perform sub_clear_varables perform su flag determine. sartof-slection perform sub_intertion_operation, else perform sub_updstion_operation. endif ‘variables “Spr text Sep text form sub_clear_variables| ‘lear? matt, p_empid, Pomme xoflag * Populate interface parameters forthe function module. objectid = ZEMPLO teode = 'SE38 utime = sy-uzet uudate = sy-datum uusemame ~ sy-unan endform. sub_eloar_variables Spl tet te ph text select Single empname into x_name from zemp_mast where empid = p_empid, end endif. endform, sub flag. determine Author : Subhendu Majumdar Page 123 12/1/2005 Entire Examples on ALE form sub_insertion_operation ‘upd_zemp_mast =X pempid, ame. - xmast ifsy-subre eq 0. ‘message 1398(00) with ‘nsertion suevessfu * Populate interface parameters forthe function module. CDOC_UPD_OBJECT = ‘UPD_ZEMP_MAST~. ‘zemp_mast-Hnandt = sj-mandt ‘zemp_mast-empid = p_empid ‘omp_mast-empname = p_name * call:o the function module fo ereate change pointers inthe database. perform ed_call_zemployee. commit work, endif endfor, sub_inserton_operstion vs *& Form sub_updation operation ta orm sub_updation_operat * Populate interface parameters forthe function module. ‘upd_zemp_mast =X! update zomp_mast set empname = p_name ‘where empid = p_empid. sysubre 09 0 message i398(00) with 'Updation successful * Populate interface parameters forthe function module. ‘CDOC_UPD_OBIECT="U! UPD_ZeMP_MasT =U + *zemp_mast contains the old values and zemp_mast contains new values, *zemp_mast-mandt = sy-mandt *zemp_mast-empid = p_empid *zemp_mast-empname = x_pame, ‘zemp_mastemandt ~ sy-mandt _zemp_nastempid = p_empid ‘zemp_aast-emmpname = p_name * Call othe function module to create change pointers in the database, perform ed_call_zemployee, endit endfor. "sub updation_ operation Include FZEMPINCLCDT contains another two includes which have global data declarations. INCLUDE FZEMPINCLCDF Author : Subhendu Majumdar Page 124 12/1/2005

You might also like