Import & submit inbound Invoic01 idoc

Hi experts:
I´m actually trying to create invoices by using xml based invoic01 idocs.
The process i´ve implemented is:
Read incoming XML file with invoices´s data.
Create a invoic01 xml idoc file in sap application server.
Call EDI_DATA_INCOMING  FM to create idocs and start invoice creation process.
The port type i´m using us xml file port, and in the outbound trigger, i put a RFC destination which triggers the startrfc program (I actually don´t know what do i have to put in the command file).
The problem I´ve found is that the idocs's process get stopped with status 64 (the system is not triggered), and it is necessary to use we19.
¿Does anyone call tell me (as detailed as possible) how must i setup the XML file port to trigger the system?
If the problem is not related with the port, ¿where is it?.
Thanks in advance for your response.
Useful answers will be rewarded.

Hi Srinivas,
Thanks for your reply.
I have already configured the tax code config and now invoices are created correctly.
But now i have one scenario which i am tying to figure out how to get it right.
Let say for example
<u>Example - 1</u>
- i have PO with 1 line iteam with Quantity = 1 and amount $100. ( we mostly have PO with quantity =1 and only thing matter is $ value )
- If the incoming invoice also have quantity = 1 and amount $100, it works fine.
- But the problem is, sometime vendor sends the partial invoice. that is, quantity = 1 but amount $ 50. There can be multiple invoice with same quantity as PO line item different amount at different time. In this case i am gettng "Account Determination" error ( message  M8 147 ). Is there any way i can make this scenarion work. 80% of invoices comes like this. Please let me know
<u>Example - 2</u>
- i have PO with 1 line iteam with Quantity = 2 and amount $200.
- If the incoming invoice also have quantity = 1 and amount $100, it works fine. Also, if it has quant = 2 and amount $ 200 it works fine. In other workds the quantity / amount ratio in invoice matches that of PO, it works fine.
- But in few case we will get invoice with quantity = 1 ( PO as quant = 2) with amount 80 ( infact, any value other than 100. PO has $200, $100 / 1 each ) and in this case invoice is failing too.
Can you please let me know, is there any setting in Logistic Invoice Verification, to support these scenarios.
Thanks
Pratik

