Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Posting Documents in FB01

Former Member
0 Likes
840

Can any one help me in posting documents in FB01...

i am using session method only..

Please help me

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
629

Try these:

Function Module POSTING_INTERFACE_DOCUMENT

BAPI_ACC_DOCUMENT_POST

Regards.

Can any one help me in posting documents in FB01...

i am using session method only..

Please help me

2 REPLIES 2
Read only

Former Member
0 Likes
630

Try these:

Function Module POSTING_INTERFACE_DOCUMENT

BAPI_ACC_DOCUMENT_POST

Regards.

Read only

mnicolai_77
Active Participant
0 Likes
629

hi,

i prefer to use 'BAPI_ACC_DOCUMENT_POST' for creatin a financial document i try to give to u how to set the minimum value in the structure/tables of the bapi.

> DOCUMENTHEADER

> BUS_ACT = 'RFBU' "for FI document

> USERNAME = sy-uname

> HEADER_TXT = your text

> COMP_CODE = Company code

> DOC_DATE = Document date

> PSTNG_DATE = Posting date

> FISC_YEAR(1) = The year of posting date

> FIS_PERIOD(1) = the period of posting date

> DOC_TYPE = document type

if you set a different year or period from the value that you have in the posting date the bapi trigger an error

> ACCOUNT GL

> ITEMNO_ACC = progessive number

> GL_ACCOUNT = G/L Account

> ITEM_TEXT = item text

> DOC_TYPE = document type (the same of the header for all item)

> COMP_CODE = company code (the same of the header for all item)

> BUS_AREA = business area

> TAX_CODE = tax code

if you set a different doc_type or company code for each item the bapi trigger an error

> ACCOUNTTAX

> ITEMNO_ACC = progressive number

> GL_ACCOUNT = G/L Account referred to TAX CODE

> TAX_CODE = TAX CODE

> TAX_RATE = TAX RATE

> ITEMNO_TAX = progressive number which tax item is referred

>CURRENCYAMOUNT

> ITEMNO_ACC = progressive number

> CURRENCY = currency

> CURRENCY_ISO = iso currency that you find in TCURC-ISOCD table

> AMT_DOCCUR = amount with sign the sign +/- identify Debit/Credit Indicator

> - this field only for tax record

> AMT_BASE = is the AMT_DOCCUR of the line which ypu want to calculate the tax with sign

> TAX_AMT = tax amount

usually for calculate the correct value i use these functions 'CALCULATE_TAX_FROM_GROSSAMOUNT'.

for example:

DOCUMENTHEADER

> BUS_ACT = 'RFBU'

> USERNAME = sy-uname

> HEADER_TXT = 'my_text'

> COMP_CODE = '0001'

> DOC_DATE = '20080115'

> PSTNG_DATE = '20080115'

> FISC_YEAR(1) = '2008'

> FIS_PERIOD(1) = '01'

> DOC_TYPE = 'SA'

ACCOUNT GL

>Record 1

>ITEMNO_ACC = 0000000001

>GL_ACCOUNT = 0290111010

>ITEM_TEXT = ITEM_TEXT

>DOC_TYPE = SA

>COMP_CODE = 0001

>BUS_AREA = GS1

>Record 2

>ITEMNO_ACC = 0000000002

>GL_ACCOUNT = 0500103900

>ITEM_TEXT = ITEM_TEXT

>DOC_TYPE = SA

>COMP_CODE = 0001

>TAX_CODE = V2

ACCOUNTTAX

> Record 3

>ITEMNO_ACC = 0000000003

>GL_ACCOUNT = 0221103001

>TAX_CODE = V2

>TAX_RATE = 20.000

>ITEMNO_TAX = 0000000002

CURRENCYAMOUNT

>Record 1

>ITEMNO_ACC = 0000000001

>CURRENCY = EUR

>CURRENCY_ISO = EUR

>AMT_DOCCUR = 150.00

>AMT_BASE = 0.00

>TAX_AMT = 0.00

>Record 2

>ITEMNO_ACC = 0000000002

>CURRENCY = EUR

>CURRENCY_ISO = EUR

>AMT_DOCCUR = -125.00

>AMT_BASE = 0.00

>TAX_AMT = 0.00

>Record 3

>ITEMNO_ACC = 0000000003

>CURRENCY = EUR

>CURRENCY_ISO = EUR

>AMT_DOCCUR = -25.00

>AMT_BASE = -125.00

>TAX_AMT = -25.00

hope that is useful.

Bye

Marco