BAPI for automatic clearing (similar to F.13)

Hi ABAP Gurus,
I need to create a  new program that should be able to clear by comparing the ASSIGNMENT filed of the payment document (DZ) against the REFERENCE field of the installment invoice (II). 
With this, do you know a BAPI that I can use for this?  I assume this BAPI will be similar as to how F.13 works.
Thanks for your inputs.
Regards.
Brando

As Brad confirm, the F.13 processing will pick up 1:N or even N:N open items and clear them based on your criteria... one site I work up sometimes builds up a mix of several hundred debits and credits within individual customer accounts over a couple of months before these clear off.
One thing to be aware of with FB05 is where you might have several open line items on the same document as the transaction's default logic will bring in all of these into the list of items to be cleared so your code would need to be able to deselect the ones you don't want - it may not be a situation that affects your scenario, but it needed some careful programming (plus I set up an additional sort option for the line item matching dynpro).
Another approach that I haven't tried is that used within F.13 itself - if you drill down into the code far enough you will see the SAP code does Call Transactions itself - but prior to the call it exports a list of items to a memory id, so I assume you could also try this technique - just never tried myself.
But, like Brad, I'd try to get the ZUONR set correctly on all the line items via substitution or whatever ... we also built a simple utility for one site that allowed the A/R end users to change just that field in bulk (list entries, select items, popup screen to collect new Assignment value, then BDC / call trans to FB02 to zap it) just so the automatic clearing could do the hard(er) multi-line clearing work for you.
Jonathan

