Ale Document

66
Right click and click on properties. Double click on any of the process code .It will open the Function module like shown below. ALE IDOC’S INBOUND AND OUTBOUND CONFIGURATIONS FOR EMPLOYEE DATA: Aim: Sending Employee Data From 800 Client(Sender System) To 810 Client(Receiver System) . Outbound Configuration in 800 Client : Create Employee Structure ‘ZEMPLOYEE_TABLEin Data Dictonary(SE11). Fill the Structure with Data for transfering to receiver system.

description

EDI, ALE, IDOC

Transcript of Ale Document

  • Right click and click on properties.Double click on any of the process code .It will open the Function module like shown below. ALE IDOCS

    INBOUND AND OUTBOUND CONFIGURATIONS FOR EMPLOYEE DATA:

    Aim: Sending Employee Data From 800 Client(Sender System) To 810 Client(Receiver System) .

    Outbound Configuration in 800 Client :

    Create Employee Structure ZEMPLOYEE_TABLE in Data Dictonary(SE11).

    Fill the Structure with Data for transfering to receiver system.

  • Create Segement Type (WE31).

    Execute Transaction code WE31 .

    Give the Segment type name ZE1EMPSEG.

    Click on create.

    If your Segment type name consists of more than 7 characters A popup will come prompting like Assigned name is longer than 7 characters, but you can ignore this and proceed by clicking Enter button..

    Enter the description as you like but be Specific.

    Give the Fields of ZEMPLOYEE_TABLE structure and respective data elements for the fields.

  • Click on Save.

    Click on Enter and Save it as Package for Traspoting.

  • In the above window segment type was saved with the Transport request Number.

    After saving click on back button.

    Here we have to release the segment type.

    Go to Edit tab and click on set release .

  • Create Idoc Type (WE30) :

    Execute Tcode WE30.

    Enter the obj.name (i.e Idoc type name) as ZEMPLOYEEIDOC .

    Click on create.

  • Enter the description .

    Click on enter.

    Place the cursor on idoc type and click on create button.

  • Give the segment type ZE1EMPSEG.

    Minimum Number = 1.

    Maximum Number = 1000.

  • Click on enter.

    Click on save button and save as package.

    Go back

  • Go to edit tab and click on set release .

    Click on yes.

  • Create Message Type (WE81) :

    Execute Transaction code WE81.

    Click on Display or Change mode.

  • Click on enter.

  • Click on New Entries.

    Give the message type ZEMPDAT and Short text.

  • Click on Save .

    Click on enter.

  • Assign Idoc Type to Message Type (WE82):

    Execute Tcode WE82.

    Click on Display or Change mode.

  • Click on New Entries.

    Give message type as ZEMPDAT .

    Basic type (Idoc type) as ZEMPLOYEEIDOC.

    Release as 700 (Generated when clicking on set relese in the segment type).

  • Save it.

  • Creating Logical Systems(SALE) :

    Now we have to Create Logical System for the Sender (800) and Receiver(810).

    Execute SALE Transaction code.

    Expand the Basic settings and next Logical systems like below.

  • Click on Define Logical System.

    Here the pop-up will come like The Table is Cross-Client , means changes done in one client will reflect to other client.

    Ignore it and Press Enter.

  • Click on New Entries.

    Enter logical systems Names for sender , Under LOG SYS Give AUS and sender system for Name.

    And for Receiver system also , LOG SYS is ASIA and Name is receiver system.

  • Save it and go back.

    Assigning Logical System to Client.

    Click on Assign Logical System to Client.

  • Double Click on 800 Client.

    Give Logical System as AUS.

    Click on Save(ctrl+s) button.

    Click on Enter.

    Go back (F3).

  • Double click on the Client 810.

    Give the logical system ASIA.

  • Save it.

    Creating RFC Destination.

    Execute SM59.

    Place the cursor on the ABAP Connections , Click on Create Button.

  • Give the RFC Destination ASIA.

    Give the Desc.

  • Target Host as your Application Server name.

    Press Enter button.

    Click on Logon & Security tab.

    Language EN.

    Client 810.

    User SAP*

    Password 06071992.

    Click on Save Button.

  • Click on Enter.

    Creating Port(WE21):

    Port is a Communication Medium between Sender and Receiver.

    Execute WE21.

    Expand the Transactional RFC .

  • Place cursor on Transactional RFC and click on Create Button.

  • Click on Enter.

    Give the Meaning full desc and RFC Destination ASIA.

    Save it.

    Creating Distribution Model:

    Execute Tcode BD64.

  • Go to change mode.

    Place the cursor on Model view, click on Create Model View .

    Give the Short Text as MODEL_EMP,

    Give the Tech name as SEND_EMP.

  • Click on enter And Save It.

    Select your Model view and Click on Add Message Type .

  • Give Sender AUS

    Give Receiver ASIA

    Message type ZEMPDAT

  • Click on Enter.

    Click on Save.

    Go to Environment Click on Generate Partner Profiles.

  • Click on Execute(F8).

  • Press back button two times.

    Go to Edit Model view Click on Distribute

  • Click on Enter.

  • Create/Change Partner Profiles(WE20):

    Execute WE20.

    Expand the Partner Type LS.

    Click on the ASIA.

  • Double click on the ZEMPDAT .

    Select Transfer Idoc Immed, And Save it.

  • Go back and Save .

    Create a Program in SE38.

    Create Program ZMASTER_IDOC_OUTBOUND.

    In Program we have to Call the Function Module Master_Idoc_Distribute.

    Code for program in Outbound Configuration.

    REPORT ZMASTER_IDOC_OUTBOUND.data : wa_cntl TYPE EDIDC. ControalRecord

    data : it_cntl TYPE STANDARD TABLE OF EDIDC, it_data TYPE STANDARD TABLE OF EDIDd, wa_data TYPE edidd.DATA : IT_EMP TYPE STANDARD TABLE OF ZEMPLOYEE_TABLE, WA_EMP TYPE ZEMPLOYEE_TABLE.

    START-OF-SELECTION. PERFORM GET_DATA. PERFORM PROCESS_DATA. PERFORM TRIGGER_IDOC.

    *&---------------------------------------------------------------------**& Form GET_DATA*&---------------------------------------------------------------------** text*----------------------------------------------------------------------** --> p1 text*

  • CLEAR : WA_EMP,WA_DATA,EMP_SEG.ENDLOOP.

    ENDFORM. " PROCESS_DATA*&---------------------------------------------------------------------**& Form TRIGGER_IDOC*&---------------------------------------------------------------------** text*----------------------------------------------------------------------** --> p1 text*

  • Inbound Configuration:

    Inbound Configuration should be done on the Reciver System (810 Client).

    But In 810 Client we have no Acces to change or Create the objects or Configurations.

    Thats why we are going for 800 Client . There we will create all configurations for Inbound and Transport those to 810 Client by using the Client Copy method.

    Create Function Module in 800 Client:

    Execute SE37.

    If there is no function group in your system create Function Group .

    After that Create Function Module, ZINBOUND_FUNCTION_EMP by Coping the Parameter Interface of any one of the Function Module in WE42(Inbound Process Code).

    Execute WE42 Tcode . There you found the Function Modules under Inbound Process Code.

    The parameter Interface is same for the All Function Modules.

  • Double Click on the any of the Process code Under Inbound Process Code Column .

    Again Double Click on the Function Module IDOC_INPUT_POS_SALES_DOCUMENTS.

    It will open Function Module like below.

  • The Parameter Interface is same for all Function Modules.

    Copy the all Parameter Interface into your Function Module ZINBOUND_FUNCTION_EMP.

    Execute Tcode SE37.

    Give Function Module name ZINBOUND_FUNCTION_EMP.

    Click on Create.

  • Copy the Import Parameters from IDOC_INPUT_POS_SALES_DOCUMENTS.

    Copy the Export Parameters.

  • Copy the Tables Parameters.

  • Copy the Exception Parameters also.

    In source Code tab write the fallowing code.

    DATA : EMP_SEG TYPE ZE1EMPSEG1. DATA :IT_EMP TYPE STANDARD TABLE OF ZEMPLOYEE_TABLE, WA_EMP TYPE ZEMPLOYEE_TABLE.

    IF IDOC_CONTRL-IDOCTP 'ZEMPLOYEEIDOC1'. RAISE WRONG_FUNCTION_CALLED. ENDIF. LOOP AT IDOC_DATA WHERE DOCNUM = IDOC_CONTRL-DOCNUM. CASE IDOC_DATA-SEGNAM. WHEN 'ZE1EMPSEG1'. EMP_SEG = IDOC_DATA-SDATA. WA_EMP-EMPNO = EMP_SEG-EMPNO. WA_EMP-EMPNAME = EMP_SEG-EMPNAME. WA_EMP-EMPADD = EMP_SEG-EMPADD. WA_EMP-EPH = EMP_SEG-EPH. APPEND WA_EMP TO IT_EMP. CLEAR :WA_EMP,EMP_SEG. ENDCASE.

  • ENDLOOP.

    MODIFY ZEMPLOYEE_TABLE FROM TABLE IT_EMP . IF SY-SUBRC EQ 0. IDOC_STATUS-STATUS = '53'. IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM. IDOC_STATUS-MSGTY = 'S'. IDOC_STATUS-MSGID = 'ZMM'. IDOC_STATUS-MSGNO = '004'. APPEND IDOC_STATUS. CLEAR IDOC_STATUS. ELSE. IDOC_STATUS-STATUS = '51'. IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM. IDOC_STATUS-MSGTY = 'E'. IDOC_STATUS-MSGID = 'ZMM'. IDOC_STATUS-MSGNO = '005'. APPEND IDOC_STATUS. CLEAR IDOC_STATUS. ENDIF.

    Save it.

    Configure The Inbound Function Module in WE57:

    Execute WE57.

    Go to change Mode.

    Click on New Entries.

  • Give , Function Module ZINBOUND_FUNCTION_EMP.

    Select Function Type as Function Module.

    Basic Type as ZEMPLOYEEIDOC.

    Message Type as ZEMPDAT.

    Select Direction as Inbound.

  • Save it.

    Register The Function Module as Inbound in( BD51):

    Execute BD51.

    Click on New Entries.

  • Give Function Module ZINBOUND_FUNCTION_EMP.

    Input Type 0.

    Save it.

    Creating The Process Code :

    Execute WE42.

    Go to Change Mode.

  • Click on New Entries.

    Give Process Code as ZPEMP.

    Give Description.

    Select Radio Button Process By Function module.

    Save it. One pop up will come . Click on Enter.

  • Select your Function Module in Drop Down List.

  • Save it as Package For Transporting.

  • Click on Enter , And save the Request Number for Client Copy .

    Go Back.

    One pop-up Information will come , It means Create Logical Message.

    Click on Enter.

  • Double Click on the Logical Message.

  • Click on New Entries.

    Give Message Type ZEMPDAT.

    Save it.

  • Go back , Save it.

    Steps in 810 Client:

    Sending The all Configurations to 810 Client Using The Client Copy Method:

    Execute SCC1 Tcode in 810 Client.

    Give The Transport Request Number generated while Saving the Program in Package.

    Check the Checkbox Including Request Subtasks.

  • Click on Start Immediately Button.

    Click on Yes.

  • Program ran Successfully.

    Note: Better to save all Configurations in one Transport Request Number.

    Otherwise we have to do Client copy for all Transport Request Numbers generated while doing all above configurations.

    Create Partner Profiles For Inbound in 810 Client(WE20):

    Execute WE20.

  • Expand Partner Type Logical System.

    Place The Cursor On Partner Type Logical System.

    Click On Create.

  • Give The Partner No as AUS.

    Save it.

    Click on the PLUS icon of Inbound Parameters.

    Give Message Type as ZEMPDAT,

    Process Code as ZPEMP.

  • Save It and Go back.

    All Configurations were done.

    Now we have to Execute the outbound program to generate IDOC in Sender System.

    Execute the Outbound Program ZMASTER_IDOC_OUTBOUND in 800 Client.

  • After Execution of program we have to Check or monitor whether the Idoc is Delivered successfully or not.

    The Transaction Codes For Monitoring the Idocs are,

    WE02, WE05, WE07, WE09.

    The Status Messages for Outbound and Inbound.

    03 is Success for Outbound Idoc .

    53 is Success for Inbound Idoc.

    The Directions For Outbound and Inbound.

    01 is for the Outbound Direction.

    02 is for the Inbound Direction.

  • Monitoring The Idocs in 800 Client:

    Execute WE02.

    Give direction as 1 .

    Click on Execute Button.

    Congrats : The Status Message is 03, means Idoc Generated Successfully .

  • Exapand The Data Record to see the Employee Data.

    Monitoring The Idocs in 810 Client:

    Here we have to check Idoc is posted Successfully or not.

    Execute WE02 Tcode in 810 Client.

    Give direction as 2.

    Click on Execute Button.

  • Double click on Idoc Number Corresponding to your partner .

  • Congrats : See the Status Message 53 , Means Idoc Posted Successfully.

    Expand the Data Record See The Posted Data.

    Check the ZEMPLOYEE_TABLE in 810 Client .

    Thank You,

    G.Siva Nageswara Rao,

    9700770364.