Cremas03  idoc program

can anyone give me program to fill and send cremas03 idoc....to xi

hi...malay gal 
hope u can get a clear idea by reading the below link
[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/877c0d53-0801-0010-3bb0-e38d5ecd352c]
thanks &regards
chinnaiya

Similar Messages

  • Standard IDOCS, Programs for posting FI & bank related data.

    Hi,
    (1)Are there any idocs available for posting FI documents, Vendor master?
    (2)Are there any outbound idocs, programs for sending data to banks. EG:positive pay etc?
    Kindly reply to these questions. Correct answer will be awarded points.
    Regards,
    Akshaya.

    Hi,
    There is message type BANK_CREATE for posting the FI related Bank details. Using the change pointers you can trigger the idocs for posting the bank related data.
    Regards,
    Uday

  • Error while posting the CREMAS03 Idoc

    Hi
    I a getting the Error while posting CREMAS03 idoc from File
    The ERROR: Status 65 ,Error in ALE Servics: Cross Company code does not exits..
    but when i cheked with the functional guys , the comany code exits..
    Any one have any idea
    SV

    Hey,
        seems you have given wrong enteries for logical system in sale or in WE20(patrner profile)
    Steps for ALE settings:-
    Steps for XI
    Step 1)
         Goto SM59.
         Create new RFC destination of type 3(Abap connection).
         Give a suitable name and description.
         Give the Ip address of the R3 system.
         Give the system number.
         Give the gateway host name and gateway service (3300 + system number).
         Go to the logon security tab.
         Give the lang, client, username and password.
         Test connection and remote logon.
    Step 2)
         Goto IDX1.
         Create a new port.
         Give the port name.
         Give the client number for the R3 system.
         Select the created Rfc Destination.
    Step 3)
         Goto IDX2
         Create a new Meta data.
         Give the Idoc type.
         Select the created port.
    Steps for R3.
    Step 1)
         Goto SM59.
         Create new RFC destination of type 3(Abap connection).
         Give a suitable name and description.
         Give the Ip address of the XI system.
         Give the system number.
         Give the gateway host name and gateway service (3300 + system number).
         Go to the logon security tab.
         Give the lang, client, username and password.
         Test connection and remote logon.
    Step 2)
         Goto WE21.
         Create a port under transactional RFC.(R3->XI)
         Designate the RFC destination created in prev step.
    Step 3)
         Goto SALE.
         Basic settings->Logical Systems->Define logical system.
         Create two logical systems(one for XI and the other for R3)
         Basic settings->Logical Systems->Assign logical system.
         Assign the R3 logical system to respective client.
    Step 4)
         Goto WE20.
         Partner type LS.
         Create two partner profile(one for XI the other for R3).
         Give the outbound or inbound message type based on the direction.
    Step 5)
         Goto WE19
         Give the basic type and execute.
         fill in the required fields.
         Goto IDOC->edit control records.
         Give the following values.(Receiver port,partner no.,part type and sender Partner no. and type)
         Click outbound processing.
    Step 6)
         Go to SM58
         if there are any messages then there is some error in execution.
         Goto WE02.
         Check the status of the IDOC.
         Goto WE47.
         TO decode the status code.
    Step 7)
         Not mandatory.
         Goto BD64.
         Click on Create model view.
         Add message type.
    BD87 to check the status of IDOC.
    In case if not authorized then go to the target system and check in SU53, see for the missing object
    and assign it to the user.

  • Steps to write Inbound Idoc program

    Hi All
    can any body send me steps to write sample inbound idoc program
    1) from which tables i have to fetch data.
    2) wat should be the status before processing idoc and wat   is  the expected status.
    Like a complete real time program with explanation.
    along with program.
    Thanks & Regards,
    Vinay

    U have to transfer the inbound idoc to the o.s.layer.
    Then u have to sen via EDI subsystem to the Business partner.
    U have to carry out the same steps u will do in EDI outbound process..
    Reward if helpful.

  • I want to run one IDOC program how to run

    Iam having one sales order idoc program
    I want to run one IDOC program how to run.
    That is sales order
    idoc number: XXXXXXXX
    idoc type: SDPICK (message)
    idoc status: 64
    direction: inbound
    Tell me the process plz.

    Hi,
    goto we19 ,give ur idoc number and then execute it and then in the next screen press on inbound fucntion module,give the Fm name thre andpress enter..it will be processed.
    else
    use program RBDAPP01 and thre specify the idoc number
    else
    use TCODE ->BD87 ..
    Rewrad if helpful.
    Regards,
    Nagaraj

  • Material for ale,idoc programming

    Hi folks,
    i need urgently the material for IDOC programming.i am mentioning the process below.
      1)i have created one program. i need to send some fields to a folder through IDOCS.
      when i will press a push button on my program, this idoc program should execute so that some of the fields will transfer through IDOCS.
    Thanks

    hi,
    Intermediate Documents (IDOCs)
    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.
    The two available process for IDOCs are 1) Outbound Process 2) Inbound Process.
    There are basically two types of IDOCs.:
    1.  Basic IDOC type defines the structure and format of the business document that is to be     
         exchanged between two systems.
    2. Extension Idoc: Extending the functionality by adding more segments to existing Basic IDOCs.
    -To Create Idoc we need to follow these steps:
    1. Create Segment      ( WE31)
    2. Create Idoc Type      ( WE30)
    3. Create Message Type  ( WE81)
    4. Assign Idoc Type to Message Type ( WE82)
    1. Creating a Segment:
    nGo to transaction code WE31
    nEnter the name for your segment type and click on the Create icon
    nType the short text
    nEnter the variable names and data elements
    nSave it and go back
    nGo to Edit -> Set Release
    nFollow steps to create more number of segments
    2. Create Idoc Type      (WE30)
    nGo to transaction code WE30
    nEnter the Object Name, select Basic type and click Create icon
    nSelect the create new option and enter a description for your basic IDOC type and press enter
    nSelect the IDOC Name and click Create icon
    nThe system prompts us to enter a segment type and its attributes
    nChoose the appropriate values and press Enter
    nThe system transfers the name of the segment type to the IDOC editor.
    nFollow these steps to add more number of segments to Parent or as Parent-child relation
    nnSave it and go back
    nnGo to Edit -> Set release
    3. Create Message Type  (WE81)
    nGo to transaction code WE81
    nChange the details from Display mode to Change modenAfter selection, the system will give this message “The table is cross-client (see Help for further info)”. Press EnternClick New Entries to create new Message Type
    nFill details
    nSave it and go back
    4. Assign Idoc Type to Message Type (WE82)
    nGo to transaction code WE82
    nChange the details from Display mode to Change moden After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    nClick New Entries to create new Message Type.
    nFill details
    nSave it and go back
    There are three types of records :
    nControl Record                          nData Record                                     nStatus Record
    Control Record - contains the key information like destination, IDoc type, message type, port and sender information. Control records are of EDIDC type of structure.
    Data Records - This contains two parts.
    nAdministrative Section and Data Section
    nAdministrative Section consists of Idoc number, Segment Name, Segment number, Version, Segment Hierarchy etc.
    nData Section contains the data of respective segment
    nData records are of EDIDD type of structure
    nStatus Record - whenever a process is taken place, system will generate status records.
    nWe can identify the process with the number of status record.
    n01 - 49  for Outbound Process
    n50 - 75  for Inbound Process
    nwhen IDoc is processed the messages are:
    n01 - IDoc is created 
    n30 - IDoc is ready for dispatch
    n03 - IDoc is processed
    check all the below links u will find lot of info
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    For ALE -- IDoc's
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    ALE/ IDOC/EDI
    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.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
    ALE/ IDOC/ XML
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
    http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
    http://www.angeli.biz/www5/books/IDocBook/IDocBook.pdf
    IDOC Convertion
    /people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
    ~~Guduri

  • Need Ebook for ALE/IDOC Programming

    Hi All,
    I am new to IDOC programming. I want a technical book for the coding purpose. Can anybody post a link for any good book. I have read functional side so plz.. post links only for technical coding things.
    Useful links will get rewarded.
    Thanks in advance,
    Jignesh.

    Below is the Complete link for ABAP and other related stuffs.
    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
    All the best!!
    REgards,
    Abdul

  • Inbound idoc program name...

    Hi all,
               i have one inbound idoc.From the data in the idoc some custom table was getting updated thrugh some program.So how to find the program name which will do that.i have only the idoc no with me....
    thanks in advance.......
    Regards,
    Rakesh.........

    GO TO WE19
    Give the idoc number
    Press F8
    Then Press 'Standard Inbound'
    Note down the function module
    Press Cancel
    Press 'Inbound Function Module'
    Give the Function mudule name which you get from the previous step
    Check 'Call in Debug Mode'
    Select in Foreground
    Debug the same and it will lead to the place where you are uploading the same.

  • Idoc programming question

    Hi friends,
    I am asked to write a custom executable program (not a function module) to create outbound idocs with some data from the database tables as for the selection screen data the user entered. How do I do this and how to trigger these outbound idocs? Can you please give me a sample code for this or your valuable suggestions?
    Thanks for the help.

    Here is the sample code which triggers the IDoc (Outbound)..I also added comments
    report z_idoc_creat_tr .
    tables : ekpo,
             edidd,  " Data record (IDoc)
             tbdlst, " Text for logical system
             edmsg . "Logical message types
    * Selection screen
    parameters: p_ebeln like ekpo-ebeln.
    data : c_seg1 like edidd-segnam value 'ZSEG1_TR',
           c_seg2 like edidd-segnam value 'ZSEG2_TR',
           itab_comm_idocs  like edidc occurs 0 with header line ,
           control_record like edidc.
    *Internal Tables
    data :
         itab_edidd like edidd occurs 0 with header line, "Data record(IDoc)
           itab_seg2 like zseg2_tr  occurs 0 with header line .
    * zseg2_tr structure generated when you define the Segments in WE31
    * Work Area
    data : seg1 like zseg1_tr, " Segments Header Data
           seg2 like zseg2_tr. " Segments
    select single * from ekpo  where ebeln = p_ebeln.
    *Build Control Data
    control_record-mestyp = 'Z_EKPO' .  "Message Type.
    control_record-idoctp = 'ZIDOC_TR' ." IDoc Type
    control_record-sndprt = 'LS'.
    control_record-sndprn = 'LOGSYS0100' . " Logical system
    control_record-sndpor = 'SAPLT1'. "SEnder Port
    control_record-rcvprt = 'LS'.
    control_record-rcvprn = 'SEND' ." Reveiver Logical system
    control_record-rcvpor = 'A000000171'." Receiver Port
    *Filling the Segment 1 ie.,Purchasing Document Number .
    move-corresponding ekpo to seg1.
    itab_edidd-segnam = 'ZSEG1_TR'." Segment Name
    itab_edidd-sdata = seg1.  " Value for the Segment1. "Segment value
    append itab_edidd .
    clear itab_edidd.
    *Filling the Segment 2 ie.,Item Number of Purchasing Document.
    select * from ekpo into corresponding fields of table itab_seg2  where
             ebeln = p_ebeln .
    loop at itab_seg2 .
      move-corresponding  itab_seg2 to seg2.
      itab_edidd-segnam = 'ZSEG2_TR'.
      itab_edidd-sdata = seg2.
      append itab_edidd.
      clear itab_edidd.
    endloop.
    * FM to trigger the Outbound Idoc
    call function 'MASTER_IDOC_DISTRIBUTE'
      exporting
        master_idoc_control                  = control_record
      tables
        communication_idoc_control           = itab_comm_idocs
        master_idoc_data                     = itab_edidd
    exceptions
       error_in_idoc_control                = 1
       error_writing_idoc_status            = 2
       error_in_idoc_data                   = 3
       sending_logical_system_unknown       = 4
       others                               = 5
    if sy-subrc <> 0.
    endif.
    loop at itab_comm_idocs.
      write:/2 'Docs generated', itab_comm_idocs-docnum.
    endloop.
    <i>* Reward each useful answer</i>
    Raja T
    Message was edited by:
            Raja Thangamani

  • IDoc program

    I have written a program for generating an idoc in sendng system.. with my Z idoc type. I want to send basic material data thru my program and create tht material on the recv system.
    Pls chk code below.
    The idoc shows a code of 03 in sending system. But at recvng system it shows code of 51-error-Application document not posted.
    Pls tell me the steps involved or rather where iam going wrong..
    Code----
    TABLES: MARA,MAKT.
    DATA DECLARATION **********
    constants *********
    DATA: C_HEADER_SEG LIKE EDIDD-SEGNAM VALUE 'ZRAJA_SEGMENT'. "'E1MARAM'.
    IDOC CONTROL RECORD
    DATA : CONT_REC_OUT LIKE EDIDC.
    DATA : FS_DATA LIKE ZRAJA_SEGMENT.
    INTERNAL TABLE ******
    DATA : BEGIN OF I_MATNR OCCURS 0,
             MATNR LIKE MARA-MATNR,  " mat name
             MTART LIKE MARA-MTART,  " mat type
             MBRSH LIKE MARA-MBRSH,  " ind sector
             MEINS LIKE MARA-MEINS,  " uom
             MAKTX LIKE MAKT-MAKTX,  " desc
           END OF I_MATNR.
    DATA REC*********************
    DATA : INT_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.
    COMM IDOC***************
    DATA : IT_COMM_IDOCS LIKE EDIDC OCCURS 0 WITH HEADER LINE.
    ***************PARAMETERS**********************
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETERS: P_MATNR LIKE MARA-MATNR OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION  LOGIC *****************
    SELECT MATNR MTART MBRSH MEINS FROM MARA
      INTO TABLE I_MATNR
      WHERE MATNR = P_MATNR .         "'TESTAMOL2'.
    CHECK SY-SUBRC EQ 0.
    LOOP AT I_MATNR.
      SELECT SINGLE MAKTX FROM MAKT INTO I_MATNR-MAKTX
        WHERE MATNR = I_MATNR-MATNR
        AND   SPRAS = SY-LANGU .
      IF SY-SUBRC EQ 0.
        MODIFY I_MATNR.
      ENDIF.
    ENDLOOP.
    BUILD CONTROL RECORD *************
    CONT_REC_OUT-MESTYP = 'MATMAS' .
    CONT_REC_OUT-IDOCTP = 'ZRAJAMAS'.                           "'MATMAS01'
    CONT_REC_OUT-RCVPRT = 'LS' .          " Partner type of receiver
    CONT_REC_OUT-RCVPRN = 'LOGSYS250' .   " Partner number of receiver
    BUILD DATA RECORDS *******************
    LOOP AT I_MATNR.
      INT_EDIDD-SEGNAM = C_HEADER_SEG.
      INT_EDIDD-SDATA = I_MATNR.
      APPEND INT_EDIDD.
    ENDLOOP.
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
      EXPORTING
        MASTER_IDOC_CONTROL                  = CONT_REC_OUT    " control rec
        OBJ_TYPE                             = ''
        CHNUM                                = ''
      TABLES
        COMMUNICATION_IDOC_CONTROL           = IT_COMM_IDOCS " comm idoc-o/p
        MASTER_IDOC_DATA                     = INT_EDIDD     " data,seg info
       EXCEPTIONS
         ERROR_IN_IDOC_CONTROL                = 1
         ERROR_WRITING_IDOC_STATUS            = 2
         ERROR_IN_IDOC_DATA                   = 3
         SENDING_LOGICAL_SYSTEM_UNKNOWN       = 4
         OTHERS                               = 5   .
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
      COMMIT WORK.
      LOOP AT IT_COMM_IDOCS.
        WRITE: / 'IDOC GENERATED ' , IT_COMM_IDOCS-DOCNUM.
      ENDLOOP.
    ENDIF.

    Hi Amol,
    This error seems to be because of some validations you do for the inbound process. Just check the inbound FM how are you handling this IDoc. Is there anything which you are checking for in the inbound process but are not sending it while you make an outbound.
    The best way is go to we19 and put all the values thats being sent in the outbound IDoc and debug and test it in your receiver system. Just see whatz goind wrong.
    Regards,
    Srikanth
    Message was edited by: Srikanth Lodd

  • How to create a IDOC program

    Hi All
    i have a requirement where i have to design a screen program to provide the user with a input screen. The user will input data on this screen, after the user enters the data and clicks on execute or some button on the module screen the system must generate a IDOC in the system. This IDOC will be picked up from another program within the same system.The reason we are doing this is the other program cannot be changed and it can accept only an IDOC from the external system which we are going to eliminate.
    My Questions:
    1. What are the steps in this requirement
    2. Do we require the partner profile and port and logical system definition as i am going to create a IDOC in the same system.( i am not sending the IDOC out of the system)
    3. Can i use the MASTER_IDOC_DISTRIBUTE FM to create a IDOC in the database?
    4. Can i use IDOC_CREATE_ON_DATABASE FM to do the same job?
    please guide me with deatils on how to go about this. Thanks
    ~Suresh

    Hi Suresh,
    First try to create a Module pool program.
    Assign the tcode to the IDOC.
    or else get the data into IDOC segment and try to transfer it.
    Creation of IDoc
    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.
    Create IDOC Type
    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
    u can also check all these links related to idocs
    http://www.allsaplinks.com/idoc_sample.html
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sappoint.com/abap.html
    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
    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://expertanswercenter.techtarget.com/eac/knowledgebaseCategory/0,295197,sid63_tax296858_idx0_off50,00.html
    http://sap.ittoolbox.com/documents/popular-q-and-a/extending-a-basic-idoc-type-2358
    http://help.sap.com/saphelp_47x200/helpdata/en/dc/6b7eee43d711d1893e0000e8323c4f/frameset.htm
    /thread/199996 [original link is broken]
    Regards,
    Priyanka.

  • IDOC/Program for Knowledge Articles in WEBUI

    What is the IDOC or Program used used to run Knowledge Articles in WEBUI in CRM 7.0?
    Thanks
    Srinivas

    And the result from Anton's advice:
    class ProvidersClass
    public bool AddProvider(
    EnterpriseManagementGroup emg,
    string sProviderName,
    string sUrl,
    EnterpriseManagementObject emoUser
    try
    //Get the Has Preference (System.SupportingItem.Library) relationship
    ManagementPackRelationship relPref =
    emg.EntityTypes.GetRelationshipClass(new Guid("649e37ab-bf89-8617-94f6-d4d041a05171"));
    //System.Search.ProviderConfig
    ManagementPackClass mpcSearchProvider = emg.EntityTypes.GetClass(new Guid("32b66b6f-1629-c411-394e-fea87a65143c"));
    //Create a new relationship for the provider
    CreatableEnterpriseManagementRelationshipObject cemroProvider =
    new CreatableEnterpriseManagementRelationshipObject(emg, relPref);
    //Create a new provider object
    CreatableEnterpriseManagementObject cemoProvider =
    new CreatableEnterpriseManagementObject(emg, mpcSearchProvider);
    //Setup the properties
    cemoProvider[mpcSearchProvider, "Id"].Value = Guid.NewGuid().ToString();
    cemoProvider[mpcSearchProvider, "ProviderName"].Value = sProviderName;
    cemoProvider[mpcSearchProvider, "DisplayName"].Value = sProviderName;
    cemoProvider[mpcSearchProvider, "Url"].Value = sUrl;
    //Create and save the relationship
    cemroProvider.SetSource(emoUser);
    cemroProvider.SetTarget(cemoProvider);
    cemroProvider.Commit();
    return true;
    catch
    return false;

  • Custom IDoc program to send PO ?

    Hai,
    Can any one send the complete program, on how to send PO (Purchase Oeder) through custom IDoc .
    Please send code for both outbound and inbound process ?

    Hi Vamsi,
    Here i am sending sample codes for Inbound and Outbound Processes..
    IN OUTBOUND SIDE :
    REPORT  ZSTAND_PROGRAM.
    *1.     Create parameters/select-options for input data. i.e., empno, message type, logical system.
    PARAMETERS : P_SNO LIKE ZSAMP1-SNO OBLIGATORY,
                 P_MESTYP LIKE EDMSG-MSGTYP DEFAULT 'ZMSG1',
                 P_LOGSYS LIKE TBDLST-LOGSYS OBLIGATORY.
    *2.     Create Data objects for control record, data record and database table.
    DATA : C_SEGMENT LIKE EDIDD-SEGNAM VALUE 'ZSEG1',
           C_IDOCTP LIKE EDIDC-IDOCTP VALUE 'ZIDOC1'.
    DATA : BEGIN OF IT_ZSAMP1,
              SNO LIKE ZSAMP1-SNO,
              SNAME LIKE ZSAMP1-SNAME,
           END OF IT_ZSAMP1.
    DATA : INT_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.
    DATA : INT_CONTROL_RECORD LIKE EDIDC.
    DATA : INT_COMM_IDOC LIKE EDIDC OCCURS 0 WITH HEADER LINE.
    *3.     Select the data from corresponding tables into internal table for a defined condition.
    SELECT SINGLE SNO SNAME FROM ZSAMP1 INTO CORRESPONDING FIELDS OF IT_ZSAMP1 WHERE SNO = P_SNO.
    *4.     create control record into internal table.
    INT_CONTROL_RECORD-MESTYP = P_MESTYP.
    INT_CONTROL_RECORD-IDOCTP = C_IDOCTP.
    INT_CONTROL_RECORD-RCVPRT = 'LS'.
    INT_CONTROL_RECORD-RCVPRN = P_LOGSYS.
    *5.     create data record into internal table.
    INT_EDIDD-SEGNAM =   C_SEGMENT.
    INT_EDIDD-SDATA =    IT_ZSAMP1.
    APPEND INT_EDIDD.
    *6.     Process ALE Service Layer using the function module  MASTER_IDOC_DISTRIBUTE.
    It returns the corresponding IDoc No.s.
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
      EXPORTING
        master_idoc_control                  = INT_CONTROL_RECORD
      tables
        communication_idoc_control           = INT_COMM_IDOC
        master_idoc_data                     = INT_EDIDD
    EXCEPTIONS
       ERROR_IN_IDOC_CONTROL                = 1
       ERROR_WRITING_IDOC_STATUS            = 2
       ERROR_IN_IDOC_DATA                   = 3
       SENDING_LOGICAL_SYSTEM_UNKNOWN       = 4
       OTHERS                               = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *7.     Display Communication IDocs.
    LOOP AT INT_COMM_IDOC.
      WRITE : / 'Communication IDoc No. is : ', INT_COMM_IDOC-DOCNUM.
    ENDLOOP.
    *8.     Commit Work.
    COMMIT WORK.
    IN INBOUND SIDE :
    FUNCTION ZL_IDOC_INPUT_MATMAS_MDM.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD
    *"     VALUE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC
    *"  EXPORTING
    *"     VALUE(WORKFLOW_RESULT) LIKE  BDWF_PARAM-RESULT
    *"     VALUE(APPLICATION_VARIABLE) LIKE  BDWF_PARAM-APPL_VAR
    *"     VALUE(IN_UPDATE_TASK) LIKE  BDWFAP_PAR-UPDATETASK
    *"     VALUE(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
    *"      OTHER_EXC
    *1.     Call workflow include program MBDCONWF.
    INCLUDE MBDCONWF.
    *2.     Create Data Objects for segment(s) and DB Table.
    TABLES : ZSAMP1.
    DATA : FS_SHDR_DATA LIKE ZSEG1.
    DATA : FS_APP_SDET LIKE ZSAMP1.
    *3.     Raise the exception if the message type is not ZMSG1.
    IF IDOC_CONTRL-MESTYP NE 'ZMSG1'.
      RAISE WRONG_FUNCTION_CALLED.
      CLEAR FS_APP_SDET.
    ENDIF.
    *4.     Process Each segment in the IDoc.
    LOOP AT IDOC_CONTRL.
      LOOP AT IDOC_DATA WHERE DOCNUM EQ IDOC_CONTRL-DOCNUM.
        CASE IDOC_DATA-SEGNAM.
          WHEN 'ZSEG1'.
            FS_SHDR_DATA = IDOC_DATA-SDATA.
           MOVE-CORRESPONDING FS_SHDR_DATA TO FS_APP_SDET.
             FS_APP_SDET-mandt = '000'.
             FS_APP_SDET-sno = FS_SHDR_DATA-zsno.
             FS_APP_SDET-sname = FS_SHDR_DATA-zsname.
        ENDCASE.
      ENDLOOP.
    5.     If the data already exists update the data or else insert the data.
      SELECT SINGLE * FROM ZSAMP1 WHERE SNO EQ FS_APP_SDET-SNO.
        IF SY-SUBRC NE 0.
          INSERT INTO ZSAMP1 VALUES FS_APP_SDET.
          ELSE.
            UPDATE ZSAMP1 FROM FS_APP_SDET.
        ENDIF.
    *6.     If the data successfully posted maintain status as 53 or if unsuccessful give status as 51.
        IF SY-SUBRC EQ 0 .
         POPULATE RETURN VARIABLES FOR SUCCESS.
            RETURN_VARIABLES-WF_PARAM      = 'PROCESSED_IDOCS'.
            RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
            APPEND RETURN_VARIABLES.
         ADD STATUS RECORD INDICATES SUCCESS.
            IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
            IDOC_STATUS-STATUS = '53'.
            IDOC_STATUS-MSGTY  = 'I'.
            IDOC_STATUS-MSGID  = 'ZM'.
            IDOC_STATUS-MSGNO  = '006'.
            IDOC_STATUS-MSGV1  = FS_APP_SDET-SNO.
            APPEND IDOC_STATUS.
            ELSE.
           POPULATE RETURN VARIABLES FOR ERROR.
              RETURN_VARIABLES-WF_PARAM      = 'ERROR_IDOCS'.
              RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
              APPEND RETURN_VARIABLES.
           ADD STATUS RECORD INDICATES ERROR.
              IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
              IDOC_STATUS-STATUS = '51'.
              IDOC_STATUS-MSGTY  = 'E'.
              IDOC_STATUS-MSGID  = 'ZM'.
              IDOC_STATUS-MSGNO  = '007'.
              IDOC_STATUS-MSGV1  = FS_APP_SDET-SNO.
              APPEND IDOC_STATUS.
       ENDIF.
    ENDLOOP.
    ENDFUNCTION.
    These are sample code for custom idoc...i did this for customized tables..change this according to your requirement.
    Reward if it useful..
    Lakshmi.
    Edited by: lakshmi matti on May 26, 2008 11:05 AM

  • IDOC/Program for Knowledge Article

    Hi all,
    Can anyone please let me know what is the IDOC or Program which is used to run  Knowledge Articles in WEBUI in CRM 7.0?
    Thanks
    Srinivas

    Hi Hans,
      Yes, it is possible to send each Variant separately. Actually in our environment we have the Variants coming at different times, based on the season.  Like for a Style during Spring we have Yellow and Green, during holidays we do Red.  So we generate different Variants at different times.  Just remember to provide correct information in the segments, like <Segment>-FUNCTION field (Create / change).  First time Style should have '005' and later it can have '009'.
    But should be like below
    IDOC1 for the generic article (with E1BPE1VARKEY segment)(New)
    IDOC1 for variant 1 (with E1BPE1AUSPRT segment)(New)
    IDOC2 for the generic article (with E1BPE1VARKEY segment) (change)
    IDOC2 for variant 2 (with E1BPE1AUSPRT segment)(New)
    IDOC3 for the generic article (with E1BPE1VARKEY segment) (change)
    IDOC3 for variant 3 (with E1BPE1AUSPRT segment)(New)
      Also if the client has too many variants the size of the idoc could be huge as you know ARTMAS idoc has complete information for an article.
    Cheers
    Kishore MVR

  • IDOC/Program to Knowledge Article

    What is the IDOC or Program used used to run Knowledge Articles in WEBUI in CRM 7.0?
    Thanks
    Srinivas

    What is the IDOC or Program used used to run Knowledge Articles in WEBUI in CRM 7.0?
    Thanks
    Srinivas

Maybe you are looking for

  • When I extract pages from a PDF and go to "Save As", Acrobat completely crashes and disappears. Why?

    I work for a remote desktop hosting company, and am having an issue with Adobe Acrobat that we have installed on one of our customer's terminal servers. The OS running on the customer's TS is Windows 2008 R2 Standard. The customer is running Windows

  • How to pass a default value in selection screen of logical database pnpce

    Dear All, Can any one tell me how to pass a default value in selection screen of logical database pnpce . Regards Rakesh Singh

  • Oracle 9i database not starting

    Dear all, need ur help. i have installed oracle9i on wndows xp. then i stoped all the services for 9i. n i installed oracle 10g also. My problem is that bothy database servies are their and they are automatic. 10 g Database is starting automatically.

  • Implementing listener in JTree

    Hi, I am trying to implement a listener for JTree within a class other than the one where is tree is initialized and set. With this listener, I would like to grab the index of the selected child from a tree. Do I only need to implement void ValueChan

  • Need help on voicemail!

    Not the built in voicemail but my corporate one. On any other phone when I hit 3 - 3, it fast forwards to the end of the message. It will not do it on the Iphone, just really does not do anything. I have tried to push 3-3 fast, slow, over and over an