Idoc fields need to be formatted before being sent

Hi Gurus,
I have a problem, Need to format  fields, is there a way  to  formate within an idoc after the idoc has been created, but prior to the
idoc being sent.
idoc type - Pexr2002
I need to add decimals to the value.
Answers are highlu rewarded.
Thanks in advance.
jog

Hi,
You can do the following steps and ensure the outbound partner profile (WE20) for output mode is set to collect IDocs.
The example codes can be found in website
http://www.sapgenie.com/sapedi/idoc_abap.htm
STEP 1 - Open document to edit
CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
  EXPORTING
    document_number = t_docnum
  IMPORTING
    idoc_control = itab_edidc
  TABLES
    idoc_data = itab_edidd
  EXCEPTIONS
    document_foreign_lock = 1
    document_not_exist = 2
    document_not_open = 3
    status_is_unable_for_changing = 4
    OTHERS = 5.
STEP 2 - Loop at itab_edidd and change data
LOOP AT itab_edidd WHERE segnam = 'E1EDKA1'.
  e1edka1 = itab_edidd-sdata.
  IF e1edka1-parvw = 'LF'.
    e1edka1-partn = t_eikto.
    itab_edidd-sdata = e1edka1.
    MODIFY itab_edidd.
    EXIT.
  ENDIF.
ENDLOOP.
STEP 3 - Change data segments
CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENTS'
  TABLES
    idoc_changed_data_range = itab_edidd
  EXCEPTIONS
    idoc_not_open = 1
    data_record_not_exist = 2
    OTHERS = 3.
STEP 3a - Change control record
CALL FUNCTION 'EDI_CHANGE_CONTROL_RECORD'
  EXPORTING
    idoc_changed_control = itab_edidc
  EXCEPTIONS
    idoc_not_open = 1
    direction_change_not_allowed = 2
    OTHERS = 3.
STEP 4 - Close Idoc
Update IDoc status
CLEAR t_itab_edids40.
t_itab_edids40-docnum = t_docnum.
t_itab_edids40-status = '51'.
t_itab_edids40-repid = sy-repid.
t_itab_edids40-tabnam = 'EDI_DS'.
t_itab_edids40-mandt = sy-mandt.
t_itab_edids40-stamqu = 'SAP'.
t_itab_edids40-stamid = 'B1'.
t_itab_edids40-stamno = '999'.
t_itab_edids40-stapa1 = 'Sold to changed to '.
t_itab_edids40-stapa2 = t_new_kunnr.
t_itab_edids40-logdat = sy-datum.
t_itab_edids40-logtim = sy-uzeit.
APPEND t_itab_edids40.
CALL FUNCTION 'EDI_DOCUMENT_CLOSE_EDIT'
  EXPORTING
    document_number = t_docnum
    do_commit = 'X'
    do_update = 'X'
    write_all_status = 'X'
  TABLES
    status_records = t_itab_edids40
  EXCEPTIONS
    idoc_not_open = 1
    db_error = 2
    OTHERS = 3.
Other alternative, you can use this user exits EXIT_SAPLBD11_001 (enhancement ALE00001
) to change the segment field value.
Hope this will help.
Regards,
Ferry Lianto

