Use of FBS1.

Hello All,
Can any one explain me the use of the Tcode FBS1? The tcode is used for Accrual, but why does one has give a reversal reason and date...for what does that two fields help? What sorts of posting keys will be used for a transaction with FBS1?
Please explain,
Thanks and Regards,
Tushar

Hi
If business requirement, is to make a provisional entry for monthly closing and then reverse the same the fist day of next month, then the reversal data would be used. Since provision entries are done for temporary accounting purposes and the real accounting can happen on receipt of invoices
Thank You,

Similar Messages

  • Fbs1 & f.81

    Suppose i want to make entry of
    Rent a/.........Dr.                    Rent payable A/c........Dr
       To Rent payable a/c                To Bank A/c
    Then i will use FB50 & f.81.
    Then what is use of FBS1 & F.81

    Hi
    It seems you are making a provisional entry and then making the payment against the provision entry
    For provision entry - FB50
    and Payment - FB50/F-53 (Manual Check)/F-58 (Check from system)
    FBS1 will be used if you have any provisional entry at year end and the same would be reversed at begining of next period through F.81
    Thank You,

  • BO for transaction FBS1

    Hi All,
    I am using tn-> FBS1.It is related to Accounting GL Document, as we are posting document using GL Account.
    My questions are,
    1) what will be the BO for this?
    2) Why no event is triggered in SWEL when a document is posted using FBS1 tcode?
    3) If no event is getting then how to confirm that a particular BO is the one which suite our requirement?
    Thanks,
    Mamta

    Hi mamta,
    I am not very sure. You can try below mentioned BOs
    AVIK Advice Notes for Paymets and Credit Memos
    BKPF Accounting document
    BSEG Accounting Document Line Item
    BUS0002 Company Code
    BUS0003 Business Area
    BUS0014 Company
    BUS0023 Functional Area
    BUS1007 Customer
    BUS1008 Vendor
    BUS1029 Chart of Accounts
    BUS3006 G/L Account
    FINCALMTX Note in financial calendar
    FIPP Parked Document
    Best Regards,
    Deepa Kulkarni

  • Need help to change line item text for 220 Line items

    Hi Specialists,
    The user has posted a reversal entry ( doc type : Manual Accrual) using TCODE FBS1.
    It has 220 line items.
    Is there a way in SAP he can change the text of All Line Items for a particular document number in one shot ( Mass Change).
    Pls note : Header text remains same . Only the line item text needs to be changed in one shot .
    For Eg :
      1 50 2758000047 Accruals for CAS               Accrl - Dec 08 / Nalini Marketing(Door Mats) - Oth
      2 50 2758000047 Accruals for CAS               Accrl - Dec 08 / SKC - M&E Repair
    Changed Description:
      1 50 2758000047 Accruals for CAS               Accrl - Jan 09 / Nalini Marketing(Door Mats) - Oth
      2 50 2758000047 Accruals for CAS               Accrl - Jan 09 / SKC - M&E Repair
    Thanks,
    Abhinav.

    Hi
    This is possible, please follow as below:
    If it is GL (FBL3N), Customer (FBL5N), Vendor (FBL1N) line item use the TCODE' mentioned.
    In the selection screen, if possible give all the document numbers (it is possible with addition selection).
    Once you get the output with the line item, select all line items and go to the menu options  there you can see the mass change option, it will give one popup screen give the new value in the text field and proceed further.
    VVR

  • Accrual Reversal

    Friends,
    Apart from FBS1 & F.81 any other way to post the Accural and Reversal entreis,because our user feel difficult to use the FBS1 TC For posting the Accural Entry, Please suggest.
    Thanks & Regards
    BK

    FBS1 is the only T Code provided by SAP to post accruals. As fast entry is not available in this T Code users find it difficult to go screen by screen to post accruals. It is advised to create a BDC script so that user can upload from an Excel sheet. Other option is to use FB50 screen to post accruals using a specific Document type but in this option you won't find the fields 'reversal date' and 'reversal reason'. You can reverse the accruals posted by FB50 using T Code F.80. In the selection screen user can select the Document type meant for accrual postings and posting dates.
    Hope this gives you some flexibility to support your case.

  • Using 'BAPI_ACC_GL_POSTING_POST' to simulate FBS1

    Hi,
    I'm using the 'BAPI_ACC_GL_POSTING_POST' to do the same as tran saction FBS1, having a few problems with the code in terms of values I should be using.
    When using FBs1 the values I use are from the following 2 lines:
    Po Number, Item, DELv. Date, Descr., Undelvd. Val., GL ACCount, Cost centre, last field being internal order
    4500011114     10     23.05.2006     pallet of photo paper     5,000.00     476000     2-1000     
    And
    4500011114     50     20.05.2006     marketing assistants     500.00     417000                    400157
    Not sure what values I should use for the following
    documentheader-obj_key =  '000000000100000038'.
    documentheader-obj_type = 'BKPFF'.
    *documentheader-obj_key = '180000000010002004'.
    documentheader-obj_sys = 'RD1CLNT200'.
    documentheader-username = sy-uname.
    documentheader-header_txt = 'Test using BAPI'.
    documentheader-comp_code = '2000'.
    The error I get is:
    E   |RW                  |609   |Error in document: BKPFF 0000000001000000<
    and E   |F5                  |702   |Balance in transaction currency 
    The code is below:
    DATA:
    obj_type LIKE bapiache02-obj_type,
    obj_key LIKE bapiache02-obj_key,
    obj_sys LIKE bapiache02-obj_sys,
    documentheader LIKE bapiache08,
    accountgl LIKE bapiacgl08
    OCCURS 0 WITH HEADER LINE,
    currencyamount LIKE bapiaccr08
    OCCURS 0 WITH HEADER LINE,
    return LIKE bapiret2
    OCCURS 0 WITH HEADER LINE,
    extension1 LIKE bapiextc
    OCCURS 0 WITH HEADER LINE,
    t_edidd LIKE edidd OCCURS 0 WITH HEADER LINE,
    bapi_retn_info LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: error_flag.
    *documentheader-obj_type = 'BKPFF'.
    documentheader-obj_key =  '000000000100000038'.
    documentheader-obj_type = 'BKPFF'.
    *documentheader-obj_key = '180000000010002004'.
    documentheader-obj_sys = 'RD1CLNT200'.
    documentheader-username = sy-uname.
    documentheader-header_txt = 'Test using BAPI'.
    documentheader-comp_code = '2000'.
    *documentheader-ac_doc_no
    *documentheader-fisc_year = '2005'.
    documentheader-doc_date = '20060506'.
    documentheader-pstng_date = '20060506'.
    *documentheader-trans_date
    *documentheader-fis_period
    documentheader-doc_type = 'SA'.
    *documentheader-ref_doc_no
    *documentheader-compo_acc
    *documentheader-reason_rev
    accountgl-itemno_acc = '1'.
    accountgl-gl_account = '0000476000'.
    accountgl-comp_code = '2000'.
    accountgl-pstng_date = '20060506'.
    accountgl-doc_type = 'SA'.
    accountgl-profit_ctr = '2-1000'.
    *accountgl-
    APPEND accountgl.
    accountgl-itemno_acc = '2'.
    accountgl-gl_account = '0000476000'.
    accountgl-comp_code = '2000'.
    accountgl-pstng_date = '20060506'.
    accountgl-doc_type = 'SA'.
    accountgl-profit_ctr = '2-1000'.
    *accountgl-
    APPEND accountgl.
    accountgl-itemno_acc = '3'.
    accountgl-gl_account = '0000417000'.
    accountgl-comp_code = '2000'.
    accountgl-pstng_date = '20060506'.
    accountgl-doc_type = 'SA'.
    accountgl-profit_ctr = '0000400157'.
    APPEND accountgl.
    accountgl-itemno_acc = '4'.
    accountgl-gl_account = '0000417000'.
    accountgl-comp_code = '2000'.
    accountgl-pstng_date = '20060506'.
    accountgl-doc_type = 'SA'.
    accountgl-profit_ctr = '0000400157'.
    APPEND accountgl.
    *AC_DOC_NO
    *FISC_YEAR
    *FIS_PERIOD
    *accountgl-STAT_CON = 'X'.
    *REF_KEY_1
    *REF_KEY_2
    *REF_KEY_3
    *CUSTOMER
    *VENDOR_NO
    *ALLOC_NMBR
    *ITEM_TEXT
    *BUS_AREA
    *COSTCENTER
    *ACTTYPE
    *ORDERID
    *ORIG_GROUP
    *COST_OBJ
    *PROFIT_CTR
    *PART_PRCTR
    *WBS_ELEMENT
    *NETWORK
    *ROUTING_NO
    *ORDER_ITNO
    currencyamount-itemno_acc = '1'.
    currencyamount-currency = 'EUR'.
    currencyamount-amt_doccur = '5000.00'.
    APPEND currencyamount.
    currencyamount-itemno_acc = '2'.
    currencyamount-currency = 'EUR'.
    currencyamount-amt_doccur = '-5000.00'.
    APPEND currencyamount.
    currencyamount-itemno_acc = '3'.
    currencyamount-currency = 'EUR'.
    currencyamount-amt_doccur = '-500.00'.
    APPEND currencyamount.
    currencyamount-itemno_acc = '4'.
    currencyamount-currency = 'EUR'.
    currencyamount-amt_doccur = '-500.00'.
    APPEND currencyamount.
    call BAPI-function in this system
    CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
    EXPORTING
    documentheader = documentheader
    importing
    obj_type = obj_type
    obj_key = obj_key
    obj_sys = obj_sys
    TABLES
    accountgl = accountgl
    currencyamount = currencyamount
    return = return
    extension1 = extension1
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
      MESSAGE e999(re) WITH 'Problem occured'.
    ELSE.
      LOOP AT return.
        IF NOT return IS INITIAL.
          CLEAR bapi_retn_info.
          MOVE-CORRESPONDING return TO bapi_retn_info.
          IF return-type = 'A' OR return-type = 'E'.
            error_flag = 'X'.
          ENDIF.
          APPEND bapi_retn_info.
        ENDIF.
      ENDLOOP.
      IF error_flag = 'X'.
        MESSAGE e999(re) WITH 'Problem occured'.
        ROLLBACK WORK.
      ELSE.
       COMMIT WORK.
      ENDIF.
    ENDIF.
    Many Thanks
    Regards Sims

    hi,
    is there is an example of how to use FM POSTING_INTERFACE_DOCUMENT, I guess, one of my issues is trying to work out the parameters I need to use?
    Many Thanks
    Regards Sims

  • How to create bdc for fbs1 using both call transaction and session

    Hi Friends,
    i have one problem with tcode FBS1, i need to create a bdc program for both call transaction and session method using subroutine.
    first call transaction needs to execute if there is an error sesion has to execute. if u have code please forward.
    thanks in advance.
    chandramouli pothugunta

    where as in call transaction we can do error handling explictly.those errors  are stored in one file .this file will send to the error log(session method),i.e session log.
    in the above case we use both call transaction n session method at time in one program.sample code is below ,go through it .
    data : begin of itxk01 occurs 0,
    end of itxk01.
    data : bdcdata like itbdcdata occurs 0 with header line.
    data : itbdcmsgcoll like itbdcmsgcoll occurs 0 with header line,
             itxk01 like itxk01-dup occurs 0 with header line.
    call gui-upload.
    loop at itxk01.
    refresh itxk01.
    perform bdc-dynpr0 using 'prg' 'scr'
    perform bdc-dynfld using fnam fval
    call transaction 'xk01' using bdcdata mode 'a' update 's' messages into itbdcmsgcoll.
    if sy-subrc ne 0.
    append itxk01 into  itxk01-dup.
    endif.
    endloop.
    if not itxk01-dup[] is initial.
    refresh itck01.
    call bdc_open_group
    itxk01 = itxk01-dup.
    loop at itxk01.
    refresh itxk01.
    perform bdc-dynpr0 using 'prg' 'scr'
    perform bdc-dynfld using fnam fval
    call bdc-insert.
    endloop.
    call bdc-close-group.
    form bdc-dynpr0 using pr sc
    endform .
    form bdc-field  using fnam faval
    endform.
    this will help u.
    reward points for me
    kiran

  • Bdc using  FBS1 & F.81

    HI,
    how can i create this programm using call transaction there is two tcodes are used in recording .
    if it is done bu session method plz provide me codes for this.
    thanks jayant

    Hi,
    PERFORM bdc_transaction USING 'FBS1'.
    After calling 1st T-Code
    Clear BDC data.
    ie.
    clear i_bdcdata[].
    After clear itab continue as per yur way.
    otherwise
    use 1st T-Code itab  i_bdcdata .
    use 2st T-Code itab  i_bdcdata_01.
    Reward if usefull...
    Thanks,
    Durai.V

  • How to ensure that an accrual (FBS1) that was cleared and reversed/reset (FBRA) does not affect the books while being in open items (FAGLB03)?

    At first the user created an accrual using FBS1 for reversal on 5/1/2015.
    This created a clearing document.
    Then it was mistakenly reversed by the user for 5/1/2015 by using F.81
    This also created a clearing document.
    Based on advice in the following thread: Delete reverse accrual/defferal documents | SCN ,
    the user used FBRA to reset and reverse the document. We are unsure if the reset and reverse command was used or just the reset choice.
    Now the accrual value is in the respective accounts with an open status (i.e. red button). Does this mean that the entry has already been discarded and it won't affect the accounts? Or does one then use FB50 to reverse the effects of the accrual in the current and next month?

    Hi
    I guess that the user has not reverse the transaction as its still shows as open item in 30 /4 .. so I belive that you need to use fb50 or simply use FBR2 and enter the original entry no and the choose (generate reversal posting option )..
    regards
    mahmoud el nady

  • Accrual/deferral document (FBS1)

    Hi All,
    I had an accrual/deferral document(FBS1) posted in December, 2006 which was stated for reversal on 15th January, 2007. This reversal was to be done automatically by the system but due to some problem at that time, it didn't get reversed.
    I am using FB02 to remove the Reversal date. I got the message SUM OF ACCOUNTS DOES NOT EQUAL ZERO. I have changed some document with the same procedure. But only one gives me this message.
    I don't understand that I am not changing any amounts, then why its giving me above message.
    Any suggestions on how we can clear these open items?  I will assign points

    As you have noticed by system design that indeed the options for Park or Hold are not available
    (greyed out) for accrual documents (FBS1).
    The apparent reason is because an accural document requires a reversal
    date and a held document cannot handle a reversal posting.
    You may want to consider using the "post with reference" feature to
    simplify the tasks of reentering accrual/deferral documents which occur
    every month.
    In adition,  please read note 492006:
    'Special transactions such as FBB1, FBS1, FB41 cannot and must not be
    parked since subsequent processing using FBV0 is not possible.'
    Hope that helps.
    Jon

  • Cannot clear document posted with FBS1 and Reversed with F.81 in F-03

    We have recently turned on OIM for a Balance Sheet account and are in the process of clearing it.  The postings in this account were generated with FBS1 (Accrual/Deferral Document) and reversed with F.81.
    Majority of the documents displayed with FBL3N cleared no problem after open item management was turned on, however, there are a handful that are not displayed in F-03 (or F.13).
    Please consider the following when answering:
    OIM was turned on for the account using ZRFSEPA02 (Copy of the standard/not-delivered program for turning on OIM).
    All of the entries were reversed with F.81 and the header of the documents does not contain a "Reversal Date".
    I have already tried turning off OIM with ZRFSEPA03 and then turning it back on again with ZRFSEPA02.
    My settings in FS00 are correct for the GL Account.
    Hundreds of items were cleared.  There are 7 documents that don't appear in F-03 or F.13
    Also, please do not give me "Beginner level" information such as "Tick the OIM box for the GL Account in FS00" (You cannot turn on OIM in that manner for an account that has line items posted to it - I have been doing R/3 Configuration for 23 years, so I am an advanced Analyst in the FI/CO Area).
    Thanks - Back to searching OSS!

    Hi,
    Actually when report is executed we get following message
    Do not use the report program to set up open item management for the
    account.
    Create a new account with the correct account assignment. Post your
    items to the new account. If you want to use the original account
    number, you must bring the account balance to zero, change the account
    assignment, and repost the items. You can remove the old items by
    archiving the documents.
    Hence, it is risky to execute this report.
    Are you getting these documents in FB03 ?
    Regards,
    Tejas

  • How to use EXTENSION1 in BAPI_ACC_DOCUMENT_POST

    Hi,
    I am using BAPI_ACC_DOCUMENT_POST for posting documents similar to what is posted using FBS1 transaction code.
    I'm not able to populate reversal date in the BAPI_ACC_DOCUMENT_POST. There is a provision it seems using the EXTENSION1 tables parameter.
    Can anyone please tell me the procedure preferably a small piece of sample code in which I can know how to pass the Reversal Date using the EXTENSION1 structure.
    Also which process code is required to be used in the Business Transaction Events enhancements to implement this.
    Thanks and regards,
    Satyadev Dutta

    hi
    good
    go through this program which ll help you to give greater knowledge about use of EXTENSION1 in BAPI_ACC_DOCUMENT_POST
    ======================================
    report zbapi_factura_acreedor2 .
    *REPORT  acc_bapi_test_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
    thanks
    mrutyun^

  • Unable to clear documents using F-44

    Hi
    We have created  a journal entry using FBS1 and the same was reversed using F.81
    We are able to view these balance in this vendor account when we run FBL1N
    When we try clear this vendor using F-44 and enter document number..We get the following error -" No appropraite line item is contained in this document"
    Please help
    Regards
    Farheen

    Hi,
    Go to T.code F-44 and give Account,Company Code,select Document number Radio button and enter and give document number click on process open items
    Go to T.code F-04 and Clearing Incoming payments
    Thanks,
    Raviteja

  • Tax calculation in FBS1

    I posted a Document type ZY with tax code say U1 using FBS1 transaction. When i simulate it, i am able to see 2 or 3 line items for use tax.As per the requirement ZY doxument should not accrue tax when posted through FBS1.
    I am an ABAPer. I would like to know if there is any configuration changes to be done for this. I checked FTXP transaction and changed the tax rate to 0 for this tax code U1.It was not at all calculating the tax wherever that tax code is used. I have to restrict the tax calculation for ZY doucment.Is there any way to acheive this?
    Thanks,
    Aparna.

    Hi,
    In mm we use Pricing Procedure and Tax procedure both.
    2- So in MM can we use tax conditions ( Custom tax conditions) in MM calculation schema and determine the taxes ?
    Normally you use MM Pricing Procedure for Base price, discount, freight, packaging etc.  However for import scenario custom tax conditions like Basic Custom Duty, CVD, Cess, Sec cess is added in MM pricing procedure.
    The Tax procedure could be used for excise duties , CST, VAT, service tax.
    3- In MM if we use calculation scheme and tax procedure , then how tax base is determined for tax calculation ?
    If you check your tax procedure say taxinn you have condition type BASB and  routine for base value as 362 through which it calculates base value
    Where as in Sd you could use it in one.
    Thanks and regards

  • Using accrual engine for reversal of month end provisions

    Hello everyone,
    I am working on a requirement to set up accrual engine for automatic reversal of month end provisions (like electricity expense provision at month end which will be reversed on first day of next month).
    I understand that accrual engine is meant for handling accruals and deferrals. But having seen the manual option of FBS1 and F.81, I felt there must be an option in the accrual engine also to handle provisions and their reversal. Also, I saw some comments in this forum that using accrual engine it is possible to automatically reverse the postings.
    So I set up a test scenario in sandbox client with basic configuration for Manual Accruals (accrual type, methods, object category, number ranges, account determination)
    After that I created an accrual object which automatically created an FI document for the provision entry. So far it is fine and working as expected. Now, for reversing the document, I see two options:
    1) Reverse entire accrual run; or
    2) Reverse the accrual object.
    By reversing the accrual object, I was able to post a reversal FI document. I am not sure whether reversal of entire accrual run is right option since SAP help recommends to use this in case wrong key date was used.
    But both options require manual execution for reversal.
    Am I missing some other option? Is there any other option/setting in the accrual engine where it is possible to set up automatic reversal of a month end provision? Only if this is not feasible, I would look at other solutions (like FBS1+F.81 or FBS1+background job for F.81).
    Any inputs/pointers from the learned members will be highly appreciated.
    Thanks in advance,
    Raghu

    Hello Raghu,
    As far as I know, all clients I worked with preferred using "FBS1+background job for F.81" as they found this more flexible (adapt job variant and possible dynamic selection), easy to maintain and well understood by accountants (rather than using accrual type, methods, object category...)
    Tamim

Maybe you are looking for

  • Some incoming calls and messages display the phone number instead of name

    I recently upgraded from a Blackberry to an iPhone 4s. When I receive a call or SMS on the 4s it often displays only the phone number instead of the name at the top of the screen even though I the correct name and phone number are entered the correct

  • Prints too small and doesn't do margins correctly

    When printing any document, either form Microsoft Word or the internet, the font sizes come out too small and the margins do not match the settings. For example, I have my margins set to 1inch all the way around and yet the printer prints the paper m

  • Derivation Rule Problem - Sales Order

    Hi Friends I am SD consultant, i wrote this issue on SD forum also, but it is related to FICO. Please send me solution with complete path. When i create a new sals order and click enter, a small screen open and message displayed on it "Error occured

  • Putting music back into Itunes library after reformat? Help Macmuse!!!

    Reformated my hard drive and now I need to get my music back into mt iTunes library from my iPod. Tried using Macmuses idea from a previous thread but I get stuck when copying the music file from my iPod onto my hard drive. It'll start copying(and by

  • Controlling a label's text with Threads

    Hello, I couldn't find a specific topic about Java Threads and that's why i am writing here. I am developing a kind of strategy game and in one module i need to show the total amount of money the user has. - at first, when the game starts, the player