Idoc FIDCCP02 posting skipping document number

I am using Idoc FIDCCP02 to post FI document. I have to enter value in field E1FIKPF-AWORG, otherwise it does not allow tax code to be used in certain conditions. Filling up filed E1FIKPF-AWORG is working fine and document is being posted. But the issue is that system is skipping one document number for each posting. If field E1FIKPF-AWORG is left blank, than this does not happen.
Any help please!

HI Dehra,
    YOu can check if any customizing is done within the IDOC processing function module.
Or you can to analyse if populating the E1FIKPF-AWORG value creates any extra documents, which are consuming the number range.
Suggestion: You may get better responses in either FI Forums or ABAP forum.
Best Regards,
Ravikanth Talagana

Similar Messages

  • Error  in document number while posting the material

    Dear experts
    while posting the stock  MB1C  for the material  the error  is  " incorrect doc number $  1 .select doc number between   800000100  and 800000199.
    how to  correct  this  error. where  to check this  number ranges  of  document.
    Thanks  &  Regards.
    Erfan.

    Hi
    The document type, which is integrated for Material related posting is appears to be configured as "External Document Number Ranges".  In the event of external number ranges, MM transaction tries to post same document number individually at MM system and propose same number in FI for Accounting Posting.  If the proposed number is not within document number ranges, then you would expect this kind of errors.
    What you need to do is:
    1.  See the document type, which is being posted and set correct number ranges as per MM transaction document type number ranges  or
    2.  change MM transaction number rages in order to FI document number rages
    Hope this helps

  • Drill down on posting date and Document number

    Hello Gurus,
    In a Bex report, I am looking at account balance on a keydate for a G/L Account. When I drill down based on posting date I do not see any values for the keyfigure 'Account balance as on key-date'....But after I drill down on posting date --> document number I get to see values for thie key figure.
    What is this strange behaviour? Kindly explain.
    Regards,
    KP

    Hi KK,
    This may be due to the values/quantities having different UOM or currency for different documents/posting date.For example,  Usually when there are mixed values like this, the aggregated value is not displayed, instead a '*' is displayed in the report result. However there is a setting in BW where you can mention how to handle such mixed values.
    So I suggest you first check the currencies for the amount at the posting date/document level(when you drill down). If they are different then check the settings in the transaction SPRO --> SAP Business Information Warehouse --> Report-relevant settings --> General Reporting settings in the Business Explorer --> Presenting the numeric value in the Business Explorer.
    Here check the value maintained for 'Mixed Values'. If it is blank, then this is the reason that no value is displayed.
    Regards,
    Shilpa

  • IDOC FIDCCP02 and Customer Invoice Clearing

    All
    Has anyone successfully used IDOC FIDCCP02 for customer invoice clearing and/or clearing with residual items?
    Any comments are appreicated.
    Thanks

    I once used this IDoc to post FI documents e.g. travel costs from non SAP systems into the ECC 6.0. The task was the clearing of those costs.
    AFAIK posting residual items is possible. Just check the IDoc documentation (transaction we60) for the KOART / BUZID fields in the E1FISEG segments. The function IDOC_INPUT_FIDCC1 will process the IDocs.

  • Fixed Term Deposit - Document Number

    Hi Guys,
    I am a BW consultant and I need to Fixed Term Deposit - Cash Flow Tab - Document Number to BW. I checked the the base table VTBFHAPO and see that some document numbers are present and some are not.
    Strangly the Cash flow tab shows document number, but there are no document numbers in the backend table. I have already tried ST05 to do a check which tables the FTR_DISPLAY tcode hits. I checked all the tables but none of them have document number,
    Can you please suggest how can I link the Fixed Term Deposit to accounting document number.
    Best Regards,
    Shailesh

    Hi,
    The table which you mention is the treasury table in which complete deal data goes. Document number only generates against posted flows. Therefore you can link FD on the basis of Posting status.1 means flagged for posting  but not posted (no document number is against them) 2 means posted (Document no. generated) 3. means flagged for reversal but not reversal entry done 4 means (reversal entry pass).
    You can see this in cash flow type of transaction . USE T Code:- FTR_EDIT and go to cash flow tab and change the layout to posting veiw.
    Regards
    Narinder Pal Verma
    +91-9818882409

  • Example program - posting accounting document,  Idoc ( ACC_DOCUMENT )

    Hi fellows developers,
    here is an example of  usage of the IDOC, directly in program for an accounting document
    (ALE message type ACC_DOCUMENT, bapi BAPI_ACC_DOCUMENT_POST )).
    It was inspired  by the lack of a flexible usage of this IDOC in LSMW
    (f.e. booking of Gl and Vendor from the same file).
    Both cases inbound and outbound are covered, although the outbound idoc was delivered in state
    for furthere dispatching and was further not tested.
    You can adapt this example to any idoc type (bapi type) and load data from anywhere ( file, table, etc.).
    If you have question please ask.
    On my system works !!!:)))
    I hope it will help you in your daily work.
    Regards,
    Miroslaw
    *& Report  Z_MKPR87
    *& Version 1.0 - creates idoc for accounting document with status
    *&  64 - inbound and 30 - outbound.
    *& Then you need to execute program RBDAPP01 for this message type (inbound),
    *& for outbound further dispatching with appropriate tool is required (not tested here).
    *& For inbound, complete booking of document was tested. For outbound
    *& only to the stage 30 - 'Idoc ready for dispatch'.
    *& Program does not require any additional DDIC objects.
    *& The solution gives you possibility for example to book document G/L + Vendor items,
    *& strictly speaking the whole power of this bapi in IDOC can be used. Unfortunately
    *& in LSMW its not the case.:)
    *& Data for idoc is takken from internal table, but can be loaded from anywhere.
    REPORT  Z_MKPR87.
    INCLUDE Z_MKPPR87_TOP.
    INCLUDE Z_MKPPR87_SEL.
    INCLUDE Z_MKPPR87_EVN.
    INCLUDE Z_MKPPR87_IDOC.
    *&  Include           Z_MKPPR87_TOP
    CONSTANTS:
    input structure for idoc ***
    Achtung! don't use BAPI input structures
    they are similar but not flat ( the casting cannot occure, since idoc
    needs flat data - see 'sdata' field in edidd )
    gc_idoc_structure1(27) TYPE c VALUE 'E1BPACHE09',
    gc_idoc_structure2(27) TYPE c VALUE 'E1BPACGL09',
    gc_idoc_structure3(27) TYPE c VALUE 'E1BPACCR09'.
    Structrures for IDOC : ALE message type - ACC_DOCUMENT
                         BAPI - BAPI_ACC_DOCUMENT_POST
    NOTE!  The E1BPXXXXXX structures are flat (char type), opposite to
    BAPI structures (BAPIACHE09. etc. )
    DATA:      gs_DOCUMENTHEADER  TYPE E1BPACHE09,
                    gt_ACCOUNTGL  TYPE TABLE OF E1BPACGL09,
               gt_CURRENCYAMOUNT  TYPE TABLE OF E1BPACCR09,
                gt_idoc_str_names TYPE TABLE OF char15,
                     gs_edidc     LIKE edidc,
               gt_idoc_data TYPE  TABLE OF       edidd,
               gt_comm_idoc_control TYPE TABLE OF edidc.
    *&  Include           Z_MKPPR87_SEL
    SELECTION-SCREEN BEGIN OF BLOCK bk2 WITH FRAME TITLE text-002.
    PARAMETERS:
              p_itype TYPE char15 DEFAULT 'ACC_DOCUMENT03',
    *'CREMAS04',
              p_mtype TYPE EDIDC-mestyp  DEFAULT 'ACC_DOCUMENT',
              p_rport TYPE EDIDC-rcvpor DEFAULT 'LSMW',
              p_rtype TYPE EDIDC-rcvprt DEFAULT 'US',
              p_rname TYPE EDIDC-rcvprn  DEFAULT 'Z_MKARAS',
              p_inbd    TYPE c DEFAULT 'X'.  " C - inbound (2), space - outbound (1)
    SELECTION-SCREEN END OF BLOCK bk2.
    *&  Include           Z_MKPPR87_EVN
    INITIALIZATION.
    PERFORM initialize_idoc_const.
    START-OF-SELECTION.
    PERFORM create_idoc.
    *&  Include           Z_MKPPR87_IDOC
    *&      Form  create_idoc
          text
    FORM create_idoc.
      PERFORM set_bussines_data
                  USING
                     gs_documentheader
                     gt_accountgl
                     gt_currencyamount.
      PERFORM build_idoc_from_bus_dat
                  USING
                     gs_documentheader
                     gt_accountgl
                     gt_currencyamount
                  CHANGING
                     gt_idoc_data.
    CASE p_inbd.
    WHEN 'X'.
       PERFORM create_inbound_idoc.
    WHEN space.
       PERFORM create_outbound_idoc.
    ENDCASE.
    ENDFORM.                    "create_idoc
    *&      Form  create_inbound_idoc
          text
    FORM create_inbound_idoc.
      PERFORM set_idoc_control_inbound CHANGING gs_edidc.
      CALL FUNCTION 'IDOC_WRITE_AND_START_INBOUND'
        EXPORTING
          i_edidc = gs_edidc
        TABLES
          i_edidd = gt_idoc_data.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
       MESSAGE 'Inbound idoc(s) created, check in TAC WE02' TYPE 'I'.
      ENDIF.
    ENDFORM.                    "create_inbound_idoc
    *&      Form  create_outbound_idoc
          text
    FORM create_outbound_idoc.
      PERFORM set_idoc_control_outbound   CHANGING   gs_edidc.
      CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
        EXPORTING
          master_idoc_control        = gs_edidc
        TABLES
          communication_idoc_control = gt_comm_idoc_control
          master_idoc_data           = gt_idoc_data.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
       MESSAGE 'Outbound idoc(s) created, check in TAC WE02' TYPE 'I'.
      ENDIF.
    ENDFORM.                    "create_outbound_idoc
    *&      Form  set_idoc_control_inbound
          text
         -->CT_EDIDC   text
    FORM set_idoc_control_inbound CHANGING cs_edidc LIKE gs_edidc.
      DATA: ls_edidc TYPE  edidc.
      cs_edidc-direct = '2'.
      cs_edidc-idoctp = p_itype.
      cs_edidc-mestyp = p_mtype.
      cs_edidc-rcvpor = 'SAPECI'.
      cs_edidc-rcvprt = p_rtype.
      cs_edidc-rcvprn = p_rname.
      cs_edidc-sndpor = p_rport.
      cs_edidc-sndprt = p_rtype.
      cs_edidc-sndprn = p_rname.
      cs_edidc-credat = sy-datum.
      cs_edidc-cretim = sy-uzeit.
    ENDFORM.                    "set_idoc_control
    *&      Form  set_idoc_control_outbound
          text
         -->CS_EDIDC   text
    FORM set_idoc_control_outbound CHANGING cs_edidc LIKE gs_edidc.
      DATA: ls_edidc TYPE  edidc.
      cs_edidc-direct = '1'.
      cs_edidc-idoctp = p_itype.
      cs_edidc-mestyp = p_mtype.
      cs_edidc-rcvpor = p_rport.
      cs_edidc-rcvprt = p_rtype.
      cs_edidc-rcvprn = p_rname.
      cs_edidc-sndpor = 'SAPECI'.
      cs_edidc-sndprt = p_rtype.
      cs_edidc-sndprn = p_rname.
      cs_edidc-credat = sy-datum.
      cs_edidc-cretim = sy-uzeit.
    ENDFORM.                    "set_idoc_control_outbound
    *&      Form  set_bussines_data
          text
         -->CS_DOCUMENTHEADER  text
         -->CT_ACCOUNTGL       text
         -->CT_CURRENCYAMOUNT  text
    FORM set_bussines_data USING cs_documentheader LIKE gs_documentheader
                                 ct_accountgl      LIKE gt_accountgl
                                 ct_currencyamount LIKE gt_currencyamount.
                            CHANGING ct_idoc_data LIKE edidd.
      DATA:
             ls_documentheader TYPE e1bpache09,
             ls_accountgl      LIKE LINE OF  gt_accountgl,
             ls_currencyamount LIKE LINE OF gt_currencyamount.
    HEADER **
      cs_documentheader-bus_act =  'RFBU'.
      cs_documentheader-username = 'RNOWAK'.
      cs_documentheader-comp_code = '1000'.
      cs_documentheader-doc_date = '20071205'.
      cs_documentheader-pstng_date = '20071205'.
      cs_documentheader-fisc_year =  '2007'.
      cs_documentheader-fis_period = '12'.
      cs_documentheader-doc_type = 'JE'.
    POSITIONS ***
    111111111 ****
      ls_accountgl-itemno_acc = '0000000001'.
      ls_accountgl-gl_account = '0000473110'.
      ls_accountgl-item_text = 'MIK test dokumentu GL z programu IUE'.
      ls_accountgl-comp_code = '1000'.
      ls_accountgl-tax_code = '0I'.
      ls_accountgl-costcenter = '0000001000'.
      ls_currencyamount-itemno_acc = '0000000001'.
      ls_currencyamount-currency = 'PLN'.
      ls_currencyamount-amt_doccur = '496'.
      APPEND ls_accountgl TO ct_accountgl.
      APPEND ls_currencyamount TO ct_currencyamount.
    2222222222 ****
      ls_accountgl-itemno_acc = '0000000002'.
      ls_accountgl-gl_account = '0000113302'.
      ls_accountgl-item_text = 'MIK test dokumentu GL z programu IUE'.
      ls_accountgl-comp_code = '1000'.
      ls_accountgl-tax_code = ''.
      ls_accountgl-costcenter = ''.
      ls_currencyamount-itemno_acc = '0000000002'.
      ls_currencyamount-currency = 'PLN'.
      ls_currencyamount-amt_doccur = '-496'.
      APPEND ls_accountgl TO ct_accountgl.
      APPEND ls_currencyamount TO ct_currencyamount.
    ENDFORM.                    "set_bussines_data
    *&      Form  build_idoc_from_bus_dat
          text
         -->IS_DOCUMENTHEADER  text
         -->IT_ACCOUNTGL       text
         -->IT_CURRENCYAMOUNT  text
         -->CT_IDOC_DATA       text
    FORM build_idoc_from_bus_dat USING is_documentheader LIKE gs_documentheader
                                            it_accountgl LIKE gt_accountgl
                                       it_currencyamount LIKE gt_currencyamount
                                   CHANGING ct_idoc_data LIKE gt_idoc_data.
      DATA:
      ls_documentheader LIKE is_documentheader,
      ls_accountgl     LIKE LINE OF it_accountgl ,
      ls_currencyamount LIKE LINE OF  it_currencyamount,
      ls_idoc_data LIKE LINE OF ct_idoc_data.
    Document header *****
      ls_documentheader = is_documentheader.
      ls_idoc_data-segnam = gc_idoc_structure1.
      ls_idoc_data-sdata = ls_documentheader.
      APPEND ls_idoc_data TO ct_idoc_data.
    Positions G/L part ************
      LOOP AT it_accountgl INTO ls_accountgl.
        ls_idoc_data-segnam = gc_idoc_structure2.
        ls_idoc_data-sdata = ls_accountgl.
        APPEND ls_idoc_data TO ct_idoc_data.
      ENDLOOP.
    Currency Items part ******
      LOOP AT  it_currencyamount INTO  ls_currencyamount.
        ls_idoc_data-segnam = gc_idoc_structure3.
        ls_idoc_data-sdata = ls_currencyamount.
        APPEND ls_idoc_data TO ct_idoc_data.
      ENDLOOP.
    ENDFORM.                    "build_idoc_from_bus_dat
    *&      Form  initialize_idoc_const
          text
    FORM initialize_idoc_const.
      APPEND gc_idoc_structure1 TO gt_idoc_str_names.
      APPEND gc_idoc_structure2 TO gt_idoc_str_names.
      APPEND gc_idoc_structure3 TO gt_idoc_str_names.
    ENDFORM.                    "initialize_idoc_const

    I summarized postings and posted again into the same system.  Yes, you can save an IDOC in your own system...There's an IDOC FM that will do just that...  In my case, I did:
    after receipt of IDOC and posting,
    process the idoc tables, rebuilding the input into tables.
    Summarize the tables, as needed.
    Create a new IDOC with a specific function code.
    Save the IDOC in my own system, using IDOC_INBOUND_ASYNCHRONOUS, as I recall.
    I had a custom process code that fired off the standard FM to process the JE posting.  I don't remember all the variables, but I have this stored as my example:
    DATA : p_sndprn TYPE edi_sndpn3.
    * Control Record Build.
      CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
        IMPORTING
          own_logical_system = p_sndprn
        EXCEPTIONS
          OTHERS             = 0.
      iedidc-direct   =  '2'.
      iedidc-idoctyp  =  'FIDCCP02'.
      iedidc-mestyp   =  'FIDCC2'.
      iedidc-mesfct   =  'ACC'.  <customer made up....used to control which process codes fire off when for standard message.
      iedidc-sndprt   =  'LS'.
      iedidc-sndprn   =   p_sndprn.
      iedidc-rcvprn   =   wa-rcvprn.
      iedidc-rcvprt   =  'LS'.
      iedidc-sndpor   =  'SAP_EDI_SC'.
      iedidc-credat   =  sy-datum.
      iedidc-cretim   =  sy-uzeit.
      APPEND iedidc.
    * IDOC store routine...must commit work
    * to get IDOC transferred to the IDOC processor.
      CALL FUNCTION 'IDOC_INBOUND_ASYNCHRONOUS'
        TABLES
          idoc_control_rec_40 = iedidc
          idoc_data_rec_40    = iedidd.
    ENDFORM.                    " send_idoc
    Edited by: DaveL on Oct 25, 2011 8:15 PM

  • Sales Document Number field in ORDER05 IDoc

    Hi All,
    I am using a ORDERS05 message type for my inbound IDoc. I am using the copy of FM IDOC_INPUT_ORDERS. I am getting a Sales Document Number from BizTalk apart from other details. I want to feed this Sales Document Number in IDoc segment, so that the order is posted with the fed sales document number instead of system generating one.
    Please let me know in which segment and field, I should assign the Sales Document Number (received from biztalk) in the IDoc?
    Thanks in Advance,
    Bipen

    Pass external Order number in segment E1EDK02. Set the field QUALF as '066' (External Order Number) and pass the order number in field BELNR (See code lines 69 to 73 of include LVEDAF5S).  This assignment will work only if the Number range configuration for Order document type is External.

  • Question on linkage of idoc with document number created in SAP R/3

    Hi all,
    I have a query related to IDOC.
    When inbound IDOC is posted into SAP R/3 it creates Material document number or billing document number is generated in SAP R/3.
    Question: <b>Do we have interface monitor in SAP R/3 Where I can see the linkage of Idoc number with the document number created in SAP R/3.</b>
    Need your help on this any suggestion will be greatly appreciated.
    Thanks & Regards
    Prabhat

    I'm not sure if this is what you are asking for, but you can look at the IDOC in WE02/WE05 and look at the header segments to get the document number.

  • Insering Material document number which is created while posting MBGMCR02

    Hello Friends ,
    i have a requiremnt to insert the material document(mblnr) which is created while by  posting  the MBGMCR02 inbound idoc for
    post goods issue .the requirement is to insert the MBLNR at weo5/we02 at status records.
    message type MBGMCR .
    For example the system will show the status message as 53 if idoc is created successfully and below that the 'message : BAPI EXECUTED SUCCESSFULLY its showing , instead of this message i wanted to show the new MBLNR number there .'
    please help me by giving good suggestions.
    thanks Advance
    Anant

    Is there any standard Function Module to find out FI Document number using Material Document number?
    let me know is there any Function module available to identify these Material Document number or FI Document number?
    Is there any standard Function Module to find out all the details ( such as Invoice date, vendor, amout, tax amount , payment due date, payment terms , approver)  using invoice document number.

  • IDOC for F-53 Posting Payment Document ?

    Dear All,
    Please advise which IDOC i can use for Posting Payment Document ? I have scenario to send the IDOC payment document to others SAP system.
    Thank You and Best Regards
    Fernand

    I guess you can use the same messagetype for outgoing payments:
    report  zzinbound_idoc.
    data: g_idoc_control_record like edi_dc40 occurs 0 with header line.
    data: g_edidd like edi_dd40 occurs 0 with header line.
    data: g_e1bpache09 like e1bpache09.
    data: g_e1bpacar09 like e1bpacar09.
    data: g_e1bpaccr09 like e1bpaccr09.
    data: g_e1bpacgl09 like e1bpacgl09.
    parameter: mode type c default 'A'.
    refresh: g_idoc_control_record, g_edidd.
    clear:   g_idoc_control_record, g_edidd.
    *-Build Control Record -*
    g_idoc_control_record-mestyp  = 'ACC_DOCUMENT'.   "Message type
    g_idoc_control_record-idoctyp = 'ACC_DOCUMENT03'. "IDOC type
    g_idoc_control_record-direct  = '2'.              "Direction
    * Receiver
    case sy-sysid.
      when 'DE2'.
        g_idoc_control_record-rcvpor = 'SAPDE2'.     "Port
        g_idoc_control_record-rcvprn = 'IDOCLEGACY'. "Partner number
    endcase.
    g_idoc_control_record-rcvprt = 'LS'.             "Partner type
    g_idoc_control_record-rcvpfc = ''.               "Partner function
    * Sender
    g_idoc_control_record-sndpor = 'FILE_PORT'.      "Port
    case sy-sysid.
      when 'DE2'.
        g_idoc_control_record-sndprn = 'IDOCLEGACY'. "Partner number
    endcase.
    g_idoc_control_record-sndprt = 'LS'.             "Partner type
    g_idoc_control_record-sndpfc = ''.               "Partner function
    g_idoc_control_record-refmes = 'Customer clearing'.
    append g_idoc_control_record.
    *-Build Idoc Segments -*
    *-------E1BPACHE09 (HEADER)
    clear g_edidd.
    g_edidd-segnam = 'E1BPACHE09'.
    g_edidd-segnum = 1.
    clear g_e1bpache09.
    g_e1bpache09-bus_act    = 'RFBU'.
    g_e1bpache09-doc_date   = sy-datum.
    g_e1bpache09-doc_type   = 'DZ'.
    g_e1bpache09-comp_code  = 'BP01'.
    g_e1bpache09-pstng_date = sy-datum.
    g_e1bpache09-username   = sy-uname.
    g_e1bpache09-ref_doc_no = '0090000025'.
    move g_e1bpache09 to g_edidd-sdata.
    append g_edidd.
    *-------E1BPACGL09 (ACCOUNT GL) (Debit) (Factoring Partner)
    clear g_edidd.
    g_edidd-segnam = 'E1BPACGL09'.
    g_edidd-segnum = 2.
    clear g_e1bpacgl09.
    g_e1bpacgl09-itemno_acc = 0000000002.
    g_e1bpacgl09-gl_account = '0000157000'.
    g_e1bpacgl09-customer   = 'C6130'.
    g_e1bpacgl09-acct_type  = 'S'.
    g_e1bpacgl09-comp_code  = 'BP01'.
    *g_e1bpacgl09-costcenter = '0000001602'.
    move g_e1bpacgl09 to g_edidd-sdata.
    append g_edidd.
    *-------E1BPACAR09 (ACCOUNT RECIEVABLE) (Credit) (Customer)
    clear g_edidd.
    g_edidd-segnam = 'E1BPACAR09'.
    g_edidd-segnum = 3.
    clear g_e1bpacar09.
    g_e1bpacar09-itemno_acc = 0000000001.
    g_e1bpacar09-customer  = 'C6110'.
    g_e1bpacar09-comp_code  = 'BP01'.
    g_e1bpacar09-alloc_nmbr = '0090000025'. "BSEG-ZUONR ?
    move g_e1bpacar09 to g_edidd-sdata.
    append g_edidd.
    *-------E1BPACCR09 (CURRENCY AMOUNT)
    clear g_edidd.
    g_edidd-segnam = 'E1BPACCR09'.
    g_edidd-segnum = 4.
    clear g_e1bpaccr09.
    g_e1bpaccr09-itemno_acc = 0000000001.
    g_e1bpaccr09-curr_type  = '00'.
    g_e1bpaccr09-currency   = 'NOK'.
    g_e1bpaccr09-amt_doccur = -111.
    move g_e1bpaccr09 to g_edidd-sdata.
    append g_edidd.
    g_e1bpaccr09-itemno_acc = 0000000002.
    g_e1bpaccr09-curr_type  = '00'.
    g_e1bpaccr09-currency   = 'NOK'.
    g_e1bpaccr09-amt_doccur = 111.
    move g_e1bpaccr09 to g_edidd-sdata.
    append g_edidd.
    *-Create idoc -*
    *-Syncronous
    if mode = 'S'.
      call function 'IDOC_INBOUND_SINGLE'
        exporting
          pi_idoc_control_rec_40              = g_idoc_control_record
    *     PI_DO_COMMIT                        = 'X'
    *   IMPORTING
    *     PE_IDOC_NUMBER                      =
    *     PE_ERROR_PRIOR_TO_APPLICATION       =
        tables
          pt_idoc_data_records_40             = g_edidd
        exceptions
          idoc_not_saved                      = 1
          others                              = 2.
      if sy-subrc  0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    *-Asynchronus
    else.
      call function 'IDOC_INBOUND_ASYNCHRONOUS'
        in background task as separate unit
        tables
          idoc_control_rec_40 = g_idoc_control_record
          idoc_data_rec_40    = g_edidd.
      commit work.
    endif.
    write: / 'Goto transaction F.13'.
    Edited by: Erik Hoven on Feb 24, 2009 12:55 PM

  • Document Number after Post !!

    Hi ,
    I am using Call Transaction in BDC .
    After Posting the document , the system generates an Accounting Document Number ..how can i get that document number after the call transaction call ??
    Thank You

    Hi,
    You can also code something like this.
    clear i_msgtab.
    refresh i_msgtab.
    call transaction 'VA02' using    bdcdata
                            mode     p_mode
                            update   'S'
                            messages into i_msgtab.
    if sy-subrc <> 0.
    *Process and display error messages
      loop at i_msgtab.
        clear t100.
        select single * from t100
        where sprsl = i_msgtab-msgspra and
              arbgb = i_msgtab-msgid   and
              msgnr = i_msgtab-msgnr.
        perform process_message using t100-text.
      endloop.
      skip.
    endif.
    form process_message using p_message.
      data: l_message(480).
      if sy-subrc = 0.
        l_message = p_message.
        if l_message cs '&1'.
          replace '&1' with i_msgtab-msgv1 into l_message.
          replace '&2' with i_msgtab-msgv2 into l_message.
          replace '&3' with i_msgtab-msgv3 into l_message.
          replace '&4' with i_msgtab-msgv4 into l_message.
        else.
          replace '&' with i_msgtab-msgv1 into l_message.
          replace '&' with i_msgtab-msgv2 into l_message.
          replace '&' with i_msgtab-msgv3 into l_message.
          replace '&' with i_msgtab-msgv4 into l_message.
        endif.
        condense l_message.
        write: /2 i_msgtab-msgtyp, l_message(250).
      else.
        write: /2 i_msgtab.
      endif.
    endform.                    " process_message
    Hope this will help.
    Regards,
    Ferry Lianto

  • How can i insert document number in the Idoc status

    Hi All,
        I am working on customized program, which will post the inbound Idoc data to transaction. Once everything updated / posted, Idoc should show the status 53 with description - <b>'Document XXXXXXXXX is created / changed</b>'. 
        I knew that we can use messages like ' Document &1 is created / Changed' in place of &1 need to replace with document number, but could not able to do that, can you please help me as soon as possible.
    Thanks
    Jayasri

    Hi,
    check this code
    LOOP AT itab_status WHERE mess NE 'WMMBXY'.
    SELECT SINGLE * FROM edids INTO wa_edids WHERE docnum = itab_status-idoc
                 AND countr = itab_status-status_counter.
          IF  wa_edids-statxt CA '&'.
            v_msgno = wa_edids-stamno.
            IF v_msgno NE '000'.                                "----mod3
              CALL FUNCTION 'MESSAGE_PREPARE'
                   EXPORTING
                        msg_id   = wa_edids-stamid
                        msg_no   = v_msgno
                        msg_var1 = wa_edids-stapa1
                        msg_var2 = wa_edids-stapa2
                        msg_var3 = wa_edids-stapa3
                        msg_var4 = wa_edids-stapa4
                   IMPORTING
                        msg_text = itab_status-descrp.
              CONDENSE itab_status-descrp.
            ENDIF.                                              "---- mod3
          ELSE .
            itab_status-descrp = wa_edids-statxt.
          ENDIF.
          MODIFY itab_status.
        ENDLOOP.
        LOOP AT itab_status WHERE mess EQ 'WMMBXY'.
          itab_status-descrp = 'APPLICATION DOCUMENT POSTED'.
          MODIFY itab_status.
        ENDLOOP.
    i guess you can do similair thing in your case too.
    let me know if you need any further help
    thanks
    venki

  • Error in FI posting using Idoc FIDCCP02

    Posting not successful when using Idoc FIDCCP02 for cash discount with document type KN. The discount amount is not posting to the cash discount clearing account. But posts sucessfully when done manually through FB01. Is anything need to be passed to Idoc for cash discount posting.

    HEllo,
    I'm not an expert in this area, but the SAP note 114814  providfes very detailed information about this IDOC type, possible issues and how to solve them.
    REgards,
    REnan

  • Document number....posted in T Code F-53 is not popping after saving

    Hi,
    I am posting outgoing payment in new fiscal year 1.4.2014, in F-53. After saving the document, I am not getting the pop up message:
    "Document number .... posted in T Code F-53.
    But when I check the GL line item in FBL3N, the document number is visible there.
    Please advice what can be the reason.

    Hi,
    I didnt check with other users. But I am facing this issue. May I know how the Security guy can help me and how its related to my authorization, since until yesterday everything was working fine.
    Kindly advice, is there any link to the year end closing activity?

  • Credit Memo request with reference to Billing Document number via IDoc

    Hi,
    I want to create credit memo request with reference to billing document number via IDocs.
    I have tried through ORDERS05, but when I process I saw that it is only processing with reference to contract  number or quotation.
    So is any other way of creating credit memo request creation with reference to Billing document number via IDocs?
    Thank you in advance.
    Regards,
    Santhi

    Please Help... it is Urgent...  Thank you

Maybe you are looking for