Similar Messages

  • Inbound INVOIC01 IDOC problem

    Hi,
    I am working on inboind INVOIC01 idoc and i am facing some problem in that.
    When IDOC comes in it is creating application document ( Status 53 ). When i go and check in transaction MIR4 the application document (Invoice) is created. But the problem is, the Invoice is not being posted.
    When i see the invoice document, there is not tax code and so the invoice does not show any amount. I do not know why it is happening.
    Can anyone let me know what are the all required segments / fields for inbound invoice interface. What are the all configuration options required for it.
    Thanks,

    Hi Srinivas,
    Thanks for your reply.
    I have already configured the tax code config and now invoices are created correctly.
    But now i have one scenario which i am tying to figure out how to get it right.
    Let say for example
    <u>Example - 1</u>
    - i have PO with 1 line iteam with Quantity = 1 and amount $100. ( we mostly have PO with quantity =1 and only thing matter is $ value )
    - If the incoming invoice also have quantity = 1 and amount $100, it works fine.
    - But the problem is, sometime vendor sends the partial invoice. that is, quantity = 1 but amount $ 50. There can be multiple invoice with same quantity as PO line item different amount at different time. In this case i am gettng "Account Determination" error ( message  M8 147 ). Is there any way i can make this scenarion work. 80% of invoices comes like this. Please let me know
    <u>Example - 2</u>
    - i have PO with 1 line iteam with Quantity = 2 and amount $200.
    - If the incoming invoice also have quantity = 1 and amount $100, it works fine. Also, if it has quant = 2 and amount $ 200 it works fine. In other workds the quantity / amount ratio in invoice matches that of PO, it works fine.
    - But in few case we will get invoice with quantity = 1 ( PO as quant = 2) with amount 80 ( infact, any value other than 100. PO has $200, $100 / 1 each ) and in this case invoice is failing too.
    Can you please let me know, is there any setting in Logistic Invoice Verification, to support these scenarios.
    Thanks
    Pratik

  • Terms of payment key in INVOIC01 Idoc

    Hi,
    We are processing inbound INVOIC01 IDOC types to load suppliers invoices in SAP.
    In the segment E1EDK01, the field ZTERM ( Terms of payment key ) is filled with a valid value. The problem is the invoice is created with blanks in that field, so the value of the IDOC is not transported to the invoice.
    Does anyone have had a similar problem, and knows how can we solve this ?
    Or does anyone has any idea of what may being heppening ? Like the need to use another segment of the IDOC or anothe issue(s) i may have attention to.
    Thanks,
    Paulo Sousa

    I,
    I solved the problem with EXIT_SAPLMRMH_014.
    The process does not pass in other sugested user-exits.
    Kind regards,
    Paulo Sousa

  • Inbound Invoice idoc segment feilds mapping to SAP feilds

    Hi,
    Could you please help me to find out the tables and feilds in SAP for the inbound invoice idoc type INVOIC01. I need to map the idoc segment fields with SAP fields and respective tables.
    Thanks in Advance
    Satish

    Hi Satish,
    That's quite a big case to get such mapping - why would you need it really? You can process Idoc with std process codes and you will see the std mapping then happening.
    You can also go through logic of processing modules:
    Function Module Name          Short text for function module
    IDOC_INPUT_INVOIC_FI           EDI: Invoice Receipt (INVOICE)
    IDOC_INPUT_INVOIC_MM           EDI: Invoice Receipt (INVOICE)
    IDOC_INPUT_INVOIC_MRM
    For sure you will get RBKP for header, RSEG for items, RBTX for taxes and some more, depending on what you get in the invoice and what are your booking and matching processes.
    Best Regards,
    Tomek

  • Inbound Custom IDoc Processing

    Hi,
    I've created an Inbound Custom IDoc, Created the ABAP function module to post it to the application, configured workflow and IDoc processing.  All my setup appears fine as I can create IDocs from our AS400 subsystem and trigger a successful posting via the IDoc test tool.
    Having got this working I now want to automate the posting.
    At present I create the IDoc's on our Legacy AS400 System and FTP them onto the SAP Application Server which runs on a Windows 2003 platform.
    How do I get SAP to process each of my waiting Idoc's?
    Any examples appreciated....

    Hi
    For CUSTOM IDOC inbound processing
    Firstly attach your idoc to a process code.
    In the process cod you can tell the system that the specified program should be triggered whenever an idoc of that type comes to the system.
    Then you want to have a Z-function module for your idoc processing, if I understand correctly.The steps should be:
    1. Create a z function module for idoc inbound posting (copy from a function module idoc_input_*).
    2. Set Function Modules as Inbound: - Transaction BD51
    3. Assign Function Modules to Logical Messages and Idoc types:- Transaction WE57
    4. Create process codes : Transaction WE42, and link the z-function module.
    5. Create partner profile: transaction WE20 and attach the message type and process code.
    6. In the Z- function module, extract data from the idoc segments, do whatever processing you want to do, and then call BAPI_CREATE_SALES_ORDER_FROMDAT2.
    Check out this sample Function Module on the inbound system
    FUNCTION Z_IDOC_INPUT_EMPREP.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD
    *"     VALUE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC
    *"  EXPORTING
    *"     VALUE(WORKFLOW_RESULT) LIKE  BDWFAP_PAR-RESULT
    *"     VALUE(APPLICATION_VARIABLE) LIKE  BDWFAP_PAR-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
    Database Tables
      TABLES: ZAK_EMPLIST.
    Include programs
      INCLUDE MBDCONWF.
    Data Declarations
    *--- Employee Header -IDOC
      DATA: FS_EMPHDR_DATA LIKE Z1R_SEG1.
    *--- Employee Details -IDOC
      DATA: FS_EMPDET_DATA LIKE Z1R_SEG2.
    *--- Employee Header - application data
      DATA: FS_APP_EMPHDR LIKE ZAK_EMPLIST.
    *--- Employee Details - application data
      DATA: FS_APP_EMPDET LIKE ZAK_EMPLIST.
    Program Logic
    *---Initialize Work Flow Result
      WORKFLOW_RESULT = C_WF_RESULT_OK.
      LOOP AT IDOC_CONTRL.
    *--- Check whether the correct message was passed to us
      IF IDOC_CONTRL-MESTYP NE 'ZR_MSG'.
          RAISE WRONG_FUNCTION_CALLED.
      ENDIF.
    *--- Clear application buffers before reading a new record
      CLEAR   FS_APP_EMPDET.
      CLEAR   FS_APP_EMPHDR.
    REFRESH FS_APP_EMPDET.
    REFRESH FS_APP_EMPDET.
    *--- Process all records and pass them on to application buffers
        LOOP AT IDOC_DATA WHERE DOCNUM EQ IDOC_CONTRL-DOCNUM.
          CASE IDOC_DATA-SEGNAM.
            WHEN 'Z1R_SEG1'.            " Employee Header
              FS_EMPHDR_DATA = IDOC_DATA-SDATA.
              MOVE-CORRESPONDING FS_EMPHDR_DATA TO FS_APP_EMPHDR.
            WHEN 'Z1R_SEG2'.            " Employee Details
              FS_EMPDET_DATA = IDOC_DATA-SDATA.
              MOVE-CORRESPONDING FS_EMPDET_DATA TO FS_APP_EMPDET.
          ENDCASE.
        ENDLOOP.
    *--- If data is ok
      SELECT * FROM ZAK_EMPLIST WHERE ENUMBER = FS_APP_EMPHDR.
        IF SY-SUBRC NE 0.
          INSERT INTO ZAK_EMPLIST VALUES FS_APP_EMPHDR.
          INSERT INTO ZAK_EMPLIST VALUES FS_APP_EMPDET.
        ELSE.
          UPDATE ZAK_EMPLIST FROM FS_APP_EMPHDR.
          UPDATE ZAK_EMPLIST FROM FS_APP_EMPDET.
        ENDIF.
      ENDSELECT.
      IF SY-SUBRC EQ 0.
    *--- Populate Return variables for success
          RETURN_VARIABLES-WF_PARAM    = 'Processed_IDOCs'.
          RETURN_VARIABLES-DOC_NUMBER  = IDOC_CONTRL-DOCNUM.
          RETURN_VARIABLES-WF_PARAM    = 'Appl_Objects'.
          RETURN_VARIABLES-DOC_NUMBER  = FS_APP_EMPHDR-ENUMBER.
          APPEND RETURN_VARIABLES.
    *--- Add Status Reocrds indicating success
          IDOC_STATUS-DOCNUM           = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS           = '53'.
          IDOC_STATUS-MSGTY            = 'I'.
          IDOC_STATUS-MSGID            = 'ZE'.
          IDOC_STATUS-MSGNO            = '006'.
          IDOC_STATUS-MSGV1            = FS_APP_EMPHDR-ENUMBER.
          APPEND IDOC_STATUS.
      ELSE.
          WORKFLOW_RESULT              = C_WF_RESULT_ERROR.
          RETURN_VARIABLES-WF_PARAM    = 'Error IDOCs'.
          RETURN_VARIABLES-DOC_NUMBER  = IDOC_CONTRL-DOCNUM.
          APPEND RETURN_VARIABLES.
    *--- Add status record indicating failure in updating
          IDOC_STATUS-DOCNUM           = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS           = '51'.
          IDOC_STATUS-MSGTY            = 'E'.
          IDOC_STATUS-MSGID            = 'ZE'.
          IDOC_STATUS-MSGNO            = '007'.
          IDOC_STATUS-MSGV1            = FS_APP_EMPHDR-ENUMBER.
          APPEND IDOC_STATUS.
        ENDIF.
    ENDLOOP.
    ENDFUNCTION.
    Good Luck and reward me for the same
    Thanks
    Ashok

  • When we post Inbound Invoice IDocs, we are getting an error message "Enter a tax jurisdiction code".

    Hi Experts,
    When we post Inbound Invoice IDocs, we are getting an error message "Enter a tax jurisdiction code". As checked, we have configured OBCD and OBCA for the vendor and we are passing the Tax Jurisdiction code in E1EDP04 SAL segment. Can anybody give us some idea to resolve this issue.
    Regards,
    Sameek

    Hi Sameek,
    Please refer the below link. Hope it helps.
    http://scn.sap.com/thread/1435286
    Regards,
    Chandan.

  • How to track the Inbound child IDOcs in PI 7.4 Single stack

    Hi Friends,
    I would like to know the procedure of tracking the Inbound child IDocs in PI 7.4 Single stack.
    Here is the detailed description.
    Say we are getting the data from third party system and the message may have multiple IDOcs in it. The message has processed successfully from PI and reached to the target system(ERP). So, now my question is how to track the IDOc count with in that message.
    Please suggest on the same.
    Thanks in Advance,
    Venkateswarlu.

    Hi Hareesh,
    Thanks for your inputs. According to the link IDOC Status, Tracking in SAP PI/PO Single Stack I am thinking the required funcionality is not there in PO 7.4, but still i would like to have little more clarity before moving further.
    I will explain what what was happening in PI 7.11 so that you can understand what i am looking for in PO 7.4.
    We will get the data from third party system in xml format, we had to search for the messages based on interface name and time range within SXMB_MONI. After getting the result(say the output is 100 messages), we will download the values of "Outbound Reference" field(which is a key to find the child messages for messages resulting in an Interface Collection). Below is the snap of Outbound Reference field for your reference.
    Now we will go to the table IDXRCVPOR in SE16(within PI) and put the values of Outbound Reference field in Text 24 and execute. Here we will get all the child messages.
    Now please let me know if this kind of scenario is possible in PO 7.4.
    Thanks,
    Venkat.

  • Prevent Posting of an Inbound SHIPPL IDOC using EXIT_SAPLV56I_011?

    Under certain circumstances (current shipment status), I need to prevent the update of a Shipment from an Inbound SHIPPL IDOC.  The documentation for function module EXIT_SAPLV56I_011 states:
    If a check determines that the shipment is not to be updated, the
    return code should be set to value zero and the cause should be noted
    in an entry in table IDOC_STATUS.
    I have programmed according to the documentation (see below). The IDOC
    status reflects my status correctly (63) however the Shipment is still
    updated even though the return code is set to zero.
    IF lv_sttrg = '5'.
    ls_bdidocstat-docnum = idoc_contrl-docnum.
    ls_bdidocstat-status = '63'.
    ls_bdidocstat-msgty = 'E'.
    ls_bdidocstat-msgid = 'VW'.
    ls_bdidocstat-msgno = '238'.
    ls_bdidocstat-msgv1 = gs_e1tpshh-shpid.
    ls_bdidocstat-msgv2 = lv_sttrg.
    APPEND ls_bdidocstat TO idoc_status.
    subrc = 0.
    EXIT.
    ENDIF.
    Looking for any ideas as to why this logic is not working.
    Thanks in advance for any iinput.

    Hi,
    I think, you should set the value of SY-SUBRC to non-zero value.   See the Code after the call to the Enhancement component "EXIT_SAPLV56I_011", it proceeds with creation of SHIPMENT if SY-SUBRC is initial.
    See the Code in include "LV56IF0T", Line number 111,133.
    if call_subrc ne 0.
          subrc = call_subrc.
        endif.
        if subrc is initial.
    * Shipment check complete
          perform shipment_event_check_complete
                           changing subrc.
        endif.
    endif.
    Regards
    Vinod

  • Which table stored the Inbound ASN IDOC # and corresponding In.B Delivery#

    Hi,
    May i know which table stored the inbound ASN IDOC# and corresponding created Inbound Delivery number??
    Thanks!!

    Dear Hoo Laa,
    You may find the Sales Organisation/Distribution Channel details in PO itself (Shipping Tab). Table where you can get Sales Organisation/Disribution Channel is EKPV.
    Regards
    Samier Danish

  • How the SAC amounts are posted to G/L accounts through Inbound Invoic Idocs

    Hi EDI/ABAP experts,
    Can anyone please tell me wow the SAC amounts are posted to G/L accounts through Inbound Invoic Idocs??
    Can anyone point me to the code that permits INVOIC02 IDocs to post the SAC (service allowances and Charge) amount to particular G/L account??
    What is the logic??
    Thanks,
    Creasy
    Edited by: Creasy Matthew on Apr 27, 2009 10:41 PM

    Hi Sunil,
    When ever you prepare a billing document it creates an entry in General Ledger as Trial Balance has to be generated for the company all the expenses for a company should be recorded in GL. So that a company can see view their profit/loss figures.
    As Billing is a sales related transaction it creates an GL Entry where in
    Debits    --> Customer Account
    Credit     --> Sales Revenue Account
    And when the Customer Makes a payment with reference to the bill
    One more GL Entry will be created i.e
    Debit     --> Bank Account
    Credit    --> Customer Account
    With this we can track the customer balance (What ever balance is there in Customer account is customer Balance)
    I think this is very clear with respect to the question you had asked.
    Reward points if it helps.
    Regards,
    Sreekanth

  • How to post Freight Charge in INbound INVOIC Idoc? (MM Invoice Verif)

    Hi Folks,
    Would like to post an inbound invoice(810) IDoc  that has multiple line items that may or may not have variances(quantity, price, etc.). MM Logistics Invoice verification is the process used for posting our invoices for raw materials. We would like for the line item variances to continue to post to the PPV account. Our problem is freight. Freight in this instance is in the header of the IDOC(segment E1EDK05). For example, we create a purchase order with 3 line items for $100.00 each totaling $300.00 for the purchase order. We receive an EDI Invoice for $345.00 which contains a $45.00 charge in the header for freight. We would like for the freight to be posted to the appropriate account. Currently the $45.00 difference in P/O total and Invoice total is being posted to the PPV account. Your helpis appreciated!
    What if Freight charge is populated as Line item in the inbound invoic idoc. Will the inbound program allow this kind of posting??
    Throw some light experts.
    Thanks,
    Matt
    Edited by: Creasy Matthew on Aug 16, 2009 6:25 PM
    Edited by: Creasy Matthew on Aug 16, 2009 6:25 PM

    Yes, you can include the freight cost in line item as well but that would not be advisable. Why don't you include Fright Cost in your pricing procedure ??? Do check the following link
    How to account freight in purchase order

  • Issue with inbound EDI idocs

    Hi
    we are receiving inbound EDI idocs throgh third party.  Third party received EDI file having 5000 transactions .
    It was transalated same number of idocs text document and posted in SAP.  But after 4 hours same file processed in SAP.
    Third party saying they sent only once .
    Is there any way in SAP file placed two times or one time .
    Any table stores this information . we are using TRFC port .  I know EDIF12 table but it was not used here.
    Any clue on this.
    Thanks

    HI
    ANY Clue on this issue

  • Inbound Invoice IDoc - Problem, Please clarify.................

    Hi All,
    I am implementing an Inbound INVOIC02 IDoc for posting Credit Memo that references purchase order. But there is some unique thing. This IDoc is used to post only the SAC (D240 - Freight Allowance).
    Freight Allowance will come at Header level on the X12. This amount should be posted to a G/L account.
    I want this SACD240 amount to be mapped onto IDoc.
    I have extended the IDoc with a Z-segment @ line item level and is mapping into this z-segment.
    The mapping team came up with a question. If SACD40 is mapped onto Z-segment. And no other line item information is present on the X12/IDoc (such as matnr). Will SAP process this IDoc??
    Plz clarify??
    Thanks,
    Creasy

    data in extended Z segment would not get processed automatically.
    If std Function module IDOC_OUTPUT_INVOIC is used as inbound process code then
    you need to add custom code in  exit   CALL CUSTOMER-FUNCTION '001'   include ZXEDFU01 to pass to correct fields. or you may have to call another FM or BDC to pass data to required transaction/fields.

  • Regarding Inbound Order Idocs

    Hi All,
    I want the tables in which Inbound Order Idocs were stored,
    Use WE02 transaction,
    i am trying to find the tables , but i cant, plz any body help me in this problem,
    Balu.

    Hi bala,
    do one thing..u wil get the idoc number as 0000000000123456(16 digit)..
    please chek the document numebr in the ztable,say for example in ur ztable it  is 10 character length.so u have extra 6 characters.
    so what u do is use CONVERSIONEXIT function module and delete the leading zeros,
    if u do like this.it will be 10 characters...
    now u can write the select query as u written,it won't give any error..
    Regards,
    Nagaraj

  • INVOIC01 IDOC giveing error.

    Hi
        I am trying to process INVOIC01 IDOC using standard SAP function module IDOC_INPUT_INVOIC_MRM. Always its giving error at a particular poing as given below.
    IF f_subrc = 0 AND NOT i_rbkpv-zterm IS INITIAL
    AND i_fix_payment_terms IS INITIAL
    AND ( NOT i_rbkpv-zbd1t IS INITIAL
    OR NOT i_rbkpv-zbd1p IS INITIAL
    OR NOT i_rbkpv-zbd2t IS INITIAL
    OR NOT i_rbkpv-zbd2p IS INITIAL
    OR NOT i_rbkpv-zbd3t IS INITIAL ).
        f_subrc = 4.
        f_fieldname = 'RBKPV-ZBD1T'.
      ENDIF.
    The values are  i_rbkpv-zterm  = A500 , i_rbkpv-zbd1t = 30 and all other variables in the condition are initial. This 'IF' condition always fails.
    Anybody have any idea why this happens ? Any solutions/ work arounds / suggestions ? Please.
    Can anybody tell me what is this i_fix_payment_terms ?
    ofcource..points will be rewarded for helping answers...
    Regards,
    Krishnakumar

    Check the sy-subrc value before the IF statement in debug.
    It should always 0 and i_fix_payment_terms (Internal table ) will not contain any value.
    Hope it will fill after that....

Maybe you are looking for