Function 'POSTING_INTERFACE_DOCUMENT'

Hello,
I'm using this function , and I have got it to work, but what I am now trying to do is add multiple lines and headers to the Internal table  FTPOST, being passed into the function.
The way I enter it at the momment is like below and it does not work, how do I match the Headers to the line items, I understand that the headers have a type 'K'
and the line items type'P'. And each has a counter,
Do I increment the line counter for new headers or not, please see how I have doen it, which does not seem to work
  1  STYPE COUNT FNAM           
    P    |004  |BSEG-SGTXT      
  1 K    |001  |BKPF-BLDAT      
  2 K    |001  |BKPF-BLART      
  3 K    |001  |BKPF-BUKRS      
  4 K    |001  |BKPF-BUDAT      
  5 K    |001  |BKPF-WAERS      
  6 K    |001  |BKPF-XBLNR      
  7 K    |001  |BKPF-STGRD      
  8 K    |001  |BKPF-STODT      
  9 K    |001  |FS006-DOCID     
10 P    |001  |RF05A-NEWBS     
11 P    |001  |BSEG-HKONT      
12 P    |001  |BSEG-WRBTR      
13 P    |001  |BSEG-MWSKZ      
14 P    |001  |BSEG-ZUONR      
15 P    |001  |BSEG-SGTXT      
16 P    |001  |BDC_SUBSCR      
17 P    |001  |DKACB-FMORE     
18 P    |001  |COBL-KOSTL      
19 P    |001  |COBL-FIPOS      
20 P    |001  |COBL-AUFNR 
          002
.....     003
then for the next header and records    
  1 K    |002  |BKPF-BLART      
  2 K    |002  |BKPF-BUKRS      
  3 K    |003  |BKPF-BUDAT 
and line items
11 P    |001  |BSEG-HKONT      
12 P    |001  |BSEG-WRBTR      
13 P    |001  |BSEG-MWSKZ 
I think it is the line items in the second batch whic is causing the confusion.
Thanks
<

for the colleagues that could not use this function with multiple documents yet.
The answer was:
1- first, call the start interface
CALL FUNCTION 'POSTING_INTERFACE_START'
    EXPORTING
      i_client           = sy-mandt
      i_function         = 'B' "C=Call/B=BDC
      i_group            = pv_goup "Generar Juego de datos
      i_mode             = modo
      i_update           = 'S'
      i_user             = sy-uname
      i_xbdcc            = 'X'     "Generar Juego de datos
    EXCEPTIONS
      client_incorrect   = 1
      function_invalid   = 2
      group_name_missing = 3
      mode_invalid       = 4
      update_invalid     = 5
      OTHERS             = 6.
2- call the posting function n times as documents you need
CALL FUNCTION 'POSTING_INTERFACE_DOCUMENT'
3- finally, Close de interface
CALL FUNCTION 'POSTING_INTERFACE_END'
    EXPORTING
      i_bdcimmed              =  space "'X' "Ejecutar el juego de datos solo para BDC
    EXCEPTIONS
      session_not_processable = 1
      OTHERS                  = 2.
Hope it will be useful

