Skip to Content
author's profile photo Former Member
Former Member

about bapi 'RFIDPT_ACC_DOCUMENT_POST_ADJ' to create Document Number

hi experts:

I use the bapi 'RFIDPT_ACC_DOCUMENT_POST_ADJ' or 'BAPI_ACC_DOCUMENT_POST' to create Document Number,I enter the po_number,but in

po's history,I can not see the Document Number.

and when I use t-code f-48 to create Document Number,in po's history,I can see the Document Number.

my question is,why I can not see the Document Number in po's history.

the code :

REPORT z1807fiaccountingtest001.

DATA:n1(10) TYPE n,

n2(10) TYPE n.

DATA: e_bukrs TYPE bukrs,

e_belnr TYPE belnr_d,

e_gjahr TYPE gjahr.

DATA:v(1) TYPE c.

DATA:

xacchd LIKE acchd OCCURS 1 WITH HEADER LINE,

xaccit LIKE accit OCCURS 10 WITH HEADER LINE,

yaccit LIKE accit OCCURS 10 WITH HEADER LINE,

xacccr LIKE acccr OCCURS 10 WITH HEADER LINE.

DATA: wa_return TYPE message_struct,

t_return LIKE message_struct OCCURS 10 WITH HEADER LINE,

return LIKE bapiret2 OCCURS 1 WITH HEADER LINE,

l_subrc TYPE sysubrc.

xacchd-bktxt = 'BAPI TEST'.

xacchd-awtyp = 'BKPF '.

xacchd-glvor = 'RFBU'.

xacchd-tcode = 'FBA7'.

APPEND xacchd.

CLEAR:xacchd.

****贷方

xaccit-posnr = 1.

xaccit-bukrs = '8088'.

xaccit-xref1 = '1000000001'."将单号存入'参照

xaccit-blart = 'KZ'. "凭证类型

xaccit-bldat = sy-datum."凭证中的凭证日期

xaccit-budat = sy-datum."凭证中的记账日期

xaccit-bschl = '50'."记账码

xaccit-fipos = '1001000'.

xaccit-vorgn = 'RFBU'. "总帐事务类型

xaccit-shkzg = 'H'.

xaccit-koart = 'K'. "帐户类型A资产D客户K供应商M物料S总分类帐科目

xaccit-sgtxt = 'test1'.

xaccit-hkont = '0001000005'. "总分类帐帐目

xaccit-lifnr = '0006001511'."供应商或债权人的帐号

xaccit-zfbdt = sy-datum. "基准日期

xaccit-rmvct = 'Z00'. "事务类型

APPEND:xaccit.

CLEAR:xaccit.

xacccr-posnr = 1.

xacccr-curtp = '00'.

xacccr-waers = 'RMB'.

xacccr-wrbtr = - 5.

APPEND xacccr.

CLEAR:xacccr.

****借方

xaccit-posnr = 2.

xaccit-bukrs = '8088'.

xaccit-blart = 'KZ'. "凭证类型

xaccit-bldat = sy-datum."凭证中的凭证日期

xaccit-budat = sy-datum."凭证中的记账日期

xaccit-bschl = '29'. "记帐代码

xaccit-shkzg = 'S'. "借方s/贷方h标识

xaccit-koart = 'K'. "帐户类型

xaccit-umskz = 'A'.

xaccit-fipos = '9900000'.

xaccit-nebtr = 5. "净收付金额

xaccit-vorgn = 'AZBU'. "总帐事务类型

xaccit-lifnr = '0006001511'."供应商或债权人的帐号

xaccit-ebeln = '4500000896'. "订单号

xaccit-ebelp = '00010'. "订单行项目号

xaccit-sgtxt = 'test'. "项目文本

xaccit-zfbdt = sy-datum. "用于到期日计算的基准日期

APPEND:xaccit.

CLEAR:xaccit.

xacccr-posnr = 2.

xacccr-curtp = '00'.

xacccr-waers = 'RMB'.

xacccr-wrbtr = 5.

APPEND xacccr.

CLEAR:xacccr.

CALL FUNCTION 'RFIDPT_ACC_DOCUMENT_POST_ADJ'

  • EXPORTING

  • I_COMP = ' '

  • I_COMP_CHECK = ' '

  • I_FREE_TABLE = 'X'

  • I_TEST = ' '

IMPORTING

e_bukrs = e_bukrs

e_belnr = e_belnr

e_gjahr = e_gjahr

TABLES

t_acchd = xacchd

t_accit = xaccit

t_acccr = xacccr

  • T_ACCTX =

t_return = t_return

.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 20, 2009 at 03:33 AM

    Hi Wei,

    Remember.whenever you use BAPI to do transaction, after you input all the data into BAPI,you have to commit the bapi.

    for example..

    CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'

    EXPORTING

    documentheader =

    • CUSTOMERCPD =

    • CONTRACTHEADER =

    • IMPORTING

    • OBJ_TYPE =

    • OBJ_KEY =

    • OBJ_SYS =

    tables

    • ACCOUNTGL =

    • ACCOUNTRECEIVABLE =

    • ACCOUNTPAYABLE =

    • ACCOUNTTAX =

    currencyamount =

    • CRITERIA =

    • VALUEFIELD =

    • EXTENSION1 =

    return =

    • PAYMENTCARD =

    • CONTRACTITEM =

    • EXTENSION2 =

    • REALESTATE =

    .

    Based on return table values,if type = 'S' you have to execute this BAPI.Otherwise the transaction won't commit.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

    • EXPORTING

    WAIT = 'X'

    • IMPORTING

    • RETURN =

    .

    Try this.

    Best Regards,

    Mohan.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.