Similar Messages

  • Payment via FPY1 and  a lock for automatic clearing

    Hello,
    I would like to lock a debit item for automatic clearing but let it be paid via FPY1.
    When trying to lock it using the posting lock it can't be paid via FPY1.
    What can I do ?
    Thanks,
    Vered

    Hi ,
                In
    CA/A/r a/p--basic function--open item management --clearing control--define specification for clearing types --define defaults for account maintenance
    click on the clearing type (03,04) and go to selection criteria define  for clearing category and the concerned main/sub , tick the NC column , this will exclude the particular main sub from clearing .
                                                               similarly for  account  maintenance during invoicing go to
    sap utilities --- invoicing ---invoice processing --item selection in invoicing --item selection in account maintenance for the clearing type , click on item selection for account maintenance , for the main/sub, mark OISEL ="9" 

  • GL is relevant for automatic clearing

    By which t.code we can check that the any particular g/l is relavant for automatic clearing or not?
    regards
    Rekha sharma

    Hi,
    Goto transaction FBKP,and select automatic clearing business transaction, there you can find GL assigned for automatic clearing.
    Regards,
    Sreekanth

  • F.13 is a standard program for automatic clearing?

    f.13 is a standard program for automatic clearing? can i include plant code to the standard program.....and it is used for display clearing......need information?

    HI,
    F.13 is a Stanndard program for Automatic clearing as you rightly siad. This is wholely dependent on the settings that you make in OB74 which is matching criteria.
    Let me take an examloe and explain.
    Lets say you have a customer invoice for  1,00,000/-. The customer has given 80,000/- once and 15,000/- once and the balance 5,000/- the company has issued a Credit Note.
    If this is a single transaction in a year you may wonder why this F.13 is used. However in practice there will be many transactions per day it self and advising a business proces of F-32 account Clear is not a good practice as the user is loaded with transactions.
    Hence You will be taking this as a periodic process and clearing automatically is advised using F.13.
    For the system to understand you will be giving the matching criteria in OB74.
    So when ever you run this program, program checks for matching Amounts in Dr and Cr sides with the matching feilds given in OB74
    The uncleared items need attention which may or may not be processed manually,
    For GR IR clearing also you can use this transaction and any open item manged account as longas the matching criteria is confiured.
    I don't think you can use Plant code in this.
    Reward points if useful.
    Sarma

  • Any BAPI for Auto clearing of Vendor accounts

    Hai,
    Any body know, any BAPI for Auto clearing of the Vendor account(transaction F.13).
    This urgent issue.
    Reward will promote you.
    Bye ,
    Elamaran

    no, there's no bapi
    -> another report is rfbibl00 with transaction fb05
    -> you've to fill structures bselk and bselp
    regards Andreas

  • GRIR - Criteria set in OB74 - Additional rule for automatic clearing

    Hi,
    WIth reference to the subject of this post, I would like to have advice on the commonly used criteria for the GRIR GL account.
    My GL master for this GRIR settings: sort key is 010: Purchase order no., which is EBELN (Tcode: OB16).
    Currently the settings at OB74 - Additional rule for automatic clearing for my GRIR are as follows:
    DMBTR, Amt.in loc.cur.
    ZUONR, Assignment
    EBELN, Purchasing Document
    My issue is due to the criteria of DMBTR, Amt.in loc.cur, I am not able to clear the GRIR GL using F.13, and after I remove the criteria: DMBTR, Amt.in loc.cur, I manage to clear all my GR and IR entries which have 0 balance in amount in local currency.
    KIndly advise.
    P/S: DO I need to have the following settings, additionally?
    Define Tolerance Groups for G/L Accounts
    Define Tolerance Groups for Employees
    Assign Users to Tolerance Groups
    Create Accounts for Clearing Differences
    Thanks in advance.

    Thanks.
    But my problem is as follows:
    My issue is due to the criteria of DMBTR, Amt.in loc.cur, I am not able to clear the GRIR GL using F.13, and after I remove the criteria: DMBTR, Amt.in loc.cur, I manage to clear all my GR and IR entries which have 0 balance in amount in local currency.
    Do you have any idea?

  • BAPI for automatic Pr creation witth multiple files from excel sheet

    I have written a programm  for automatic PR creation  with the help of bapi , where its picks data from excel sheet and makes PR .It is picking excel files from one folder(Files) for PR creation and moving to another folder(Files sucess).
    now the problem is if Folder (Files) contains one excel sheet ,PR is created fine , but if the Folder(Files) have multiple excel sheet ,its is creating 1st PR right, but next PR's contains all the line item of 1st PR , 2nd PR and so on .can anyone suggest me where is the problem in codes.
    types : begin of x_file ,
            key1(10),
            pur_grp(4),
            maktx(40),
            plant(4) ,
            req(10),
            s_qty(13),
            wbs(24),
            gl(10),
            trackno(10),
            supl(4),
            deladd(255).
    types : end of x_file .
      data : str5 type char10.
      data : mm type char2.
      data : yyyy type char4.
      data : dd type char2.
      data : str9 type char10.
      data : str6 type char10.
      data : month type char2.
      data : year type char4.
      year = sy-datum+0(4).
      month = sy-datum+4(2).
      dd = sy-datum+6(2).
      yyyy = sy-datum+0(4).
      mm = sy-datum+4(2).
      dd = sy-datum+6(2).
      clear str6 .
      clear str5.
      concatenate  dd'.' month '.' year into str5 .
      concatenate  yyyy mm dd into str6 .
    DATA : file type rlgrap-filename .
    data : it_file type table of x_file .
    data : wa_file type x_file .
    data : it_header type table of x_file .
    data : wa_header type x_file .
    *&  Internal Table For Define Row and Coloum Postion
    data: col_start type i value 1 ,
          row_start type i value 2,
          col_end type i value 256 ,
          row_end type i value 65000 .
    *&  Internal Table For Retrieve  Data From Excel
    *data: excel_bdcdata like kcde_cells occurs 0 with header line.
    *data: excel_bdcdata1 like kcde_cells occurs 0 with header line.
    data: excel_bdcdata like ALSMEX_TABLINE occurs 0 with header line.
    data: excel_bdcdata1 like ALSMEX_TABLINE occurs 0 with header line.
    data: it_index type i.
    DATA : IT_INDEX1 TYPE I.
    *&  Define Field Symbol
    field-symbols: <fs> .
    data :   bdcdata like bdcdata    occurs 0 with header line.
    data :   messtab like bdcmsgcoll occurs 0 with header line.
    data : req_items type table of bapiebanc .
    data : wa_req_items type bapiebanc .
    data : req_acc_asg type table of bapiebkn.
    data : wa_req_acc_asg type bapiebkn.
    DATA : RETURN LIKE BAPIRETURN OCCURS 0 WITH HEADER LINE .
    *data : return type table of     bapireturn.
    *data : wa_return type bapireturn .
    data : number type ebeln .
    *****************************MOVE FILES******************************
    data : xsource type string .
    data : xdestin type string .
    data : destin1 type string .
    data : destin2 type string .
    DATA : DEST1 TYPE STRING.
    DATA : DEST11 TYPE STRING.
    DATA : DEST2 TYPE STRING.
    DATA : DEST22 TYPE STRING.
    data : sou_dir_name like SALFILE-LONGNAME.
    data : tar_dir_name like SALFILE-LONGNAME.
    data : tar_dir_name1 like SALFILE-LONGNAME.
    data : sou_filename like EDI_PATH-PTHNAM .
    data : tar_filename like EDI_PATH-PTHNAM .
    data : filename1  type string .
    data : tar_filename1 like EDI_PATH-PTHNAM .
    data : file_itab like SALFLDIR occurs 0 with header line.
    data : wa_file_itab like SALFLDIR.
    data : file_count type i .
    data : dir_count type i.
    data : dir_table like sdokpath occurs 0 with header line.
    data : file_table like SDOKPATH occurs 0 with header line.
    data : wa_file_table like sdokpath.
    data : strr type string ,
           str1 type string ,
           str2 type string ,
           str3 type string .
    DATA : PA_VAL TYPE CHAR1.
    sou_dir_name = 'D:\barcodes\files\'.
    tar_dir_name = 'D:\barcodes\files-success\'.
        "success folder.
    CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
      EXPORTING
        DIRECTORY  = sou_dir_name
        FILTER     = '.'
      IMPORTING
        FILE_COUNT = file_count
        DIR_COUNT  = dir_count
      TABLES
        FILE_TABLE = file_table
        DIR_TABLE  = dir_table
      EXCEPTIONS
        CNTL_ERROR = 1
        OTHERS     = 2.
    IF SY-SUBRC <> 0.
    ENDIF.
    loop at file_table into wa_file_table.
    clear  :  strr , str1 , str2 , str3 .
      strr = wa_file_table-PATHNAME .
      concatenate sou_dir_name strr into str1 .
      concatenate tar_dir_name strr into str2 . " success
      concatenate tar_dir_name1 strr into str3 .         " failed
    FILE = STR1 .
    *start-of-selection.
    *&  Function For Retrieve Data From Excel
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        filename                      = FILE
        i_begin_col                   = col_start
        i_begin_row                   = row_start
        i_end_col                     = col_end
        i_end_row                     = row_end
      tables
        intern                        = excel_bdcdata
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3.
      IF sy-subrc NE 0.
    WRITE : / 'File Error'.
    EXIT.
    ENDIF.
      loop at excel_bdcdata.
        translate excel_bdcdata to upper case .
        move excel_bdcdata-col to it_index.
        assign component it_index of  structure  wa_file to <fs> .
        move excel_bdcdata-value to <fs>.
        at end of row.
          append wa_file to it_file .
            clear wa_file.
        endat.
      endloop.
    sort it_file by key1. "pur_grp maktx plant  .
    it_header[] = it_file[].
    delete adjacent duplicates from it_header comparing key1 pur_grp maktx
    plant .
    data : h_item(5) type n .
    data : h_pack(10) type n .
    data : line_no(5) type n .
    data : ln_no(5) type n .
    loop at it_header into wa_header .
    ln_no = 1.
    h_item = h_item + 10.
    h_pack = h_pack + 1.
    wa_req_items-preq_item = h_item .
    wa_req_items-doc_type = 'BOM'.
    wa_req_items-pur_group = wa_header-pur_grp .
    wa_req_items-MATERIAL = wa_header-maktx .
    wa_req_items-plant = wa_header-plant .
    wa_req_items-pckg_no =  h_pack .
    wa_req_items-deliv_date = str6 .
    wa_req_items-item_cat = '0'.
    wa_req_items-acctasscat = 'P'.
    *wa_req_items-distrib = '2' .
    **wa_req_items-gr_ind = 'X'.
    wa_req_items-ir_ind = '2'.
    wa_req_items-purch_org = 'TISL' .
    wa_req_items-QUANTITY =  wa_header-s_qty.
    wa_req_items-PREQ_NAME =  wa_header-req.
    wa_req_items-SUPPL_PLNT = wa_header-supl.
    wa_req_items-trackingno = wa_header-trackno.
    append wa_req_items to req_items .
    clear wa_req_items.
    wa_req_acc_asg-preq_item = h_item .
    wa_req_acc_asg-g_l_acct = wa_file-gl .
    WA_req_acc_asg-wbs_elem  = wa_header-wbs .
    append wa_req_acc_asg to req_acc_asg .
    clear wa_req_acc_asg.
    h_pack = h_pack + 1  .
    endloop.
    clear ln_no .
    ***BREAK-POINT.
    *& BAPI FUNCTION
    call function 'BAPI_REQUISITION_CREATE'
    importing
       number                               = number
      tables
        requisition_items                   = req_items
       requisition_account_assignment       = req_acc_asg
       return                               = return .

    Can someone please give me sol........

  • BAPI for Automate direct debit proposal creation for selected customers.

    Hello ABAP Gurus,
    Requirement is - Changing the process for Automate direct debit proposal creation for selected customers from a custom BDC program to a BAPI.
    Explanation -
    Currently as per the process, we are using a BDC call transaction program for F110 - Automate direct debit proposal creation for selected customers. The main pupose of this BDC program is to automate F110 Bank Run for A/R (Selected Customers Only). It creates payment proposal which is the first step in order to create payment runs.This program will run in background.
    We wanted to change the process from a BDC call transaction process to a BAPI call . In this process I am trying to chase for a valid BAPI in order to sync to my requirement.
    It would be appreciate for your << removed >> response.
    Thank you.
    Regarsd,
    Kumar.
    Edited by: Rob Burbank on Nov 11, 2009 3:33 PM

    Hello gurus,
    Is there any implicit or explicit enhancement point for F110 process or is there any alternative for payment proposal creations?
    is there any BAPI for F110 functionality?
    can you please let me know.
    Thank you
    Regards,
    Kumar.

  • BAPI for reset cleared items ie for transaction FBRA

    Hi all,
    Is ther any BAPI for trasaction FBRA ?
    Ther are 2 BAPIS REVERSE_CLEARING or FM_REVERSE_CLEARING
    but are not released .
    Kindly do the needful.

    Hi ,
    You should use FM CALL_FBRA AND CALL_FB08 function modules one by one.
    CALL_FBRA is for clearing items
    CALL_FB08 is for Reversing items
    Regards,
    Imran

  • Program details / T-Code for automatic clearing for AP Check  Encashment

    Hi Friends,
    Please provide me the details of the std program used or (if t-code is there) for the AUTOMATIC CLEARING for AP Check Enchasment) . I am trying in SDN , but could not find.
    Thanks in advance.
    Vengal Rao.

    hi
    RFEBCK00 (t-code FF.5)
    Cashed Checks (FCKR)
    with regards,
    ramanuja chary
    Edited by: Ramanuja Chary Sripada on Mar 22, 2010 9:20 PM

  • BAPI for Automatic Good Recipt refer to Service Entry Sheet

    Hello Experts,
    I need to create an automatic GR document after the SES creation/acceptance through importing time sheets from CATS to MM-SRV using transaction CATM. When doing so, the service entry sheet is created and after the acceptance is automatically set by the EXIT_SAPLMLSR_010, but the GR document is not created. Is there a BAPI for the automatic creation of the GR document?
    Thank you
    Mario F.

    Hi,
    I think you should check this in ML81N. You try to post and check the error there. Not all the errors are reported back in you scenario.
    cheers,
    Sanjeev

  • Reference field for Automatic Clearing - STO

    Hi All,
    This pertains to automatic clearing of line items in Cenvat Clearing Account for STO transactions.
    Our client is using J1IIN for creating outgoing STO Excise Invoice at sending plant. The accounting document posted will have Billing Document Number in its reference field.
    The accounting entry will be:
    Cenvat Clearing A/c Dr.
    Cenvat Payable A/c Cr.
    In the receiving plant an incoming excise STO invoice is posted in J1IEX. In the accounting document, the reference field is filled with the excise invoice number generated in J1IIN.
    The accounting entry will be:
    Cenvat Receivable A/c Dr.
    Cenvat Clearing A/c Cr.
    Since the reference fileds are having different document numbers, clearing the open items in Cenvat Clearing Account using automatic clearing has become difficult.
    Need inputs on how to get a common text (either Billing Document Number or Outgoing Excise Invoice Number) entered in reference field for both the Excise Invoices in J1IIN and J1IEX, so as to make this automatic clearing work fine . . . .
    Can anybody help in this regard..??
    Regards,
    Ravi Kumar

    Hi
    In OB74  we have following options for defining rules
    COA      A/Type     Frm No      To No         Criter 1      Criter 2      Criter 3      Criter 4      Criter 5
         D     1     9999999999     VERTN     VERTT     VBEWA
         D     A     Z     ZUONR     GSBER     VBUND
         K     A     Z     ZUONR     GSBER     VBUND
         S     0     9999999999     ZUONR     GSBER     VBUND
    From the above we can have options for
    1. For all accounts or selected one account , we can have upto 5 criterias for our decision to vlear
    2. We can have COA level decisions also
    3. We can have Account type level decisions - Vendor, Customer & GL accounts - one or many and can many rules defined.
    4. apart from the above you have the option to clear the criteria order of the field for account type definitions level
    Please go through the settings - SPRO-GL/AP/AR- Business Transactions- Open items processing- auto clearing 
    whether this helps u to understand the logic

  • Settings for Automatic clearing open item in BRS

    Hi Gurus,
    When i am running automatic brs clearing,for this any settings is there for clearing open item automatically.
    Pls very urgent.
    Raju.

    Dear Raj,
    Bank clearing accounts is used to for Bank Reconciliation purpose . If you like to automate this process you have to configure Electronic Bank Statement process. You can check the below links
    http://wiki.sdn.sap.com/wiki/display/ERPFI/ElectronicBankStatement
    http://www.sap-img.com/financial/customizing-an-electronic-bank-reconciliation-statement.htm
    Note: There are so many posts with regards to Electronic Bank Statement process, you can search from the forum also.
    Thanks and regards
    Praveen.J

  • BAPI for Customer Clearing(f-32)

    Hi all,
    I want to clear the customer clearing transaction by Residual Method  will be clearing the Credit Memo  .
    Can anybody help me any BAPI is there for this.
    Thanks.

    I want to clear the customer clearing transaction by Residual Method will be clearing the Credit Memo .
    If i understand you (some punctuation could make you more understandable), you may execute a
    SUBMIT sapf124 WITH ...
    Regards,
    Raymond

  • BAPI for Automatic Forwarding

    Hallo.
    When I create a user, I set the automatic forwarding from the SAP inbox username to mail.
    I make this setting using SO36.
    Is there a Bapi or RFC to make this?
    Thanks for your help.
    Mario
    Any news about my issue?
    Thanks.

    Hi,
    Please check this link.
    [Link|Send notification to Lotus Notes when a WI is created;

Maybe you are looking for