Step-by step procedure for INBOUND IDOC (VENDOR CREATE / CHANGE)

Hi ,
Can any body provide me the step-by-step procedure for Inbound IDOCS.
As i'm new to this i need the the clarification between Inbound & outbound idocs.
How can we differentiate both?
where to define outbound & where to define Inbound?
( If possible Please explain me the procedure for  Vendor Create through INBOUND IDOCS )
Thanks in advance..

Hi,
Ale Technology is SAPu2019s technology to support distributed yet integrated processes across several SAP systems.
Outbound Process:
ALE Outbound Process in SAP sends data to one or more SAP Systems. It involves four steps.
1. Identify the need of IDoc: This step starts upon creating a application document, can relate to a change to a master data object.
2. Generate the Master IDoc: The document or master data to be sent is read from the database and formatted into an IDoc format. This IDoc is called as a Master IDoc.
3. Generate the Communication IDoc: The ALE Service layer generates a separate IDoc from the Master IDoc for each recipient who is interested in the data. Separate IDocs are generated because each recipient might demand a different version or a subset of the Master IDoc. These recipient-specific IDocs are called Communication IDocs and are stored in the database.
4. Deliver the Communication IDoc: The IDoc is delivered to the recipients using an asynchronous communication method. This allows the sending system to continue its processing without having to wait for the destination system to receiver or process the IDoc.
Inbound Process:
The inbound process receives an IDoc and creates a document in the system.
1. Store the IDoc in the database: The IDoc is received from the sending system and stored in the database. Then the IDoc goes through a basic integrity check and syntax check.
2. Invoke the Posting Module: The control information in the IDoc and configuration tables are read to determine the posting program. The IDoc is then transferred to its posting program.
3. Create the Document: The posting program reads the IDoc data and then creates a document in the system. The results are logged in the IDoc.
Over view of IDocs:
IDoc is a container that is used to exchange data between any two processes. The document represented in an IDoc is independent of the complex structure SAP uses to store application data. This type of flexibility enables SAP to rearrange its internal structure without affecting the existing interface.
IDoc interface represents an IDoc Type or IDoc data. IDoc Type represents IDocu2019s definition and IDoc Data is an instance of the IDoc Type.
IDoc Types:
IDoc type structure can consist of several segments, and each segment can consist of several data fields. The IDoc structure defines the syntax of the data by specifying a list of permitted segments and arrangement of the segments. Segments define a set of fields and their format.
An IDoc is an instance of an IDoc Type and consists of three types of records.
i. One Control record: each IDoc has only one control record. The control record contains all the control information about an IDoc, including the IDoc number, the sender and recipient information, and information such as the message type it represents and IDoc type. The control record structure is same for all IDocs.
ii. One or Many Data records: An IDoc can have multiple data records, as defined by the IDoc structure. Segments translate into data records, which store application data, such as purchase order header information and purchase order detail lines.
iii. One or Many Status records: An IDoc can have multiple status records. Status record helps to determine whether an IDoc has any error.
Message in IDoc Type:
A Message represents a specific type of document transmitted between two partners.
Outbound Process in IDocs:
Outbound process used the following components to generate an IDoc. A customer model, and IDoc structure, selection programs, filter objects, conversion rules, a port definition, an RFC destination, a partner profile, service programs, and configuration tables.
The Customer Model:
A customer model is used to model a distribution scenario. In a customer model, you identify the systems involved in a distribution scenario and the message exchanged between the systems.
Message control:
Message control is a cross application technology used in pricing, account determination, material determination, and output determination. The output determination technique of Message control triggers the ALE for a business document. Message control separates the logic of generating IDocs from the application logic.
Change Pointers:
The change pointers technique is based on the change document technique, which tracks changes made to key documents in SAP, such as the material master, customer master and sales order.
Changes made to a document are recorded in the change document header table CDHDR, and additional change pointers are written in the BDCP table for the changes relevant to ALE.
IDoc Structure:
A message is defined for data that is exchanged between two systems. The message type is based on one or more IDoc structures.
Selection Program:
Is typically implemented as function modules, are designed to extract application data and create a master IDoc. A selection program exists for each message type. A selection programu2019s design depends on the triggering mechanism used in the process.
Filter Objects;
Filter Objects remove unwanted data for each recipient of the data basing on the recipients requirement.
Port Definition:
A port is used in an outbound process to define the medium in which documents are transferred to the destination system. ALE used a Transactional RFC port, which transfers data in memory buffers.
RFC Destination:
The RFC destination is a logical name used to define the characteristics of a communication link to a remote system on which a function needs to be executed.
Partner Profile:
A partner profile specifies the components used in an outbound process(logical name of the remote SAP system, IDoc Type, message type, TRFC port), an IDocu2019s packet size, the mode in which the process sends an IDoc (batch versus immediate), and the person to be notified in case of error.
Service Programs and Configuration Tables:
The outbound process, being asynchronous, is essentially a sequence of several processes that work together. SAP provides service programs and configuration tables to link these programs and provide customizing options for an outbound process.
Process flow for Distributing Transactional Data:
Transactional data is distributed using two techniques: with Message control and without message control.
Process flow for Distributing Master Data:
Master data between SAP systems is distributed using two techniques: Stand alone Programs and Change Pointers.
Triggering the Outbound Process via Stand-Alone Programs:
Stand-Alone programs are started explicitly by a user to transmit data from one SAP system to another. Standard Programs for several master data objects exist in SAP. Ex. The material master data can be transferred using the RBDSEMAT program or transaction BD10.
The stand-alone programs provide a selection screen to specify the objects to be transferred and the receiving system. After the stand-alone program is executed, it calls the IDoc selection program with the specified parameters.
Triggering the Outbound Process via Change Pointers:
The change pointer technique is used to initiate the outbound process automatically when master data is created or changed.
A standard program, RBDMIDOC, is scheduled to run on a periodic basis to evaluate the change pointers for a message type and start the ALE process for distributing the master data to the appropriate destination. The RBDMIDOC program reads the table TBDME to determine the IDoc selection program for a message type.
Processing in the Application Layer:
The customer distribution model is consulted to make sure that a receiver has been defined for the message to be transmitted. If not, processing ends. If at least one receiver exists, the IDoc selection program reads the master data object from the database and creates a master IDoc from it. The master IDoc is stored in memory. The program then calls the ALE service layer by using the function module MASTER_IDOC_DISTRIBUTE, passing the master IDoc and the receiver information.
Processing in the ALE Interface Layer:
Processing in the ALE Layer consists of the following steps:
u2022 Receiver Determination: The determination of the receiver is done through Customer Distribution Model.
u2022 IDoc Filtering: if an IDoc filter is specified in the distribution model for a receiver, values in the filter are compared against the values in the IDoc data records. If a data record does not meet the filter criteria, it is dropped.
u2022 Segment Filtering: For each sender and receiver combination, a set of segments that are not required can be filtered out.
u2022 Field conversion: Field values in data records are converted by using the conversion rules specified for the segment.
u2022 Version change for segments: Segments are version-controlled. A new version of a segment always contains fields from the preceding version and fields added for the new version. Release in IDoc type field of the partner profile to determine the version of the segment to be generated.
u2022 Version change for IDocs: IDocs are also version controlled. The version is determined from the Basic Type field of the partner profile.
u2022 Communication IDocs generated: The final IDoc generated for a receiver after all the conversions and filtering operations is the communication IDoc. One master IDoc can have multiple communication IDocs depending on the number of receivers identified and the filter operations performed. IDoc gets the status record with a status code of 01 (IDoc Created).
u2022 Syntax check performed: IDoc goes through a syntax check and data integrity validation. If errors found the IDoc get the status of 26 (error during syntax check of IDoc u2013 Outbound). If no errors found the IDoc gets the status 30 (IDoc ready for dispatch u2013 ALE Service).
u2022 IDoc dispatched to the communication Layer: In the ALE process, IDocs are dispatched using the asynchronous RFC method, which means that the sending system does not await for data to be received or processed on the destination system. After IDocs have been transferred to the communication layer, they get a status code 01 (Data Passed to Port OK).
Processing in the Communication Layer:
To dispatch an IDoc to a destination system, the system reads the port definition specified in the partner profile to determine the destination system, which is then used to read the RFC destination. The RFC destination contains communication settings to log o to the remote SAP system. The sending system calls the INBOUND_IDOC_PROCESS function module asynchronously on the destination system and passes the IDoc data via the memory buffers.
Inbound Process in IDocs:
An inbound process used IDoc structure, posting programs, filter objects, conversion rules, a partner profile, service programs, and configuration tables to post an application document from an IDoc.
Posting Program:
Posting programs, which are implemented as function modules, read data from an IDoc and create an application document from it. A posting program exists for each message. Each posting program is assigned a process code. A process code can point to a function module or a work flow. In the standard program process codes always point to a function module.
Ex. The posting program for message type MATMAS is IDOC_INPUT_MATMAS which has a process code MATM.
Workflow:
A workflow represents a sequence of customized steps to be carried out for a process. The workflow management system is used to model the sequence, identify information required to carry out the steps and identify the person responsible for the dialog steps.
Partner Profile;
A partner profile specifies the components used in an inbound process (partner number, message type, and process code), the mode in which IDocs are processed (batch versus immediate), and the person to be notified in case of errors.
Process flow for the Inbound process via a Function Module:
In this process, IDocs are received from another system and passed to the posting function module directly.
1. Processing in the communication Layer:
The IDOC_INBOUND_ASYCHRONOUS program, triggered as a result of an RFC from the sending system, acts as the entry point for all inbound ALE processes. The IDoc to be processed is passed as an input parameter. Control is transferred to the ALE/EDI layer.
2. Processing in the ALE/EDI Interface Layer:
u2022 Basic integrity check: A basic integrity check is performed on the control record.
u2022 Segment Filtering and conversion: Filtering out unwanted segments and carry out any required conversion of field values.
u2022 Creation of Application IDoc: The application IDoc is created and stored in the database and a syntax check is performed. If there are errors it gets status code of 60 (Error during Syntax check of IDoc u2013 Inbound). At this point a tangible IDoc, which can be monitored via one of the monitoring transactions, is created and the IDoc gets status code 50 (IDoc Added).
u2022 IDoc Marked ready for Dispatch: IDoc gets the status code 64 (IDoc ready to be passed to application).
u2022 IDoc is passed to the posting program: The partner profile table is read. If the value of the Processing field is set to Process Immediately, the IDoc is passed to the posting program immediately using the program RBDAPP01.
3. Processing in the Posting Module:
The process code in the partner profile points to a posting module for the specific message in the IDoc. The posting program implemented as a function module either calls a standard SAP transaction by using the Call Transaction command for posting the document or invokes a direct input function module.
The results of execution are passed back via the function moduleu2019s output parameters. If the posting is successful IDoc gets the status code 53 (Application Document Posted) or it gets status code 51 (Error: Application Document Not Posted).

