BAPI for FB01

Hi,
I am using bapi  BAPI_ACC_DOCUMENT_POST.. for FB01 but i am not getting Two fields
PstKy (Posting Key for the Next Line Item) and  SGL Ind (Special G/L Indicator for the Next Line Item)
is any other bapi avilabel for this...
or please give me sample bapi for FB01 or BAPI_ACC_DOCUMENT_POST.
<removed by moderator>
Thanks.
Edited by: Mike Pokraka on Aug 4, 2008 2:40 PM

Hi
The posting keys are setted by the BAPI in according to the item type (customer, vendor and G/L) and the sign of amount.
The BAPI usually uses the standard posting key: 01/11; 40/50, 21/31.
If it needs a different posting keys it needs to assign them to a certain operation key (field KOTSL): u can do it in the table T030B.
Anyway u should consider u can use the BTE RWBAPI01 in order to set own data into FI interfaces.
Max
Edited by: max bianchi on Jun 20, 2008 11:16 AM

Similar Messages

  • Which BAPI for FB01

    Hi,
    which is BAPI for FB01 which will help me to update following fields. like
    1) Doc Date
    2) Doc Type
    3) company Code
    4)Currency Key
    5)Referen
    6)Posting Key
    7) G/L account
    8) Speical G/L indicatior
    9)Profit Center
    10)Sales Doc. with sample code.
    thanks.

    Hi,
    it may help u.
    BAPI for FB01
    Thanks,
    Sree.

  • What is exact BAPI for FB01 transaction......

    Hi,
       Currently i got requirement to upload transactional data into FB01 using BAPI. I used BAPI_acc_gl_posting_post but it applicable only for GLs, but i want to upload Vendors, Customers, assets, Materials.. Please tell me apropriate BAPI for the requirement. Its urgent.
    Thanks in advance...........
    Regards,
    Chinna.

    Thanks Atish....
        I have written code using BAPI_ACC_DOCUMENT_POST. But it is not posting and it is not generating Object Key...
    Please go thru the code and tell the solutions....
    Thanks in Advance......
    REPORT  zk_fi_fb01                     .
    Data: v_objkey(20) type c.
    Data: Docheader type BAPIACHE09.
    Data: ACCOUNTGL LIKE BAPIACGL09 occurs 0 with header line,
         ACCOUNTRECEIVABLE like BAPIACAR09,
          ACCOUNTPAYABLE like BAPIACAP09 occurs 0 with header line,
          CURRENCYAMOUNT like BAPIACCR09 occurs 0 with header line,
          RETURN like BAPIRET2 occurs 0.
    Data: obj_typ like BAPIACHE09-OBJ_TYPE,
          OBJ_KEY like BAPIACHE09-OBJ_KEY,
          OBJ_SYS like BAPIACHE09-OBJ_SYS.
    Data: gv_belnr type belnr_d.
    Data:file_Na type String.
    Data: lsys like TBDLS-LOGSYS.
    *START OF SELECTION
    START-OF-SELECTION.
    *CALL FUNCTION 'NUMBER_GET_NEXT'
    EXPORTING
       nr_range_nr                  = '19'
       object                       = 'RF_BELEG' "'FIAA-BELNR'
      QUANTITY                      = '1'
      SUBOBJECT                     = '7777'
      TOYEAR                        = '2007'
      IGNORE_BUFFER                = ' '
    IMPORTING
      NUMBER                        = gv_belnr
    QUANTITY                      =
    RETURNCODE                    =
    *CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
    IMPORTING
      OWN_LOGICAL_SYSTEM                   = lsys
    EXCEPTIONS
      OWN_LOGICAL_SYSTEM_NOT_DEFINED       = 1
      OTHERS                               = 2
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    *concatenate gv_belnr '7777' '2007' into v_objkey.
    *Filling Document Header Details
    *Docheader-OBJ_TYPE = 'BEBD'.
    *Docheader-OBJ_key = V_objkey.
    *Docheader-OBJ_SYS = lsys.
    *docheader-BUS_ACT = 'RFBU'.
    Docheader-USERNAME = sy-uname.
    Docheader-COMP_CODE = '7777'.
    Docheader-DOC_DATE   = '20070725'.
    Docheader-PSTNG_DATE = '20070725'.
    Docheader-FISC_YEAR = '2007'.
    *DOCHEADER-OBJ_KEY_R = 'X'.
    Docheader-DOC_TYPE = 'KR'.
    *Item data for ACCOUNTGL
    ACCOUNTGL-ITEMNO_ACC = '0000000001'.
    ACCOUNTGL-GL_ACCOUNT = '0000000102'.         "99900
    ACCOUNTGL-DOC_TYPE   = 'KR'.
    ACCOUNTGL-COMP_CODE  = '7777'.
    ACCOUNTGL-FISC_YEAR  = '2007'.
    ACCOUNTGL-PSTNG_DATE = '20070725'.
    ACCOUNTGL-DE_CRE_IND = 'S'.
    append ACCOUNTGL.
    ACCOUNTGL-ITEMNO_ACC = '0000000002'.
    ACCOUNTGL-GL_ACCOUNT = '0000400002'.         "99900
    ACCOUNTGL-DOC_TYPE   = 'KR'.
    ACCOUNTGL-COMP_CODE  = '7777'.
    ACCOUNTGL-FISC_YEAR  = '2007'.
    ACCOUNTGL-PSTNG_DATE = '20070725'.
    ACCOUNTGL-DE_CRE_IND = 'H'.
    append ACCOUNTGL.
    *Account payable
    ACCOUNTPAYABLE-ITEMNO_ACC = '0000000001'.
    ACCOUNTPAYABLE-GL_ACCOUNT = '0000000102'.
    ACCOUNTPAYABLE-COMP_CODE  = '7777'.
    append ACCOUNTPAYABLE.
    ACCOUNTPAYABLE-ITEMNO_ACC = '0000000002'.
    ACCOUNTPAYABLE-GL_ACCOUNT = '0000400002'.
    ACCOUNTPAYABLE-COMP_CODE  = '7777'.
    append ACCOUNTPAYABLE.
    *Currency Amount
    CURRENCYAMOUNT-ITEMNO_ACC = '0000000001'.
    CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
    MOVE 1000 TO CURRENCYAMOUNT-AMT_DOCCUR.
    Append CURRENCYAMOUNT.
    CURRENCYAMOUNT-ITEMNO_ACC = '0000000002'.
    CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
    MOVE '1000-' to CURRENCYAMOUNT-AMT_DOCCUR.
    Append CURRENCYAMOUNT.
    clear CURRENCYAMOUNT.
    clear ACCOUNTGL.
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader          = Docheader
      CUSTOMERCPD             =
      CONTRACTHEADER          =
    IMPORTING
       OBJ_TYPE                =  obj_typ
       OBJ_KEY                 =  obj_key
       OBJ_SYS                 =  obj_sys
      tables
       ACCOUNTGL               = ACCOUNTGL
      ACCOUNTRECEIVABLE       =
      ACCOUNTPAYABLE          = ACCOUNTPAYABLE
      ACCOUNTTAX              =
        currencyamount          = CURRENCYAMOUNT
      CRITERIA                =
      VALUEFIELD              =
      EXTENSION1              =
        return                  = return.
    if sy-subrc = 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = ' '.
    endif.
    if sy-subrc = 0.
    WRITE: / OBJ_KEY,
             OBJ_TYP,
             OBJ_SYS.
    endif.

  • BDC OR BAPI - FOR FB01 T-CODE

    Dear all,
    I am facing one problem for upload the data from excel to FB01 T-code..
    here my excel sheet is like this
    Doc Date Posting date Doc type Posting key GL account Amount Posting key GL account Amount
    03.04.2010     03.04.2010          40     60011     8391                          50 & GL & TAX again repeate....
    04.04.2010     04.04.2010          40     60011     5496     40     60012     2198   50 & GL & TAX
    05.04.2010     05.04.2010          40     60011     7887     40     60012     0        50 & GL & TAX
    How should i do the program.....
    plz give me any bapi program or bdc program for this type excel sheet....
    plz help me..
    Regards
    margani

    Posting FI documents is one of the more frequently discussed topics here, please search before posting. Do not expect complete solutions for requirements, always work yourself first.
    Thread locked.
    Thomas

  • Reg. BAPI for FB01

    Hi Friends,
       I tried to create accounting document from the babi 'BAPI_ACC_DOCUMENT_POST'. In a one line item i need to give withholding tax information. How to pass this value to this bapi. I passed the withholding tax info in the ACCOUNTTAX parameter. But that is not working.
    thanks in advance.
    regards
    sritkanth

    go through this code
    data:gt_accountgl type table of bapiacgl09 with header line,
         gt_accountpayable type table of bapiacap09 with header line,
         gt_currencyamount type table of bapiaccr09 with header line,
         gt_return type table of bapiret2 with header line.
    data:wa_documentheader type bapiache09,
           vcounter type i.
    tables:bdcmsgcoll.
      TABLE TO READ FILE DATA
    data:   begin of gt_uploadfile occurs 0,
           input(200) type c,
           end of gt_uploadfile,
             TABLE FOR DOWNLOAD FILE
           begin of gt_downloadfile occurs 0,
            output type string,
           end of gt_downloadfile,
         TO HOLD HEADER DATA
           begin of gt_header occurs 0,
           counter(1),
           identifier(2),
           bukrs(5),
           accnt(10),
           bldat like sy-datum,
           budat like sy-datum,
           wrbtr(10),
           end of gt_header,
           begin of gt_item occurs 0,
           counter(1),
           identifier(2),
           hkont(10),
           wrbtr(10),
           kostl(10),
           end of gt_item,
        INTERNAL TABLE TOI DISPLAY ERRORS.
          begin of gt_summery occurs 0,
          identifier(2),
          bukrs(5),
          accnt(10),
          msgv1 like bdcmsgcoll-msgv2,
          msgv2 like bdcmsgcoll-msgv2,
          msgnr type string,
          end of gt_summery,
          v_upload type string,
          v_download type string,
          msg type string,
          v_hkont type string,
          v_kostl type string,
          date1 type datum,
          date2 type datum,
    v_refkey like   bapiache09-obj_key.
    *CREATING SELECTION CREITERIA
    parameters:p_gfile like ibipparms-path,
               p_test as checkbox.
              P_DFILE LIKE IBIPPARMS-PATH.
    at selection-screen on value-request for p_gfile.
      perform f4help_upload.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_DFILE.
    PERFORM F4HELP_DOWNLOAD.
    start-of-selection.
      v_upload = p_gfile.
    V_DOWNLOAD = P_DFILE.
      perform uploadfile.
      perform  sendinto_head_item.
      perform buildbapi.
    end-of-selection.
      perform disp_report.
    *&      Form  F4HELP
          text
    -->  p1        text
    <--  p2        text
    form f4help_upload .
      call function 'F4_FILENAME'
       exporting
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
         field_name          = 'P_GFILE'
       importing
         file_name           = p_gfile
    endform.                                                    " F4HELP
    *&      Form  F4HELP_DOWNLOAD
          text
    -->  p1        text
    <--  p2        text
    form f4help_download .
    CALL FUNCTION 'F4_FILENAME'
      EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
        FIELD_NAME          = 'P_DFILE'
      IMPORTING
        FILE_NAME           = P_DFILE
    endform.                    " F4HELP_DOWNLOAD
    *&      Form  UPLOADFILE
          text
    -->  p1        text
    <--  p2        text
    form uploadfile .
      call function 'GUI_UPLOAD'
        exporting
          filename                      = v_upload
      FILETYPE                      = 'ASC'
    HAS_FIELD_SEPARATOR           = '|'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            = VIRUS_SCAN_PROFILE
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    = FILELENGTH
      HEADER                        = HEADER
        tables
          data_tab                      = gt_uploadfile
       exceptions
         file_open_error               = 1
         file_read_error               = 2
         no_batch                      = 3
         gui_refuse_filetransfer       = 4
         invalid_type                  = 5
         no_authority                  = 6
         unknown_error                 = 7
         bad_data_format               = 8
         header_not_allowed            = 9
         separator_not_allowed         = 10
         header_too_long               = 11
         unknown_dp_error              = 12
         access_denied                 = 13
         dp_out_of_memory              = 14
         disk_full                     = 15
         dp_timeout                    = 16
         others                        = 17
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " UPLOADFILE
    *&      Form  SENDINTO_HEAD_ITEM
          text
    -->  p1        text
    <--  p2        text
    form sendinto_head_item .
      loop at gt_uploadfile.
        if gt_uploadfile-input+0(1) = '1'.
          split gt_uploadfile-input at cl_abap_char_utilities=>horizontal_tab
          into
                gt_header-counter
                gt_header-identifier
                gt_header-bukrs
                gt_header-accnt
                gt_header-bldat
                gt_header-budat
                gt_header-wrbtr.
          append gt_header.
          clear gt_header.
        else.
          split gt_uploadfile-input at cl_abap_char_utilities=>horizontal_tab
       into   gt_item-counter
              gt_item-identifier
              gt_item-hkont
              gt_item-wrbtr
              gt_item-kostl.
          append gt_item.
          clear gt_item.
        endif.
       BREAK-POINT.
      endloop.
    endform.                    " SENDINTO_HEAD_ITEM
    *&      Form  BUILDBAPI
          text
    -->  p1        text
    <--  p2        text
    form buildbapi .
      loop at gt_header.
       GT_HEADER-BUDAT = sy-datum - 5.
       GT_HEADER-BLDAT = sy-datum.
        vcounter = 1.
        gt_header-wrbtr = gt_header-wrbtr  * -1.
    *FILLING INPORTING PARAMETER STRUCTURE.
        wa_documentheader-comp_code = gt_header-bukrs.
        wa_documentheader-doc_date = gt_header-bldat.
        wa_documentheader-pstng_date = gt_header-budat.
        wa_documentheader-username = sy-uname.
        wa_documentheader-bus_act = 'RFBU'.
        wa_documentheader-doc_type = 'KR'.
        gt_accountpayable-itemno_acc = vcounter.
        gt_accountpayable-vendor_no =  gt_header-accnt.
        append gt_accountpayable.
        clear gt_accountpayable.
        gt_currencyamount-itemno_acc = vcounter.
        gt_currencyamount-currency = 'INR'.
        gt_currencyamount-amt_doccur = gt_header-wrbtr.
        append gt_currencyamount.
        clear gt_currencyamount.
        loop at gt_item where identifier = gt_header-identifier.
          vcounter = vcounter + 1.           .
          gt_accountgl-itemno_acc = vcounter.
          call function 'CONVERSION_EXIT_ALPHA_INPUT'
            exporting
              input  = gt_item-hkont
            importing
              output = gt_item-hkont.
          gt_accountgl-gl_account = gt_item-hkont.
          call function 'CONVERSION_EXIT_ALPHA_INPUT'
            exporting
              input  = gt_item-kostl
            importing
              output = gt_item-kostl.
          gt_accountgl-costcenter = gt_item-kostl.
          gt_accountgl-pstng_date = gt_header-budat.
          append gt_accountgl.
          clear gt_accountgl.
          gt_currencyamount-itemno_acc = vcounter.
          gt_currencyamount-currency = 'INR'.
          gt_currencyamount-amt_doccur = gt_item-wrbtr.
          append gt_currencyamount.
          clear gt_currencyamount.
        endloop.
        call function 'BAPI_ACC_DOCUMENT_POST'
          exporting
            documentheader          = wa_documentheader
          CUSTOMERCPD             = CUSTOMERCPD
          CONTRACTHEADER          = CONTRACTHEADER
         importing
          OBJ_TYPE                = OBJ_TYPE
           obj_key                 =  v_refkey
          OBJ_SYS                 = OBJ_SYS
          tables
           accountgl               = gt_accountgl
          ACCOUNTRECEIVABLE       = ACCOUNTRECEIVABLE
           accountpayable          = gt_accountpayable
          ACCOUNTTAX              = ACCOUNTTAX
            currencyamount          = gt_currencyamount
          CRITERIA                = CRITERIA
          VALUEFIELD              = VALUEFIELD
          EXTENSION1              = EXTENSION1
            return                  = gt_return
          PAYMENTCARD             = PAYMENTCARD
          CONTRACTITEM            = CONTRACTITEM
          EXTENSION2              = EXTENSION2
          REALESTATE              = REALESTATE
        break-point.
        if p_test is initial.
          call function 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT          = WAIT
    IMPORTING
      RETURN        = RETURN
        endif.         .
      endloop.
    endform.                    " BUILDBAPI
    *&      Form  disp_report
          text
    -->  p1        text
    <--  p2        text
    form disp_report .
      loop at gt_return.
        write:/ gt_return-type,
       gt_return-id,
       gt_return-number,
       gt_return-message,
       gt_return-log_no,
       gt_return-log_msg_no,
       gt_return-message_v1,
       gt_return-message_v2,
       gt_return-message_v3,
       gt_return-message_v4,
       gt_return-parameter,
       gt_return-row,
       gt_return-field,
       gt_return-system.
      endloop..
    endform.                    " disp_report
    reward points if helpful........

  • Intercompany posting issue through bapi for FB01

    Hi,
    I am facing an issue for intercompany document posting.
    I have created a Z program in which I am using BAPI_ACC_DOCUMENT_POST for posting. The document is posted if we post within same company code. But for intercompany it gives error saying: 'G/L account XXX requires a valid tax code' even if for that account tax category is *.
    Please share your valuable inputs on this issue.

    Hi
    The posting keys are setted by the BAPI in according to the item type (customer, vendor and G/L) and the sign of amount.
    The BAPI usually uses the standard posting key: 01/11; 40/50, 21/31.
    If it needs a different posting keys it needs to assign them to a certain operation key (field KOTSL): u can do it in the table T030B.
    Anyway u should consider u can use the BTE RWBAPI01 in order to set own data into FI interfaces.
    Max
    Edited by: max bianchi on Jun 20, 2008 11:16 AM

  • Require BAPI for creating outgoing Invoice (Accounts Payable).

    Hi Friends,
       As per our requirement, we need to create an outgoing Invoice (ie., Accounts payable). Is there any BAPI available to create outgoing invoice?
    Thanks in advance,
    Sai.

    BAPI_ACC_DOCUMENT_POST try with this.
    see for sample code in this thread : What is exact BAPI for FB01 transaction......
    Reward points if useful
    Madhavi

  • Bapi for the transaction FBRA, FB08, FB01 anf FD02

    hi,
    can any one please help me with BAPI for the following transaction?
    FBRA - reset cleared items
    FB08 - reversal of the documents
    FB01 - post documents
    FD02 - change customer.
    regards kriti

    Hi
    Copy the below  program in se38 and execute the program and along with the transaction code you need to specify the program name to obtain the program name all you have to do is execute the t-code and go to system--> status and copy the program name from the screen and paste it in the above program.
    tables : tstc,
             tadir,
             modsapt,
             modact,
             trdir,
             tfdir,
             enlfdir,
             sxs_attrt ,
             tstct.
    data :
       jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode,
    p_pgmna like tstc-pgmna .
    data wa_tadir type tadir.
    start-of-selection.
      if not p_tcode is initial.
        select single * from tstc where tcode eq p_tcode.
      elseif not p_pgmna is initial.
        tstc-pgmna = p_pgmna.
      endif.
      if sy-subrc eq 0.
        select single * from tadir
        where pgmid = 'R3TR'
        and object = 'PROG'
        and obj_name = tstc-pgmna.
        move : tadir-devclass to v_devclass.
        if sy-subrc ne 0.
          select single * from trdir
          where name = tstc-pgmna.
          if trdir-subc eq 'F'.
            select single * from tfdir
            where pname = tstc-pgmna.
            select single * from enlfdir
            where funcname = tfdir-funcname.
            select single * from tadir
            where pgmid = 'R3TR'
            and object = 'FUGR'
            and obj_name eq enlfdir-area.
            move : tadir-devclass to v_devclass.
          endif.
        endif.
        select * from tadir into table jtab
        where pgmid = 'R3TR'
        and object in ('SMOD', 'SXSD')
        and devclass = v_devclass.
        select single * from tstct
        where sprsl eq sy-langu
        and tcode eq p_tcode.
        format color col_positive intensified off.
        write:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        skip.
        if not jtab[] is initial.
          write:/(105) sy-uline.
          format color col_heading intensified on.
          * sorting the internal table
       sort jtab by object.
          data : wf_txt(60) type c,
          wf_smod type i ,
          wf_badi type i ,
          wf_object2(30) type c.
          clear : wf_smod, wf_badi , wf_object2.
          * get the total smod.
          loop at jtab into wa_tadir.
            at first.
              format color col_heading intensified on.
              write:/1 sy-vline,
              2 'Enhancement/ Business Add-in',
              41 sy-vline ,
              42 'Description',
              105 sy-vline.
              write:/(105) sy-uline.
            endat.
            clear wf_txt.
            at new object.
              if wa_tadir-object = 'SMOD'.
                wf_object2 = 'Enhancement' .
              elseif wa_tadir-object = 'SXSD'.
                wf_object2 = ' Business Add-in'.
              endif.
              format color col_group intensified on.
              write:/1 sy-vline,
              2 wf_object2,
              105 sy-vline.
            endat.
            case wa_tadir-object.
              when 'SMOD'.
                wf_smod = wf_smod + 1.
                select single modtext into wf_txt
                from modsapt
                where sprsl = sy-langu
                and name = wa_tadir-obj_name.
                format color col_normal intensified off.
              when 'SXSD'.
                * for badis
             wf_badi = wf_badi + 1 .
                select single text into wf_txt
                from sxs_attrt
                where sprsl = sy-langu
                and exit_name = wa_tadir-obj_name.
                format color col_normal intensified on.
            endcase.
            write:/1 sy-vline,
            2 wa_tadir-obj_name hotspot on,
            41 sy-vline ,
            42 wf_txt,
            105 sy-vline.
            at end of object.
              write : /(105) sy-uline.
            endat.
          endloop.
          write:/(105) sy-uline.
          skip.
          format color col_total intensified on.
          write:/ 'No.of Exits:' , wf_smod.
          write:/ 'No.of BADis:' , wf_badi.
        else.
          format color col_negative intensified on.
          write:/(105) 'No userexits or BADis exist'.
        endif.
      else.
        format color col_negative intensified on.
        write:/(105) 'Transaction does not exist'.
      endif.
    at line-selection.
      data : wf_object type tadir-object.
      clear wf_object.
      get cursor field field1.
      check field1(8) eq 'WA_TADIR'.
      read table jtab with key obj_name = sy-lisel+1(20).
      move jtab-object to wf_object.
      case wf_object.
        when 'SMOD'.
          set parameter id 'MON' field sy-lisel+1(10).
          call transaction 'SMOD' and skip first screen.
        when 'SXSD'.
          set parameter id 'EXN' field sy-lisel+1(20).
          call transaction 'SE18' and skip first screen.
      endcase.
    Regards
    Pavan

  • BAPI for transaction FB01 with account posting key

    Hi,
    I have to use a BAPI for registering Invoices into the FI module through the FB01 transaction.
    I am trying to use the standard BAPI: BAPI_ACC_DOCUMENT_POST
    The problem is that this BAPI does not manage the account posting key (field BSCHL).
    Could anyone provide help?
    Thank you very much in advance.

    It is happening here in the BAPI
    CALL FUNCTION 'FI_GET_POSTING_KEY'
             EXPORTING
                  i_ktosl       = gs_accit-ktosl
             IMPORTING
                  e_bschs       = ld_bschs
                  e_bschh       = ld_bschh
                  e_umskz       = ld_umskz
             EXCEPTIONS
                  error_message = 1.
    As max pointed out, it is dependent on the transaction key(KTOSL).
    Srinivas

  • What is the BAPI name for FB01

    Hi all,
            Currently i got requirement on Transactional data uploding to FB01 transaction thru BAPI.
    I found the BAPI ' BAPI_ACC_GL_POSTING_POST'. But in this iam unable to find the Posting key(BSCHL) at line item level. If it is the exact BAPI tell me how to get the posting key for it. Please tell me the solution  its urgent.
    Thanks all,
    Chinnamurthy.

    There are many
    ACC4                           FI/CO: BAPIs for UPDATE                                              
    BAPI_ACC_BILLING_POST          Accounting: Post Billing Document (OAG: LOAD RECEIVABLE)             
    BAPI_ACC_EMPLOYEE_EXP_POST     Accounting: Post G/L Acct Assignment for HR Posting (OAG: POST JOURNAL
    BAPI_ACC_EMPLOYEE_PAY_POST     Accounting: Post Vendor Acct Assignment for HR Posting (OAG: LOAD PAYA
    BAPI_ACC_EMPLOYEE_REC_POST     Accounting: Post Cust. Acct Assigt for HR Posting (OAG: LOAD RECEIVABL
    BAPI_ACC_GL_POSTING_POST       Accounting: General G/L Account Posting                              
    BAPI_ACC_GOODS_MOVEMENT_POST   Accounting: Post Goods Movement (OAG: POST JOURNAL)                  
    BAPI_ACC_INVOICE_RECEIPT_POST  Accounting: Post Invoice Receipt (OAG: LOAD PAYABLE)                 
    BAPI_ACC_PURCHASE_ORDER_POST   Accounting: Post Purchase Order                                      
    BAPI_ACC_PURCHASE_REQUI_POST   Accounting: Post Purchase Requisition                                
    BAPI_ACC_SALES_ORDER_POST      Accounting: Post Sales Order                                         
    BAPI_ACC_SALES_QUOTA_POST      Accounting: Post Customer Quotation                                  
    BAPI_ACC_TRAVEL_POST           Accounting: Post Trip        
    The Function Module BAPI_ACC_GL_POSTING_POST is for General G/L account, you don't have to provide the posting key, but an amount positive or negative (Credit);
    Regards

  • BAPI or Batch Input Program for FB01

    Hi all!
    I am trying to post invoice through transaction code FB01, i need a standard BAPI program or Batch Input Program for FB01 (except recording).
    thanks.

    Hello,
    In the 'Specify Files' step,
    1. give some short file name (about 20 Characters )
    2. In the File option for 'Converted Data' option check the Logical path / logical file entries. Normally it is LSMW ( Logical Path ) and the same File name for logical file. If you do not have a Logical path 'LSMW' create one in Tx. FILE'.
    3. Please note that you need authority to save the file on application server ( You can see the files on Appl. Server in Tx. AL11 ).
    Let me know how it goes on!
    Regds, Murugesh AS
    Message was edited by: Murugesh Arcot
    Message was edited by: Murugesh Arcot

  • Bapi error for fb01  transaction

    hai friends
    iam using      *bapi_acc_document_post  *
    for posting amount inplace fb01 .
    this bapi is called in module program .
    is it write bapi for this
    or
    else can i use any other bapi for this
    if it right bapi
    how can pass the parameeters to this
    what are the maditary fields in this bapi
    hoe can i pass this values to this bapi.
    pls tell me friends
    thanks
    with regards
    srikanth vipparla

    hai friend
    its ok
    but iam not fiending the documentation for this function module
    so pls helpme the maditari parameters in this function module .
    and iam using 4.6b  .
    or just post me the documentation pls .
    thanks
    ssrikanth vipparla

  • Bapi for vendor non po invoice parking

    Hello,
    We have a requirement to Create a Non PO Invoice and also parking invoice.
    I could able to create Vendor Invoice (Non PO) using BAPI: BAPI_ACC_DOCUMENT_POST.
    But i am unable to find a BAPI for Parking the Vendor Invoice (Non PO). When i try to use BDC on FB01 transaction for creating Parking Vendor Invoice, it is throwing an error that "Parking Invoice creation is not allowed in batch input".
    Can anybody help me for creating Parking Invoice (Non PO).
    Note: There is a BAPI: BAPI_INCOMINGINVOICE_PARK, which wont support for Non PO Invoice creation. It is PO based.
    Thanks in Advance for your support.
    Thanks & Regards,
    Sreedhar.

    Hi,
    Please see the given link, hope It will help you.
    Re: BAPI to Park the Invoice Document
    Regards,
    Shamma

  • BAPI for post Tax Amount

    Hi,
    Please tell me BAPI for post Tax Amount.
    Which tcode use for Post tax code, is it FB01 or FB60.
    Regards
    Jana

    Hi,
    Use BAPI_ACC_DOCUMENT_POST
    TCodes
    FB41    Post Tax Payable
    FB05    Post with Clearing
    FB01    Post Document
    Edited by: Neenu Jose on Nov 18, 2008 1:15 PM
    Edited by: Neenu Jose on Nov 18, 2008 1:16 PM
    Edited by: Neenu Jose on Nov 18, 2008 1:17 PM
    Edited by: Neenu Jose on Nov 18, 2008 1:18 PM

  • Bapi for posting FI documents for new General ledger accounting

    Hi,
    We have a requirement for posting FI documents for new General ledger i.e for transaction FB01L. Is there any BAPI for the same so that BDC can be avoided.
    The BAPI "BAPI_ACC_DOCUMENT_POST" is used for FB01. Can we use it for FB01L?? As in this BAPI ledger group field is not there. Please suggest.
    Thanks in advance.
    Regards,
    Gaurav

    Hi Sandra,
    Solved myself using the below options.
    If you are using the BAPI - BAPI_ACC_GL_POSTING_POST, you can pass accounting principle field in importing structure BAPIACHE08. The relation between Legder group & accounting principle has to be configured in SPRO by FICO consultant. Once they configured in the system, get the accounting principles and then pass the accounting principle .
    Code:  s_documentheader-acc_principle  = wa_header-acc_principle.
    Reward me if this will help you.
    Thanks,
    Yerukala Setty

Maybe you are looking for