ALE Idoc coding in BADi

hi friends,
i am adding 2 fields to basic idoc.for this i have created segment in WE31 and attached to idoc. now i need to write code in user exit.but i am not finding the user exit for this.but
BADI is there .plz some one tell me how  to write code in badi. give  me sample code
thanks in advance
regards
rajesh

1. Find the exact definition name
2. Implement in se19 as zdefinition name
3. Go to interface tab after implementing.U can find ur interface name as If_EX_def name
4. Choose the appropriate interface. Double clik on it.
5. Between method and endmethod, u can have ur code .Better to have it as a fn mod.
hope this is helpful
regds
kiran

Similar Messages

  • Diff... between  ALE, IDOC, RFC, BAPI, BADI --- Not clear and clarify

    Hi All
        I am learning XI and the difference between " ALE, IDOC, RFC, BAPI, BADI "
        Not clear and when to use what and how in point of XI ?
       Pl..clarify me
    Adv..thanks and points
    --- Rakesh Behera

    Hi
    This will expalin you every thing ...pl..go through
    The interface concept of the classic R/3 is based on two different strategies: Remote Function Calls (RFC) and data exchange through IDoc message documents. RFC makes direct and synchronous calls of a program in the remote system. If the caller is an external program it will call an RFC-enabled function in R/3 and if the calling program is the R/3 system it will call an RFC-function in another R/3-system or it will call a non-R/3 program through a gateway-proxy (usually rfcexec.exe). BAPIs are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.
    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.
    The philosophical difference between EDI and ALE can be pinned as follows: If we send data to an external partner, we generally speak of EDI, while ALE is a mechanism to reliable replicate data between trusting systems to store a redundant copy of the IDoc data. The difference is made clear, when we think of a purchase order that is sent as an IDoc. If we send the purchase order to a supplier then the supplier will store the purchase order as a sales order. However, if we send the purchase order via ALE to another R/3 system, then the receiving system will store the purchase order also as a purchase order.
    I hope this will help you to understand the difference bet..those
    regards
    --- prasad

  • Ale,idocs,edi,bapi,badi

    Hi Guru,
    Can u give me the detail idea and configuration steps in a sequence of the following -ALE,IDOCS,EDI,BAPI,BADI
    your perfect answer would be very helpful and i will cosider u as a real hiro in sap abap in my mind and heart

    Hi Manas,
    EDI
    EDI stands for Electronic Data Interchange.It is mainly an interface which acts as a moderator between SAP and non SAP system.EDI is used to transfer Datas to R/3 from NonSAP system or Other SAP system.
    EDI uses IDOC as its interface component.Which mean EDI is a concept and IDOC is like protocol.
    EDI is configured in the R/3. It has Outbound folder and indboud folder.
    Outbound folder:This contains the data to be send to the nonSAP system
    Inbound folder:
    This contains the data from the nonSAP to R/3 or SAP system.
    status processing
    This holds the status of message from SAP to NonSAP and from Non-SAP to SAP. So that if any error occurs in transfereing Message it is easily traced out.
    You can refer from this sites
    Check the following links
    See the below links
    SAP XI supports EDIFACT
    How to get started using Conversion Agent from Itemfield
    More on the SAP Conversion Agent by Itemfield
    http://www.stylusstudio.com/edi/XML_to_X12.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b0b355ae-0501-0010-3b83-8f2bb566fa47
    Details on XI EDI adapter from seeburger
    Check this for Conversions-
    SAP XI supports EDIFACT
    http://www.seeburger.it/fileadmin/it/pdf/2005_04_sapphire_Ferrero_transcript.pdf
    http://www.seeburger.com/fileadmin/com/pdf/Butler_Group_SEEBURGER_Technology_Audit.pdf
    http://www.seeburger.com/fileadmin/com/pdf/AS2_General_Overview.pdf
    SAP Adapters
    EDI with XI
    http://www.seeburger.com
    http://www.seeburger.com/fileadmin/com/pdf/AS2_General_Overview.pdf
    http://www.seeburger.it/fileadmin/it/pdf/2005_04_sapphire_Ferrero_transcript.pdf
    http://www.seeburger.com/fileadmin/com/pdf/SEEBURGER_SAP_Adapter_engl.pdf
    http://www.seeburger.com/fileadmin/com/pdf/Butler_Group_SEEBURGER_Technology_Audit.pdf
    http://www.sap.com/france/company/events/2006/02-01-Automotive-Seeburger.pdf
    http://h41123.www4.hp.com/presentations/ISUG/XISeeBurger.ppt
    http://www.sap.com/asia/company/events/nwtechdays/presentation/australia-slides/Pre-Built_Integration.pdf
    Hope this will help you...
    Regards,
    Nitin.

  • ALE Idoc coding

    hi friends,
    i have extended my basic idoc by adding zsegment
    can anyone plz give me sample code to write in userexit
    thanks in advance
    regards
    raj

    Hi,
    check the below thread.
    Re: populate extended idoc fields
    Regards,
    Nagaraj

  • Regarding BDC's, BAPI's, ALE ,IDOCs, BADI's

    Hi all,
    can any one send materials with screen shots having example programs
    for BDC's, BAPI's, ALE ,IDOCs, BADI's
    to my mail id
    <b><REMOVED BY MODERATOR></b>
    regards and thanks
    venu
    Message was edited by:
            Alvaro Tejada Galindo

    hi
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm
    call Transaction or session method ?
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    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
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    BAPI
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    List of all BAPIs
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    <b><REMOVED BY MODERATOR></b>
    regards
    Nagesh.Paruchuri
    Message was edited by:
            Alvaro Tejada Galindo

  • ALE IDoc Conversion Rule or BADI

    Hi,
    I'm new to ALE IDoc. I have a requirement to hide some sensitive data field for the HR information when outbound the Idoc.
    Example, I need to outbound the IT8 Basic Pay with payscale area etc but not with the basic pay amount. I can convert the basic pay amount to zero when the idoc is being created.
    I've searched through some information and found out that there are several ways to achieve it. However, I'm not sure which one is a better way.
    Is it using the Conversion Rule (BD62) or using Badi or Idoc Reduction method is better?
    Kindly give me some hints as I'm very confuse of which one is the better solution.
    Many thanks in advance.

    No user exit is needed for conversion rule.
    However, you should remember that conversion rules are applied segment fields for a particular message type. So wherever the IDoc message type is used the rule will be applied. If you want to associate the rule for any other condition in addition to message type better to go with a BADI
    These are steps to create and apply a conversion rule to a message type:
    1. Transaction BD62 - Create conversion rule and assign it to a IDoc segment
    2. Transaction BD79 - Define the conversion rule by selecting your field and clicking display button. Once inside you can use various options like set constant to map 0 to the basic pay
    3. Finally assign the conversion rule to your message type using BD55
    As for BADIs, IDOC_DATA_MAPPER is also suited for your requirement, the method PROCESS, allows you to manipulate your IDoc fields whichever way you want. You get the control record, data records, using which you can restrict your manipulation to specific message type or other conditions
    To above post, BADI IDOC_CREATION_CHECK should not be used for mappings/conversions as its specific purpose is to stop creation of an IDoc under required conditions

  • Looking for materials in badi bapi and ale idoc

    dude
        i got materials from <removed by moderator> and other few sites also.i need to know the full structure of bapi badi and ale idoc.
    ppl who are working in these areas pls post materials as well the real time issues facing in their comp.so that i can get a wide knowledge.
    pls post........
    waiting ..
    thnx in advance.
    Edited by: Jan Stallkamp on Aug 18, 2008 8:16 PM

    Check these links before posting any further:
    [Step 1|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] <= this one is important for you dude!
    [Step 2|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] <= see the "Why is no one answering" docs!
    [Step 3|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] <= check your own profile dude!
    [Step 4|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] <= optional, but for a good cause!
    [Step 5|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] <= not applicable for you yet
    * * * * * Please read the rules if found usefull! * * * * * *

  • BAPI,BADI ,BDC,ALE ,IDOC,USER EXIT,VALIDATION AND SMART FORMS.

    Dear Experts,
    I am pretty new in BAPI,BADI ,BDC,ALE ,IDOC,USER EXIT,VALIDATION AND SMART FORMS.
    Pls let me know for these topics shall i put the question in this community or should i put in any other form. Pl suggest me .
    Regards
    Shivas

    Plz SEARCH in SCN before posting ,you will get lot of posts .
    Don't use all caps in the subject line

  • BADI/ALE/IDOC

    Can anyone send me some good documents on BADI and ALE/IDOC?
    Points will be rewarded for good and useful documents.
    Mail me at [email protected]

    Hi Rajesh,
    Take a look at this thread.
    ale idoc
    http://cma.zdnet.com/book/abap/index.htm
    http://www.sapdevelopment.co.uk/
    http://www.sap-img.com/
    http://juliet.stfx.ca/people/fac/infosys/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d6/0db357494511d182b70000e829fbfe/frameset.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://www.sapgenie.com/abap/example_code.htm
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://www.sap-img.com/abap-function.htm
    http://www.sapgenie.com/abap/code/abap19.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://help.sap.com/saphelp_40b/helpdata/ru/d6/0dc169494511d182b70000e829fbfe/applet.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/symbols.htm
    http://www.henrikfrank.dk/abapexamples/index.html
    http://sap.ittoolbox.com/documents/document.asp?i=752
    http://members.aol.com/_ht_a/skarkada/sap/
    http://sappoint.com/abap/
    http://members.tripod.com/abap4/SAP_Functions.html
    http://members.ozemail.com.au/~anmari/sap/index.html
    http://www.planetsap.com/Userexit_List.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://www.kabai.com/abaps/q.htm
    http://www.planetsap.com/Userexit_List.htm
    http://help.sap.com/saphelp_bw21c/helpdata/en/c4/3a8090505211d189550000e829fbbd/frameset.htm
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm
    http://www.sap-basis-abap.com/index.htm
    http://help.sap.com/saphelp_40b/helpdata/en/fc/eb2c46358411d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/aa/aeb23789e95378e10000009b38f8cf/frameset.htm
    http://www.geocities.com/ResearchTriangle/1635/system.html
    http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
    http://help.sap.com/saphelp_45b/helpdata/en/d1/801bdf454211d189710000e8322d00/content.htm
    http://www.sapfans.com/sapfans/repos/saprep.htm
    http://www.planetsap.com/howdo_a.htm
    http://help.sap.com/saphelp_util464/helpdata/en/69/c2516e4ba111d189750000e8322d00/content.htm
    http://www.sapgenie.com/abap/smartforms_detail.htm
    http://www.sap-img.com/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    http://www.geocities.com/victorav15/sapr3/abap.html
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://abap4.tripod.com/Other_Useful_Tips.html
    http://help.sap.com/saphelp_45b/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    http://www.sap-basis-abap.com/sapmm.htm
    http://sap.ittoolbox.com/nav/t.asp?t=303&p=448&h1=303&h2=322&h3=448
    http://sapfans.com/
    http://cma.zdnet.com/book/abap/ch03/ch03.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapuk.html
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://www.sapgenie.com/abap/index.htm
    http://www.sap-img.com/abap.htm
    http://www.sapdevelopment.co.uk/tips/tipshome.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
    http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
    http://www.thespot4sap.com/
    http://www.kabai.com/abaps/q.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapgenie.com/abap/tips_and_tricks.htm
    http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
    For FAQ
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.sapgenie.com/faq/abap.htm
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    Weblog for receive email and processing it through ABAP
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
    For Logical database
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    very useful
    http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Useful link to websites
    http://www.hernangn.com.ar/sap.htm
    Useful for background
    http://www.sappoint.com/basis/bckprsng.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/08703713bf277ee10000009b38f8cf/frameset.htm
    http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.wbix_adapters.doc/doc/mysap4/sap4x41.htm
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    For posting weblog,
    /people/sap.user72/blog/2005/06/28/sdn-weblogs-making-it-easier
    Dynamic Internal table -weblog in sdn
    /people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table
    Smartforms
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    Workflow
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
    For examples on WorkFlow...check the below link..
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    ALV
    http://www.geocities.com/mpioud/Abap_programs.html
    Mail
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    BOM Explosion
    /people/prakash.singh4/blog/2005/05/15/explode-boms-in-enterprise-portal-using-htmlb-tree--part-1-abap
    BOM
    http://help.sap.com/saphelp_erp2005/helpdata/en/ea/e9b7234c7211d189520000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/2e4114a61711d2b423006094b9d648/frameset.htm
    http://www.sap-img.com/sap-sd/sales-bom-implementation.htm
    http://www.sap-basis-abap.com/sappp007.htm
    OLE
    http://www.sapgenie.com/abap/ole.htm
    http://help.sap.com/saphelp_46c/helpdata/en/59/ae3f2e488f11d189490000e829fbbd/frameset.htm
    ALVGRID with refresh
    http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html
    For language setting and decimal separator
    /people/horst.keller/blog/2004/11/16/abap-geek-7-150-babylonian-confusion
    Oracle queries
    http://sqlzoo.net/
    To format SQL
    http://www.sqlinform.com/
    SCOT settings
    http://www.sap-img.com/basis/basis-faq.htm
    Status Icon [ALV,Table Control,Tab Strip]
    http://www.sapdesignguild.org/resources/MiniSG-old/from_develop/norm_status_icons.htm#positioning_4
    ALV Group Heading
    http://www.sap-img.com/fu037.htm
    For multiMedia
    /people/thomas.jung3/blog/2005/05/11/using-classic-activex-controls-in-the-abap-control-framework
    Uploading LOGO in SAP
    http://www.sap-img.com/ts001.htm
    LSMW
    http://www.sap-img.com/sap-data-migration.htm
    http://www.sapgenie.com/saptech/lsmw.htm
    http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
    http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-17643ed1d6d658821_glossary/L#Word-17643ed1d6d658821_glossary
    Here are the two links which contains lots of PDFS:
    http://www.easymarketplace.de/online-pdfs-q-s.php
    http://www.consolut.de/saphelp/sap_online_help.html
    Cheers
    VJ
    Message was edited by: Vijayendra  Rao

  • ALE/IDOC/BAPI/BADI/EDI

    Hi,
    ABAP GURUS
    I am a new bie to SAP .Now I want to learn the following things :-
    ALE
    IDOC
    BAPI
    BADI
    EDI
    My doubt is that which should be learned first so that I can understand them more effectively. It may be possible that is not a question to ask but please guide me and also provide me some good links of ppt which gives me the complete overview of all these and the steps to use them.
    Thanks In Advance
    Bharti Jain

    Hi Bharti,
    EDI is Electronic Data Interchange, and is not linked to any technology, is just the definition of the communication of data using electronic equipment. ALE is Application link enabled, and is used by SAP to communicate data between systems, to build distributed systems, using electronic communication.
    iDoc is a data format to send and receive data, then, can be used for EDI and ALE.
    Bapi and Badi are programming tools, that allow to modify the data in the system, and also, a BAPI can be used to send data to other systems, but, in short, are just functions.
    Regards,
    Ivan.

  • NOTES ON ALE, IDOC, BAPI, BADI, LSMW

    HI,
         CAN ANYBODY GIVE ME NOTES OR ANY TYPE OF DOCUMENTATION ON ALE, IDOC, BADI, BAPI, LSMW. I AM NEW TO THIS CONCEPTS. SO PLEASE HELP ME.
                       THANKS IN ADVANCED.

    Hi
    Creation of Custom IDOc type and message Type
    First Create Partner Profile(WE20 Tcode) and Port Definition in WE19 Tcodes.
    take the Basis help to create them.
    1.First create segments in WE31 Tcode with the required dataelements
    2.Create the Basic Idoc Type in WE30
       release the Segments and IDOC type.
    3.Create Message type in We81
    4.Assign the message type to IDOC type in WE82 T code
    5.Create the process code in We41 (for Outbound) WE42 (for Inbound)
    6.Create A fun module in SE37 starting with ZIDOC_OUTPUT_.. by copying some Inbound (for    Inbound) Outbound Fun module
    7.Create  Workflow setting if needed ..
    8. Assign the fun module to Idoc Type, Message Type and WF object (if it is there0
    9.Define setting for fun module in BD51
    10.In BD51 Define the settings for Fun module..
    10.Assign the Processs Code to Fun mod`ule
    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/
    DEFINING THE BADI
    1) execute Tcode SE18.
    2) Specify a definition Name : ZBADI_SPFLI
    3) Press create
    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
    multiple use.
    5) Choose the interface tab
    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7) Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method level desc
    Linese;ection instance methos some desc
    8) place the cursor on the method name desc its parameters to define the interface.
    Parameter type refe field desc
    I_carrid import spfli-carrid some
    I_connid import spefi-connid some
    9) save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION
    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2) Specify aname for implementation ZIM_LINESEL
    3) Specify short desc.
    4) Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5) Specify short desc for method
    6) Dbl clk on method to insert code..(check the code in “AAA”).
    7) Save , check and activate the code.
    Some useful URL
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Now write a sample program to use this badi method..
    Look for “BBB” sample program.
    “AAA”
    data : wa_flights type sflight,
    it_flights type table of sflight.
    format color col_heading.
    write:/ 'Flight info of:', i_carrid, i_connid.
    format color col_normal.
    select * from sflight
    into corresponding fields of table it_flights
    where carrid = i_carrid
    and connid = i_connid.
    loop at it_flights into wa_flights.
    write:/ wa_flights-fldate,
    wa_flights-planetype,
    wa_flights-price currency wa_flights-currency,
    wa_flights-seatsmax,
    wa_flights-seatsocc.
    endloop.
    “BBB”
    *& Report ZBADI_TEST *
    REPORT ZBADI_TEST .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli.
    http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
    and
    http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
    BAPI
    http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5e114a4a1611d1894c0000e829fbbd/frameset.htm
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    ALE
    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
    LSMW
    http://www.sapbrain.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html
    http://esnips.com/doc/8e732760-5548-44cc-a0bb-5982c9424f17/lsmw_sp.ppt
    http://esnips.com/doc/f55fef40-fb82-4e89-9000-88316699c323/Data-Transfer-Using-LSMW.zip
    http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI.ppt
    http://esnips.com/doc/7582d072-6663-4388-803b-4b2b94d7f85e/LSMW.pdf
    for Long texts Upload
    Please take a look at this..
    http://help.sap.com/saphelp_erp2005/helpdata/en/e1/c6d30210e6cf4eac7b054a73f8fb1d/frameset.htm
    Reward points if useful
    Regards
    Anji

  • An object on badi, ale/idoc,bapi

    hi experts
    hi this is sripathi.i want objects on badi, ale.idoc,bapi,smartforms and  workfow.
    i would be thankful to you if any one send these real time objects.

    BADI
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/63ee7f486cc143a560799d8803ce29/content.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/srm/badi-general+information&
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    The specified item was not found.
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    http://www.allsaplinks.com/badi.html
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-serieshttps [original link is broken]:///people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework /people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://www.esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40921dd7-d5cf-2910-1894-bb62316afbd1
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
    http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm
    BAPI-step by step procedure
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all BAPI's
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    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
    Refer this
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    http://www.techinterviews.com/?p=198
    http://www.techinterviews.com/?p=326
    http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.geekinterview.com/Interview-Questions/SAP-R-3/ABAP
    http://sap.ittoolbox.com/documents/popular-q-and-a/abap-sample-interview-questions-3240
    http://www.sap-img.com/abap/abap-interview-question.htm
    http://www.allinterview.com/Interview-Questions/ABAP.html
    Smarforms
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    SmartForms : some links
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://help.sap.com/saphelp_46c/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm
    http://www.sap-img.com/smartforms/smart-001.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sap-img.com/smartforms/smart-002.htm
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html
    http://www.allsaplinks.com/smartform_example.html
    http://www.sap-basis-abap.com/sapsf001.htm
    Smart Form PDF Link
    http://help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://sap.ionelburlacu.ro/sap0/sapsf001.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/16/a369b1800e4bdda978ee0fe3b7bd2c/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-img.com/smartforms/smart-001.htm
    Re: How to Debug a Smartform
    Debug of smartform and sapscript.
    Debugging SmartForms
    Debugging of a subroutine pool.
    http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    Workflows
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://www.sapgenie.com/workflow/index.htm
    https://sapneth9.wdf.sap.corp/workflow
    http://help.sap.com/saphelp_webas620/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
    For examples on WorkFlow...check the below link..
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    Rewards if useful............
    Minal

  • Passing Changed  extended fields using ALE-IDOC to receiving system

    Hi all,
    Please tell me how passing changed  extended fields using ALE-IDOC to receiving system can be achieved. Is it possible by Chnage pointer concept.Do i need to do some coading after data enters into receiving system as it is required while creating the entries in database table.
    For ex. in matmas05 extended for classification and inspection view and then created using 'CREATION'
    related bapi.Do i also need to incorporate the changes by change related bapi or ir can be handled by change pointer concept.
    Thanks.

    Hi Sanu
    1) Please tell me how passing changed extended fields using ALE-IDOC to receiving system can be achieved. Is it possible by Chnage pointer concept.
    => Looks like you have extended standard IDOC here. so you need to find User Exit or BADI for the Push program to populate the additional fields. Yes, it is possible thru change pointers as well.
    1) Do i need to do some coading after data enters into receiving system as it is required while creating the entries in database table.
    => Yes, as suggested in 1 try finding User Exits/BADIs.
    Regards
    Shital

  • Ale-idoc  steps

    Hi All,
    Can any one please give me the step by step ale-idoc toturial.about the steps to send data from one client to other.
    Regards,
    bunty

    Hi,
    <b>
      It gives, entire idoc documentation.
    http://help.sap.com/saphelp_nw04/helpdata/en/3b/beb13b00ae793be10000000a11402f/frameset.htm
    To develop a new custom ALE scenario, comprises 5 steps:
    1. Design and develop the custom IDoc with it’s segments and a new message type
    2. Configure the ALE environment with the new IDoc and message type (customer model, partner profiles and linking IDoc to message type)
    3. Develop the outbound process which does the following:
    • Populates the custom IDoc with control info and functional data
    • Sends the IDoc to the ALE layer for distribution
    • Updates status and handles errors
    4. Configure the ALE inbound side (partner profiles with inbound process code)
    5. Develop the inbound process which does the following:
    • Reads the IDoc into a BDC table; selects other data that is required
    • Runs transaction using call transaction or BDC session
    • Updates status and handles errors
    Below is a pictorial representation of the flow of a complete ALE scenario from the sending system to the receiving system.
    Figure 1: ALE Scenario model
    1.1. ALE Example
    For the purposes of this example we will develop a small ALE scenario. This scenario is described below.
    “The receiver of an internal service must be able to reverse (cancel) the invoice receipt which will then cancel the applicable billing document automatically on the service provider’s system.”
    Figure 2: Example Purchasing & Selling scenario
    We will develop a custom IDoc to carry the billing number from the Service Receiver’s system to the Service Provider’s system. We will populate the IDoc in a user exit on the sending side and we will process the transaction on the receiving side using a custom function module and a BDC transaction call.
    No rule conversion, segment filtering or version conversion will be implemented in the model as described in Figure 1.
    Requirements
    • Working ALE environment - See ALE Basis Configuration Guide;
    • ALE scenario design together with the business requirement;
    • Development access; and
    • ALE configuration access.
    NOTES:
    1. All IMG references to transactions are located in the transaction SALE which is the ALE portion of the IMG
    2. This is one way of developing a scenario where no message control exists. If message control exist (EG. On purchase orders) then NAST can be used to call an outbound function module that would create the required IDocs.
    3. Extensive knowledge of IDocs and ALE basis configuration is required in order to understand this guide.
    2. OUTBOUND PROCESSING
    2.1. Create IDoc type (WE30) Client independent
    The IDoc type refers to the IDoc structure that you will require for your development. In our case the IDoc type is called ZINVRV01. This IDoc type will have 1 segment called Z1INVRV with 2 fields, LIFNR & XBLNR, in this segment. If you require many segments or nested segments then they are also created using the same procedure.
    We will create the IDoc of the following structure:
    ZINVRV01
    Purchasing and Selling - Invoice receipt reversal
    Z1INVRV P&S - Segment 1
    Segment fields
    LIFNR Vendor account number
    XBLNR Reference document number
    Figure 3: IDoc type ZINVRV01
    To create the IDoc type, follow these next few steps:
    • Enter transaction WE30 (ALE -> Extensions -> IDoc types -> Maintain IDoc type)
    • Type in ZINVRV01 and click on Basic IDoc type, click the Create icon
    • Click on Create new (we are creating an IDoc from scratch but you may want to copy another IDoc if it is similar to your requirements) and enter a description, and press enter
    • Click on ZINVRV01 and then on the Create icon
    • Enter Z1INVRV as the segment type (must start with Z1), check mandatory if the segment must exist (in this case check it), enter 1 in minimum number and 1 as maximum number. (Make the maximum number 9999999999 if there are going to be many of these segments in each IDoc. IE. When line items are passed via IDocs), click on Segment editor
    • Enter a description for your segment type and create
    • Enter a description for your segment, enter each field required in your IDoc, in our case type LIFNR across for Field name, DE structure and DE documentation, repeat for XBLNR and press enter to validate.
    • Save and generate, press back
    • To release the segment choose Goto, Release from the menu
    • Check the box on the line of your new segment
    • Save, back and enter
    • Your IDoc type structure should be displayed with your new segment
    • Save and back
    • To release the IDoc type choose Extras, Release type from the menu and Yes
    Your IDoc is now ready for use. If you need to add fields or segments to your IDoc type, you will need to cancel the release of the IDoc type as well as the segment release using a similar procedure followed above (except now you uncheck the release box for the segment and you choose cancel release for the IDoc type).
    2.2. Create message type (WE81) Client independent
    To create a new message type, follow these next few steps:
    • Enter transaction WE81 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Create logical message type)
    • Choose Create logical message type by double clicking on it
    • Click on change icon to enter change mode
    • Click on New entries to add a new type
    • Enter the required message type, in our case it is ZINVRV and an appropriate description
    • Save and exit.
    Your message type has now been created. The next step will be to link it to the IDoc.
    2.2.1. Link message to IDoc type (WE82 & BD69) Client independent
    To link the message type to the IDoc type follow these next few steps:
    • Enter transaction WE82 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> EDI: Message Types and Assignment to IDoc Types)
    • Click on change icon to enter change mode
    • Click on New entries to create the link
    • Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
    • Save and exit
    • Enter transaction BD69 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Assign message type to IDoc for ALE)
    • Click on change icon to enter change mode
    • Click on New entries to create the link
    • Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
    • Save and exit
    Your IDoc is now linked to your message type. We still need to link object types and add the message to the model before we can use the message.
    2.2.2. Maintain object type for message type (BD59) Client independent
    The ALE objects are used to create links between IDocs and applications objects, to control the serialisation, to filter messages in the customer model and to use listings.
    For our own message type and IDoc you must maintain object types for the links.
    If you want to check the serialisation for the message type, then you must maintain object types for the serialisation. If no serialisation object has been maintained for a given message type, then the serialisation will not be checked for this message type.
    To add an object type to our message type, follow these next few steps:
    • Enter transaction BD59 (ALE -> Extensions -> ALE object maintenance -> Maintain object types)
    • Type in your message type ZINVRV and press enter
    • Click on New entries
    • Enter your object type, LIFNR (We need to use the vendor as a filter object), the segment name where LIFNR resides, Z1INVRV, a number 1 for the sequence followed by the actual field name LIFNR
    • Save and exit.
    You have now created an object that we’ll use as a filter object in the customer model to direct the flow of messages to the various logical systems based on the vendors in the filter of the message type ZINVRV.
    We now need to add our new message type to the distribution model.
    2.3. Configuring the Distribution Model
    This task is performed on your ALE reference client.
    2.3.1. Manual Configuration (BD64) Client dependent
    To manually configure the customer distribution model, read the ALE configuration procedure, and follow these steps:
    • Perform the Maintain customer distribution model directly function. (ALE -> Distribution customer model -> Maintain customer distribution model directly)
    • Specify the customer model you want to maintain and the logical system that is to be the sender of the messages OR create a new model. (Create model ALE with logical system ALELS1C400)
    • Choose the receiving systems to which the sending system must forward message type ZINVRV to.
    • For each receiving logical system allocate the message type necessary for communication to the receiving systems as per ALE configuration procedure.
    • Create filter objects (in our case LIFNR as the object type with the associated vendor number, 0000018001 with leading zeros, in the object area) for the message types.
    • Save the entries.
    NOTES:
    You cannot maintain a message type between the same sender and receiver in more than one customer distribution model.
    Only the owner is authorised to modify the model.
    To change the owner of a model, choose the 'Maintain ownership of customer distribution model' function. Make sure that all changes will be distributed to all systems that know the corresponding model. To do so, you can use the correction and transport system.
    To transport the customer distribution model you should use the Distribute customer model function of the IMG as described below.
    2.3.2. Distribute customer model (BD71) Client dependent
    After the customer model has been created centrally, it must be distributed to the other remote systems. This entails first of all setting up the communication for the distributed systems and then sending the model.
    2.3.2.1. Distribute Model (BD71) Client dependent
    This task is performed on your ALE reference client. To distribute the customer distribution model, read the ALE configuration procedure and follow these steps:
    • Make the settings for the communication with the other decentral systems, you have not set them yet.
    • Define the RFC destination for R/3 connections whose names correspond to the name of the corresponding logical system.
    • Create the output partner profile.
    • Distribute the customer model
    • Specify the name of the customer model.
    • You must specify the target system to which you want to distribute the customer model.
    • You must repeat this function for every distributed logical system.
    2.3.2.2. Maintain sending system partner profile (WE20) Client dependent
    With this function, you define the partner profiles for all outbound and inbound messages on the basis of the customer distribution model.
    After you have defined and distributed the customer model, you will have to maintain the partner profiles locally. To do this read the ALE configuration procedure.
    • Enter the output mode (background, immediately) and the package size for outbound processing.
    Requirements
    • The customer model must be maintained.
    • RFC destinations must be maintained.
    • The customer model must be distributed.
    • To ensure that the appropriate persons in charge are informed if a processing error occurs, you must make settings in: Error processing Maintain organisational units.
    2.4. Populate & distribute IDoc using ABAP
    An IDoc consists of a control record with structure edidc and one or more data records with structure edidd. The control record contains the sender and recipient of the IDoc, as well as information on the type of message.
    To be able to pass an IDoc to the ALE layer, you must set up a field string with structure edidc and an internal table with structure edidd. They are used to call function module master_idoc_distribute, which performs the save to the database and triggers the dispatch if necessary.
    2.4.1. Example code
    The code displayed below does the following:
    • populates our IDoc segment Z1INVR with the 2 fields XBLNR and LIFNR, populates the segment name and appends this to an internal table used to store the IDoc data;
    • populates the control record info with the message type and IDoc type; and
    • calls the MASTER_IDOC_DISTRIBUTE function module which distributes the IDoc as configured in the customer distribution model.
    *--- Data declaration statements
    DATA: C_INVREV_SEGNAME(7) TYPE C VALUE 'Z1INVRV',
    C_INVREV_MESTYPE(6) TYPE C VALUE 'ZINVRV',
    C_INVREV_IDOC_TYPE(8) TYPE C VALUE 'ZINVRV01',
    Z1INVRV LIKE Z1INVRV,
    C_INVREV_DOCTYPE LIKE BKPF-BLART VALUE 'YY',
    IDOC_CONTROL LIKE EDIDC,
    T_COMM_CONTROL LIKE EDIDC OCCURS 0 WITH HEADER LINE,
    IDOC_DATA LIKE EDIDD OCCURS 0 WITH HEADER LINE.
    *--- Move the document header into a structure
    LOOP AT DOC_HEAD_TAB INTO DOC_HEAD.
    ENDLOOP.
    *--- Move the document item data into a structure
    LOOP AT DOC_ITEM_TAB INTO DOC_ITEM WHERE NOT ( LIFNR IS INITIAL ).
    ENDLOOP.
    *--- Populate the IDoc segment’s field with the required data
    CLEAR Z1INVRV.
    Z1INVRV-LIFNR = DOC_ITEM-LIFNR. “Store vendor number for filter
    Z1INVRV-XBLNR = DOC_HEAD-XBLNR. “Billing number
    IDOC_DATA-SEGNAM = C_INVREV_SEGNAME. “Segment name
    IDOC_DATA-SDATA = Z1INVRV. “Segment data
    APPEND IDOC_DATA. “Populate IDoc internal table
    *--- Move the control data info required for the distribution
    IDOC_CONTROL-MESTYP = C_INVREV_MESTYPE.
    IDOC_CONTROL-DOCTYP = C_INVREV_IDOC_TYPE.
    *--- Call the distribute function with the required parameters
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' IN UPDATE TASK
    EXPORTING
    MASTER_IDOC_CONTROL = IDOC_CONTROL
    TABLES
    COMMUNICATION_IDOC_CONTROL = T_COMM_CONTROL
    MASTER_IDOC_DATA = IDOC_DATA
    EXCEPTIONS
    ERROR_IN_IDOC_CONTROL = 1
    ERROR_WRITING_IDOC_STATUS = 2
    ERROR_IN_IDOC_DATA = 3
    SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
    OTHERS = 5.
    Figure 4: Outbound processing example code
    NOTE:
    For debugging purposes, use transaction WE05 (IDoc overview) to see check your IDoc status, or to see whether an IDoc was created/
    3. INBOUND PROCESSING
    3.1. Create Function Module
    This function module is called when a message type, of type ZINVRV, comes into the receiving system. This needs to be configured and is dealt with later in this section. The function module is passed the IDoc as a parameter.
    Example parameters
    Import parameters Reference field Opt Y/N
    INPUT_METHOD BDWFAP_PAR-INPUTMETHD N
    MASS_PROCESSING BDWFAP_PAR-MASS_PROC N
    Export Parameters Reference field Opt Y/N
    WORKFLOW_RESULT BDWFAP_PAR-RESULT N
    APPLICATION_VARIABLE BDWFAP_PAR-APPL_VAR N
    IN_UPDATE_TASK BDWFAP_PAR-UPDATETASK N
    CALL_TRANSACTION_DONE BDWFAP_PAR-CALLTRANS N
    Table Parameters Reference field Optional Y/N
    IDOC_CONTRL EDIDC
    IDOC_DATA EDIDD
    IDOC_STATUS BDIDOCSTAT
    RETURN_VARIABLES BDWFRETVAR
    SERIALIZATION_INFO BDI_SER
    Exceptions
    WRONG_FUNCTION_CALLED
    Example code
    The code displayed below does the following:
    • populates a BDC table with the IDoc info;
    • calls the transaction via a BDC call; and
    • updates the IDoc status according to the BDC error status.
    EXTRACT FROM: Z_IDOC_INPUT_ZINVRV
    *--- Declaration of local variables
    DATA: C_SEGNAM(10) TYPE C VALUE 'Z1INVRV'.
    *-Loop through the IDOCs
    LOOP AT IDOC_CONTRL.
    *---Loop through the data for the IDOC
    LOOP AT IDOC_DATA WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
    CASE IDOC_DATA-SEGNAM.
    WHEN C_SEGNAM.
    Here we get the info from the idoc table
    IT_Z1INVRV = IDOC_DATA-SDATA.
    ENDCASE.
    PERFORM REV_INV.
    ENDLOOP.
    PERFORM UPDATE_IDOC_STATUS.
    ENDLOOP.
    FORM REV_INV "Reverse invoice form
    *--- Local variables & constants
    DATA: C_TCODE LIKE BKPF-TCODE VALUE 'VF11'. "BDC transaction code
    *--- Now we can build the bdc table to call the reversal transaction start of screen 109
    CLEAR BDC_TAB.
    BDC_TAB-PROGRAM = 'SAPMV60A'.
    BDC_TAB-DYNPRO = '109'.
    BDC_TAB-DYNBEGIN = 'X'.
    APPEND BDC_TAB.
    *--- Document number
    CLEAR BDC_TAB.
    BDC_TAB-FNAM = 'KOMFK-VBELN(01)'.
    BDC_TAB-FVAL = IT_Z1INVRV-XBLNR. "Billing document number
    APPEND BDC_TAB.
    *--- OK Code for screen 109
    CLEAR BDC_TAB.
    BDC_TAB-FNAM = 'BDC_OKCODE'.
    BDC_TAB-FVAL = 'SICH'.
    APPEND BDC_TAB.
    *--- Now we can call transaction 'VF11' with the populated bdc table. The transaction is called inside the idoc-contrl loop, so a transaction will be called for every idoc (journal). the transaction is called in no-display mode ('N') because this code runs in background as it is called by ale. The update is specified to be synchronous ('S') because we have to wait for the result to update the idoc status correctly.
    CALL TRANSACTION C_TCODE USING BDC_TAB MODE 'N' UPDATE 'S'.
    *--- Store the return code for use in another form (status update)
    RETURN_CODE = SY-SUBRC.
    *--- Here we check the return code, if there was an error, we put the transaction in a bdc session for the user to review and correct.
    IF SY-SUBRC NE 0.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    CLIENT = SY-MANDT
    GROUP = 'ZINVRV'
    USER = C_ALE_USER
    KEEP = 'X'.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE = C_TCODE
    TABLES
    DYNPROTAB = BDC_TAB.
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
    NOT_OPEN = 1
    QUEUE_ERROR = 2
    OTHERS = 3.
    ELSE. "No problems
    C_EXISTS = 'N'.
    Select from the billing document table to get sales doc number
    SELECT * FROM VBRP WHERE VBELN = IT_Z1INVRV-XBLNR.
    Select from the sales document table to get user status number
    SELECT SINGLE * FROM VBAP WHERE VBELN = VBRP-AUBEL AND
    POSNR = VBRP-AUPOS.
    Select from the status table to change the user status to pending
    SELECT * FROM JEST WHERE OBJNR = VBAP-OBJNR AND
    STAT LIKE C_USER_STATUS.
    IF JEST-STAT = C_US_PENDING. "User status is pending
    JEST-INACT = C_UNCHECKED. "Make pending the active status
    UPDATE JEST.
    C_EXISTS = 'Y'. "I.E. An entry is already in table
    ELSEIF JEST-INACT = C_UNCHECKED AND JEST-STAT NE C_US_PENDING.
    JEST-INACT = C_CHECKED. "Make everything else inactive
    UPDATE JEST.
    ENDIF.
    ENDSELECT.
    IF C_EXISTS = 'N'. "I.E. Pending has never been a status before
    JEST-OBJNR = VBAP-OBJNR.
    JEST-STAT = C_US_PENDING.
    JEST-INACT = C_UNCHECKED. "Make pending the active status
    INSERT JEST.
    ENDIF.
    ENDSELECT. "Select from VBRP (Billing document table)
    ENDIF.
    ENDFORM. " REV_INV
    FORM UPDATE_IDOC_STATUS.
    *--- Now we check the CALL TRANSACTION return code and set IDOC status
    CLEAR IDOC_STATUS.
    IF RETURN_CODE = 0.
    WORKFLOW_RESULT = '0'.
    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
    IDOC_STATUS-STATUS = '53'.
    IDOC_STATUS-UNAME = SY-UNAME.
    IDOC_STATUS-REPID = SY-REPID.
    IDOC_STATUS-MSGTY = SY-MSGTY.
    IDOC_STATUS-MSGID = SY-MSGID.
    IDOC_STATUS-MSGNO = SY-MSGNO.
    IDOC_STATUS-MSGV1 = SY-MSGV1.
    IDOC_STATUS-MSGV2 = SY-MSGV2.
    IDOC_STATUS-MSGV3 = SY-MSGV3.
    IDOC_STATUS-MSGV4 = SY-MSGV4.
    RETURN_VARIABLES-WF_PARAM = 'Processed_IDOCs'.
    RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
    APPEND RETURN_VARIABLES.
    ELSE.
    WORKFLOW_RESULT = '99999'.
    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
    IDOC_STATUS-STATUS = '51'.
    IDOC_STATUS-UNAME = SY-UNAME.
    IDOC_STATUS-REPID = SY-REPID.
    IDOC_STATUS-MSGTY = SY-MSGTY.
    IDOC_STATUS-MSGID = SY-MSGID.
    IDOC_STATUS-MSGNO = SY-MSGNO.
    IDOC_STATUS-MSGV1 = SY-MSGV1.
    IDOC_STATUS-MSGV2 = SY-MSGV2.
    IDOC_STATUS-MSGV3 = SY-MSGV3.
    IDOC_STATUS-MSGV4 = SY-MSGV4.
    RETURN_VARIABLES-WF_PARAM = 'ERROR_IDOCS'.
    RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
    APPEND RETURN_VARIABLES.
    ENDIF.
    APPEND IDOC_STATUS.
    ENDFORM. " UPDATE_IDOC_STATUS
    Figure 5: Inbound processing example code
    3.1.1. Debugging inbound FM
    Use transaction WE19 to test inbound function module in debugging mode. Also use WE05 to view the IDocs and their statuses.
    3.2. Maintain ALE attributes
    The inbound function module needs to be linked to the message type and the message type needs to be linked to the appropriate inbound process code at the partner profile level before the scenario is enabled. These steps are described below in detail.
    3.2.1. Link Message Type to Function Module (WE57) Client independent
    To link a message (ZINVRV) type to a function module (Z_IDOC_INPUT_ZINVRV) follow these steps:
    • Enter transaction WE57 (ALE -> Extensions -> Inbound -> Allocate function module to logical message)
    • Select an entry (EG. IDOC_INPUT_ORDERS) and copy
    • Type in module name Z_IDOC_INPUT_ZINVRV
    • Type in basic IDoc type as ZINVRV01
    • Type in message type as ZINVRV
    • Type object type as IDOCINVOIC (Invoice document) - Used for workflow
    • Direction should be set to 2 for inbound
    • Enter and save
    3.2.2. Define FM settings (BD51) Client independent
    • Enter transaction BD51 (ALE -> Extensions -> Inbound -> Define settings for input modules)
    • Click on New entries
    • Type in the name of the new function module Z_IDOC_INPUT_ZINVRV
    • Enter 0 for mass processing in the output column
    • Save and Exit
    3.2.3. Maintain process codes (WE42) Client dependent
    A process code needs to be maintained on each client. It then needs to be linked to the message via the partner profiles on each client. This allows the various clients to use a unique function module for the same message type.
    To maintain the process code follow these steps:
    • Log on to the appropriate receiving system client
    • Execute WE42 (ALE -> Extensions -> Inbound -> Maintaining process codes inbound)
    • Choose Inbound with ALE service
    • Choose Processing with function module
    • Click on Processing with function module and choose create icon
    • Click on New Entries
    • Type in process code ZINR and give it a description and save
    • Now you are asked to Please maintain codes added in ALE entry methods, enter and choose Z_IDOC_INPUT_FIRVSL and copy it. You should choose a FM similar to your one.
    • Enter your process code ZINR
    • Enter your function module Z_IDOC_INPUT_ZINVRV
    NOTE: The next 6 steps are used in workflow error handling.
    • Enter IDPKFIDCMT in object type
    • Enter MASSINPUTFINISHED in End event
    • Enter IDOCINVOIC in IDoc object type
    • Enter INPUTERROROCCURREDFI in IDoc start event
    • Enter INPUTFINISHEDFI in IDoc End event
    • Enter IDOCINVOIC in Application object type
    You will need to determine the task associated with object IDOCINVOIC, and then assign the appropriate position to it. This position will then receive the application error messages via workflow.
    To set up the workflow area please consult the Workflow config guide.
    3.3. Create inbound partner profile
    For each message type you need to maintain the inbound partner profiles.
    3.3.1. Maintain receiving system partner profile (WE20) Client dependent
    To maintain inbound partner profiles read the document ALE configuration procedure:
    • Add the message type ZINVRV with process code ZINR.
    • Enter the output mode (background, immediately) for inbound processing and NO message code.
    • Enter the position S and choose the ALE administrator 50000085. This position will then receive all the technical ALE errors via workflow.
    3.4. Test
    Once the inbound function module has been debugged the scenario should be ready to test in its entirety. If problems occur, read through the relevant areas of this document to check your configuration or code.
    IDOC Programming
    Index
    Process Steps for IDOC Programming 3
    Interpreting An IDoc Segment Info 3
    IDoc Type – The Structure of The IDoc File 5
    Defining The Message Type 6
    Define Valid Combination Of Message and IDoc Types 6
    Process Steps for Inbound IDOC Programming 7
    Characteristics of Inbound function module 7
    Assigning a processing function 8
    Processing Codes 9
    Workflow Handling 12
    Create Inbound Partner Profile 12
    Sample Code Snippet 14
    Execution Steps for inbound Idoc: 17
    Testing of Inbound Idoc: 19
    Process Steps for Outbound IDOC Programming 21
    Common Steps 21
    Create Outbound Partner Profile 21
    Sample Code Snippet 23
    Execution Steps: 26
    Testing of Outbound Idoc: 26
    Change Pointers & Reduction of IDOCs. 26
                                                                                    What is IDOC
    IDocs are SAP’s file format to exchange data with a foreign system. IDocs is the acronym for Intermediate Document. This indicates a set of (electronic) information, which builds a logical entity. An IDoc is e.g. all the data of a single customer in your customer master data file. Or the Idoc is all the data of a single invoice.
    • IDocs are an ASCII file format to exchange data between computers; the format is chosen arbitrarily
    • IDocs are similar to segmented files; they are not a description language like ANSI X.12, EDIFACT or XML
    • The IDoc contents are processed by function modules, which can be assigned in customizing
    Process Steps for IDOC Programming
    The following steps are required for inbound and outbound IDOC Programming.
    Interpreting An IDoc Segment Info
    All IDoc data records are exchanged in a fixed format, regardless of the segment type. The segment’s true structure is stored in R/3’s repository as a DDIC structure of the same name.
    Go to transaction code WE31. Enter the name of the Segment, which is to be created (fig 2.1).
    E.g. Create the segment ZEMPMASTSEG
    Fig 2.1 WE31- IDOC Segment main screen.
    Fig 2.2 WE31 IDOC Segment definition screen.
    In the above screen user can enter the fields, which are necessary for the segment. Once all the necessary fields will be populated then Save the transaction. After Saving release the version of the Segment by selecting the version and through menu Edit -> Set release.
    Same way create one or more segment.
    Fig 2.3 WE31 – IDOC Segment definition screen for another segment (ZEMPMASTHEADERSEG).
    IDoc Type – The Structure of the IDoc File
    The IDoc type is the name of the data structure used to describe the file format of a specific IDoc.
    An IDoc is a segmented data file. It has typically several segments. The segments are usually structured into fields, however different segments use different fields.
    The IDoc type is defined with transaction WE30, the respective segments are defined with transaction WE31 as per the point 2
    Go to transaction code WE30. Enter the IDOC Type name.
    Fig 3.1 WE30 – IDOC Type main screen.
    Add the segments to the IDOC Type as per the requirement.
    For e.g. in the fig 3.2 it shown that IDOC Type is having only one segment ZEMPMASTHEADERSEG, which is having one child segment ZEMPMASTSEG
    Fig 3.2 WE30 – IDOC Type segment screen
    For each segment developer (double click on the segment) can set the minimum, maximum number of segment in a sequence.
    Fig 3.3 fig 3.4
    Defining the Message Type
    The message type defines the context under which an IDoc is transferred to its destination. It allows using the same IDoc file format to use for several different applications.
    The message type together with the IDoc type determines the processing function.
    The message type defined using transaction code WE81.
    fig 4.1 WE81 – Message Types
    Define Valid Combination Of Message and IDoc Types
    The valid combinations of message type and IDoc type are stored in table EDIMSG, using transaction WE82.
    The declaration of valid combinations is done to allow validation, if the system can handle a certain combination.
    Fig 5.1 WE82 – Message Type Assignment
    Process Step for Inbound IDOC Programming
    Characteristics of Inbound function module
    Before assigning the function module to Inbound process code, its characteristics must be set with the transaction BD51. This step is mandatory before assigning the function module to Inbound process code.
    For inbound processing you need to tell, whether the function will be capable of dialog processing. This is meant for those functions, which process the inbound data via call transaction. Those functions can be replayed in visible batch input mode to check why the processing might have failed.
    Fig 6.1
    Here the main characteristic is Input Type. It means “How are IDoc packages processed?” and having values like
    Input Type Short Text
    0 Mass Processing
    1 Individual input
    2 Individual input with IDOC locked in CALL TRANSACTION
    Also another property Dialog Allowed can be set here. With “Dialog allowed” IDocs can be processed in dialog mode.
    Fig 6.2 – BD51 Characteristics of Inbound Function Module
    Assigning a processing function
    The combination of message type and IDoc type determine the processing algorithm. This is usually a function module with a well-defined interface or a SAP business object and is set up in table EDIFCT.
    The entry made the points to a function module, which will be called when the IDoc is to be processed. The entries for message code and message function are usually left blank. They can be used to derive sub types of messages together with the partner profile used.
    Used transaction code WE57 for assigning function module to IDOC Type.
    Fig 7.1 WE57 – Assign Function Module to Message and IDOC Type
    Fig 7.2 Assign a handler function to a message/message type
    Process Codes
    R/3 uses the method of logical process codes to detach the Idoc processing and the processing function module. They assign a logical name to function instead of specifying the physical function name.
    The combination message type/IDoc will determine the logical processing code, which itself points to a function. If the function changes, only the definition of the processing codes will be changed and the new function will be immediately effective for all IDocs associated with the process code.
    For inbound processing codes you have to specify the method to use for the determination of the inbound function.
    The Inbound processing code can be attach to the function module using transaction code WE42
    Fig 8.1 WE42 – Define Inbound Process Code
    You need to tick, if your function can be used via the ALE engine. This is the option you would usually choose. It allows processing via the ALE scenarios. See fig below
    Fig 8.2 WE42 – Set properties of Inbound Process Code
    See fig 8.4
    Fig 8.3 WE42 – Set the Message type for the Inbound Process Code
    Fig 8.4 WE42 – Fill the details of the Inbound Process Code.
    The properties set in the above fig 8.4 are used for the workflow handling when the IDOC is having any error.
    Properties, which are useful in the workflow processing, are as follows.
    • Object Type – It is a business object created using transaction code SWO1 and used as a handler
    • Starting Event - Will triggered the workflow on occur of Error.
    • Ending Event - Will terminate the workflow after processing the
    Workflow Handling
    Refer: - Workflow Guide
    Create Inbound Partner Profile
    For each message type you need to maintain the inbound partner profiles. Maintain receiving system partner profile using WE20 (See fig. 10.3). Add the message type in the Senders inbound parameter.
    Following steps will be followed for creation of partner profile (Inbound).
    • Add the message type (e.g. ZEMPMSG) into the inbound parameter by clicking .
    Fig. 10.1 WE20 – Addition of message type in Inbound Partner Profile
    • On the next screen enter the message type , process code. In the Processing by function module block select the radio button based on the need. If you clicked on Triggered by background program then the IDOC will be collected and will triggered by another program which will run in background and if the second option Triggered immediately is clicked then the IDOC will be processed by the function module as soon as it is triggered.
    Fig. 10.2 WE20 – Inbound Parameters.
    Fig 10.3 WE20 – Create Partner profile
    Sample Code Snippet
    Important Steps are as follows.
    1) Unpacking of IDOC: - Unpack the IDOC into the respective segments.
    2) Process Data: - Process the unpacked data.
    3) Error Handling.
    4) Workflow triggering.
    FUNCTION Z_IDOC_INPUT_EMPMAST.
    ""Local interface:
    *” IMPORTING
    *" REFERENCE (INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
    *" REFERENCE (MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
    *” EXPORTING
    *" REFERENCE (WORKFLOW_RESULT) LIKE BDWFAP_PAR-RESULT
    *" REFERENCE (APPLICATION_VARIABLE) LIKE BDWFAP_PAR-APPL_VAR
    *" REFERENCE (IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
    *" REFERENCE (CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
    *” TABLES
    *" IDOC_CONTRL STRUCTURE EDIDC
    *" IDOC_DATA STRUCTURE EDIDD
    *" IDOC_STATUS STRUCTURE BDIDOCSTAT
    *" RETURN_VARIABLES STRUCTURE BDWFRETVAR
    *" SERIALIZATION_INFO STRUCTURE BDI_SER
    *” EXCEPTIONS
    *" WRONG_FUNCTION_CALLED
    DATA: S_EMPMAST LIKE ZEMPMASTHEADERSEG.
    DATA: T_EMPMAST LIKE ZEMPMASTSEG OCCURS 0 WITH HEADER LINE.
    DATA: WA_EMPMAST LIKE ZEMPMAST.
    DATA: L_FLAG VALUE 'Y'.
    CLEAR S_EMPMAST.
    REFRESH T_EMPMAST.
    check if the function is called correctly *
    IF IDOC_CONTRL-MESTYP <> 'ZEMPMSG'.
    RAISE WRONG_FUNCTION_CALLED.
    ENDIF.
    WORKFLOW_RESULT = 0.
    Unpacking the IDoc
    LOOP AT IDOC_DATA.
    CASE IDOC_DATA-SEGNAM.
    WHEN 'ZEMPMASTHEADERSEG'.
    MOVE IDOC_DATA-SDATA TO S_EMPMAST.
    WHEN 'ZEMPMASTSEG'.
    MOVE IDOC_DATA-SDATA TO T_EMPMAST.
    APPEND T_EMPMAST.
    ENDCASE.
    ENDLOOP.
    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
    IDOC_STATUS-MSGV1 = IDOC_CONTRL-IDOCTP.
    IDOC_STATUS-MSGID = '00'.
    IDOC_STATUS-MSGNO = '398'.
    Processing Data
    LOOP AT T_EMPMAST.
    MOVE-CORRESPONDING T_EMPMAST TO WA_EMPMAST.
    INSERT INTO ZEMPMAST VALUES WA_EMPMAST.
    G_OKCODE = SY-SUBRC.
    IF G_OKCODE <> 0.
    L_FLAG = 'N'.
    Error Handling
    IDOC_STATUS-STATUS = '51'.
    IDOC_STATUS-MSGTY = 'E'.
    IDOC_STATUS-MSGV2 = 'Employee & already exists'.
    REPLACE '&' WITH WA_EMPMAST-EMPNO INTO IDOC_STATUS-MSGV2.
    IDOC_STATUS-SEGNUM = SY-TABIX + 1.
    APPEND IDOC_STATUS.
    ENDIF.
    AT LAST.
    ENDAT.
    ENDLOOP.
    IF L_FLAG <> 'Y'.
    Workflow Triggering
    CLEAR RETURN_VARIABLES.
    RETURN_VARIABLES-WF_PARAM = 'Error_IDOCs'.
    RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
    APPEND RETURN_VARIABLES.
    WORKFLOW_RESULT = '99999'.
    ROLLBACK WORK.
    ELSE.
    IDOC_STATUS-STATUS = '53'.
    IDOC_STATUS-MSGTY = 'S'.
    IDOC_STATUS-MSGV2 = 'Employee Info inserted'.
    APPEND IDOC_STATUS.
    ENDIF.
    ENDFUNCTION.
    Execution Steps for inbound Idoc:
    To execute inbound idoc go to Transaction we19 give the Idoc number execute the transaction
    It displays a screen with control, data, and status records. Click Standard inbound OR inbound function module buttons and process the idoc.
    i) Standard inbound:
    If you have selected the standard inbound button it displays a screen with the standard setup:
    II) Inbound function module:
    If you select the in bound function module button displays the below screen you can enter the function module name which you want to execute
    If you select Check box Call in debug mode you can execute the function module in debug mode.
    Call transaction Processing:
    In Background:
    The function module is called in the background
    This setting is only important if the function module to be called reacts accordingly to the importing parameter 'INPUT_METHOD'. This is therefore only valid for function modules which implement the application functionality using the command 'CALL TRANSACTION'.
    In foreground :
    The function module is called in the foreground.
    This setting is only important if the function module to be called reacts accordingly to the importing parameter 'INPUT_METHOD'. This is therefore only true for function modules which implement application functionality using the command 'CALL TRANSACTION'.
    In foreground After error:
    The function module is called in a background session. This becomes a session in the foreground after the first error has occurred.
    This setting is only important if the function module to be called reacts accordingly to the importing parameter 'INPUT_METHOD'. This is therefore only true for function modules which implement application functionality using the command 'CALL TRANSACTION'.
    Now it will post the idoc.
    Testing of Inbound Idoc:
    If you need to check the status of idoc Go to Transaction ZE05 give the idoc number in the idoc number select option execute the transaction.
    Then displays a screen with Out box and Inbox . select the idoc number in the Inbox Shows the control record , data record ,status record .select the status record and check for the idoc status Then you will be known the idoc is successful posted or not.
    The idoc which has been posted into SAP successfully will have the status 53.
    The list of the other valid status for Inbound Idoc are as follows:
    Status Message Description
    50 IDoc added
    51 Error: Application document not posted
    52 Application document posted
    62 IDoc passed to application
    64 IDoc ready to be transferred to application
    74 IDoc was created by test transaction
                                                                                    Process Steps for Outbound IDOC Programming
    The following steps are required for Outbound IDOC Programming.
    Common Steps
    The steps for new segment creation, new Idoc Type, new Message Type and linking between message type and Idoc Type are same as Inbound Idoc Programming. The detail Steps for such activities are mentioned in the Page 2 to Page 5.
    Create Outbound Partner Profile
    Use Transaction WE20 and select the Receiver Partner. Then add message type ZEMPMSG in the outbound parameters. The partner profile needs to be created at the ReceiverLogical System(LS)/Customer(KU)/Vendor(LI)/Bank(B)/Benefits provider(BP)/ User(US) only.
    Then double click on the Message type ZEMPMSG and it navigates to the following screen where user has to set the following attributes:
    • Receiver port as A000000001 for RFC
    • Packet Size field as 1
    • Idoc type Z_EMPMAT_IN in basic type field
    • Set the Syntax check box
    • Set the output mode as Transfer Idoc immediately
    • Save the changes.
    Coding Steps:
    1) Create an Executable Program Based on specification.
    2) All the Important Data should be displayed as Parameters with mandatory.
    i) Message type
    ii) Sender port
    iii) Sender partner
    iv) Sender partner function
    v) Receiver port
    vi) Receiver partner
    vii) Receiver partner function
    3) Select the data based on selection screen into an internal table.
    4) Read the selected internal table and fill the Header segment.
    5) Now Loop the internal table to fill other Segments.
    6) Fill the Control segment data.
    7) Call the proper Function module and pass the data to the function module
    To create the idoc.
    8) Change the status of idoc based on the function module return code.
    9) If FM return code is 0 set status to 03.
    10) See the demo program Z_IDOC_OUTBOUND_EMP for more Clarification.
    Sample Code Snippet
    REPORT Z_IDOC_OUTBOUND_EMP .
    TABLES: ZEMPMAST.
    DATA: F_IDOC_CONTRL LIKE EDIDC,
    T_COMM_CONTROL LIKE EDIDC OCCURS 0 WITH HEADER LINE,
    T_IDOC_DATA LIKE EDIDD OCCURS 0 WITH HEADER LINE.
    Data: Begin of t_zempmast occurs 0.
    include structure zempmast.
    Data: end of t_zempmast.
    data:wa_ZEMPMAST like ZEMPMAST.
    data:wa_ZEMPMASTSEG like ZEMPMASTSEG.
    Data: wa_ZEMPMASTHEADERSEG like ZEMPMASTHEADERSEG.
    CONSTANTS: C_BASIC_IDOC_TYPE LIKE EDIDC-IDOCTP VALUE 'Z_EMPMAT_IN',
    C_Z1CLIPS_SEG_NAME LIKE EDIDD-SEGNAM VALUE 'Z1CLIPS',
    TRUE VALUE 'X',
    FALSE VALUE SPACE.
    “Selection Screen----
    SELECTION-SCREEN BEGIN OF BLOCK EMP WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_EMPNO FOR ZEMPMAST-EMPNO.
    SELECTION-SCREEN END OF BLOCK EMP.
    PARAMETERS: P_MESTYP LIKE EDIDC-MESTYP
    DEFAULT 'ZEMPMSG'
    OBLIGATORY.
    PARAMETERS: P_SNDPRT LIKE EDIDC-SNDPRT,
    P_SNDPRN LIKE EDIDC-SNDPRN,
    P_SNDPFC LIKE EDIDC-SNDPFC.
    PARAMETERS: P_RCVPRT LIKE EDIDC-RCVPRT,
    P_RCVPRN LIKE EDIDC-RCVPRN,
    P_RCVPFC LIKE EDIDC-RCVPFC.
    “Selection of data
    Perform select_data.
    “Create Idoc
    perform creat_idoc.
    CLEAR F_IDOC_CONTRL.
    *& Form select_data
    text
    --> p1 text
    <-- p2 text
    FORM select_data.
    “Selecting the required data based on Selection Screen
    select * into corresponding fields of table t_ZEMPMAST from ZEMPMAST
    where EMPNO in s_EMPNO.
    ENDFORM. " select_data
    *& Form creat_idoc
    text
    --> p1 text
    <-- p2 text
    FORM creat_idoc.
    “Creating Header Segment
    if not t_zempmast[] is initial.
    T_IDOC_DATA-SEGNAM = 'ZEMPMASTHEADERSEG'.
    “Populating Idoc data table with header Segment
    perform prepare_segment using wa_zempmast.
    T_IDOC_DATA-SDATA = wa_ZEMPMASTHEADERSEG.
    APPEND T_IDOC_DATA.
    “Creating other Segments.
    loop at t_zempmast into wa_zempmast.
    CLEAR T_IDOC_DATA.
    “Filling item segment
    T_IDOC_DATA-SEGNAM = 'ZEMPMASTSEG'.
    perform prepare_segment1 using wa_zempmast.
    T_IDOC_DATA-SDATA = wa_ZEMPMASTSEG.
    “Adding the item segments into idoc table
    APPEND T_IDOC_DATA.
    CLEAR T_IDOC_DATA.
    endloop.
    “Filling Control data.
    F_IDOC_CONTRL-MESTYP = P_MESTYP.
    F_IDOC_CONTRL-IDOCTP = C_BASIC_IDOC_TYPE.
    F_IDOC_CONTRL-SNDPRT = P_SNDPRT.
    F_IDOC_CONTRL-SNDPRN = P_SNDPRN.
    F_IDOC_CONTRL-SNDPFC = P_SNDPFC.
    F_IDOC_CONTRL-RCVPRT = P_RCVPRT.
    F_IDOC_CONTRL-RCVPRN = P_RCVPRN.
    F_IDOC_CONTRL-RCVPFC = P_RCVPFC.
    “Creating idoc
    PERFORM DISTRIBUTE_THE_IDOC TABLES T_IDOC_DATA
    T_COMM_CONTROL
    USING F_IDOC_CONTRL.
    endif.
    ENDFORM. " creat_idoc
    *& Form prepare_segment
    text
    -->P_T_ZEMPMAST text
    FORM prepare_segment USING P_T_ZEMPMAST like ZEMPMAST.
    “Filling header Segment
    wa_ZEMPMASTHEADERSEG-REPNAME = sy-repid.
    wa_ZEMPMASTHEADERSEG-DATE = sy-datum.
    wa_ZEMPMASTHEADERSEG-TIME = sy-uzeit.
    ENDFORM. " prepare_segment
    *& Form prepare_segment1
    text
    -->P_WA_ZEMPMAST text
    FORM prepare_segment1 USING P_T_ZEMPMAST like ZEMPMAST.
    “filling item segment
    wa_ZEMPMASTSEG-EMPNO = P_T_ZEMPMAST-EMPNO.
    wa_ZEMPMASTSEG-EMPNAME = P_T_ZEMPMAST-EMPNAME.
    ENDFORM. " prepare_segment1
    *& Form DISTRIBUTE_THE_IDOC
    text
    -->P_T_IDOC_DATA text
    -->P_T_COMM_CONTROL text
    -->P_F_IDOC_CONTRL text
    FORM DISTRIBUTE_THE_IDOC TABLES T_IDOC_DATA STRUCTURE EDIDD
    T_COMM_CONTROL STRUCTURE EDIDC
    USING F_IDOC_CONTRL STRUCTURE EDIDC.
    READ TABLE T_IDOC_DATA INDEX 1.
    IF SY-SUBRC = 0.
    insert and distribute the idoc
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
    EXPORTING
    MASTER_IDOC_CONTROL = F_IDOC_CONTRL
    TABLES
    COMMUNICATION_IDOC_CONTRO

  • ALE - IDOC vs IDOC - EDI

    Hi,
    I can see the ALE IDOC configurations at many places . Whats the process to send an IDOC to External Non-SAP System?
    Does it differ much??
    Please explain the steps.

    Hi,
    Pushing the IDOC from SAP to External:
    IDOC are SAP specifc data structure.  Only SAP understands IDOCS natively.  Normall what you can do is write a process that maps the IDOC to the format the recieving system is looking for. ie: flat file etc...   Or if the external system can be coded to understand the IDOC structure, you could put a flat file with this structure to be read by teh external system.
    Pulling from the External system:
    Usin connectors, the external system can call a BAPi or RFC function module that can create IDOCS and pass the data to the external system using the IDOC structure.
    thanks.
    JB

Maybe you are looking for

  • Number Format Please help

    I have a float value like 232453.75 now I want to format it as 2,32,453.75 Is this possible using some java classes directly rather than going in for a string manipulation. Thanks

  • How to resolve VAT triangulation determination in CRM 70

    Please adjust SAP CRM so that it supports external tax software packages like Vertex.  There are at least two scenarios to be considered for VAT.  The first is a direct sale from seller to customer where there are no triangulation issues: Bentley Sys

  • Auditing SAP Application - users lists

    Hello everybody, i am trying to find a way to report a list of users that have the following authorizations: u2022     access to administrative tasks u2022     access to batch input administration u2022     access to monitoring tools and logs u2022  

  • QuickTime 7.1.2 won't download or install

    I downloaded the QT-7.1.2 pkg via SoftwareUpdate and when I tried to install it I got an error saying "This update requires less that MacOS X 10.4" When I tried a SoftwareUpdate install I get an networking error "NSURLErrorDomain -1005 (-1005)" about

  • Latency UAD+EZDrummer

    Hi, I'm having Latency problems with Uad-1 PCIe on Logic 7.2.3, OS 10.4.8 the Latancy issues occur when Toontrack EZDrummer is used as multi channel Audio Instrument and it's Auxilaries are processed by Uad plugs. The delays begin when I tweek the pl