Similar Messages

  • POSTING_INTERFACE_DOCUMENT for FBS!

    Hi,
    I've written a program to simulate transaction FBS1 using
    FUNCTION 'POSTING_INTERFACE_DOCUMENT', it goes through with sy-subrc set 0, but I cannot see the document number in  T_BLNTAB, the code is below, I think I have all the right Parameters.
    DATA: i_msgid LIKE sy-msgid,
          i_msgno LIKE sy-msgno,
          i_msgty LIKE sy-msgty,
          i_msgv1 LIKE sy-msgv1,
          i_msgv2 LIKE sy-msgv2,
          i_msgv3 LIKE sy-msgv3,
          i_msgv4 LIKE sy-msgv4,
          i_subrc LIKE sy-subrc.
    DATA: ftpost LIKE ftpost  OCCURS 0  WITH HEADER LINE,
          fttax  LIKE fttax   OCCURS 1  WITH HEADER LINE,
          blntab LIKE blntab  OCCURS 1  WITH HEADER LINE.
    blntab-BELNR =
    *blntab-BUKRS = 2000.
    *blntab-GJAHR =
    Header Information first
    ftpost-stype ='K'.
    ftpost-count = 1.
    ftpost-fnam = 'BKPF-BLDAT'.
    ftpost-fval = '310506'.
    ftpost-stype ='K'.
    ftpost-count = 1.
    ftpost-fnam = 'BKPF-BLART'.
    ftpost-fval = 'SA'.
    ftpost-stype ='K'.
    ftpost-count = 1.
    ftpost-fnam = 'BKPF-BUKRS' .
    ftpost-fval = '2000'  .
    ftpost-stype ='K'.
    ftpost-count = 1.
    ftpost-fnam = 'BKPF-BUDAT' .
    ftpost-fval =   '310506' .
    ftpost-stype ='K'.
    ftpost-count = 1.
    ftpost-fnam = 'BKPF-WAERS' .
    ftpost-fval =   'GBP' .
    ftpost-stype ='K'.
    ftpost-count = 1.
    ftpost-fnam = 'BKPF-XBLNR ' .
    ftpost-fval =   'ACCRUAL POST' .
    ftpost-stype ='K'.
    ftpost-count = 1.
    ftpost-fnam = 'BKPF-STGRD' .
    ftpost-fval =  '05' .
    ftpost-stype ='K'.
    ftpost-count = 1.
    ftpost-fnam = 'BKPF-STODT' .
    ftpost-fval =  '010606'.
    ftpost-stype ='K'.
    ftpost-count = 1.
    ftpost-fnam = 'FS006-DOCID' .
    ftpost-fval =  '*'.
    ftpost-stype ='K'.
    ftpost-count = 1.
    ftpost-fnam = 'RF05A-NEWBS' .
    ftpost-fval =  '40'.
    ftpost-stype ='K'.
    ftpost-count = 1.
    ftpost-fnam = 'RF05A-NEWKO' .
    ftpost-fval =   '476000'.
    *Line Items Now
    ftpost-stype ='P'.
    ftpost-count = 1.
    ftpost-fnam = 'BSEG-WRBTR' .
    ftpost-fval =     '5000' .
    ftpost-stype ='P'.
    ftpost-count = 1.
    ftpost-fnam = 'BSEG-MWSKZ' .
    ftpost-fval =    'v0' .
    ftpost-stype ='P'.
    ftpost-count = 1.
    ftpost-fnam = 'BSEG-SGTXT' .
    ftpost-fval =  'pallet of photo paper' .
    ftpost-stype ='P'.
    ftpost-count = 1.
    ftpost-fnam = 'BDC_SUBSCR' .
    ftpost-fval =  'SAPLKACB' .
    ftpost-stype ='P'.
    ftpost-count = 1.
    ftpost-fnam = 'DKACB-FMORE' .
    ftpost-fval =    'X'.
    ftpost-stype ='P'.
    ftpost-count = 1.
    ftpost-fnam = 'COBL-KOSTL' .
    ftpost-fval =    '2-1000 '.
    ftpost-stype ='P'.
    ftpost-count = 1.
    ftpost-fnam = 'COBL-FIPOS ' .
    ftpost-fval =    ''.
    ftpost-stype ='P'.
    ftpost-count = 1.
    ftpost-fnam = 'BSEG-DMBE2' .
    ftpost-fval =  '70.42' .
    ftpost-stype ='P'.
    ftpost-count = 1.
    ftpost-fnam = 'RF05A-NEWBS' .
    ftpost-fval =      '40'  .
    ftpost-stype ='P'.
    ftpost-count = 1.
    ftpost-fnam = 'RF05A-NEWKO' .
    ftpost-fval =   '417000'.
    Item no. 2
    ftpost-stype ='P'.
    ftpost-count = 2.
    ftpost-fnam = 'BSEG-WRBTR' .
    ftpost-fval =    '500' .
    ftpost-stype ='P'.
    ftpost-count = 2.
    ftpost-fnam = 'BSEG-MWSKZ' .
    ftpost-fval =    'V0'.
    ftpost-stype ='P'.
    ftpost-count = 2.
    ftpost-fnam = 'BSEG-SGTXT' .
    ftpost-fval =    'marketing assistants'.
    ftpost-stype ='P'.
    ftpost-count = 2.
    ftpost-fnam = 'DKACB-FMORE' .
    ftpost-fval =  'X'.
    ftpost-stype ='P'.
    ftpost-count = 2.
    ftpost-fnam = 'COBL-AUFNR' .
    ftpost-fval =  ' 400157 '.
    ftpost-stype ='P'.
    ftpost-count = 2.
    ftpost-fnam = 'BSEG-DMBE2' .
    ftpost-fval =  '7.04'.
    ftpost-stype ='P'.
    ftpost-count = 2.
    ftpost-fnam = 'RF05A-NEWBS' .
    ftpost-fval =  '50' .
    ftpost-stype ='P'.
    ftpost-count = 2.
    ftpost-fnam = 'RF05A-NEWKO' .
    ftpost-fval =  '89000' .
    Next Line
    ftpost-stype ='P'.
    ftpost-count = 3.
    ftpost-fnam = 'BSEG-WRBTR' .
    ftpost-fval =   '5500'.
    ftpost-stype ='P'.
    ftpost-count = 3.
    ftpost-fnam = 'BSEG-MWSKZ' .
    ftpost-fval =   'V0' .
    ftpost-stype ='P'.
    ftpost-count = 3.
    ftpost-fnam = 'BSEG-SGTXT'  .
    ftpost-fval =   'accrual posting bala' .
    *Next Line
    ftpost-stype ='P'.
    ftpost-count = 4.
    ftpost-fnam = 'BSEG-WRBTR' .
    ftpost-fval =   '5500'.
    ftpost-stype ='P'.
    ftpost-count = 4.
    ftpost-fnam = 'BSEG-MWSKZ' .
    ftpost-fval =  'V0' .
    ftpost-stype ='P'.
    ftpost-count = 4.
    ftpost-fnam = 'BSEG-SGTXT' .
    ftpost-fval =  'accrual posting bala' .
    ftpost-stype ='P'.
    ftpost-count = 4.
    ftpost-fnam = 'COBL-GSBER ' .
    ftpost-fval =   '1000'   .
    CALL FUNCTION 'POSTING_INTERFACE_DOCUMENT'
      EXPORTING
        i_tcode                        = 'FBS1'
      I_SGFUNCT                      = ' '
      I_NO_AUTH                      = ' '
    IMPORTING
        e_msgid                  = i_msgid
        e_msgno                  = i_msgno
        e_msgty                  = i_msgty
        e_msgv1                  = i_msgv1
        e_msgv2                  = i_msgv2
        e_msgv3                  = i_msgv3
        e_msgv4                  = i_msgv4
        e_subrc                  = i_subrc
      TABLES
        t_blntab                 = blntab
        t_ftpost                 = ftpost
        t_fttax                  = fttax
    EXCEPTIONS
          account_missing          = 1
          company_code_missing     = 2
          posting_key_invalid      = 3
          posting_key_missing      = 4
          record_type_invalid      = 5
          transaction_code_invalid = 6
          amount_format_error      = 7
          too_many_line_items      = 8
          OTHERS                   = 9.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Any ideas anyone?
    Many Thanks Sims

    Hello,
    this is what I have at the momment, but I still get the error message
                                                                                    <i> Two accounts were transferred but not BSEG-HKONT                                                                               
    Message no. F8 020                                                     
            </i>                                                                    
    Diagnosis                                                                               
    Two accounts were transferred but not BSEG-HKONT.                                                                               
    This error also occurs if more than 1000 line items are transferred. In
         this case, the transferred data must be distributed across several     
         documents.                                                             
    *& Report  Zrep1                                                 *
    REPORT  zstaccrual                    .
    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_key =  '000000000100000038'.
    documentheader-obj_type = 'BKPFF'.
    documentheader-obj_sys = 'RD1CLNT200'.
    documentheader-username = sy-uname.
    documentheader-doc_date = '310506'.
    documentheader-doc_type = 'SA'.
    documentheader-comp_code = 2000.
    documentheader-pstng_date = '310506'.
    documentheader-ref_doc_no = 'Accrual Post'.
    documentheader-reason_rev = '05'.
    documentheader-ac_doc_no = 476000.
    documentheader-obj_key = 40.
    *documentheader-ac_doc_no
    *documentheader-fisc_year = '2005'.
    *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 documents posting using POSTING_INTERFACE_DOCUMENT

    Does anyone know the format for header and item to post many documents using POSTING_INTERFACE_DOCUMENT ?
    is it scenario A ?
    Document header data A ( K 1)
    Document item A.1 ( P 1)
    Document item A.2 ( P 2)
    Document header data B ( K 2)
    Document item B.1 ( P 1)
    Document item B.2 ( P 2)
    or scenario B ?
    Document header data A ( K 1)
    Document item A.1 ( P 1)
    Document item A.2 ( P 2)
    Document header data B ( K 2)
    Document item B.1 ( P 3)
    Document item B.2 ( P 4)
    or it cannot be done ?
    Many Thanks.

    Hi,
    Look at the link
    Re: function 'POSTING_INTERFACE_DOCUMENT'
    http://translate.google.com/translate?hl=en&sl=es&u=http://sap4.com/wiki/index.php%3Ftitle%3DZIFIPIDOC&sa=X&oi=translate&resnum=8&ct=result&prev=/search%3Fq%3DABAP%2B%252B%2BPOSTING_INTERFACE_DOCUMENT%26hl%3Den
    Regards
    Sudheer

  • Calculate tax item field name in bapi .. bapi_acc_document_post

    Hello Friends,
    Im using Bapi>> Bapi_acc_document_post to post vendor and customer invoices, im not getting mapping field for the "calculate tax item(checkbox)" technical name is xmwst in any of the bapi strucuture.
    please tell me in which bapi structure we have to pass this field so that the tax amount should get calculated automatically.
    regards,
    Sunny

    You can try the Financial Posting Interface (FIPI).
    *=======================================================================
    CONSTANTS:
    *=======================================================================
                c_typehead  TYPE stype_pi VALUE 'K',
                c_typepos   TYPE stype_pi VALUE 'P',
                c_waers     TYPE waers    VALUE 'EUR',
                c_blart     TYPE blart    VALUE 'ZN',
                c_debit     TYPE bschl    VALUE  '40',
                c_credit    TYPE bschl    VALUE  '50',
                c_inddebit  TYPE shkzg    VALUE  'S',
                c_indcredit TYPE shkzg    VALUE  'H'.
    *===================================================================
    FORM append_ftpost
    *===================================================================
                      USING    p_stype   TYPE stype_pi
                               p_count   TYPE count_pi
                               p_fnam    TYPE bdc_fnam
                               p_fval    TYPE any
                      CHANGING pt_ftpost TYPE tt_ftpost.
      DATA: ls_ftpost LIKE LINE OF pt_ftpost.
      CLEAR ls_ftpost.
      ls_ftpost-stype = p_stype.
      ls_ftpost-count = p_count.
      ls_ftpost-fnam  = p_fnam.
      ls_ftpost-fval  = p_fval.
      APPEND ls_ftpost TO pt_ftpost.
    ENDFORM.                    "append_ftpost
    *===================================================================
    FORM post_document
    *===================================================================
                        USING    p_bukrs   TYPE bukrs
                                 p_gjahr   TYPE gjahr
                                 p_monat   TYPE monat
                                 p_tip     TYPE zga_nomtipcont
                                 p_saknr   TYPE saknr
                                 p_bktxt   TYPE bktxt
                                 pt_pos    TYPE tt_pos.
      DATA: lt_blntab TYPE tt_blntab,
            lt_ftpost TYPE tt_ftpost,
            lt_fttax  TYPE tt_fttax,
            ls_blntab LIKE LINE OF lt_blntab.
      REFRESH: lt_blntab,
               lt_ftpost,
               lt_fttax.
      CALL FUNCTION 'ENQUEUE_EZGA_NOMLOG'
        EXPORTING
          bukrs          = p_bukrs
          gjahr          = p_gjahr
          monat          = p_monat
          tipcont        = p_tip
          _wait          = 'X'
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 2
          OTHERS         = 3.
      IF sy-subrc IS NOT INITIAL.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      PERFORM fill_bkpf USING    p_bukrs p_gjahr
                                 p_monat p_bktxt
                        CHANGING lt_ftpost.
      PERFORM fill_bseg USING    p_saknr p_bktxt
                        CHANGING pt_pos lt_ftpost.
      CALL FUNCTION 'POSTING_INTERFACE_START'
        EXPORTING
          i_function = 'C'
          i_mode     = 'N'
          i_update   = 'S'.
      CALL FUNCTION 'POSTING_INTERFACE_DOCUMENT'
        EXPORTING
          i_tcode  = 'FB01'
        IMPORTING
          e_msgid  = sy-msgid
          e_msgno  = sy-msgno
          e_msgty  = sy-msgty
          e_msgv1  = sy-msgv1
          e_msgv2  = sy-msgv2
          e_msgv3  = sy-msgv3
          e_msgv4  = sy-msgv4
          e_subrc  = sy-subrc
        TABLES
          t_blntab = lt_blntab
          t_ftpost = lt_ftpost
          t_fttax  = lt_fttax.
      IF sy-subrc IS NOT INITIAL.
        MESSAGE i021(zga_nom).
      ELSE.
    *  Grabación en tabla de log y mensaje
        READ TABLE lt_blntab INTO ls_blntab INDEX 1.
        IF sy-subrc        IS INITIAL AND
           ls_blntab-belnr IS NOT INITIAL.
          PERFORM insert_log USING p_bukrs
                                   p_gjahr
                                   p_monat
                                   p_tip
                                   ls_blntab-belnr.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ELSE.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'POSTING_INTERFACE_END'
        EXCEPTIONS
          session_not_processable = 1
          OTHERS                  = 2.
      CALL FUNCTION 'DEQUEUE_EZGA_NOMLOG'
        EXPORTING
          bukrs   = p_bukrs
          gjahr   = p_gjahr
          monat   = p_monat
          tipcont = p_tip.
    ENDFORM.                    " post_document
    *===================================================================
    FORM insert_log
    *===================================================================
                    USING p_bukrs TYPE bukrs
                          p_gjahr TYPE gjahr
                          p_monat TYPE monat
                          p_tip   TYPE zga_nomtipcont
                          p_belnr TYPE belnr_d.
      DATA: lv_belnr TYPE belnr_d,
            ls_log   TYPE zga_nomlog.
      CLEAR: lv_belnr, ls_log.
      ls_log-bukrs   = p_bukrs.
      ls_log-gjahr   = p_gjahr.
      ls_log-monat   = p_monat.
      ls_log-tipcont = p_tip.
      ls_log-belnr   = p_belnr.
      SELECT SINGLE belnr INTO lv_belnr
        FROM zga_nomlog
        WHERE bukrs   = p_bukrs AND
              gjahr   = p_gjahr AND
              monat   = p_monat AND
              tipcont = p_tip.
      IF sy-subrc IS INITIAL.
        UPDATE zga_nomlog FROM ls_log.
      ELSE.
        INSERT zga_nomlog FROM ls_log.
      ENDIF.
    ENDFORM.                    "insert_log
    *===================================================================
    FORM get_posting_date
    *===================================================================
                          USING    p_gjahr TYPE gjahr
                                   p_monat TYPE monat
                          CHANGING p_date  TYPE dats.
      DATA: lv_date TYPE dats,
            lv_month TYPE tfmatage.
      IF p_monat <= '12'.
        CONCATENATE p_gjahr p_monat '01' INTO lv_date.
        CALL FUNCTION 'FIMA_END_OF_PERIOD_DETERMINE'
          EXPORTING
            i_date               = lv_date
            i_months             = '1'
          IMPORTING
            e_date_end_of_period = p_date.
      ELSE.
        CONCATENATE p_gjahr '1231' INTO p_date.
      ENDIF.
    ENDFORM.                    "get_posting_date
    *======================================================================
    FORM fill_bkpf
    *======================================================================
                     USING    p_bukrs   TYPE bukrs
                              p_gjahr   TYPE gjahr
                              p_monat   TYPE monat
                              p_bktxt   TYPE bktxt
                     CHANGING pt_ftpost TYPE tt_ftpost.
      DATA: lv_posting_date TYPE dats,
            lv_dats TYPE char10.
      PERFORM get_posting_date USING    p_gjahr p_monat
                               CHANGING lv_posting_date.
      WRITE lv_posting_date TO lv_dats.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BUKRS' p_bukrs
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-MONAT' p_monat
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BLART' c_blart
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BUDAT' lv_dats
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BLDAT' lv_dats
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-WAERS' c_waers
                            CHANGING pt_ftpost.
      *PERFORM append_ftpost USING    c_typehead '1'*
                                     *'BKPF-XMWST'  'X'*
                            *CHANGING pt_ftpost.*
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BKTXT' p_bktxt
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-XBLNR' p_bktxt+0(16)
                            CHANGING pt_ftpost.
    ENDFORM.                    "fill_bkpf
    *===================================================================
    FORM fill_bseg
    *===================================================================
                          USING  p_saknr   TYPE saknr
                                 p_bktxt   TYPE bktxt
                        CHANGING pt_pos    TYPE tt_pos
                                 pt_ftpost TYPE tt_ftpost.
      DATA: ls_pos      LIKE LINE OF pt_pos,
            ls_ftpost   LIKE LINE OF pt_ftpost,
            lv_item     TYPE buzei,
            lv_wrbtr    TYPE wrbtr,
            lv_saknr    TYPE saknr,
            lv_bschl    TYPE bschl,
            lt_poscont  TYPE TABLE OF zga_nompospost,
            ls_poscont  LIKE LINE OF lt_poscont,
            ls_poscontaux LIKE LINE OF lt_poscont.
      CLEAR: ls_pos, ls_ftpost.
      REFRESH lt_poscont.
      LOOP AT pt_pos INTO ls_pos.
        MOVE-CORRESPONDING ls_pos TO ls_poscont.
        APPEND ls_poscont TO lt_poscont.
      ENDLOOP.
      SORT lt_poscont BY saknr.
      lv_item = '002'.
      LOOP AT lt_poscont INTO ls_poscontaux.
        ls_poscont = ls_poscontaux.
        AT NEW saknr.
          CLEAR: lv_wrbtr,
                 lv_saknr,
                 lv_bschl.
        ENDAT.
        CASE ls_poscont-shkzg.
          WHEN c_inddebit.
            lv_bschl = c_debit.
          WHEN c_indcredit.
            lv_bschl = c_credit.
        ENDCASE.
        IF ls_poscont-saknr IS INITIAL.
          lv_saknr = p_saknr.
        ELSE.
          lv_saknr = ls_poscont-saknr.
        ENDIF.
        IF ls_poscont-indhkont = abap_true.
          lv_wrbtr = lv_wrbtr + ls_poscont-wrbtr.
        ELSE.
          PERFORM fill_bsegpos USING   lv_bschl lv_saknr
                                       ls_poscont-wrbtr p_bktxt
                                       ls_poscont-kostl ls_poscont-prctr
                                       lv_item
                              CHANGING pt_ftpost.
          CLEAR: lv_wrbtr,
                 lv_saknr,
                 lv_bschl.
          lv_item = lv_item + 1.
        ENDIF.
        AT END OF saknr.
          IF ls_poscont-indhkont = abap_true.
            PERFORM fill_bsegpos USING   lv_bschl lv_saknr
                                         lv_wrbtr p_bktxt
                                         ls_poscont-kostl ls_poscont-prctr
                                         lv_item
                                CHANGING pt_ftpost.
            lv_item = lv_item + 1.
          ENDIF.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    "fill_bseg
    *===================================================================
    FORM fill_bsegpos
    *===================================================================
                        USING    p_bschl   TYPE bschl
                                 p_saknr   TYPE saknr
                                 p_wrbtr   TYPE wrbtr
                                 p_bktxt   TYPE bktxt
                                 p_kostl   TYPE kostl
                                 p_prctr   TYPE prctr
                                 p_pos     TYPE buzei
                        CHANGING pt_ftpost TYPE tt_ftpost.
      DATA: lv_wrbtrstr TYPE char16.
      WRITE  p_wrbtr TO lv_wrbtrstr
                    CURRENCY c_waers NO-SIGN.
      PERFORM append_ftpost USING    c_typepos p_pos
                               'BSEG-BSCHL' p_bschl
                      CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typepos p_pos
                                     'BSEG-HKONT' p_saknr
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typepos p_pos
                                     'BSEG-WRBTR' lv_wrbtrstr
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typepos p_pos
                                     'BSEG-SGTXT' p_bktxt
                            CHANGING pt_ftpost.
      IF p_kostl IS NOT INITIAL.
        PERFORM append_ftpost USING    c_typepos p_pos
                                      'COBL-KOSTL' p_kostl
                             CHANGING pt_ftpost.
      ENDIF.
      IF p_prctr IS NOT INITIAL.
        PERFORM append_ftpost USING    c_typepos p_pos
                                      'COBL-PRCTR' p_prctr
                             CHANGING pt_ftpost.
      ENDIF.
    ENDFORM.                    "fill_bsegpos
    Edited by: Javier Meavilla Olivas on Feb 25, 2010 1:25 PM

  • BAPI to park G/L Account document with ledger

    Hi Experts,
    I have been looking for BAPI to park G/L account document with ledger (FV50L).
    Can you please let me know, if you have know about it.
    I have found the one for posting BAPI_ACC_DOCUMENT_POST, but It should not be used in our case.
    It is park G/L account document without ledger.
    Thank you in advance.
    Kyongkeum Im.
    Edited by: Kyoung Keun Im on Aug 13, 2010 1:11 PM
    Edited by: Kyoung Keun Im on Aug 13, 2010 1:12 PM

    Hi,
    There is not function module for that. I am using BDC to park GL document. For BDC parking you can use Function module -
    POSTING_INTERFACE_START and POSTING_INTERFACE_DOCUMENT.
    Sample Logic:
    Loop at header.
    populate header.
      loop at item.
       populate item.
      endloop.
    call function POSTING_INTERFACE_START
    call function POSTING_INTERFACE_DOCUMENT
    call function POSTING_INTERFACE_END
    BAPI COMMIT.
    Endloop.

  • T-CODE FB01 In Mass creation

    Hi all,
    I'm looking for idea to create FB01(post g/l document) in mass mode from a file.
    I'm open to all techno : BAPI, Batch Input, ...
    I've notice that a std Bi exists : RFBIBL00, but I've no idea in how formatting a file for this program.
    Tanks,
    Erwan.

    You can use function 'POSTING_INTERFACE_DOCUMENT', works really fine. Example code bellow:
    REPRT ztest.
                                  TYPES
    TYPES: BEGIN OF ge_account,
      source(12)      TYPE c,            "Source Interface
      bukrs(4)        TYPE c,            "Company code
      operid(13)      TYPE c,            "Operation ID
      date(10)        TYPE c,            "Date
      blart(2)        TYPE c,            "Document type
      waers(5)        TYPE c,            "Currency
      free(10)        TYPE c,            "Free
      newko(10)       TYPE c,            "Gl account
      kostl(10)       TYPE c,            "Cost center
      newbs(2)        TYPE c,            "Posting key
      wrbtr(14)       TYPE c,            "Amount
      sgtxt(25)       TYPE c,            "Description
      zuonr(8)        TYPE c,            "Reference 1
      ref2(8)         TYPE c,            "Reference 2
    END OF ge_account.
    TYPES: BEGIN OF ge_account_new,
      source(12)      TYPE c,            "Source Interface
      bukrs(4)        TYPE c,            "Company code
      operid(13)      TYPE c,            "Operation ID
      date(10)        TYPE c,            "Date
      blart(2)        TYPE c,            "Document type
      waers(5)        TYPE c,            "Currency
      free(10)        TYPE c,            "Free
      newko(10)       TYPE c,            "Gl account
      kostl(10)       TYPE c,            "Cost center
      newbs(2)        TYPE c,            "Posting key
      wrbtr           LIKE bseg-wrbtr,   "Amount
      sgtxt(25)       TYPE c,            "Description
      zuonr(8)        TYPE c,            "Reference 1
      ref2(8)         TYPE c,            "Reference 2
    END OF ge_account_new.
    TYPES: BEGIN OF ge_ftpost.
            INCLUDE STRUCTURE ftpost.
    TYPES: END OF ge_ftpost.
    TYPES: BEGIN OF ge_blntab.
            INCLUDE STRUCTURE blntab.
    TYPES: END OF ge_blntab.
    TYPES: BEGIN OF ge_blntabdoc.
            INCLUDE STRUCTURE blntab.
    TYPES: END OF ge_blntabdoc.
    TYPES: BEGIN OF ge_fttax.
            INCLUDE STRUCTURE fttax.
    TYPES: END OF ge_fttax.
    TYPES: BEGIN OF ge_message,
      text(110),
      flag,
    END OF ge_message.
    *TYPES: BEGIN OF ge_zlscf008.
           INCLUDE STRUCTURE zlscf008.
    *TYPES: END OF ge_zlscf008.
    TYPES: tyt_account_aux TYPE TABLE OF ge_account.
    TYPES: tyt_account     TYPE TABLE OF ge_account_new.
    TYPES: tyt_ftpost      TYPE TABLE OF ge_ftpost.
    TYPES: tyt_blntab      TYPE TABLE OF ge_blntab.
    TYPES: tyt_blntabdoc   TYPE TABLE OF ge_blntabdoc.
    TYPES: tyt_fttax       TYPE TABLE OF ge_fttax.
    TYPES: tyt_message     TYPE TABLE OF ge_message.
    DATA: it_blntab          TYPE tyt_blntab      WITH HEADER LINE.
    DATA: it_blntabdoc       TYPE tyt_blntabdoc   WITH HEADER LINE.
    DATA: it_fttax           TYPE tyt_fttax       WITH HEADER LINE.
    DATA: it_ftpost          TYPE tyt_ftpost      WITH HEADER LINE.
    DATA: v_lines_doc(3) TYPE n,
          v_user         LIKE  sy-uname,
          v_msgid        LIKE  sy-msgid,
          v_msgno        LIKE  sy-msgno,
          v_msgty        LIKE  sy-msgty,
          v_msgv1        LIKE  sy-msgv1,
          v_msgv2        LIKE  sy-msgv2,
          v_msgv3        LIKE  sy-msgv3,
          v_msgv4        LIKE  sy-msgv4,
          v_subrc        LIKE  sy-subrc,
          v_subrc1       LIKE  sy-subrc,
          v_tcode        LIKE  sy-tcode VALUE 'FB01',
          v_msg(110),
          v_err,
          v_mode,
       v_blart        LIKE  zlscf007-blart,
         v_hkont        LIKE  zlscf007-hkont,
         v_sources      LIKE  zlscf007-sources,
          v_operid(13),
          v_bierr(2)     TYPE  n,
          v_xdate(8),
          v_bktxt        LIKE bkpf-bktxt,
          v_kokrs        LIKE csks-kokrs.
    PERFORM f_fill_doc_header.
    PERFORM f_fill_doc_position.
    *Inicio el post del documento
    CALL FUNCTION 'POSTING_INTERFACE_START'
           EXPORTING
                i_client           = sy-mandt
                i_function         = 'C'
                i_mode             = 'A'
                i_update           = 'S'
                i_user             = sy-uname
           EXCEPTIONS
                client_incorrect   = 1
                function_invalid   = 2
                group_name_missing = 3
                mode_invalid       = 4
                update_invalid     = 5
                OTHERS             = 6.
    *Postin document.
    CLEAR   it_blntab.
      REFRESH it_blntab.
      CALL FUNCTION 'POSTING_INTERFACE_DOCUMENT'
           EXPORTING
                i_tcode                  = v_tcode
           IMPORTING
                e_msgid                  = v_msgid
                e_msgno                  = v_msgno
                e_msgty                  = v_msgty
                e_msgv1                  = v_msgv1
                e_msgv2                  = v_msgv2
                e_msgv3                  = v_msgv3
                e_msgv4                  = v_msgv4
                e_subrc                  = v_subrc
           TABLES
                t_blntab                 = it_blntab
                t_ftpost                 = it_ftpost
                t_fttax                  = it_fttax
           EXCEPTIONS
                account_missing          = 1
                company_code_missing     = 2
                posting_key_invalid      = 3
                posting_key_missing      = 4
                record_type_invalid      = 5
                transaction_code_invalid = 6
                amount_format_error      = 7
                too_many_line_items      = 8
                OTHERS                   = 9.
      CALL FUNCTION 'POSTING_INTERFACE_END'
           EXPORTING
                i_bdcimmed              = 'X'
           EXCEPTIONS
                session_not_processable = 1
                OTHERS                  = 2.
    *&      Form  f_fill_doc_header
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_doc_header.
    REFRESH it_ftpost.
    CLEAR   it_ftpost.
    ADD 1 TO v_lines_doc.
      it_ftpost-stype = 'K'.
      it_ftpost-count = v_lines_doc.
    it_ftpost-fnam = 'BKPF-BLDAT'.
      it_ftpost-fval = '06092004'.
      APPEND it_ftpost.
      it_ftpost-fnam = 'BKPF-BUDAT'.
      it_ftpost-fval = '06092004'.
      APPEND it_ftpost.
      it_ftpost-fnam = 'BKPF-BLART'.
      it_ftpost-fval = 'K3'.
      APPEND it_ftpost.
      it_ftpost-fnam = 'BKPF-BUKRS'.
      it_ftpost-fval = 'CTIU'.
      APPEND it_ftpost.
      it_ftpost-fnam = 'BKPF-WAERS'.
      it_ftpost-fval = 'ARS'.
      APPEND it_ftpost.
      it_ftpost-fnam = 'BKPF-BKTXT'.
      it_ftpost-fval = 'Prueba'.
      APPEND it_ftpost.
    CLEAR   v_lines_doc.
    ENDFORM.                    " f_fill_doc_header
    *&      Form  f_fill_doc_position
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_doc_position.
    it_ftpost-stype = 'P'.
    ADD 1 TO v_lines_doc.
    it_ftpost-count = v_lines_doc.
    it_ftpost-fnam = 'RF05A-NEWBS'.
      it_ftpost-fval = '11'.
      APPEND it_ftpost.
      it_ftpost-fnam = 'RF05A-NEWKO'.
      it_ftpost-fval = '55'.
      APPEND it_ftpost.
    it_ftpost-fnam = 'BSEG-WRBTR'.
      it_ftpost-fval = '1.00'.
      APPEND it_ftpost.
    it_ftpost-stype = 'P'.
    ADD 1 TO v_lines_doc.
    it_ftpost-count = '2'.
    it_ftpost-fnam = 'RF05A-NEWBS'.
      it_ftpost-fval = '21'.
      APPEND it_ftpost.
      it_ftpost-fnam = 'RF05A-NEWKO'.
      it_ftpost-fval = '55'.
      APPEND it_ftpost.
    it_ftpost-fnam = 'BSEG-WRBTR'.
      it_ftpost-fval = '*'.
      APPEND it_ftpost.
    ENDFORM.                    " f_fill_doc_position

  • BDC Related to FB01

    Hi,
    This is regarding an issue related to Posting of a Document using FB01.A BDC has been created to Post the document based on the Tax A1 and the Calculation is happening pretty smmothly. Now when we use the the Tax code as A3 the posting does not take place instead it will be parked and will be displayed in blue.on double clicking on it, it posts the document.
    pls give me a solution on how to go about creating a BDC.
    if code is available pls post it
    Thanks in advance
    Naveen

    You say this: The documentation for function POSTING_INTERFACE_DOCUMENT is quite good. It can create a batch or process immediately.
    You call POSTING_INTERFACE_START to specify if a batch session is to be created or processing will be done immediately with All, Errors or No stopping.
    1. i have a program use this function but my problem i don't know how in batch session specify will be done inmediately.
    2. where is the official documentation. i can't find it!
    Thanks for you answers!
    Christian

  • Posting FI documents

    i want to post FI documents from old company code to new company code using these functions:POSTING_INTERFACE_START
                           POSTING_INTERFACE_DOCUMENT
                            POSTING_INTERFACE_END
    Can somebody show me how i can implement it in abap code

    Hi,
    DATA: ftp east TYPE ftp east OCCURS 0 WITH HEADER LINE.
    * Internal accounting cut place initialize
    CALL FUNCTION “POSTING_INTERFACE_START”
    EXPORTING
    i_function = “I”
    more i_user = “”
    EXCEPTION
    client_incorrect = 1
    function_invalid = 2
    group_name_missing = 3
    mode_invalid = 4
    update_invalid = 5
    OTHERS = 6.
    * Head
    PERFORM fill_ftpost USING “K” “1” “BKPF BUDAT” “31102006”.
    PERFORM fill_ftpost USING “K” “1” “BKPF BLDAT” “31102006”.
    PERFORM fill_ftpost USING “K” “1” “BKPF BLART” “MD”.
    PERFORM fill_ftpost USING “K” “1” “BKPF BKTXT” “LALELU”.
    PERFORM fill_ftpost USING “K” “1” “bkpf belnr” “20808599”.
    PERFORM fill_ftpost USING “K” “1” “BKPF XBLNR” “123”.
    * IF EMERGENCY control identifier IS INITIAL.
    PERFORM fill_ftpost USING “K” “1” “BKPF XMWST” “X”.
    * ENDIF.
    PERFORM fill_ftpost USING “K” “1” “BKPF BUKRS” “1000”.
    * PERFORM fill_ftpost USING “K” “1” “BKPF MONTH” wa_mhnk-ausdt+4 (2).
    PERFORM fill_ftpost USING “K” “1” “BKPF WAERS” “EUR”.
    * Pos1 (debtor)
    PERFORM fill_ftpost USING “P” “1” “BSEG BSCHL” “01”.
    PERFORM fill_ftpost USING “P” “1” “BSEG KUNNR” “10926014”.
    PERFORM fill_ftpost USING “P” “1” “BSEG WRBTR” “116,00”.
    * IF EMERGENCY control identifier IS INITIAL.
    PERFORM fill_ftpost USING “P” “1” “BKPF XMWST” “X”.
    * PERFORM fill_ftpost USING “P” “1” “BSEG MWSKZ” control identifier.
    * ENDIF.
    PERFORM fill_ftpost USING “P” “1” “BSEG ZTERM” “1003”.
    PERFORM fill_ftpost USING “P” “1” “BSEG ZFBDT” “31102006”.
    PERFORM fill_ftpost USING “P” “1” “BSEG SGTXT” “LALELU”.
    PERFORM fill_ftpost USING “P” “1” “BSEG ZUONR” “LALELUKOPF”.
    * Pos2 (revenue account)
    PERFORM fill_ftpost USING “P” “2” “BSEG BSCHL” “50”.
    PERFORM fill_ftpost USING “P” “2” “BSEG HKONT” “409600”.
    PERFORM fill_ftpost USING “P” “2” “BSEG WRBTR” “100,00”.
    * IF EMERGENCY control identifier IS INITIAL.
    PERFORM fill_ftpost USING “P” “2” “BSEG MWSKZ” “A1”.
    * ENDIF.
    PERFORM fill_ftpost USING “P” “2” “BSEG SGTXT” “LALELU”.
    PERFORM fill_ftpost USING “P” “2” “COBL PRCTR” “NETPHONE”.
    PERFORM fill_ftpost USING “P” “2” “BSEG ZUONR” “LALELU”.
    PERFORM book TABLES ftp east.
    FORM fill_ftpost USING p_stype
    p_count
    p_fnam
    p_fval.
    ftp east type = p_stype.
    ftp east COUNT = p_count.
    ftpost fnam = p_fnam.
    ftpost fval = p_fval.
    CONDENSE ftpost fval.
    APPEND ftp east.
    END FORM. “FTPOST_FIELD
    *& form BEECHES
    * text
    * --> P1 text
    * <- p2 text
    TABLES ftp east books FORM.
    DATA: blntab TYPE blntab OCCURS 0 WITH HEADER LINE,
    fttax TYPE fttax OCCURS 0 WITH HEADER LINE.
    DATA: msgid LIKE system-msgid,
    msgno LIKE system-msgno,
    msgty LIKE system-msgty,
    msgv1 LIKE sy-msgv1,
    msgv2 LIKE sy-msgv2,
    msgv3 LIKE sy-msgv3,
    msgv4 LIKE sy-msgv4.
    CALL FUNCTION “POSTING_INTERFACE_DOCUMENT”
    EXPORTING
    i_tcode = “FB01”
    IMPORTING
    e_subrc = system-subrc
    e_msgid = msgid
    e_msgty = msgty
    e_msgno = msgno
    e_msgv1 = msgv1
    e_msgv2 = msgv2
    e_msgv3 = msgv3
    e_msgv4 = msgv4
    TABLES
    t_ftpost = ftp east
    t_fttax = fttax
    t_blntab = blntab
    EXCEPTION
    account_missing = 1
    company_code_missing = 2
    posting_key_invalid = 3
    posting_key_missing = 4
    record_type_invalid = 5
    transaction_code_invalid = 6
    amount_format_error = 7
    too_many_line_items = 8
    company_code_invalid = 9
    screen_not_found = 10
    no_authorization = 11
    OTHERS = 12.
    IF system-subrc <> 0.
    MESSAGE ID SYSTEM-MSGID TYPE SYSTEM-MSGTY NUMBER SYSTEM-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    REFRESH ftp east.
    REFRESH fttax.
    END FORM. “BEECHES
    Regards
    Sudheer

  • Posting COPA fields to FB01 using POSTING_INTERFACE_DOCUMENT

    Hi All,
    I am trying to post FI document through FB01 using POSTING_INTERFACE_DOCUMENT. All the FI fields are getting posted. But I am unable to post COPA fields. I am using BSEG-RKE* structure as suggested in other threads but still the COPA button is disabled for the document posted. I also checked in database, the fields are not populated. Could someone suggest if any additional information needs to be passed to enable COPA specific posting to the FM. Thanks.

    Hi SS ,
    can you do like this , Pass all COPA field details in this format "BSEG_RKEXXXXX' ,let me know the results.
    im ref :   call function 'RKE_FILL_BDCDATA_WITH_CRITERIA' in that FM.
    Edited by: Prabhu Peram on Sep 29, 2011 11:50 AM

  • Problem in posting FB01transaction using function modules

    Hi,
       I am uploading the data to transaction FB01.
       For that i have used three function modules:
       1, POSTING_INTERFACE_START
       2, POSTING_INTERFACE_DOCUMENT
       3, POSTING_INTERFACE_END
        The this is, i have added 2 custom fields on 2nd screen more button.
        The data is coming into those fields, but its not getting saved.
        when i do it in 4.6c its working fine, but in 4.7 its not working.
        when i save it in manual posting, its getting saved.
        Can you please help me to overcome this problem.
    Regards,
    Srikanth.

    Hi This has already been developed in 4.6c and copied the same same program in 4.7. Data is getting updated in 4.6c but the data is not getting updated in 4.7.
    if we use the BAPI as u said,  we have to change the total program. but i dont think client will agree for that coz its working fine in 4.6c. can u please suggest any solution??
    Regards,
    Srikanth.

  • POSTING_INTERFACE_DOCUMENT with PA segments/CO-PA

    Does anybody able post the document using function module POSTING_INTERFACE_DOCUMENT with PA Character ( CO-PA) segment(Product,Brand, equipment type). If so, can you please suggest me.
    Iam using the structure "CE01000" which was in FB01 screen but iam getting the error screen field is un known.
    Thanks.

    Thanks Rob, profit center, cost center and IOs are taken care. only concerned with PA segments. Function module is not understanding the structures for PA segments.

  • Posting_interface_documents

    Can anyone demonstrate the use of function modules "POSTING_INTERFACE_DOCUMENTS"  with a simple example. My header data and line data are in two different tables...do i need to club all the data into one table and pass into function module. Please help me.....

    Yes you have to fill FTPOST.
    Eg:
      FTPOST-STYPE = 'K'.
      FTPOST-COUNT = '001'.
      FTPOST-FNAM  = BKPF-BLART.
      FTPOST-FVAL  = 'AB'.
      APPEND FTPOST.
      CLEAR FTPOST.
    1. CALL FUNCTION 'POSTING_INTERFACE_START'
    2. CALL FUNCTION 'POSTING_INTERFACE_CLEARING'
    3. CALL FUNCTION 'POSTING_INTERFACE_END'
    I think you have to call all the 3 functions

  • Function module for f-64 transaction

    Hi,
            Is there any function module is there for f-64 transaction please let me know.
    regards,
    Naveen

    hi Naveen,
    you can park documents with POSTING_INTERFACE_DOCUMENT.
    ec

  • Bapi / Function to save FI document

    Hallo everybody!
    Is there a function module to create an FI document?
    Thank you very much indeed!!!

    There are BAPI for that (most of those have a _CHECK associated BAPI)
    - 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 PAYABLE)
    - BAPI_ACC_EMPLOYEE_REC_POST     Accounting: Post Cust. Acct Assigt for HR Posting (OAG: LOAD RECEIVABLE)
    - 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
    - BAPI_ACC_BILLING_REV_POST     Accounting: Post Billing Doc.Reversal (OAG: LOAD RECEIVABLE)
    - BAPI_ACC_GL_POSTING_REV_POST     Accounting: Post General G/L Posting Reversal
    - BAPI_ACC_GOODS_MOV_REV_POST     Accounting: Post Goods Movement Reversal (OAG: POST JOURNAL)
    - BAPI_ACC_INVOICE_REV_POST     Accounting: Post Invoice Receipt Reversal (OAG: LOAD PAYABLE)
    - BAPI_ACC_PYMNTBLK_UPDATE_POST     Accounting: Post Changes to Payment Block for Open Items
    - BAPI_ACC_DOCUMENT_POST     Accounting: Posting
    There are also FM generating BDC data
    - POSTING_INTERFACE_START
    - POSTING_INTERFACE_DOCUMENT
    - POSTING_INTERFACE_END
    Regards

  • Errors while using funtion module 'POSTING_INTERFACE_DOCUMENT'

    Hi All,
    I have written a rpogram to simulate transaction 'FB01' using the function module 'POSTING_INTERFACE_DOCUMENT'.
    It is throwing an error - 'Two accounts were transferred but not BSEG-HKONT'
    What are the possible causes of this error.
    Thank you for all your help in advance.
    Nobin

    Hi Anand,
    Could you please specify which reference fields are not getting populated?
    I think this is the standard behaviour of POSTING_INTERFACE_CLEARING. All the values in the first line item are populated, while in second line item only some of the fields like posting key, account number, account currency, amount, company code and business partner are populated.
    If you need to populate other values, I guess you will have to search for some enhancement points inside the FM POSTING_INTERFACE_CLEARING after the 'call transaction' statement.
    Regards
    Radhika

Maybe you are looking for

  • How do i zoom in or out to take a picture?

    How do I zoom in or out before taking a picture?

  • Models in Abap Webdynpro.

    Hi All, I am a Java guy having knowledge in Java webdynpro, it happend for me to get into ABAP webdynpro just had a small query here. How does models functionality work in ABAp Webdynpro. How do we access RFC, BAPI, web services, EJBs etc in ABAP web

  • Unable to uninstall AnyConnect Version 2.5.0217

    I can't uninstall this or upgrade to another version because of missing msi file, also found the anyconnect-win-2.5.0217-pre-deploy-k9.msi file on the internet and cannot uninstall with that either.

  • Implies Boolean Logic

    Hi guys, just a bit stuck on something. In my programs i've been using a shift register and a not-implies boolean function to perform an action once only, when a value changed from false to true in boolean logic how would I spot a change so that a tr

  • BSP Page

    Hi All, Can anyone tell me solution for the following Thanks Ramkk Error when processing your request What has happened? The URL http://sapecc50:8000/sap/bc/bsp/sap/zgoodsmovement/goodsmovement.htm was not called due to an error. Note The following e