Similar Messages

  • Mail photo attachment changes format after being sent?

    When I take a photo using the iPad camera and send it as an attachment in mail, how can I ensure the photo will maintain the same format after sending it, as it did when I took the photo? Recipients of my email with a portrait photo attachment, will receive the attachment in landscape format. This also happens to photos I've taken and saved previously in photos on my iPad2.
    Does anyone know why this happens or how I can prevent it from happening?

    Denis-
    I have seen this effect on photos received from an iPhone camera.  I suggest you let Apple know so they can fix it in a future iOS update.  Go to <iPad Feedback>.
    When  saved, the side-ways photos seem to end up right-side-up, if that is any consolation.
    Fred

  • TS3899 How to fix Sent emails getting stuck in Outbox for a period of time before being sent?

    How do you fix Sent emails getting s tuck in Outbox for a period of time before they actually send?
    The error message says that my "sender address is rejected by the server", but it eventually does send.

    Have you tried a Reset [Hold the Home and Sleep/Wake buttons down together for 10 seconds or so (until the Apple logo appears) and then release. When the screen goes blank then power ON again in the normal way.] It is 'appsolutely' safe!

  • HT1320 how can i save me data stored on a non responding ipod classic and says you need to format before using it?

    how can i save me data stored on a non responding ipod classic and says you need to format before using it?
    in another way : how can i save my date stored on my classic iPOD as a external hard .... when that msgs appears .... volume doesn't contain a recognized file system , make sure the file system is loaded .... then , you need to format ??? can anyone help ?

    It sounds like the iPod's storage has data corruption.  You may be able to treat it like an external drive and use data recovery software on it, but it probably won't work because the system is telling you that the drive needs to be formatted before it is recognized.
    If the problem is data corruption and there is no hardware-related problem on the iPod's hard drive, a Restore should fix the problem.  But this will obviously erase the iPod's hard drive.

  • I need one XML File containing one Idoc fields Say Orders01

    hiall,
    i need one XML File containing one Idoc fields Say Orders01
    bye
    satish

    hi,
    <?xml version="1.0" encoding="iso-8859-1"?>
    <ORDERS02>
      <IDOC BEGIN="1">
        <EDI_DC40 SEGMENT="1">
          <TABNAM>EDI_DC40</TABNAM>
          <MANDT>800</MANDT>
          <DOCNUM>0000000000213213</DOCNUM>
          <DOCREL>46B</DOCREL>
          <STATUS>30</STATUS>
          <DOCTYP>ORDERS02</DOCTYP>
          <DIRECT>1</DIRECT>
          <RCVPOR>A000000032</RCVPOR>
          <RCVPRT>LS</RCVPRT>
          <RCVPRN>sell</RCVPRN>
          <RCVSAD/>
          <RCVLAD/>
          <STD/>
          <STDVRS/>
          <STDMES/>
          <MESCOD/>
          <MESFCT/>
          <OUTMOD>4</OUTMOD>
          <TEST/>
          <SNDPOR>SAPSID</SNDPOR>
          <SNDPRT>KU</SNDPRT>
          <SNDPRN>23334</SNDPRN>
          <SNDSAD/>
          <SNDLAD/>
          <REFINT/>
          <REFGRP/>
          <REFMES/>
          <ARCKEY/>
          <CREDAT>20061019</CREDAT>
          <CRETIM>205734</CRETIM>
          <MESTYP>ORDERS</MESTYP>
          <IDOCTYP>ORDERS02</IDOCTYP>
          <CIMTYP/>
          <RCVPFC/>
          <SNDPFC/>
          <SERIAL></SERIAL>
          <EXPRSS/>
        </EDI_DC40>
        <E1EDK01 SEGMENT="1">
          <KZABS>X</KZABS>
          <CURCY>USD</CURCY>
          <WKURS>1.000</WKURS>
          <ZTERM>ZZZZ</ZTERM>
          <BSART>EC</BSART>
          <BELNR>300024455</BELNR>
          <RECIPNT_NO>misssa</RECIPNT_NO>
        </E1EDK01>
        <E1EDK14 SEGMENT="1">
          <QUALF>014</QUALF>
          <ORGID>1000</ORGID>
        </E1EDK14>
        <E1EDK14 SEGMENT="1">
          <QUALF>009</QUALF>
          <ORGID>001</ORGID>
        </E1EDK14>
        <E1EDK14 SEGMENT="1">
          <QUALF>011</QUALF>
          <ORGID>1000</ORGID>
        </E1EDK14>
        <E1EDK03 SEGMENT="1">
          <IDDAT>012</IDDAT>
          <DATUM>20061019</DATUM>
        </E1EDK03>
        <E1EDKA1 SEGMENT="1">
          <PARVW>LF</PARVW>
          <PARTN>000002344</PARTN>
          <TELF1></TELF1>
          <BNAME></BNAME>
        </E1EDKA1>
        <E1EDKA1 SEGMENT="1">
          <PARVW>WE</PARVW>
          <LIFNR>1000</LIFNR>
          <NAME1></NAME1>
          <STRAS></STRAS>
          <ORT01></ORT01>
          <PSTLZ>4444</PSTLZ>
          <LAND1>EN</LAND1>
          <TELF1></TELF1>
          <SPRAS>D</SPRAS>
          <ORT02></ORT02>
          <REGIO>02</REGIO>
        </E1EDKA1>
        <E1EDK02 SEGMENT="1">
          <QUALF>001</QUALF>
          <BELNR>600060324</BELNR>
          <DATUM>20061019</DATUM>
          <UZEIT>205736</UZEIT>
        </E1EDK02>
        <E1EDK17 SEGMENT="1">
          <QUALF>001</QUALF>
          <LKOND>EXW</LKOND>
          <LKTEXT>london</LKTEXT>
        </E1EDK17>
        <E1EDK18 SEGMENT="1">
          <QUALF>001</QUALF>
          <TAGE>12</TAGE>
          <PRZNT>4.000</PRZNT>
        </E1EDK18>
        <E1EDK18 SEGMENT="1">
          <QUALF>002</QUALF>
          <TAGE>30</TAGE>
          <PRZNT>2.000</PRZNT>
        </E1EDK18>
        <E1EDK18 SEGMENT="1">
          <QUALF>003</QUALF>
          <TAGE>45</TAGE>
        </E1EDK18>
        <E1EDP01 SEGMENT="1">
          <POSEX>00010</POSEX>
          <PSTYP>0</PSTYP>
          <KZABS>X</KZABS>
          <MENGE>1.000</MENGE>
          <MENEE>EA</MENEE>
          <BMNG2>1.000</BMNG2>
          <PMENE>EA</PMENE>
          <VPREI>3</VPREI>
          <PEINH>1</PEINH>
          <NETWR>3</NETWR>
          <MATKL>001</MATKL>
          <BPUMN>1</BPUMN>
          <BPUMZ>1</BPUMZ>
          <E1EDP20 SEGMENT="1">
            <WMENG>1.000</WMENG>
            <EDATU>19</EDATU>
          </E1EDP20>
          <E1EDP19 SEGMENT="1">
            <QUALF>002</QUALF>
            <IDTNR>100</IDTNR>
          </E1EDP19>
          <E1EDP19 SEGMENT="1">
            <QUALF>001</QUALF>
            <KTEXT>some text</KTEXT>
          </E1EDP19>
        </E1EDP01>
        <E1EDS01 SEGMENT="1">
          <SUMID>002</SUMID>
          <SUMME>3</SUMME>
          <SUNIT>USD</SUNIT>
        </E1EDS01>
      </IDOC>
    </ORDERS02>
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Need help for Format HD

    Hi I need Help for Formating HD so Wat Key need hold on start up for format HD I apprciated you Help

    Jesus:
    Formatting, Partitioning Erasing a Hard Disk Drive
    Warning! This procedure will destroy all data on your Hard Disk Drive. Be sure you have an up-to-date, tested backup of at least your Users folder and any third party applications you do not want to re-install before attempting this procedure.
    • With computer shut down insert install disk in optical drive.
    • Hit Power button and immediately after chime hold down the "C" key.
    • Select language
    • Go to the Utilities menu (Tiger) Installer menu (Panther & earlier) and launch Disk Utility.
    • Select your HDD (manufacturer ID) in left side bar.
    • Select Partition tab in main panel. (You are about to create a single partition volume.)
    • _Where available_ +Click on Options button+
    +• Select Apple Partition Map (PPC Macs) or GUID Partition Table (Intel Macs)+
    +• Click OK+
    • Select number of partitions in pull-down menu above Volume diagram.
    (Note 1: One partition is normally preferable for an internal HDD.)
    • Type in name in Name field (usually Macintosh HD)
    • Select Volume Format as Mac OS Extended (Journaled)
    • Click Partition button at bottom of panel.
    • Select Erase tab
    • Select the sub-volume (indented) under Manufacturer ID (usually Macintosh HD).
    • Check to be sure your Volume Name and Volume Format are correct.
    • Click Erase button
    • Quit Disk Utility.
    cornelius

  • User Exit to Override ASN IDOC field

    Hello Experts,
    I am looking for an user exit to override ASN IDOC field while sending IDOC to third party tool. Below is the scenario
    Once we do the PGI on outbound delivery SPED output creates ASN and it triggers ZASN output. We use basic type DELVRY03 to send IDOC to third party tool. Now before sending ASN to third party tool we would want to send them a flag so based on that they perform auto receipt process in their system.
    I have selected Export Indicator (EXPKZ) field from IDOC since this hasn't been mapped with third party tool. Once we get an user exit to update the Auto Receipt flag in the Export Indicator field in IDOC we will map it in XI/PI so that it will go to third party tool for further processing.
    I have a logic to identify the ASN which needs to set auto flag but I am struggling where and how to put that logic, what user exit suffice the requirement?
    Thanks in Advance
    Jay

    If my understanding correct Before you send inbound delivery information to third party system you will send one Flag to Third party system to do goods receipt.I have one question if system failed to create /user cancelled Outbound delivery then how will you stop auto goods receipt in Third party system ?.Also After goods receipt GR messages failed in sap as there is no ASN created in system.
    If you want to send the flag before ASN creation then at Speed message level you split the Idoc message into two parts one for flag the message two third party system and another one to create Inbound delivery.

  • I need help to format my laptop

    I am Brazilian and do not speak well in inbles, please forgive me first of all. I want to ask for help at all, I'm having trouble formatting my Toshiba laptop I bought with windos 8, I want to downgrade to windows 7. Cant work the DVD system.
    photo:
    Solved!
    Go to Solution.

    Once you change the bios your hard drive will show up to install windows 7, sometimes the bios will need to be updated before the CSM option will appear.
    INSTRUCTIONS:
    First - Burn recovery media before you make any changes! -you may want or need to go back to windows 8 later-
    Second -
    Important Bios changes when changing from Windows 8 to Windows 7:
    Completely shut down laptop (Shut down Windows 8 while pressing the Shift key to completely power off.) then restart computer and hold f2 when the screen goes black and wait for the bios setup utility to launch.
    Select advanced, then system configuration, then boot mode
    UEFI and CSM or legacy  (UEFI for Windows 8 and CSM or legacy for windows 7)
    For windows 7 change to CSM or Legacy mode.
    Third -  Also in bios setup utility select - Security, then Secure Boot, then you have to disable secure boot for windows 7.
     You will need to delete all partitions before installing windows 7 this is done forth step.
    Forth - Insert your windows 7 disc and select custom install, your partitions should show up - click on each one and below you will see advanced drive options, click that and you will have options to format - format each one, then delete each one. You will be left with one raw partition, select to install and windows will do the rest while installing the operating system.
    Fifth - install drivers
    Installation order is important:
    Install chipset driver then video driver before other drivers. Then install Toshiba Value added package before other applications
    Your support page is here - http://support.toshiba.com/support/modelHome?freeText=1200007943
    These windows 7 64 bit drivers may work for Satelite C55-A5105 - http://www.toshiba.eu/innovation/download_drivers_bios.jsp?service=EU&selCategory=2&selFamily=2&selS...
    Post your results!
    S70-ABT2N22 Windows 7 Pro & 8.1Pro, C55-A5180 Windows 8.1****Click on White “Kudos” STAR to say thanks!****

  • Inbound IDoc: Field BVTYP is missing

    Hi, 
    I am new to IDoc I need help with a scenario. We have an interface wherein AP documents are transported to SAP. When we are viewing these IDocs in SAP field BVTYP  (Partner Bank Type) is missing
    Thanks in advance

    Hi,
    Are you dealing with inbound or outbound IDoc for sales order?
    I am a bit confused ... you mentioned the IDoc successfully posted (inbound IDoc?) however outsource EDI team reported that field ZEILE is missing (outbound IDoc?)
    Regards,
    Ferry Lianto

  • I'm a bit confused. Since my original camera format was 720/60p, and I converted the footage to Pro Res422 in order to edit in Final Cut Pro 7, should I convert back to a higher quality format before sending the file to DVD Studio Pro?

    I'm a bit confused. Since my original camera format was 720/60p, and I converted the footage to Pro Res422 in order to edit in Final Cut Pro 7, should I convert back to a higher quality format before sending the file to DVD Studio Pro? If so, which Compressor codec is best to use in order to preserve the original 720/60p?   How do I maintain the highest quality?

    No...ProRes is a high quality format. Finishing format.  Many TV networks take that as a final deliverable. 
    BUT...DVDs aren't high definition...they are SD.  You cannot make a 720p60 DVD with DVD Studio Pro.  Any DVD you make will be SD...720x480.  The only HD DVD format out there is BluRay, and for that you need a BluRay burner.
    As for making a high quality DVD...using the BEST QUALITY settings in Compressor will work:
    #42 - Quick and dirty way to author a DVD
    Shane's Stock Answer #42 - David Roth Weiss' Secret Quick and Dirty Way to Author a DVD:
    The absolute simplest way to make a DVD using FCP and DVDSP is as follows:
    1. Export a QT movie, either a reference file or self contained using current settings.
    2. Open DVDSP, select the "graphical" tab and you will see two little monitors, one blue, one green.
    3. Select the left blue one and hit delete.
    4. Now, select the green one, right click on it and select the top option "first play".
    5. Now drag your QT from the browser and drop it on top of the green monitor.
    6. Now, for a DVD from an HD source, look to the right side and select the "general tab" in the track editor, and see the Display Mode, and select "16:9 pan-scan."
    7. Hit the little black and yellow burn icon at the top of the page and put a a DVD in when prompted. DVDSP will encode and burn your new DVD.
    THATS ALL!!!
    NOW...if you want a GOOD LOOKING DVD, instead of taking your REF movie into DVD SP, instead take it into Compressor and choose the BEST QUALITY ENCODE (2 pass VBR) that matches your show timing.  Then take THAT result into DVD SP and follow the rest of the steps.  Except you can choose "16:9 LETTERBOX" instead of PAN & SCAN if you want to see the entire image.

  • To Handle Special Characters(Guideu0099 ) in MATMAS IDOC fields

    Need to handle special characters like Guide™, as an attached  superscript in MATMAS02/05 IDOC field . The field name is TDLINE in E1MTXLM segment.
    As a trial run when these special characters are pasted in the TDLINE field, it throws an error that "the input field contains prohibited characters"
    Please let me know if there is any workaround for this.

    hi
    good
    go through these links, i hope these ll help you to solve your problem.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAGTFADMLO/CAGTFADMLO.pdf
    http://www.erphome.net/wdb/upload/forum14_f_2908.doc
    thanks
    mrutyun^

  • After running ridc to checkin file into Oracle Content Center Server there is error: oracle.stellent.ridc.protocol.ProtocolException: java.io.IOException: Input terminated before being able to read line

    Hi,
       I use ridc to check in file into Oracle Center Content server. There is no problem at the beginning. But after running for several days, there is following error.
    I must restart my program to solve this issue.
       Can anyone help me solve this problem?
    Thanks,
    Tony
    2013-07-11 12:24:31,189 ERROR [BatchEventHandler] com.edocs.common.api.integration.contmgmt.ContentException: oracle.stellent.ridc.protocol.ProtocolEx
    ception: java.io.IOException: Input terminated before being able to read line
            at com.edocs.common.integration.contmgmt.UCMContentManager.saveContent(UCMContentManager.java:95)
            at com.edocs.common.reporting.batch.BatchEventHandler.processBatchRequest(BatchEventHandler.java:284)
            at com.edocs.common.reporting.batch.BatchEventHandler.service(BatchEventHandler.java:138)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.executeInternal(BatchReportProcessorTask.java:156)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.doProcessTask(BatchReportProcessorTask.java:68)
            at com.edocs.pwc.tasks.CommonTask.processTask(CommonTask.java:166)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.__WL_invoke(Unknown Source)
            at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.processTask(Unknown Source)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl_WLSkel.invoke(Unknown Source)
            at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:85)
            at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
            at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: oracle.stellent.ridc.protocol.ProtocolException: java.io.IOException: Input terminated before being able to read line
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:149)
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:108)
            at com.edocs.common.integration.contmgmt.UCMContentManager.saveContent(UCMContentManager.java:81)
            ... 17 more
    Caused by: java.io.IOException: Input terminated before being able to read line
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.readLine(HdaBinderSerializer.java:371)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.readToEnd(HdaBinderSerializer.java:335)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.parseBinder(HdaBinderSerializer.java:165)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.parseBinder(HdaBinderSerializer.java:71)
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:126)
            ... 19 more
    2013-07-11 12:24:33,005 ERROR [BatchEventHandler] com.edocs.common.api.integration.contmgmt.ContentException: oracle.stellent.ridc.protocol.ProtocolEx
    ception: java.io.IOException: Input terminated before being able to read line
            at com.edocs.common.integration.contmgmt.UCMContentManager.saveContent(UCMContentManager.java:95)
            at com.edocs.common.reporting.batch.BatchEventHandler.processBatchRequest(BatchEventHandler.java:284)
            at com.edocs.common.reporting.batch.BatchEventHandler.service(BatchEventHandler.java:138)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.executeInternal(BatchReportProcessorTask.java:156)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.doProcessTask(BatchReportProcessorTask.java:68)
            at com.edocs.pwc.tasks.CommonTask.processTask(CommonTask.java:166)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.__WL_invoke(Unknown Source)
            at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.processTask(Unknown Source)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl_WLSkel.invoke(Unknown Source)
            at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:85)
            at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
            at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: oracle.stellent.ridc.protocol.ProtocolException: java.io.IOException: Input terminated before being able to read line
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:149)
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:108)
            at com.edocs.common.integration.contmgmt.UCMContentManager.saveContent(UCMContentManager.java:81)
            ... 17 more
    Caused by: java.io.IOException: Input terminated before being able to read line
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.readLine(HdaBinderSerializer.java:371)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.readToEnd(HdaBinderSerializer.java:335)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.parseBinder(HdaBinderSerializer.java:165)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.parseBinder(HdaBinderSerializer.java:71)
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:126)
            ... 19 more
    2013-07-11 12:24:37,870 ERROR [BatchEventHandler] com.edocs.common.api.integration.contmgmt.ContentException: oracle.stellent.ridc.protocol.ProtocolEx
    ception: java.io.IOException: Input terminated before being able to read line
            at com.edocs.common.integration.contmgmt.UCMContentManager.saveContent(UCMContentManager.java:95)
            at com.edocs.common.reporting.batch.BatchEventHandler.processBatchRequest(BatchEventHandler.java:284)
            at com.edocs.common.reporting.batch.BatchEventHandler.service(BatchEventHandler.java:138)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.executeInternal(BatchReportProcessorTask.java:156)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.doProcessTask(BatchReportProcessorTask.java:68)
            at com.edocs.pwc.tasks.CommonTask.processTask(CommonTask.java:166)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.__WL_invoke(Unknown Source)
            at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.processTask(Unknown Source)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl_WLSkel.invoke(Unknown Source)
            at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:85)
            at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
            at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: oracle.stellent.ridc.protocol.ProtocolException: java.io.IOException: Input terminated before being able to read line
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:149)
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:108)
            at com.edocs.common.integration.contmgmt.UCMContentManager.saveContent(UCMContentManager.java:81)
            ... 17 more
    Caused by: java.io.IOException: Input terminated before being able to read line
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.readLine(HdaBinderSerializer.java:371)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.readToEnd(HdaBinderSerializer.java:335)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.parseBinder(HdaBinderSerializer.java:165)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.parseBinder(HdaBinderSerializer.java:71)
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:126)
            ... 19 more
    2013-07-11 12:24:39,722 ERROR [BatchEventHandler] com.edocs.common.api.integration.contmgmt.ContentException: oracle.stellent.ridc.protocol.ProtocolEx
    ception: java.io.IOException: Input terminated before being able to read line
            at com.edocs.common.integration.contmgmt.UCMContentManager.saveContent(UCMContentManager.java:95)
            at com.edocs.common.reporting.batch.BatchEventHandler.processBatchRequest(BatchEventHandler.java:284)
            at com.edocs.common.reporting.batch.BatchEventHandler.service(BatchEventHandler.java:138)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.executeInternal(BatchReportProcessorTask.java:156)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.doProcessTask(BatchReportProcessorTask.java:68)
            at com.edocs.pwc.tasks.CommonTask.processTask(CommonTask.java:166)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.__WL_invoke(Unknown Source)
            at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.processTask(Unknown Source)
            at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl_WLSkel.invoke(Unknown Source)
            at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:85)
            at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
            at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: oracle.stellent.ridc.protocol.ProtocolException: java.io.IOException: Input terminated before being able to read line
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:149)
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:108)
            at com.edocs.common.integration.contmgmt.UCMContentManager.saveContent(UCMContentManager.java:81)
            ... 17 more
    Caused by: java.io.IOException: Input terminated before being able to read line
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.readLine(HdaBinderSerializer.java:371)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.readToEnd(HdaBinderSerializer.java:335)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.parseBinder(HdaBinderSerializer.java:165)
            at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.parseBinder(HdaBinderSerializer.java:71)
            at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:126)
            ... 19 more

    The following is my testing code.
    package ebilling;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.security.SecureRandom;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Calendar;
    import java.util.List;
    import java.util.Properties;
    import java.util.concurrent.LinkedBlockingQueue;
    import java.util.concurrent.ThreadPoolExecutor;
    import java.util.concurrent.TimeUnit;
    import oracle.stellent.ridc.IdcClient;
    import oracle.stellent.ridc.IdcClientManager;
    import oracle.stellent.ridc.IdcContext;
    import oracle.stellent.ridc.model.DataBinder;
    import oracle.stellent.ridc.model.DataObject;
    import oracle.stellent.ridc.model.DataResultSet;
    import oracle.stellent.ridc.model.TransferFile;
    import oracle.stellent.ridc.protocol.ServiceResponse;
    import org.apache.commons.lang.StringUtils;
    public class UCMContentManager {
         * Check in a file into a Oracle WebCenter Content Server and return content id of uploaded content item in Oracle WebCenter Content Server.    
         * @param properties        The Oracle WebCenter Content Server connection properties.
         * @param contentFile       This file will be checked in a Oracle WebCenter Content Server.
         * @param path              The location path of checked in file in Oracle WebCenter Content Server. This path includes the file name.<br>
         *                             For example, "/folder1/folder2/file1.txt". The "file1.txt" is the file name part. <br>
         *                             The file name will be used as dDocName in Oracle WebCenter Server. It must be unique.<br>
         * @throws ContentException The exception when uploading file into Oracle WebCenter Content Server.
         * @return                  The content id of uploaded content item in Oracle WebCenter Content Server.
        public String saveContent(Properties properties, File contentFile, String path) throws ContentException{
            if(path.endsWith(SLASH)) {
                throw new ContentException("Require file name in Content Management Server");
            if(!path.startsWith(SLASH)) {
                throw new ContentException("The file store path in Content Management Server should be absolute.");
            if (path.indexOf("//") != -1) {
                path = path.replace("//", SLASH);
            String[] paths = path.split(SLASH);       
            String[] parents = new String[paths.length - 1];
            String itemName = paths[paths.length-1];
            System.arraycopy(paths, 0, parents, 0, paths.length-1);
            ServiceResponse response = null;
            try {
                IdcClientManager manager = new IdcClientManager();
                IdcClient client = manager.createClient(properties.getProperty(URL_PROPERTY));
                client.getConfig().setProperty ("http.library", "apache4");
                String user = properties.getProperty(USERNAME_PROPERTY);
                String pwd = properties.getProperty(PASSWORD_PROPERTY);
                IdcContext connectionContext = new IdcContext(user, pwd);
                pwd = null;
                //create the parent folders if they don't exist
                String folderGUID = makeFolders(properties, parents);
                //check in the file
                DataBinder requestData = client.createBinder();
                requestData.putLocal("IdcService", "CHECKIN_UNIVERSAL");
                requestData.putLocal("IsJava", "1");
                requestData.putLocal("dDocName", itemName);           
                requestData.putLocal("dDocTitle", itemName);           
                requestData.putLocal("dDocType", "Binary");
                requestData.putLocal("dSecurityGroup", "Public");
                requestData.addFile("primaryFile", new TransferFile(contentFile));
                response = client.sendRequest(connectionContext, requestData);           
                DataBinder responseData = response.getResponseAsBinder();
                //String did = responseData.getLocal("dID");           
                String dDocname = responseData.getLocal("dDocName");
                closeResponse(response);
                //link the file in a folder
                requestData = client.createBinder();
                requestData.putLocal("IdcService", "FLD_CREATE_FILE");
                requestData.putLocal("fParentGUID", folderGUID);
                String fileType = "owner";
                requestData.putLocal("fFileType", fileType);           
                requestData.putLocal("dDocName", dDocname);           
                response = client.sendRequest(connectionContext, requestData);
                return dDocname;
            } catch (Throwable e) {
                throw new ContentException(e);
            } finally{
                closeResponse(response);
        public void deleteContent(Properties properties, String contentId) throws ContentException{
            List<String> didList = getDIds(properties, contentId);
            contentId = contentId.toUpperCase();
            ServiceResponse    response = null;
            try {           
                IdcClientManager manager = new IdcClientManager();
                IdcClient client = manager.createClient(properties.getProperty(URL_PROPERTY));
                client.getConfig().setProperty ("http.library", "apache4");
                String user = properties.getProperty(USERNAME_PROPERTY);
                String pwd = properties.getProperty(PASSWORD_PROPERTY);
                IdcContext connectionContext = new IdcContext(user, pwd);
                pwd = null;
                DataBinder requestData = null;
                for(int i=0; i<didList.size(); i++) {
                    String did = didList.get(i);
                    requestData = client.createBinder();
                    requestData.putLocal("IdcService", "DELETE_DOC");
                    requestData.putLocal("dDocName", contentId);               
                    requestData.putLocal("dID", did);   
                    response = client.sendRequest(connectionContext, requestData);
                    closeResponse(response);
                    //delete parent folder
    //                try {
    //                    requestData = client.createBinder();           
    //                    requestData.putLocal("IdcService", "FLD_DELETE");       
    //                    requestData.putLocal("item1", "path:" + parentPath);
    //                    requestData.putLocal("constructDialog", "1");
    //                    response = client.sendRequest(connectionContext, requestData);
    //                } catch (Exception e) {
    //                    // TODO: handle exception
            } catch (Exception e) {
                throw new ContentException(e);
            } finally {
                closeResponse(response);
        public int getFileCountInFolder(Properties properties, String path) throws ContentException{
            ServiceResponse    response = null;
            try {
                IdcClientManager manager = new IdcClientManager();
                IdcClient client = manager.createClient(properties.getProperty(URL_PROPERTY));
                client.getConfig().setProperty ("http.library", "apache4");
                String user = properties.getProperty(USERNAME_PROPERTY);
                String pwd = properties.getProperty(PASSWORD_PROPERTY);
                IdcContext connectionContext = new IdcContext(user, pwd);
                pwd = null;
                DataBinder binder = client.createBinder();
                binder.putLocal("IdcService", "FLD_BROWSE");
                binder.putLocal("path", path);
                response = client.sendRequest(connectionContext, binder);
                DataBinder result = response.getResponseAsBinder();
                String num = result.getLocal("numFiles");
                return Integer.parseInt(num);
            catch (Exception e) {
                throw new ContentException(e);
            } finally {
                closeResponse(response);
        private String getFolderGUID(Properties properties, String path) throws ContentException {
            ServiceResponse    response = null;       
            String tmpFolderGUID = null;
            try {
                IdcClientManager manager = new IdcClientManager();
                IdcClient client = manager.createClient(properties.getProperty(URL_PROPERTY));
                client.getConfig().setProperty ("http.library", "apache4");
                String user = properties.getProperty(USERNAME_PROPERTY);
                String pwd = properties.getProperty(PASSWORD_PROPERTY);
                IdcContext connectionContext = new IdcContext(user, pwd);
                pwd = null;   
                DataBinder requestData = client.createBinder();
                requestData.putLocal("IdcService", "FLD_INFO");
                requestData.putLocal("path", path);       
                response = client.sendRequest(connectionContext,
                        requestData);
                DataResultSet result = response.getResponseAsBinder().getResultSet("FolderInfo");
                tmpFolderGUID = result.getRows().get(0).get("fFolderGUID")
                    .toString();
                if(StringUtils.isBlank(tmpFolderGUID))
                    tmpFolderGUID = null;           
            } catch (Exception e) {               
            } finally {
                closeResponse(response);
            return tmpFolderGUID;
        public boolean deleteFolder(Properties properties, String path) throws ContentException {
            if(getFolderGUID(properties, path)==null)       
                return false;
            int fileCount = getFileCountInFolder(properties, path);
            ServiceResponse    response = null;
            if(fileCount==0) {
                try {
                    IdcClientManager manager = new IdcClientManager();
                    IdcClient client = manager.createClient(properties.getProperty(URL_PROPERTY));
                    client.getConfig().setProperty ("http.library", "apache4");
                    String user = properties.getProperty(USERNAME_PROPERTY);
                    String pwd = properties.getProperty(PASSWORD_PROPERTY);
                    IdcContext connectionContext = new IdcContext(user, pwd);
                    pwd = null;               
                    DataBinder binder = client.createBinder();   
                    binder.putLocal("IdcService", "FLD_DELETE");       
                    binder.putLocal("item1", "path:" + path);
                    binder.putLocal("constructDialog", "1");
                    response = client.sendRequest(connectionContext, binder);
                    return true;
                catch (Exception e) {
                    throw new ContentException(e);
                } finally {
                    closeResponse(response);
            } else {
                return false;
        private String buildPath(String[] arr, int i) {
            StringBuilder buf = new StringBuilder();
            for(int j=0; j<=i; j++) {
                buf.append(arr[j]);
                buf.append(SLASH);
            return buf.toString();
        private String makeFolders(Properties properties, String[] paths) throws ContentException{
            String folderGUID = "";
            ServiceResponse response = null;
            try {
                IdcClientManager manager = new IdcClientManager();
                IdcClient client = manager.createClient(properties.getProperty(URL_PROPERTY));
                client.getConfig().setProperty ("http.library", "apache4");
                String user = properties.getProperty(USERNAME_PROPERTY);
                String pwd = properties.getProperty(PASSWORD_PROPERTY);
                IdcContext connectionContext = new IdcContext(user, pwd);
                pwd = null;
                String parentFolderGUID = null;
                for(int i=0; i<paths.length; i++) {
                    String fullPath = buildPath(paths, i);
                    DataBinder requestData = null;                   
                    parentFolderGUID = folderGUID;
                    folderGUID = getFolderGUID(properties, fullPath);
                    boolean exists = folderGUID!=null;
                    DataResultSet result = null;               
                    if(!exists) {
                        //create new folder
                        try {
                            requestData = client.createBinder();                   
                            requestData.putLocal("IdcService", "FLD_CREATE_FOLDER");
                            requestData.putLocal("fParentGUID", parentFolderGUID);
                            requestData.putLocal("fFolderName", paths[i]);
                            response = client.sendRequest(connectionContext, requestData);
                        } finally {
                            closeResponse(response);
                        //retrieve folderGUID of new folder
                        folderGUID = getFolderGUID(properties, fullPath);                   
            } catch (Throwable e) {
                throw new ContentException(e);
            } finally{
                closeResponse(response);
            return folderGUID;
        public List<String> getDIds(Properties properties, String contentId) throws ContentException{
            contentId = contentId.toUpperCase();
            List<String> didList = new ArrayList<String>();
            ServiceResponse    response = null;
            try {
                IdcClientManager manager = new IdcClientManager();
                IdcClient client = manager.createClient(properties.getProperty(URL_PROPERTY));
                client.getConfig().setProperty ("http.library", "apache4");
                String user = properties.getProperty(USERNAME_PROPERTY);
                String pwd = properties.getProperty(PASSWORD_PROPERTY);
                IdcContext connectionContext = new IdcContext(user, pwd);
                pwd = null;
                DataBinder requestData = null;
                requestData = client.createBinder();
                requestData.putLocal("IdcService", "GET_SEARCH_RESULTS");
                requestData.putLocal("SortField", "dInDate");
                requestData.putLocal("SortType", "DESC");
                requestData.putLocal("QueryText", "dDocName <matches> `" + contentId +"`");
                response = client.sendRequest(connectionContext, requestData);
                DataBinder result = response.getResponseAsBinder();
                DataResultSet resultSet = result.getResultSet("SearchResults");
                for (DataObject dataObject : resultSet.getRows()) {
    //                System.out.println("ID : " + dataObject.get("dID")+" dDocName : "
    //                        + dataObject.get("dDocName") + " Title : " + dataObject.get("dDocTitle")
    //                        + " Author : " + dataObject.get("dDocAuthor") + " Security Group : "
    //                        + dataObject.get("dSecurityGroup"));
                    String did = dataObject.get("dID");
                    didList.add(did);
                    //break;
            } catch (Exception e) {
                throw new ContentException(e);
            } finally{
                closeResponse(response);
            return didList;
         * Get the file content represented by contentId from a Oracle WebCenter Content Server.
         * The return value is the input stream of retrieved file content.
         * @param properties        The Oracle WebCenter Content Server connection properties.
         * @param contentId         The Content ID for the content item in Oracle WebCenter Content Server.
         * @throws ContentException The exception when retrieving content from Oracle WebCenter Content Server.
         * @return                  The input stream of retrieved file content.
        public InputStream retrieveContent(Properties properties, String contentId) throws ContentException{
            try {
                return new FileInputStream(retrieveContentFile(properties, contentId));
            } catch (Throwable e) {
                throw new ContentException(e);
        public File retrieveContentFile(Properties properties, String contentId) throws ContentException {
            contentId = contentId.toUpperCase();
            ServiceResponse response = null;
            try {
                IdcClientManager manager = new IdcClientManager();
                IdcClient client = manager.createClient(properties.getProperty(URL_PROPERTY));
                client.getConfig().setProperty ("http.library", "apache4");
                String user = properties.getProperty(USERNAME_PROPERTY);
                String pwd = properties.getProperty(PASSWORD_PROPERTY);
                IdcContext connectionContext = new IdcContext(user, pwd);
                pwd = null;
                DataBinder binder = client.createBinder();
                binder.putLocal("IdcService", "GET_FILE");
                //binder.putLocal("dID", dID);
                binder.putLocal("dDocName", contentId);
                binder.putLocal("RevisionSelectionMethod", "Latest");
                response = client.sendRequest(connectionContext, binder);
                InputStream in = null;
                OutputStream out = null;
                String edxhome = System.getProperty("edx.home");
                File tmpParent = new File(edxhome);
                tmpParent = new File(tmpParent, "Output");
                tmpParent = new File(tmpParent, "tmp");
                tmpParent.mkdirs();
                File tmpFile = File.createTempFile("down_", "_ucm", tmpParent);
                tmpFile.deleteOnExit();
                try {
                    in = response.getResponseStream();
                    out = new FileOutputStream(tmpFile);
                    byte[] buf = new byte[1024];
                    int read = -1;
                    while((read = in.read(buf))!=-1) {
                        out.write(buf, 0, read);
                } finally{
                    try {
                        if(in!=null)
                            in.close();
                    } catch (Exception e2) {
                    try {
                        if(out!=null)
                            out.close();
                    } catch (Exception e2) {
                return tmpFile;
            } catch (Throwable e) {
                throw new ContentException(e);
            } finally{
                closeResponse(response);
        private void closeResponse(ServiceResponse response) {
            if(response!=null) {
                try {
                    response.close();
                } catch (Exception e) {
        private static final String SLASH = "/";   
        private static final String URL_PROPERTY = "contentServerURL";
        private static final String USERNAME_PROPERTY = "contentServerUser";
        private static final String PASSWORD_PROPERTY = "contentServerPassword";
        static volatile boolean flag = false;
        static class UploadTask implements Runnable{
            public void run() {           
                try {
                    while(!flag) {
                        UCMContentManager manager = new UCMContentManager();
                        Properties properties = new Properties();
                        properties.put(URL_PROPERTY, "https://slc402124:16201/cs/idcplg");
                        properties.put(USERNAME_PROPERTY, "weblogic");
                        properties.put(PASSWORD_PROPERTY, "weblogic1");
                        File contentFile = new File("C:/toding/mypro/UCM/test.txt");
                        String parentPath = "/new/test/multiThreadUpload/";
                        String location = makePath(parentPath);
                        manager.saveContent(properties, contentFile, location);
                        System.out.println(location);
                        Thread.sleep(5000);
                } catch (Exception e) {
                    e.printStackTrace();
                    flag = true;
        public static void main(String[] args) throws Exception{
            ThreadPoolExecutor executor = new ThreadPoolExecutor(10, 10, 60, TimeUnit.SECONDS,
                     new LinkedBlockingQueue<Runnable>());
            for(int i=0; i<10; i++) {
                 UploadTask uploadTask = new UploadTask();
                 executor.execute(uploadTask);
            while(!flag) {
                Thread.sleep(5000);
            executor.shutdown();
        public static String makePath(String parentPath) {
            StringBuilder buf = new StringBuilder();
            buf.append(parentPath);
            if(!parentPath.endsWith("/")) {
                buf.append("/");
            Calendar rightNow = Calendar.getInstance();
            String pattern = "yyyyMMdd";
            SimpleDateFormat simDateForm = new SimpleDateFormat(pattern);
            String dateStr = simDateForm.format((rightNow).getTime());       
            pattern = "HHmmssSSS";
            simDateForm = new SimpleDateFormat(pattern);
            String timeStr = simDateForm.format((rightNow).getTime());
            buf.append(dateStr);
            buf.append("/");
            buf.append(timeStr);
            buf.append("_");
            buf.append(random.nextInt(10000));
            String finalLocation = buf.toString();
            return finalLocation;
        private static SecureRandom random = new SecureRandom();

  • IDoc fields, when empty

    Hi all,
    I have a requirement to send IDoc to external system. When there is no corresponding data, IDoc fields are not filling.
    I need to fill blant value to the IDoc fields and send to external system.
    I don't have permissions to change the standard code.
    My doubt is: Can I fill the empty field in conversions or in any other place, other than coding? is BD64 useful to fill the IDoc field?
    Thanks in Adv,
    Moderator message - Duplicate post locked
    Edited by: Rob Burbank on Dec 9, 2009 9:51 AM

    Hi Kanagaraja,
    I am sending the IDoc to PI system using ALE. The IDoc is CLFMAS. when ever a Material Master IDoc generated, subsequent CLFMAS will be generated. The IDoc filling logic is actually in Master_IDoc_MATMAS FM. I think I don't have permissions to change the coding, since its a standard IDoc and some other systems also using the same IDoc generation logic.

  • Standard Vendor IDoc CREMDM04 needs to be triggered from the transactions

    The Standard Vendor IDoc CREMDM04 needs to be triggered from the following transactions:
    u2022XK01 (Create Vendor)
    u2022XK02 (Modify Vendor)
    u2022User Exit EXIT_SAPOTM_VEND01 .
    The following are some more details:
    u2022Receiving System: SAP PI
    u2022Sending System: SAP ECC
    u2022Direction: Outbound from SAP ECC.
    How do we achieve it ??
    BR.
    Tan
    Moderator message: please do more research before asking, show what you have done when posting.
    Edited by: Thomas Zloch on Feb 20, 2012

    Hi,
    In Tx. WE42, Select the process code for the corresponding partner and bind your workflow / task inplace of the function module with the process code. Now, this will enable the idoc to get placed in the agents(identified by that workflow)inbox.
    But to design the workflow, you`ll have to use tx. swdd and prior to that get some basic understanding of Business Workflow from SAP Library.
    Hope the info. is helpful and reward points if so.
    Regards

  • ALE EDI /IDOC Documents needed

    Hi All,
      Can any body send the ALE ,EDI and IDOC Dcouments with live examples.
      My mail id is : [email protected]
    Thanks and Regards,
    Muralikrishna

    Hi
    IDOC
    Data Creation in Idoc
    IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an
    asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
    While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
    IDoc is a intermediate document to exchange data between two SAP Systems.
    *IDocs are structured ASCII files (or a virtual equivalent).
    *Electronic Interchange Document
    *They are the file format used by SAP R/3 to exchange data with foreign systems.
    *Data Is transmitted in ASCII format, i.e. human readable form
    *IDocs exchange messages
    *IDocs are used like classical interface files
    IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
    WE30 - you can create a IDOC type.
    An IDOC with data, will have to be triggered by the application that is trying to send out the data.
    FOr testing you can use WE19.
    How to create idoc?
    *WE30 - you can create a IDOC type
    For more information in details on the same along with the examples can be viewed on:
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
    http://www.sappoint.com/presentation.html
    http://www.allsaplinks.com/idoc_search.html
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://www.erpgenie.com/sapedi/idoc_abap.htm
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30 )
    Create Message Type ( WE81 )
    Assign Idoc Type to Message Type ( WE82 )
    Creating a Segment
    Go to transaction code WE31
    Enter the name for your segment type and click on the Create icon
    Type the short text
    Enter the variable names and data elements
    Save it and go back
    Go to Edit -> Set Release
    Follow steps to create more number of segments
    Create IDOC Type
    Go to transaction code WE30
    Enter the Object Name, select Basic type and click Create icon
    Select the create new option and enter a description for your basic IDOC type and press enter
    Select the IDOC Name and click Create icon
    The system prompts us to enter a segment type and its attributes
    Choose the appropriate values and press Enter
    The system transfers the name of the segment type to the IDOC editor.
    Follow these steps to add more number of segments to Parent or as Parent-child relation
    Save it and go back
    Go to Edit -> Set release
    Create Message Type
    Go to transaction code WE81
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter
    Click New Entries to create new Message Type
    Fill details
    Save it and go back
    Assign Message Type to IDoc Type
    Go to transaction code WE82
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    Click New Entries to create new Message Type.
    Fill details
    Save it and go back
    Check these out..
    Re: How to create IDOC
    Check below link. It will give the step by step procedure for IDOC creation.
    http://www.supinfo-projects.com/cn/2005/idocs_en/2/
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
    go trough these links.
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
    1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
    2.IDOCs are independent of the sending and receiving systems.
    3.IDOCs are independent of the direction of data exchange.
    The two available process for IDOCs are
    Outbound Process
    Inbound Process
    AND There are basically two types of IDOCs.
    Basic IDOCs
    Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
    Extended IDOCs
    Extending the functionality by adding more segments to existing Basic IDOCs.
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30)
    Create Message Type ( WE81)
    Assign Idoc Type to Message Type ( WE82)
    imp links
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    www.sappoint.com
    --here u can find the ppts and basic seetings for ALE
    http://sappoint.com/presentation.html
    www.sapgenie.com
    http://www.sapgenie.com/ale/index.htm
    WE30 - you can create a IDOC type.
    An IDOC with data, will have to be triggered by the application that is trying to send out the data.
    Try this..Hope this will help.
    >>>> SAP ALE & IDOC<<<<
    Steps to configuration(Basis) >>
    1. Create Logical System (LS) for each applicable ALE-enabled client
    2. Link client to Logical System on the respective servers
    3. Create background user, to be used by ALE(with authorizaton for ALE postings)
    4. Create RFC Destinations(SM59)
    5. Ports in Idoc processing(WE21)
    6. Generate partner profiles for sending system
    The functional configuration(Tcode: SALE)
    • Create a Customer Distribution Model (CDM);
    • Add appropriate message types and filters to the CDM;
    • Generate outbound partner profiles;
    • Distribute the CDM to the receiving systems; and
    • Generate inbound partner profiles on each of the clients.
    Steps to customize a new IDoc >>>
    1. Define IDoc Segment (WE31)
    2. Convert Segments into an IDoc type (WE30)
    3. Create a Message Type (WE81)
    4. Create valid Combination of Message & IDoc type(WE82)
    5. Define Processing Code(WE41 for OUT / WE42 for IN)
    6. Define Partner Profile(WE20)
    Important Transaction Codes:
    SALE - IMG ALE Configuration root
    WE20 - Manually maintain partner profiles
    BD64 - Maintain customer distribution model
    BD71 - Distribute customer distribution model
    SM59 - Create RFC Destinations
    BDM5 - Consistency check (Transaction scenarios)
    BD82 - Generate Partner Profiles
    BD61 - Activate Change Pointers - Globally
    BD50 - Activate Change Pointer for Msg Type
    BD52 - Activate change pointer per change.doc object
    BD59 - Allocation object type -> IDOC type
    BD56 - Maintain IDOC Segment Filters
    BD53 - Reduction of Message Types
    BD21 - Select Change Pointer
    BD87 - Status Monitor for ALE Messages
    BDM5 - Consistency check (Transaction scenarios)
    BD62 - Define rules
    BD79 - Maintain rules
    BD55 - Defining settings for IDoc conversion
    WEDI - ALE IDoc Administration
    WE21 - Ports in Idoc processing
    WE60 - IDoc documentation
    SARA - IDoc archiving (Object type IDOC)
    WE47 - IDoc status maintenance
    WE07 - IDoc statistics
    BALE - ALE Distribution Administration
    WE05 - IDoc overview
    BD87 - Inbound IDoc reprocessing
    BD88 - Outbound IDoc reprocessing
    BDM2 - IDoc Trace
    BDM7 - IDoc Audit Analysis
    BD21 - Create IDocs from change pointers
    SM58 - Schedule RFC Failures
    Basic config for Distributed data:
    BD64: Maintain a Distributed Model
    BD82: Generate Partner Profile
    BD64: Distribute the distribution Model
    Programs
    RBDMIDOC – Creating IDoc Type from Change Pointers
    RSEOUT00 – Process all selected IDocs (EDI)
    RBDAPP01 - Inbound Processing of IDocs Ready for Transfer
    RSARFCEX - Execute Calls Not Yet Executed
    RBDMOIND - Status Conversion with Successful tRFC Execution
    RBDMANIN - Start error handling for non-posted IDocs
    RBDSTATE - Send Audit Confirmations
    FOr testing you can use WE19.
    Check these links.
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
    Please check this PDF documents for ALE and IDoc.
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
    Check below link. It will give the step by step procedure for IDOC creation.
    http://www.supinfo-projects.com/cn/2005/idocs_en/2/
    EDI
    Electronic Data Interchange
    Cross-company exchange of electronic data (for example business documents) between domestic and international business partners who use a variety of hardware, software, and communication services. The data involved is formatted according to predefined standards. In addition to this, SAP ALE technology is available for data exchange within a company.
    Refer
    http://www.erpgenie.com/sapedi/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
    https://www.2020software.com/products/Fourth_Shift_Edition_for_SAP_Business_One_Electronic_Data_Interchange.asp
    http://downloads-zdnet.com.com/SoftwareandWebDevelopment/SoftwareDevelopmentTools/ElectronicData+Interchange/
    http://www.erpgenie.com/sapedi/index.htm
    http://www.kostal.com/english/downloads/EDI_AGB_eng.pdfd
    EDI FLOW :
    Here is some thing which helps you and here the purchase order is taken as example too..
    Electronic Data Interchange, or EDI, is the electronic exchange of business data. Using a standard format, EDI provides a method of transmitting business data from one computer to another, without the need to re-key data. This electronic link can result in more effective business transactions. With EDI, paper documents such as invoices can be replaced with electronic transmissions, thus time is saved, and the potential for error is minimized. Data can be exchanged at any time. Related business expenses, such as postage, printing, phone calls, and handling, can also be significantly reduced. EDI can aid in the support of manufacturing efforts, such as Just-in-Time and Third Party Warehousing, and financial efforts, such as Electronic Payments.
    What parts of the business cycle can be supported by EDI?
    Any business documents that are currently exchanged using paper can be converted to an EDI. Standards. Standards include ANSI X12 and XML/EDI are primarily used in the United States, while EDIFACT is used in Europe and Asia.
    How does EDI get started?
    EDI gets started when one company contacts another expressing interest in trading business documents electronically using Electronic Data Interchange. The two companies must first determine each other's EDI capabilities. If you do not already know your EDI capabilities, we have prepared a questionnaire to help you determine them. If you are already EDI capable, we will coordinate with your technical staff to determine a testing plan. Upon completion of testing the EDI documents, the appropriate business personnel will set a production start date to begin the exchange of EDI business data. If you are not EDI capable, we recommend you first obtain a commitment from your upper management. Your company will need to allocate resources and capital for software, hardware, testing, possible programming, and training.
    What is the flow of EDI?
    The flow of EDI depends on the sophistication of your systems and your EDI software. If you have internal purchasing/order entry systems, you will need interface programs that can extract and insert data out of and into these systems. EDI programs that interface with your internal systems are preferred over software that requires re-keying of data. Embassy Software specializes in seemless interface between EDI and your back office systems. Using a purchase order as an example of a business document your customer would send that PO electronically (850) to you. It could be sent either through a VAN (Value Added Network) or through an FTP server. You would take that 850 and convert it either into and ODBC database, a flat file or XML document to be imported into your Order System with the use of EDI Software such as PassportXchange.. Using EDI communication software, which is part of the PassportXchange package you would pull down data at set intervals from the VAN or FTP. These documents are then processed through EDI translation software and output to our order entry system. Finally, an EDI document called a functional acknowledgment (997) is sent to your customer.
    check this.
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
    https://www.2020software.com/products/Fourth_Shift_Edition_for_SAP_Business_One_Electronic_Data_Interchange.asp
    http://downloads-zdnet.com.com/SoftwareandWebDevelopment/SoftwareDevelopmentTools/ElectronicData+Interchange/
    http://www.erpgenie.com/sapedi/index.htm
    http://www.kostal.com/english/downloads/EDI_AGB_eng.pdfd
    ALE
    Application Linking and Enabling (ALE)
    In this document you will learn the step-by-step procedure to setup the ALE system and go through a transaction between two clients
    For our purpose we have two clients
    namely Client 100 and Client 200.
    System name is SAPKDC (FOR BOTH 100 AND 200 CLIENTS).
    Distribution of Material Master Data Between two Systems
    1) SETUP LOGICAL SYSTEM: (Note: Do Not Create This Step)
    To do this follow the following steps
    Execute SALE Transaction Code
    On The Screen Click on Sending and Receiving Systems.
    Then Click on Logical Systems.
    Then Click Defining Logical Systems.
    Click New Entries Button
    (E.g. (LG100 sending system)
    (LG200 receiving system))
    Enter two logical system names and their description.
    Save
    Comeback to SALE Transaction Code screen.
    2) Now you have to allocate the created logical systems to respective clients.( Note: Do Not Create This Step)
    LG100 assign to client 100
    LG200 assign to client 200
    To do this, do the following.
    Click Assigning Client to Logical System.
    Ignore the message that comes up on the screen.
    Select client 100
    Click details button on the toolbar icon or press F2.
    In the logical system box, enter LG100.
    Click on the save Icon
    Click the back button.
    Now select client 200.
    Click details icon or press f2.
    In logical Systems box, enter LG200.
    Save
    Back.
    Comeback to SALE Transaction Code screen.
    3) Maintain RFC Destination: (TR.CODE:SM59)
    (Note: Do Not Create This Step)
    Click Create Button on the Screen
    On the Screen Maintain RFC Destination i.e LG200.
    Enter LG200 in RFC destination box.
    Connection type is 3
    Give a description for the RFC destination.
    Maintain Technical Settings on Details on Technical Settings tab
    Target Host as : SAPKDC (NOTE: Save it as a Host Name)
    Maintain Logon Details on Logon/Security tab.
    Language: EN.
    User: MMUSER200 (This is the logon for dist.)
    Client : 200
    Password: MM1234.
    Save.
    Click on create to do the above process for Client 200 in
    The client 200 system.
    4) Maintain Distribution Model.(BD64). (ABAPer role starts here)
    Execute Maintain distribution model directly for
    creating the model.
    Click on change mode button on App tool bar of the Screen.
    Create Model View pushbutton on App tool bar of the Screen.
    A pop screen will appear in which you specify
    Short text as Distribution for MM Data.
    Enter Technical Name as LGMODEL.
    Select Model View and Click on Add Message Type Pushbutton on App toolbar of the Screen.
    A popup screen will appear in which you specify
    Model View as LGMODEL.
    Sender as LG100.
    Receiver as LG200.
    Again Click on Add Message Type Pushbutton on App toolbar of the Screen.
    A popup screen will appear in which you specify
    Model View as LGMODEL.
    Sender as LG200.
    Receiver as LG100.
    SAVE.
    On the same screen goto Menubar and select Environment.
    And then select Generate Partner Profiles , then execute it.
    On the Screen specify the Logical System as LG200.
    Then execute the screen.
    Click back.
    Again On the same screen goto Menubar and select EDIT.
    Again select Model View and then select Distribute.
    ****LOGIN to client 200.
    Execute Tr.code BD64 and again On the same screen goto Menubar and select Environment.
    And then select Generate Partner Profiles , then execute it.
    On the Screen specify the Model View as LGMODEL
    And Specify the Logical System as LG100.
    Then execute the screen.
    Click back.
    *******Switch back to client 100 Session.
    5) Create Material using MM03 Tr.Code.
    Enter the material name as LGMATERIAL
    Industry sector as Mechanical Engineering
    Material Type as Finished Products.
    And then Click on Data Pushbutton on the App tool bar.
    Select views.
    In the select views box for materials check basic data 1 AND 2.
    Click enter icon.
    In the next screen that you get
    Give the text of the material as NEW MATERIAL.
    Base unit of measure as KG.
    Gross Weight as 200.
    Net Weight as 100.
    Weight Unit as KG.
    In the description area language (E) and material description.
    Click Save.
    Now I Created a Material in Client 100 , I want to transfer this data to Client 200.
    6) Execute BD10 to transfer the material in which you specify
    the material as LGMATERIAL and
    message type as MATMAS (client100).
    Then a Screen will be displayed in which it shows that
    1 Master Idoc Generated .. Enter
    1 Communication Idoc Generated..Enter.
    *******LOGIN to Client 200.
    7) Execute BD11 to get the material in which you specify
    the material as LGMATERIAL and
    message type as MATMAS (client200).
    8) Execute Tr.code MM03 and give the material as LGMATERIAL
    and see that the material is displayed as it was in Client 100.
    If not follow these steps.
    9) Execute Tr.code WE19( for rectification of errors in client200).
    Specify the Existing Idoc Number and Executes it .
    A Screen is displayed in which you specify the corresponding Function Module as INPUT_IDOC_MATMAS01 and execute it.
    10) Execute Tr.code MM03 and give the material as LGMATERIAL
    and see that the material is displayed as it was in Client 100.
    Now the Material is correctly displayed in Client 200.
    11) Monitoring of IDOCS.
    Transaction Codes:
    IDOC Display of Status: WE 05.
    IDOC Date and Time: WE07.
    Outbound:
    Step 1. Application document is created when transaction is saved.
    2. Message control is invoked.
    3. Messages are processed by system.
    4. Messages are Edited (if desired).
    5. Output (ALE / EDI) is checked
    6. Validate against Message control record from Partner Profile
    7. Application Document is saved.
    8. Entry NAST table is created for every selected output program
    along with Medium & Timing.
    9. Check for Process Immediately .
    If (yes)
    Determine Processing Program from TNAPR Table.
    ELSE
    Execute RSNASTED Program.
    10. Read Partner Profile to determine Process Code.
    11. Process Code points to the Function Module & Invoked.
    12. IDoc is generated.
    13. Check for ALE Request.
    if (Yes)
    Perform Filters, Conversions, Version Changes etc.
    Else.
    IDoc is stored in DATABASE.
    INBOUND:
    Step 1. EDI Subsystem creates an IDoc file from EDI Messages
    2. Subsystem calls Functional Module EDI_DATA_INCOMING from startRFC program.
    3. Data in Control Record is validate against the Partner Profile.
    4. IDoc is generated in Database and syntax check is carried out.
    5. IDoc file is deleted once file read.
    6. Event PROCESSSTATE REACHED is triggered in Idoc Object Workflow.
    7. Check for Process Immediately.
    If NO
    Execute RBDAPP01 Program
    Else
    Read Process Code from Partner Profile
    Process Code Points to Function Module
    Application Document Posted.
    further help:
    check url
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/ale/configuration.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapdevelopment.co.uk/training
    And also u can get lots of inof from the below link.
    http://www.sapgenie.com/ale/why_ale.htm
    Regards

Maybe you are looking for

  • Upgraded to pro X and having issues with form created in pro 9

    I created a form in LiveCyle using Pro 9, the form was created for an employer who had to buy Pro X so I was upgraded to Pro X.  Here are the issues I am having, This form was the first time I have ever created a form and I have never used Java Scrip

  • Problem with nesting repetitive groups, using PDF as template

    We are trying to use a pdf file (Acrobat 5.0) as a template for BI Publisher reports. Our report uses as a data source a xml file (facturas.xml) with data from several bills. In each bill, there are areas where multiple lines must be displayed. We us

  • Can I publish keyframed parameters in an FCP generator?

    Hi I'm making an FCP generator in Motion and have a layer which moves from (0,0) to (x,y) and then goes back to (0,0). What I would like to do is publish the (x,y) position so that I can change this in FCP. I have currently keyframed the animation wi

  • Lr keeps crashing in Mac 10.7.5

    Joined Creative Cloud a few months ago. Ps working fine but Lr keeps crashing. Have to re-install to get back. What's up? What am i doing wrong? thanks.

  • Diagnostic Utility - where is it?

    I nearly positive there was a discrete diagnostic tool when I first got the T520 a month ago. Various updates via the toolbox driver update and such applied. I don't see any subsystem tests any more only memory and nothing specific. So why isn't it a