Similar Messages

  • Standard IDoc Type for Inbound NonPO Vendor Invoices - FB60

    What should be the perfect standard IDoc Type for Inbound NonPO Vendor Invoice posting. Tcode FB60.
    I found IDoc Type FIDCCP02 but the Function Module 'IDOC_INPUT_FIDCC2' for FIDCCP02 is not released.
    In the same way many other standard function modules like - IDOC_INPUT_ACLPAY, IDOC_INPUT_FIDCCH, IDOC_INPUT_ACC_INVOICE_RECEIPT and few more are not released.
    My question : If at all I have to use standard IDoc Type, Message type and Function module (Released) for Inbound NonPO Vendor Invoices, then what should be the solution from SAP ?
    Thanks,
    Veeru.

    Hi,
    IDOC_INPUT_FIDCC2 for FIDCCP02 works for us in ECC6.0
    If you want Automatic tax calculation functionality using FIDCCP02.. then FIDCC2 is not correct message type for you. In that case you should probably go for :
    Msg: INVOIC
    Basic type: INVOIC02
    FM: IDOC_INPUT_INVOIC_FI
    Process code: INVF
    Thanks,
    Kumar

  • Partner profile for INBOUND IDOC

    Dear experts,
    Need your help to define partner profile for inbound idoc to R/3 system. There is a third party (Non SAP) based application from which idocs need to be sent to the R/3 system. There is no need to send an outbound idoc from the R/3 system. Can some one please suggest what are the steps to be taken  to b configure the partner profile  in the R/3 system for the inbound idoc?
    Thanks,
    Priyanka

    Hi
    This is not the right location to post this question.
    You got to post this query in Data transfers section of SDN ABAP Development forums
    Now regarding your question,
    You need to create a Logical System with the help of the transaction SALE.
    Assign the created LS to the client with the help of same transaction
    Go to WE20 and create the partner with the same Logical System name
    Now..as you are recieving the Inbound Idoc from external Non-SAP System, you need to maintain the message type in the Inbound Parameters by clicking on ADD Icon over there.
    Before doing the above step, you got to create the connection between SAP and Non-SAP System.
    Use transaction SM59 to do this. Type of connection would be R/3 I guess
    Thanks
    Hope it helps.

  • Process code for inbound idoc's

    hi  friend,
    i want to create a zprocess code for inbound idoc's pls i want to step or code.
    regrads and thanks

    Hi
    Are you using the customised idoc i:e message type .I hope most of the data transfer techniques always has a standard message type and if you are using one such than you can check in transaction we42(inbound process code) .All the steps have been rightly been mentioned for this querry of yours if you can clearly explain as to what message type are you using and for what purpose i can send you with documentation with steps to you.At the end of the day you will be posting idocs so that the data is being reflected in the segments .The things to be noted down is :-
    1.Maintain Partner Profile(we20) which is the sender system are you using ?
    2.If the satus is 53 it is sucess(green ) else 64(being processed-yellow) or 51(error-red)
    3.If you trigger by workflow than you have to use Message Variant .
                     If you are ok or incase do face any issues please do reply to the forum.
    Regards
    Somnath

  • Upgradation procedure for ALE/IDOCS

    Can anyone  let me know what is the upgradation procedure for ALE/IDOCS and what are the steps needs to be checked  out during technical remediation part of version upgrade(lower version to ECC6.0)?

    IDocs are backwards compatible, so I don't think you need any special procedures for them, just a regular test, to make sure everything stull works fine. If you've had extended any standard IDocs, that part will need to be reviewed, as any other custom development.
    However, there might be a newer version of the IDoc type available in ECC 6.0, which you didn't have in the previous release. You might want to see if there would be any benefits in switching to the newer version.
    I'm sure you'll find all the information on the Upgrade page on SAP's [web site|http://service.sap.com/upgrade]. Also there is an SAP Press book on the subject.

  • EOIO should be enabled for Inbound IDocs to SAP

    Hi All,
    My Interface requirement:
    i want to send my IDoC's to SAP ECC from SAP PI using IDoc Adapter in EOIO manner. so i have followed the below link.
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/96/791c42375d5033e10000000a155106/frameset.htm
    1)I have have enabled EOIO in sender File adapter.
    2)i have checked the Queue Processing in IDoC adapter.
    assumed that IDocs are processing in EOIO manner. for proving the same, i have stopped the RFCUSER which is in ECC to process the IDOCs to SAP.
    but still messages are stuck in Trfc queue, so i am thinking that EOIO is not enabled as messages are not stuck in SMQ1.
    how to achive EOIO for inbound IDoCS??
    Thank You,
    Madhav

    Hi
    It's fine that messages are not stuck in smq2 on PI side. You set in smq1 system, connection and assing connetion pool numer and meesage is transfered to Ecc using common connection. On target Ecc check tcode WEINBQUEUE.
    Br
    Maciej

  • Program for inbound idoc processing

    Hi,
    Can anyone provide a sample program structure to process inbound idocs to create delivery and change BOM? Appreciate any help
    Thanks,
    Michael

    Hi gaurav,
    thanks for you reply.
    Can you give an example
    thanks & regards

  • User exit for inbound idoc

    could anyone please tell the user exit for inbound idoc : ACC_POSTING_GL01

    I thnk the inbound idoc name is ACC_GL_POSTING01. User Exit for this is EXIT_SAPLACC4_001.
    *****Reward points if useful
    Regards,
    Kiran Bobbala

  • Sample files for inbound IDOC's( EDI)

    Hi All,
    I am trying to get idoc's into system using EDI , wanted sample files for inbound idocs using EDI.
    If someone could send the files please.
    rgds
    Ajay Sharma

    HI,
    Here one sample file.U need to change the sender/receiver ID's accordingly to the setup at ur EDI subsystem.This 850 i/b file will create an ORDERS idoc in SAP.
    ISA³00³          ³00³          ³01³006906614GE    ³01³040986076      ³060714³0640³U³00401³000012157³1³P³>~
    GS³PO³006906614GE³040986076³20060714³0640³5008³X³004010~
    ST³850³020700691~
    BEG³00³NE³020700691³³20060714~
    N1³BS³ABC PHOENIX DIVISION³11³RA0290837~
    N1³SU³³11³II7930501~
    PO1³1³12³EA³123.45³³ND³0469520260~
    PO1³2³24³EA³190.23³³ND³0469520211~
    CTT³2~
    SE³8³020700691~
    ST³850³057796284~
    BEG³00³NE³057796284³³20060714~
    N1³BS³ABC RALEIGH DIVISION³11³RA0289036~
    N1³SU³³11³II7930501~
    PO1³1³48³EA³61.72³³ND³0469520230~
    PO1³2³12³EA³123.45³³ND³0469520260~
    PO1³3³6³EA³190.23³³ND³0469520211~
    CTT³3~
    SE³9³057796284~
    GE³2³5008~
    IEA³1³000012157~
    Also u can check in the system and find some ORDERS
    idocs and u can retrigger that from WE19.
    reward if helpfulll
    ram

  • Lsmw for Inbound idoc matmas04

    Hi experts,
    I Need to upload Material Master for Idoc Matmas04. Can anyone provide me steps for it.
    Can we use bapi_master_savedata for same.
    I tried LSMW but when i go to settings> idoc inbound processings is disabled.What can be the cause.
    Thanks and Regards
    Neha Kapoor

    hi Neha,
    For material master specifically its better to go with DI method in lsmw.
    Here r the sample steps to fallow...
    Check the Step by step process for LSMW
    Using Tcode MM01 -- Maintain the source fields are
    1) mara-amtnr char(18)
    2) mara-mbrsh char(1)
    3) mara-mtart char(4)
    4) makt-maktx char(40)
    5) mara-meins char(3)
    the flate file format is like this as follows
    MAT991,C,COUP,Srinivas material01,Kg
    MAT992,C,COUP,Srinivas material02,Kg
    AMT993,C,COUP,Srinivas material03,Kg
    MAT994,C,COUP,Srinivas material04,Kg
    MAT995,C,COUP,Srinivas material05,Kg
    goto Tcode LSMW
    give Project Name
    Subproject Name
    object Name
    Press Enter -
    Press Execute Button
    It gives 13 radio-Button Options
    do the following 13 steps as follows
    1) select radio-Button 1 and execute
    Maintain Object Attributes
    select Standard Batch/Direct Input
    give Object -- 0020
    Method -- 0000
    save & Come Back
    2) select radio-Button 2 and execute
    Maintain Source Structures
    select the source structure and got to click on create button
    give source structure name & Description
    save & Come Back
    3) select radio-Button 3 and execute
    Maintain Source Fields
    select the source structure and click on create button
    give
    first field
    field name matnr
    Field Label material Number
    Field Length 18
    Field Type C
    Second field
    field name mbrsh
    Field Label Industrial Sector
    Field Length 1
    Field Type C
    Third field
    field name mtart
    Field Label material type
    Field Length 4
    Field Type C
    fourth field
    field name maktx
    Field Label material description
    Field Length 40
    Field Type C
    fifth field
    field name meins
    Field Label base unit of measurement
    Field Length 3
    Field Type C
    save & come back
    4) select radio-Button 4 and execute
    Maintain Structure Relations
    go to blue lines
    select first blue line and click on create relationship button
    select Second blue line and click on create relationship button
    select Third blue line and click on create relationship button
    save & come back
    5) select radio-Button 5 and execute
    Maintain Field Mapping and Conversion Rules
    Select the Tcode and click on Rule button there you will select constant
    and press continue button
    give Transaction Code : MM01 and press Enter
    after that
    1) select MATNR field click on Source filed(this is the field mapping) select MATNR and press Enter
    2) select MBRSH field click on Source filed(this is the field mapping) select MBRSH and press Enter
    3) select MTART field click on Source filed(this is the field mapping) select MTART and press Enter
    4) select MAKTX field click on Source filed(this is the field mapping) select MAKTX and press Enter
    5) select MEINS field click on Source filed(this is the field mapping) select MEINS and press Enter
    finally
    save & come back
    6) select radio-Button 6 and execute
    Maintain Fixed Values, Translations, User-Defined Routines
    Create FIXED VALUE Name & Description as MM01
    Create Translations Name & Description as MM01
    Create User-Defined Routines Name & Description as MM01
    after that delete all the above three just created in the 6th step
    FIXED VALUE --MM01
    Translations --MM01
    User-Defined Routines --MM01
    come back
    7) select radio-Button 7 and execute
    Specify Files
    select On the PC (Frontend) -- and click on Create button(f5)
    give the path of the file like "c:\material_data.txt"
    description : -
    separators as select comma radiao- button
    and press enter save & come back
    8) select radio-Button 8 and execute
    Assign Files
    Save & come back
    9) select radio-Button 9 and execute
    Read Files
    Execute
    come back
    come back
    10) select radio-Button 10 and execute
    Display Imported Data
    Execute and press enter
    come back
    Come back
    11) select radio-Button 11 and execute
    Convert Data
    Execute
    come back
    Come back
    12) select radio-Button 12 and execute
    Display Converted Data
    Execute & come back
    13) select radio-Button 13 and execute
    Start Direct Input Program
    select the Program
    select continue button
    go with via physical file
    give the lock mode as 'E'
    and execute
    and gothrough this link for the step by step procedure...
    http://help.sap.com/bp_blv1500/BL_US/documentation/LSMW_EN_US.doc
    ~~Guduri

  • Workflow for inbound idoc failures

    Hi Gurus,
    Can anybody please point me to a place where i can start to see how i can setup workflow to notify users via SBWP whenver there is an inbound idoc error happens. We want to derive the standard functionality to its fullest even before thinking of putting any custom code. I'm specifically looking for hte order acknowledgemetns and shiipping notifications errors of idocs coming from the vendor
    Thanks
    anusha
    Edited by: anusha vemulapati on Jul 2, 2011 4:43 PM

    Hi Anusha,
    The simplest way is to link the partner profile to a specific user ID. This is done in trs WE20 - you have the link to the WF recipient both generally for the partner (on the initial screen of WE20 when the partner has been selected) and specifically for the different message types - double-click on the inbound message type and choose the tab "Post processing - permitted agent".
    You link the partner profile to a specific user by choosing the user type = "US" (user") and then specifying the user name below it. If you want several users to receive the same WF, you can link the partner profile to another user type, e.g. O = Organisational unit. Then you link the users to the organisational unit in trs PPOME.
    As far as I remember, the WF for IDoc's in error is activated in the standard system, i.e. the setting above shall be sufficient.
    BR
    Raf

  • Workflow for INBOUND IDOC

    Hi,
    I want to set you a workflow for one IBOUND idoc coming via edi partner. I want to use the organization units and then assign the user to it. what are the steps required for setting up a new workflow totally from the start for a IDOC / Message type and config.
    Thanks in adv
    /Manik

    STEP 1.       USE   SALE -> Error Handling                 
    STEP 2.   Go To  Basic Workflow  Settings.Use Auto-customise button to allow the system to configure most of the options.
    STEP 3 
      a)Go to SAP MENU -> TOOLS-> BUSINESS WORKFLOW ->
    DEVELOPMENT ->DEFINITION TOOLS->TASKS
      b) Create a customised task putting IDOCCLFMAS for example   as object type and    INPUTFOREGROUND  as object method.
    c)Associate the triggring event InputErrorOccurred with the standard task.
    d)Associate the terminating event InputFinished with the standard task
    e) Assign appropiate agent to the customised task. For this GO TO
         Additional data -> Agent assignment -> Maintain
    STEP 4  --  Go to transaction WE20.In the partner profile of the message type CLFMAS enter for the post  processing permitted agent.Enter the agent type (Organisational unit,Workcenter,Job,Person,Position or User),agentId and the language.
    STEP 5- In case of any error in processing of Idoc a workflow notification is sent to concerned agents.The message is sent to the inboxes of concerned persons which indicates which interface has erred,the associated IDOC number ,status of the IDOC and the date and time of error.
    Regarding the complete set up you can check the workflow tutorial in help.sap.com.
    regards
    Aveek

  • How to create the INBOUND Function Module for INBOUND IDOCs

    Hi Friends,
    Can any Suggest me How to proceed to Create an INBOUND Function Module for Processing the INBOUND IDOCS
    which are recieved from XI Server ?
    I am working in SAP-ISU
    Here i will recieve the INBOUND IDOCs for the Meter Reading Orders.
    We have a Standard INBOUND FUNCTION MODULE
    IDOC_INPUT_ISU_MR_UPLOAD
    which Uploads the Meter Reading Results.
    I copied the Same function Module into ZIDOC_INPUT_
    and working on it.
    Can any one suggest me, whether i am going in correct way or not.
    In IDOC_INPUT_ISU_MR_UPLOAD Inbound fun module,
    BAPI_MTRREADDOC_UPLOAD is used to Update or Insert the Meter Reading Results,
    My requirment is to Insert and Update the Meter Reading Orders which are Inbounded from XI.
    Can I Use the Same BAPI
    BAPI_MTRREADDOC_UPLOAD
    to Update the below fields,
    EABL-SERNR
    EABL-ZWNUMMER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS
    EABL-ADATTATS
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Kindly Suggest me,
    Thanks in Advance,
    Ganesh

    Hello Ganesh
    I think you are going completely astray with you z-function module for IDoc processing.
    If you look at TABLES parameter METERREADINGRESULTS (type BAPIEABLU ) of BAPI_MTRREADDOC_UPLOAD you will find many of the requested fields already:
    EABL-SERNR => BAPIEABLU-SERIALNO
    EABL-ZWNUMMER =>REGISTER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS => ACTUALMRTIME
    EABL-ADATTATS => ACTUALMRDATE
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Field EABL-ZMESSAGE appears to be custom field (at least I cannot find it on ECC 6.0). If this field was added using include CI_EABL then you probably can get these values into the BAPI using the EXTENSIONIN parameter.
    Check routine CHECK_UPLOADRECORDS in the BAPI which allows two extension structures:
    - BAPI_TE_EABL
    - BAPI_TE_EOSB
    Not surprisingly BAPI_TE_EABL contains the include CI_EABL.
    Regards
      Uwe

  • Problem with user exit EXIT_SAPLIEDI_001 for Inbound Idocs in replacing G/L

    Hello all,
    I am currently facing an issue where my IDOC where exit EXIT_SAPLIEDI_001 is not appearing to work properly.
    Basically I am using the FM that processes the inbound idoc (IDOC_INPUT_INVOIC_FI) to post an accounting document. We needed a solution where we need to substitute one of the G/L Accounts.
    The current process in our SAP system is that we are creating a billing document which automatically generates the output type (running: program rsnasted subroutine edi_processing) to create and process the inbound idoc. 
    So I discovered FM EXIT_SAPLIEDI_001 which exports company code and G/L Account back does this.
    In this exit, Since I needed to get data from the IDOC, I used the logic ASSIGN: ('(SAPLIEDI)IDOC_DATA[]') TO <fs_edidd> to get the DATA Records for further processing.
    During the development and testing phase in the Sandbox system this works.
    However when we moved this to production we encountered a situation where the G/L account was not being substituted so were assuming EXIT_SAPLIEDI_001 is not working properly. However when I reprocess this in production either by running the idoc with errors RBDMANI2 or BD87 the IDOC is properly posted and the G/L Account is substituted as well as if I try to repeat the output type of the billing document. So there are instances when in the actual business scenario it does not work except when I reprocess it.
    I was wondering if there are any ideas why this could have happened?
    Oh ... I  also noticed when we transported the objects of the exit. When I try to double click the subroutine I made inside the exit it said the object does not exist. I had to generate the function group of FM EXIT_SAPLIEDI_001 in SE80 in production for it to reflect. I was wondering if this could have caused the issue.
    Well I hope to hear from you.
    Regards
    Edited by: Rob Burbank on Dec 6, 2011 1:03 PM

    Hi,
    Check in t.code CMOD whether project is active or not (Activate the Project)
    BR,
    Vijay

  • Stored Procedure for checking Invoice Vendor ref No

    Hi All
    I need a sp for checking a vendor ref no  on an invoice if it already exist in the system or the user forgot to include one when trying to add the document.
    I get this error on the one that I created
    16/03/2010  12:21:54: [Microsoft][SQL Native Client][SQL Server]Conversion failed when converting the nvarchar value '24     0' to data type int. (CINF)
    Here is my SP :-
    DECLARE @Invoice AS VARCHAR(15)
    DECLARE @Card AS VarChar (20)
    SELECT @invoice = NumatCard, @card = CardCode FROM dbo.OPCH
    WHERE DocEntry = @list_of_cols_val_tab_del
    if @object_type = '18' and @transaction_type in (N'A', N'U') -- AP Invoice is null
    begin
        If exists (SELECT T0.cardcode, T0.NumAtCard  FROM OPCH T0 where T0.NumatCard is null and  T0.cardcode=@list_of_cols_val_tab_del)
         begin
              SET @error = 10
              SET @error_message = N'Supplier invoice number not entered.'
         END
    END
    SELECT @INVOICE = NumatCard FROM dbo.OPCH
    WHERE DocEntry = @list_of_cols_val_tab_del
    if @object_type = '18' and @transaction_type in (N'A', N'U') -- AP Invoice to check if the invoice no exist
    begin
        If exists (SELECT T0.cardcode, T0.NumatCard  FROM OPCH T0 where T0.NumatCard = @invoice  and  T0.cardcode=@list_of_cols_val_tab_del)
         begin
              SET @error = 10
              SET @error_message = N'This invoice number already exist for this supplier.'
         END
    END
    Regards
    Bongani Dlamini

    This code should be inserted into the original (or already expanded) SBO_SP_TransactionNotification stored procedure after the line
    --     ADD     YOUR     CODE     HERE )
    Try this full (and a little modified) procedure:
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER proc [dbo].[SBO_SP_TransactionNotification]
    @object_type nvarchar(20),                     -- SBO Object Type
    @transaction_type nchar(1),               -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
    @num_of_cols_in_key int,
    @list_of_key_cols_tab_del nvarchar(255),
    @list_of_cols_val_tab_del nvarchar(255)
    AS
    begin
    -- Return values
    declare @error  int                    -- Result (0 for no error)
    declare @error_message nvarchar (200)           -- Error string to be displayed
    select @error = 0
    select @error_message = N'Ok'
    --     ADD     YOUR     CODE     HERE
    if @object_type = '18' and @transaction_type in (N'A', N'U') -- AP invoice
    BEGIN          ----
    DECLARE @Invoice AS VARCHAR(15)
    DECLARE @Card AS VarChar (20)
    SELECT @invoice = NumatCard, @card = CardCode FROM dbo.OPCH
         WHERE DocEntry = @list_of_cols_val_tab_del
    -- AP Invoice is null
    If exists (SELECT T0.cardcode, T0.NumAtCard FROM OPCH T0 where T0.NumatCard is null
               and T0.DocEntry=@list_of_cols_val_tab_del)
    begin
    SET @error = 10
    SET @error_message = N'Supplier invoice number not entered.'
    end
    -- AP Invoice to check if the invoice no exist
    If exists (SELECT T0.cardcode, T0.NumatCard FROM OPCH T0 where T0.NumatCard = @invoice
               and T0.CardCode=@card and T0.DocEntry!=@list_of_cols_val_tab_del)
    begin
    SET @error = 10
    SET @error_message = N'This invoice number already exist for this supplier.'
    end
    END          ----
    -- Select the return values
    select @error, @error_message
    end

Maybe you are looking for