ECC 5.0 BAPI for posting documents only in non-leading ledger

Hello,
for an FI-interface i want to call an BAPI for posting the documents. The document were posted to the leading ledger and to the non-leading ledger by usage of BAPI_ACC_DOCUMENT_POST.
Now there are cases to post documents only to the non-leading ledger.
Is there anywhere a possibility to tell the BAPI (e.g. enter the ledger group) only to post to the non-leading ledger or is another BAPI available to do so.
Thank you for your help.
Thomas

Hi Thomas,
You can use the same BAPI for any type of ledger postings. You can restrict your postings to Type of ledger.
Cheers
Srinivas

Similar Messages

  • Document splitting with non leading ledger activation

    Hi experts,
    Thanks for your advance help. we have activated document splitting in my company code pofit center is deriving proprly. for below entry.
    1 31       503402     Vinayaka International Ltd.     4100     3,000.00-     0.00
    2 40       53080043     ELECT.CHRGS-NON PLT     4100     2,000.00     0.00  4206
    3 40       53080043     ELECT.CHRGS-NON PLT     4100     1,000.00     0.00  4207
    system is deriving profit center like below.
    000001  31  16011002     SUNDRY CREDITORS     2,000.00-     INR   4207
    000002  40   53080019     BAD DEBTS WRITTEN OF     1,000.00     INR   4207
    000003  40   53080043     ELECT.CHRGS-NON PLT     1,000.00     INR   4206
    000004  50   19910001     INTER BRCH/DIVN A/C     1,000.00-     INR   4206
    000005 40   19910001     INTER BRCH/DIVN A/C     1,000.00     INR   4207
    in the same way i have activated document splitting in another company code with non leading ledger activation. and posting same transation
    1 31       503402     Vinayaka International Ltd.     4100     3,000.00-     0.00
    2 40       53080043     ELECT.CHRGS-NON PLT     4100     2,000.00     0.00  4206
    3 40       53080043     ELECT.CHRGS-NON PLT     4100     1,000.00     0.00  4207
    system is not deriving pofit center and it is giving the below error.
    Balancing field "Profit Center" in line item 001 not filled
    please advise any configration i have missed out.
    any quaries please please let me know.
    Regards

    Hi Venkat,
    Even in the first transaction, the profit center has not been determined by document splitting
    if the profit center was derived by document splitting we would have seen 2 items for sundry creditors in the GL view
    So check your document splitting settings for the corresponding document type, and transaction variant
    the account category which includes vendor's recon accounts should be included in "item categories to be edited" list
    Regards
    Sach!n

  • Posting of values in non leading ledger

    Hello,
    I had created two ledger on is leading and other is non-leading for IFRS and leading for local.
    How the posting values get automatically get transferred to nonleading ledger if  i do the posting through FB50L in leading ledger.
    This is for IFRS reporting.
    suggest

    Dear Prem,
    If u do transactions using other than FB50L t-code then, there is no selection of ledger. What ever ent done in Leading ledger will automatically flow to Non -Leading LEdger(IFRS).
    When you use FB50L and select Non Leding Ledger the entries will be posted to IFRS ledger only. Nothing posting will happen to leading ledger that ie your local gap.
    Regards,
    Alok

  • Document Split on Non Leading Ledger

    Hi Friends,
    Can we activate document split on Non leading Ledgers also?
    Actually my client wants to maintain Leading ledger as per US GAAP and Non leading ledgers as per Schedule VI
    So there is a requirement of activating document split on the non leading ledgers
    Regards,
    Ambuj Garg
    +91-9739976912

    Ok Think I should put my question differently
    I have activated document split.....
    Leading and Nonleading Ledgers are also in use
    Now when i post a document it is split on the basis of Profit Center on the "OL" Leading Ledger view
    While in the "NL" it is not split.
    Is there a seperate setting for achieving document split in the Nonleading ledgers

  • Bapi for posting documents in PCA

    Hello All,
    Does somebody know a FM or a BAPI wich permit's posting in the Profit Center Accounting?
    We have a list of documents for which we have to post documents in the PCA, tables GLPCA, GLPCP. I have found a series of BAPI's for ALE PCA , but nothing usefull.
    I know that usually the posting in PCA is done in automatic from customizing, but for these documents this is not the case. We have to do this posting via a BAPI.
    If anyone has encounterred this situation, please advise.
    Thank you,
    Viorel Nistor.

    Thank you for your answer.
    I have found the BAPI but it doesn't help me very much because it seems that it's purpose is to create a replica of the document to an external system.
    I need to create this document in the same system.
    Has anyone used it in this way?
    Thank you,
    Viorel.

  • Bapi for post document

    I need create a post document (transaction FB01), there is a bapy to do it?
    Thanks.
    Moderator message: probably the most frequently discussed BAPI around here, please search for information.
    Edited by: Thomas Zloch on Dec 17, 2010 12:37 PM

    I need create a post document (transaction FB01), there is a bapy to do it?
    Thanks.
    Moderator message: probably the most frequently discussed BAPI around here, please search for information.
    Edited by: Thomas Zloch on Dec 17, 2010 12:37 PM

  • Automatic AP/ AR posting with different amount in Non-Leading Ledger

    Dear All,
    We have leading ledger for local GAAP and Non leading for IFRS. Is there any configuration/ mechanism to post a AP/ AR document with relevant amount in the Non-Leading Ledger based on the a/cing standards described by relevant standard.
    I am aware of autoamtion in posting the documents of depreciation, foreign currency valuation, accrual/ deferrals. I want to know settings for automating the entry in non-leading ledger based on the standard.
    Thanks,
    Amish.

    Hi,
    If you want to post additional amounts ,adjustments, modifcations to non leading ledgers you can use FB01L and give your non leading ledger while posting. System post documents only in Non leading ledger.

  • Non-Leading Ledger Transactions-  Direct Posting

    Hi All
    Kindly give your valuable info on below:
      01. We are not getting Ledger info from regular Transactions i.e BSEG, BSIS, BSID etc. so we are taking leading ledger as ledger for transaction from this tables. Is it Right?
    02. For Non-Leading Ledger Transactions-- From which table we can get it?
    03. What is the process to post document only into Non-Leading Ledger? i.e transaction code or any specific method
    Thanks in advance.
    Regards,
    Venkat

    Dear Srikanth,
    Thanks for your valuable reply.
    We are able to post only to Non-leading Ledger through FB50L.  But we didnt find the documents in BSEG table.
    Kindly help me if you know the tables name for Non-Leading Ledger Documents.
    Regards,
    Venkat

  • Post SKF only to New GL -Non leading ledger

    Hi New GL experts,
    We have an issue with SKF ( Statistical key figures) in New GL.
    The below 2 options are considered:
    1. Entry from KP46 ( CO Module) - Flowing to Leading and Non leading ledger. But the period is wrongly derived in Non leading ledger.
    2. Entry from FAGLSKF1 ( New GL) - Posts to both Leading / Non leading ledger ( with correct periods) - But does not flow to Controlling.
    Is there any way to post the SKF to Non leading ledger only ? or to CO module only without updating to Leading / Non leading ledger ?
    Thanks in advance for your help.
    Siva

    Hi Siva
    Option 1 - If you deactivate the "Integrated Planning" in CO Version 0 OKEQ and also in GL Planning, the Plan data in CO wont auto update to New GL at all..
    You need to then manually push the plan data into New GL using a special T code.. You can find the T code in the SPRO where you set up GL planning
    Option 2
    FAGLSKF1 does not update controlling, as designed.. So, maintain your SKFs independently in FI and CO
    Option 3
    Try to raise it to SAP if the period in Non Leading Ledger is wrong.. Ideally, the period you enter in KP46 should convert to the Non Leading Ledger period as per the Fiscal yr variant of Non leading Ledger
    Br, Ajay M

  • Depreciation Posting to Non-Leading Ledger

    In our client we have been set with the Book Depreciation posted to only Leading Ledger. And we ran the Depreciation for all the month from Jan to Aug for 2010.
    Depreciation postings posted to only Leading Ledger. Now they want to post to both Leading and one more ledger. For future postings i configured to the Depreciation area to post to both these ledgers.
    Is there anyway we could post the previous  months Depreciation postings to other Ledger now. I have the document numbers which i need to post to Non-Leading ledger and all the details. I think posting manually through FB01L is not right method and will not allow us to do. Please advice me on this.

    Hi,
    check SAPNET Notes 987824, 1317485, 1455618 (T-code ABF1L). This allows you to post asset values only to non-leading ledger. Thus you can create an opening balance for your non-leading ledger.
    best regards, Christian

  • Double posting of APC value in non leading ledger

    Hi,
    While posting asset, system is posting to both Leading and non leading ledger where as configuration is allowed to post only leading ledger in realtime and periodic posting is allowed in non leading ledger. That cause double posting in non leading ledger on execution of ASKB. Please guide.
    Regards,
    DC

    ASKB is working based on this table "APERB_PROT". So if I remove these entries, no posting will be allowed through ASKB which is possible if I simply not execute ASKB. Here what I am looking for that on posting of original value should only post to leading ledger and with ASKB it should post in non leading ledger because of its configuration.

  • Authorization - Restrict to view non-leading ledger only

    Dear Gurus,
    Is it possible to allow users to have access to view non-leading ledger only and not main ledger?
    However, at posting, we will want users to still have access to post to main ledger.
    Appreciate your expertise on this!
    B Regards,
    Wong

    Hi Atif,
    Thanks for the response.
    I tried that but it is now telling me that I need to provide the leading ledger authorization too.
    Any idea why?
    We will like to only provide non-leading ledger authorization for displaying reports.
    Regards,
    Wong

  • BAPI for Accounting Document Posting

    What is the name of BAPI for Accounting Document Posting and how can I run it?

    Hi ,
    Can you send me the code how to use the BAPI_ACC_DOCUMENT_POST.
    Regards,
    L Srikanthan.

  • BAPI for posting accounting documents

    Hi,
    Can anyone please provide me with the BAPI to be used for GL postings with example.

    Hi,
    Use  the BAPI   BAPI_ACC_DOCUMENT_POST for posting Documents.
    Check the sample code related to posting.
    REPORT  acc_bapi_document                  .
    selection-screen begin of block bl01 .
    parameters:
      check_l             radiobutton group rb1,
      check_a default 'X' radiobutton group rb1,
      post                radiobutton group rb1.
    selection-screen uline.
    parameters:
      rev_c               radiobutton group rb1,
      rev_p               radiobutton group rb1.
    selection-screen uline.
    parameters:
      ref_key like bapiache01-obj_key default 'TEST000001BAPICALL',
      dest    like bdi_logsys-logsys  default '          '.
    selection-screen end   of block bl01 .
    data:
      gd_documentheader    like bapiache09,
      gd_customercpd       like bapiacpa09,
      gd_fica_hd           like bapiaccahd,
      it_accountreceivable like table of bapiacar09 with header line,
      it_accountgl         like table of bapiacgl09 with header line,
      it_accounttax        like table of bapiactx09 with header line,
      it_criteria          like table of bapiackec9 with header line,
      it_valuefield        like table of bapiackev9 with header line,
      it_currencyamount    like table of bapiaccr09 with header line,
      it_return            like table of bapiret2   with header line,
      it_receivers         like table of bdi_logsys with header line,
      it_fica_it           like table of bapiaccait with header line,
      it_accountpayable    like table of bapiacap09 with header line,
      it_paymentcard       like table of bapiacpc09 with header line,
      it_ext               like table of bapiacextc with header line.
    it_re                LIKE TABLE OF bapiacre09 WITH HEADER LINE,
    it_ext2              LIKE TABLE OF bapiparex  WITH HEADER LINE.
    perform fill_internal_tables.
    if check_l = 'X'.
      call function 'BAPI_ACC_DOCUMENT_CHECK'
           destination dest
           exporting
                documentheader    = gd_documentheader
                customercpd       = gd_customercpd
                contractheader    = gd_fica_hd
           tables
                accountgl         = it_accountgl
                accountreceivable = it_accountreceivable
                accountpayable    = it_accountpayable
                accounttax        = it_accounttax
               currencyamount    = it_currencyamount
                criteria          = it_criteria
                valuefield        = it_valuefield
                extension1        = it_ext
                return            = it_return
                paymentcard       = it_paymentcard
                contractitem      = it_fica_it.
               extension2        = it_ext2
               realestate        = it_re.
      write: / 'Result of check lines:'.                        "#EC NOTEXT
      perform show_messages.
    endif.
    if check_a = 'X'.
      call function 'BAPI_ACC_DOCUMENT_CHECK'
        destination dest
        exporting
          documentheader    = gd_documentheader
          customercpd       = gd_customercpd
          contractheader    = gd_fica_hd
        tables
          accountgl         = it_accountgl
          accountreceivable = it_accountreceivable
          accountpayable    = it_accountpayable
          accounttax        = it_accounttax
          currencyamount    = it_currencyamount
          criteria          = it_criteria
          valuefield        = it_valuefield
          extension1        = it_ext
          return            = it_return
          paymentcard       = it_paymentcard
          contractitem      = it_fica_it.
         extension2        = it_ext2
         realestate        = it_re.
      write: / 'Result of check all:'.                          "#EC NOTEXT
      perform show_messages.
    endif.
    if post = 'X'.
      data: l_type like gd_documentheader-obj_type,
            l_key  like gd_documentheader-obj_key,
            l_sys  like gd_documentheader-obj_sys.
      if dest = space or
         dest = gd_documentheader-obj_sys.
       post synchron
        call function 'BAPI_ACC_DOCUMENT_POST'
          exporting
            documentheader    = gd_documentheader
            customercpd       = gd_customercpd
            contractheader    = gd_fica_hd
          importing
            obj_type          = l_type
            obj_key           = l_key
            obj_sys           = l_sys
          tables
            accountgl         = it_accountgl
            accountreceivable = it_accountreceivable
            accountpayable    = it_accountpayable
            accounttax        = it_accounttax
            currencyamount    = it_currencyamount
            criteria          = it_criteria
            valuefield        = it_valuefield
            extension1        = it_ext
            return            = it_return
            paymentcard       = it_paymentcard
            contractitem      = it_fica_it.
           extension2        = it_ext2
           realestate        = it_re.
        write: / 'Result of post:'.                             "#EC NOTEXT
        perform show_messages.
      else.
      create Idoc
        it_receivers-logsys = dest.
        append it_receivers.
        call function 'ALE_ACC_DOCUMENT_POST'
          exporting
            documentheader    = gd_documentheader
            customercpd       = gd_customercpd
            contractheader    = gd_fica_hd
          tables
            accountgl         = it_accountgl
            accountreceivable = it_accountreceivable
            accountpayable    = it_accountpayable
            accounttax        = it_accounttax
            currencyamount    = it_currencyamount
            criteria          = it_criteria
            valuefield        = it_valuefield
            extension1        = it_ext
            paymentcard       = it_paymentcard
            contractitem      = it_fica_it
           extension2        = it_ext2
           realestate        = it_re
            receivers         = it_receivers
          COMMUNICATION_DOCUMENTS =
          APPLICATION_OBJECTS     =
          exceptions
            error_creating_idocs    = 1
            others                  = 2  .
        if sy-subrc = 0.
          write: / 'IDoc created'.                              "#EC NOTEXT
        else.
          write: sy-msgid.
        endif.
      endif.
    endif.
    if rev_p = 'X' or rev_c = 'X'.
      data: rev like bapiacrev,
            rev_key like ref_key.
      rev_key       = ref_key.
      rev_key(1)    = 'R'.
      rev-obj_type  = gd_documentheader-obj_type.
      rev-obj_key   = rev_key.
      rev-obj_sys   = gd_documentheader-obj_sys.
      rev-obj_key_r = ref_key.
      if rev_c is initial.
        if dest = space or
           dest = gd_documentheader-obj_sys.
          call function 'BAPI_ACC_DOCUMENT_REV_POST'
            exporting
              reversal = rev
              bus_act  = gd_documentheader-bus_act
            tables
              return   = it_return.
        else.
          it_receivers-logsys = dest.
          append it_receivers.
          call function 'ALE_ACC_DOCUMENT_REV_POST'
            exporting
              reversal                      = rev
              busact                        = gd_documentheader-bus_act
            OBJ_TYPE                      = 'BUS6035'
            SERIAL_ID                     = '0'
            tables
              receivers                     = it_receivers
            COMMUNICATION_DOCUMENTS       =
            APPLICATION_OBJECTS           =
            exceptions
              error_creating_idocs          = 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.
          else.
            write: / 'IDoc created'.                            "#EC NOTEXT
          endif.
        endif.
      else.
        call function 'BAPI_ACC_DOCUMENT_REV_CHECK'
          exporting
            reversal = rev
            bus_act  = gd_documentheader-bus_act
          tables
            return   = it_return.
      endif.
      write: / 'Result of Reversal Posting:'.                   "#EC NOTEXT
      perform show_messages.
    endif.
    commit work.
         Form  fill_internal_tables
    form fill_internal_tables.
      perform fill_header.
      perform fill_accountgl.
    perform fill_accountar.
      perform fill_accountap.
      perform fill_accounttax.
      perform fill_currencyamount.
    perform fill_criteria.
    perform fill_valuefield.
    perform fill_re.
    perform fill_cpd.
    perform fill_contractitem.
    perform fill_contractheader.
    perform fill_paymentcard.
    perform fill_extension.
    endform.                               " fill_internal_tables
         Form  Show_messages
    form show_messages.
      if it_return[] is initial.
        write: / 'no messages'.
      else.
        skip 1.
        loop at it_return.
          write: /    it_return-type,
                 (2)  it_return-id,
                      it_return-number,
                 (80) it_return-message,
                    IT_RETURN-LOG_NO
                    IT_RETURN-LOG_MSG_NO
                      it_return-message_v1,
                    IT_RETURN-MESSAGE_V2
                    IT_RETURN-MESSAGE_V3
                    IT_RETURN-MESSAGE_V4
                 (20) it_return-parameter,
                 (3)  it_return-row,
                      it_return-field.
                    IT_RETURN-SYSTEM
        endloop.
      endif.
      uline.
    endform.                               " Show_messages
          FORM fill_accountgl                                           *
    form fill_accountgl.
      clear it_accountgl.
      it_accountgl-itemno_acc     = 2.
      it_accountgl-gl_account     = '0021510201'.
      it_accountgl-item_text      = 'BAPI Test G/L line item'.  "#EC NOTEXT
    it_accountgl-bus_area       = '01'.
    it_accountgl-profit_ctr     = '0000010101'.
    it_accountgl-comp_code      = 'SLOC'.
      append it_accountgl.
      clear it_accountgl.
      it_accountgl-itemno_acc     = 3.
      it_accountgl-gl_account     = '0082000201'.
      it_accountgl-item_text      = 'BAPI Test G/L line item'.  "#EC NOTEXT
      it_accountgl-bus_area       = '01'.
      it_accountgl-profit_ctr     = '0000010101'.
      it_accountgl-comp_code      = 'SLOC'.
      it_accountgl-tax_code       = 'A3'.
      append it_accountgl.
      clear it_accountgl.
      it_accountgl-itemno_acc     = 5.
      it_accountgl-gl_account     = '0021510201'.
      it_accountgl-item_text      = 'BAPI Test G/L line item'.  "#EC NOTEXT
    it_accountgl-bus_area       = '01'.
    it_accountgl-profit_ctr     = '0000010301'.
    it_accountgl-comp_code      = 'SLOC'.
      append it_accountgl.
      clear it_accountgl.
      it_accountgl-itemno_acc     = 6.
      it_accountgl-gl_account     = '0082000201'.
      it_accountgl-item_text      = 'BAPI Test G/L line item'.  "#EC NOTEXT
      it_accountgl-bus_area       = '01'.
      it_accountgl-profit_ctr     = '0000010301'.
      it_accountgl-comp_code      = 'SLOC'.
      it_accountgl-tax_code       = 'A3'.
      append it_accountgl.
      clear it_accountgl.
      it_accountgl-itemno_acc     = 7.
    it_accountgl-itemno_acc     = 8.
      it_accountgl-gl_account     = '0021510201'.
      it_accountgl-item_text      = 'BAPI Test G/L line item'.  "#EC NOTEXT
    it_accountgl-bus_area       = '90'.
    it_accountgl-profit_ctr     = '0000900008'.
    it_accountgl-comp_code      = 'CORP'.
      append it_accountgl.
      clear it_accountgl.
      it_accountgl-itemno_acc     = 8.
    it_accountgl-itemno_acc     = 9.
      it_accountgl-gl_account     = '0082000201'.
      it_accountgl-item_text      = 'BAPI Test G/L line item'.  "#EC NOTEXT
      it_accountgl-bus_area       = '90'.
      it_accountgl-profit_ctr     = '0000900008'.
      it_accountgl-comp_code      = 'CORP'.
    it_accountgl-tax_code       = 'A3'.
      append it_accountgl.
    endform.                    "fill_accountgl
          FORM fill_header                                              *
    form fill_header.
    CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
       IMPORTING
         own_logical_system = gd_documentheader-obj_sys.
    OBJ_TYPE has to be replaced by customers object key (Y* or Z*)
    gd_documentheader-obj_type   = 'IDOC'.
    gd_documentheader-obj_key    = ref_key.
      gd_documentheader-username   = sy-uname.
      gd_documentheader-header_txt = 'BAPI Test'.               "#EC NOTEXT
    gd_documentheader-obj_key_r  =
    GD_DOCUMENTHEADER-reason_rev =
    gd_documentheader-comp_code  = 'SLOC'.
    GD_DOCUMENTHEADER-AC_DOC_NO  =
      gd_documentheader-fisc_year  = sy-datum(4).
      gd_documentheader-doc_date   = sy-datum.
      gd_documentheader-pstng_date = sy-datum.
    GD_DOCUMENTHEADER-TRANS_DATE =
    GD_DOCUMENTHEADER-VALUE_DATE =
    GD_DOCUMENTHEADER-FIS_PERIOD =
    gd_documentheader-doc_type   = 'KR'.
    gd_documentheader-ref_doc_no = 'xxxx'.
    GD_DOCUMENTHEADER-COMPO_ACC  =
      gd_documentheader-bus_act    = 'RFBU'.
    endform.                    "fill_header
          FORM fill_contractheader                                     *
    form fill_contractheader.
    gd_fica_hd-doc_no           =
    gd_fica_hd-doc_type_ca      =
    gd_fica_hd-res_key          =
    gd_fica_hd-fikey            =
    gd_fica_hd-payment_form_ref =
    endform.                    "fill_contractheader
          FORM fill_cpd                                                 *
    form fill_cpd.
    gd_customercpd-name
    gd_customercpd-name_2
    gd_customercpd-name_3
    gd_customercpd-name_4
    gd_customercpd-postl_code
    gd_customercpd-city
    gd_customercpd-country
    gd_customercpd-country_iso
    gd_customercpd-street
    gd_customercpd-po_box
    gd_customercpd-pobx_pcd
    gd_customercpd-pobk_curac
    gd_customercpd-bank_acct
    gd_customercpd-bank_no
    gd_customercpd-bank_ctry
    gd_customercpd-bank_ctry_iso
    gd_customercpd-tax_no_1
    gd_customercpd-tax_no_2
    gd_customercpd-tax
    gd_customercpd-equal_tax
    gd_customercpd-region
    gd_customercpd-ctrl_key
    gd_customercpd-instr_key
    gd_customercpd-dme_ind
    gd_customercpd-langu_iso
    endform.                    "fill_cpd
          FORM fill_ar                                                  *
    form fill_accountar.
    CLEAR it_accountreceivable.
    it_accountreceivable-itemno_acc =
    it_accountreceivable-customer   =
    IT_ACCOUNTRECEIVABLE-REF_KEY_1  =
    IT_ACCOUNTRECEIVABLE-REF_KEY_2  =
    IT_ACCOUNTRECEIVABLE-REF_KEY_3  =
    IT_ACCOUNTRECEIVABLE-PMNTTRMS   =
    IT_ACCOUNTRECEIVABLE-BLINE_DATE =
    IT_ACCOUNTRECEIVABLE-DSCT_DAYS1 =
    IT_ACCOUNTRECEIVABLE-DSCT_DAYS2 =
    IT_ACCOUNTRECEIVABLE-NETTERMS   =
    IT_ACCOUNTRECEIVABLE-DSCT_PCT1  =
    IT_ACCOUNTRECEIVABLE-DSCT_PCT2  =
    IT_ACCOUNTRECEIVABLE-PYMT_METH  =
    IT_ACCOUNTRECEIVABLE-DUNN_KEY   =
    IT_ACCOUNTRECEIVABLE-DUNN_BLOCK =
    IT_ACCOUNTRECEIVABLE-PMNT_BLOCK =
    IT_ACCOUNTRECEIVABLE-VAT_REG_NO =
    IT_ACCOUNTRECEIVABLE-ALLOC_NMBR =
    it_accountreceivable-item_text  =
    IT_ACCOUNTRECEIVABLE-PARTNER_BK =
    IT_ACCOUNTRECEIVABLE-GL_ACCOUNT =
    it_accountreceivable-comp_code
    it_accountreceivable-bus_area
    it_accountreceivable-pmtmthsupl
    it_accountreceivable-paymt_ref
    it_accountreceivable-scbank_ind
    it_accountreceivable-businessplace
    it_accountreceivable-sectioncode
    it_accountreceivable-branch
    it_accountreceivable-pymt_cur
    it_accountreceivable-pymt_cur_iso
    it_accountreceivable-pymt_amt
    it_accountreceivable-c_ctr_area
    it_accountreceivable-bank_id
    it_accountreceivable-supcountry
    it_accountreceivable-supcountry_iso
    it_accountreceivable-tax_code
    it_accountreceivable-taxjurcode
    it_accountreceivable-tax_date
    it_accountreceivable-sp_gl_ind
    it_accountreceivable-partner_guid = '1465464654'.
    APPEND it_accountreceivable.
    endform.                    "fill_accountar
          FORM fill_ap                                                  *
    form fill_accountap.
      clear it_accountpayable.
      it_accountpayable-itemno_acc = 1.
    it_accountpayable-vendor_no  = '0000060259'.
      it_accountpayable-vendor_no  = '0000060693'.
    it_accountpayable-gl_account
    it_accountpayable-ref_key_1
    it_accountpayable-ref_key_2
    it_accountpayable-ref_key_3
    it_accountpayable-comp_code = 'SLOC'.
    it_accountpayable-bus_area = '01'.
    it_accountpayable-pmnttrms = 'A000'.
    it_accountpayable-bline_date
    it_accountpayable-dsct_days1
    it_accountpayable-dsct_days2
    it_accountpayable-netterms
    it_accountpayable-dsct_pct1
    it_accountpayable-dsct_pct2
    it_accountpayable-pymt_meth
    it_accountpayable-pmtmthsupl
    it_accountpayable-pmnt_block
    it_accountpayable-scbank_ind
    it_accountpayable-supcountry
    it_accountpayable-supcountry_iso
    it_accountpayable-bllsrv_ind
    it_accountpayable-alloc_nmbr
      it_accountpayable-item_text  = 'BAPI Test A/P line item'. "#EC NOTEXT
    it_accountpayable-po_sub_no
    it_accountpayable-po_checkdg
    it_accountpayable-po_ref_no
    it_accountpayable-w_tax_code
    it_accountpayable-businessplace
    it_accountpayable-sectioncode
    it_accountpayable-instr1
    it_accountpayable-instr2
    it_accountpayable-instr3
    it_accountpayable-instr4
    it_accountpayable-branch
    it_accountpayable-pymt_cur
    it_accountpayable-pymt_amt
    it_accountpayable-pymt_cur_iso
    it_accountpayable-sp_gl_ind
      append it_accountpayable.
    endform.                    "fill_accountap
          FORM fill_tax                                                 *
    form fill_accounttax.
      clear it_accounttax.
      it_accounttax-itemno_acc = 4.
      it_accounttax-gl_account = '0011361502'.
      it_accounttax-tax_code   = 'A3'.
      it_accounttax-acct_key   = 'VST'.
      it_accounttax-cond_key   = 'MWVS'.
    it_accounttax-itemno_tax = 8.
      append it_accounttax.
    clear it_accounttax.
    it_accounttax-itemno_acc = 7.
    it_accounttax-gl_account = '0011361502'.
    it_accounttax-tax_code   = 'A3'.
    it_accounttax-acct_key   = 'VST'.
    it_accounttax-COND_KEY   = 'MWVS'.
    append it_accounttax.
    clear it_accounttax.
    it_accounttax-itemno_acc = 10.
    it_accounttax-itemno_acc = 9.
    it_accounttax-gl_account = '0011361502'.
    it_accounttax-tax_code   = 'A3'.
    it_accounttax-acct_key   = 'VST'.
    it_accounttax-cond_key   = 'MWVS'.
    it_accounttax-itemno_tax = 4.
    append it_accounttax.
    endform.                    "fill_accounttax
          FORM fill_currencyamount                                      *
    form fill_currencyamount.
      clear it_currencyamount.
      it_currencyamount-itemno_acc   = 1.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'MXN'.
      it_currencyamount-amt_doccur   = '-7408036.2'.
      append it_currencyamount.
      clear it_currencyamount.
      it_currencyamount-itemno_acc   = 2.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'MXN'.
      it_currencyamount-amt_doccur   = '5336472.00'.
      append it_currencyamount.
      clear it_currencyamount.
      it_currencyamount-itemno_acc   = 3.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'MXN'.
      it_currencyamount-amt_doccur   = '3840.00'.
      append it_currencyamount.
      clear it_currencyamount.
      it_currencyamount-itemno_acc   = 4.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'MXN'.
      it_currencyamount-amt_base   = '5548.00'.
      it_currencyamount-amt_doccur   = '832.2'.
    it_currencyamount-amt_doccur   = '576.00'.
    it_currencyamount-amt_base   = '3840.00'.
      append it_currencyamount.
      clear it_currencyamount.
      it_currencyamount-itemno_acc   = 5.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'MXN'.
      it_currencyamount-amt_doccur   = '2051279.00'.
      append it_currencyamount.
      clear it_currencyamount.
      it_currencyamount-itemno_acc   = 6.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'MXN'.
      it_currencyamount-amt_doccur   = '1690.00'.
      append it_currencyamount.
    clear it_currencyamount.
    it_currencyamount-itemno_acc   = 7.
    it_currencyamount-curr_type    = '00'.
    it_currencyamount-currency     = 'MXN'.
    it_currencyamount-amt_base     = '1690.00'.
    it_currencyamount-amt_doccur   = '253.5'.
    append it_currencyamount.
      clear it_currencyamount.
    it_currencyamount-itemno_acc   = 8.
      it_currencyamount-itemno_acc   = 7.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'MXN'.
      it_currencyamount-amt_doccur   = '13905.00'.
      append it_currencyamount.
      clear it_currencyamount.
    it_currencyamount-itemno_acc   = 9.
      it_currencyamount-itemno_acc   = 8.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'MXN'.
    it_currencyamount-amt_base     = '2.70'.
      it_currencyamount-amt_doccur   = '18.00'.
      append it_currencyamount.
    clear it_currencyamount.
    it_currencyamount-itemno_acc   = 10.
    it_currencyamount-itemno_acc   = 9.
    it_currencyamount-curr_type    = '00'.
    it_currencyamount-currency     = 'MXN'.
    it_currencyamount-amt_doccur   = '2.70'.
    it_currencyamount-amt_base     = '18.00'.
    append it_currencyamount.
    endform.                    "fill_currencyamount
          FORM fill_criteria                                            *
    form fill_criteria.
    CLEAR it_criteria.
    it_criteria-itemno_acc = 2.
    it_criteria-fieldname = 'BZIRK'.
    it_criteria-character = '000001'.
    append it_criteria.
    endform.                    "fill_criteria
          FORM fill_valuefield                                          *
    form fill_valuefield.
    CLEAR it_valuefield.
    it_valuefield-itemno_acc = 2.
    it_valuefield-fieldname = 'VV010'.
    it_valuefield-curr_type
    it_valuefield-currency = 'EUR'.
    it_valuefield-currency_iso
    it_valuefield-amt_valcom
    it_valuefield-base_uom
    it_valuefield-base_uom_iso
    it_valuefield-qua_valcom
    append it_valuefield.
    endform.                    "fill_valuefield
          FORM fill_extension                                           *
    form fill_extension.
    CLEAR it_ext.
    it_ext-field1
    it_ext-field2
    it_ext-field3
    it_ext-field4
    APPEND it_ext.
    DATA: ls_zzz TYPE ZZZ_ACCIT.
    CLEAR it_ext2.
    it_ext2-structure = 'ZZZ_ACCIT'.
    ls_zzz-posnr = 2.
    ls_zzz-awref_reb = '123654'.
    ls_zzz-aworg_reb = '654654'.
    ls_zzz-grant_nbr = '0022002'.
    MOVE ls_zzz TO it_ext2-valuepart1.
    APPEND it_ext2.
    endform.                    "fill_extension
          FORM fill_paymentcard                                         *
    form fill_paymentcard.
    CLEAR it_paymentcard.
    it_paymentcard-itemno_acc = 1.
    it_paymentcard-cc_glaccount
    it_paymentcard-cc_type
    it_paymentcard-cc_number
    it_paymentcard-cc_seq_no
    it_paymentcard-cc_valid_f
    it_paymentcard-cc_valid_t
    it_paymentcard-cc_name
    it_paymentcard-dataorigin
    it_paymentcard-authamount = '100'.
    it_paymentcard-currency = 'EUR'.
    it_paymentcard-currency_iso
    it_paymentcard-cc_autth_no
    it_paymentcard-auth_refno
    it_paymentcard-auth_date
    it_paymentcard-auth_time
    it_paymentcard-merchidcl
    it_paymentcard-point_of_receipt
    it_paymentcard-terminal
    it_paymentcard-cctyp = '1'.
    APPEND it_paymentcard.
    endform.                    "fill_paymentcard
          FORM fill_contractitem                                        *
    form fill_contractitem.
    CLEAR it_fica_it.
    it_fica_it-itemno_acc
    it_fica_it-cont_acct
    it_fica_it-main_trans
    it_fica_it-sub_trans
    it_fica_it-func_area
    it_fica_it-fm_area
    it_fica_it-cmmt_item
    it_fica_it-funds_ctr
    it_fica_it-fund
    append it_fica_it.
    endform.                    "fill_contractitem
    *&      Form  fill_re
    form fill_re .
    CLEAR it_re.
    it_re-itemno_acc      =
    it_re-business_entity =
    it_re-building        =
    it_re-property        =
    it_re-rental_object   =
    it_re-serv_charge_key =
    it_re-settlement_unit =
    it_re-contract_no     =
    APPEND it_re.
    endform.                    "fill_re
    Please check these links
    http://sap4.com/wiki/index.php?title=BAPI_ACC_DOCUMENT_POST
    http://www.sapfans.com/forums/viewtopic.php?p=76232&sid=b6519d31b5097f49dc303d03b35eed43
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi_acc_document_post-622561
    Regards,
    Raj.

  • Exit for to restict Non-leading ledger posting periods for Document Type SA

    Hi,
      Please give the guidelines to complete the following requirment.
      In SAP FI two ledgers Leading(0L), Non-Leading (J2) Posting periods are defined in OB52.
    If non-leading ledger is closed also it will take the Leading posting periods and Posting the document..
    This is the SAP Behaviour.
    Like in FB50L if we enter J2 (Non-Leading) it will display the erro message like
    Posting period in not open.
    Like that they want for FB70,FB75,MIGO,MIRO,FINT and Invoice(VF01).
    Please suggest the suitable exit.
    Thanks & Regards,
    Padmaja.

    Hi Ramu,
    Please refer the below points,
    1. Leading ledger is only one ledger in one client.
    2. In one client you can keep N of non leading ledgers.
    3. company codes are need  assign to non leading ledgers.
    4. All postings will update leading ledger by default.
    5. Non leading ledgers will update if  company code is assigned to non leading ledger.
    6. If you want to  post only non leading ledger then please use the tcode FB50L and FB01L.
    7 You can set the separeate fiscal year variant for non leading ledger.
    I hope above information will resolve you r issue.
    Regards
    Madhu M
    http://wiki.sdn.sap.com/wiki/x/JghNCw    (NewGL Migration Secnarios)
    http://wiki.sdn.sap.com/wiki/x/mosOD     (Document Splitting Wizard)
    http://wiki.sdn.sap.com/wiki/x/f4OfDg    (NON-LEADING LEDGER SPECIFIC
                                                                  POSTING)

Maybe you are looking for