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

BAPI_ACC_DOCUMENT_POST - not updating in databse

Former Member
0 Likes
2,004

Hi,

In my program code for outgoing payments(F-53) I am passing the following values for the BAPI_ACC_DOCUMENT_POST and getting the message in RETURN table as Document Successfully Posted( S RW 605) and I am able to see the document number in export parameter also. I am using BAPI_TRANSACTION_COMMIT after this. But the the document is not updated in database. Can you please suggest me that I have do any customization settings to update in databse or I am passing any wrong values for BAPI.My requirement is using BAPI, I have to update outgoing payments in SAP.

The values I am passing are as below.

DOCUMENTHEADER

-


BUS_ACT = RFBU

USERNAME = SY-UNAME

COMP_CODE = 3000

DOC_DATE = SY-DATUM

PSTNG_DATE = SY-DATUM

FISC_YEAR = 2008

FIS_PERIOD = 03

DOC_TYPE = KZ

TABLES

-


ACCOUNTGL

-


ITEMNO_ACC = 1

GL_ACCOUNT = 113100

DOC_TYPE = KZ

COMP_CODE =

FIS_PERIOD = 03

FISC_YEAR = 2008

PSTING_DATE = SY-DATUM

DE_CRE_IND = H

ACCOUNTPAYABLE

-


ITEMNO_ACC = 2

VENDOR_NO = 205203

COMP_CODE = 3000

PYMT_CUR = USD

PYMT_AMT = 100

CURRENCYAMOUNT

-


1ST LINE

-


ITEMNO_ACC = 1

CURRENCY = SGD

AMT_BASE = -100

2ND LINE

-


ITEMNO_ACC = 2

CURRENCY = SGD

AMT_BASE = 100

Thanks

Santhikumar

Hi,

In my program code for outgoing payments(F-53) I am passing the following values for the BAPI_ACC_DOCUMENT_POST and getting the message in RETURN table as Document Successfully Posted( S RW 605) and I am able to see the document number in export parameter also. I am using BAPI_TRANSACTION_COMMIT after this. But the the document is not updated in database. Can you please suggest me that I have do any customization settings to update in databse or I am passing any wrong values for BAPI.My requirement is using BAPI, I have to update outgoing payments in SAP.

The values I am passing are as below.

DOCUMENTHEADER

-


BUS_ACT = RFBU

USERNAME = SY-UNAME

COMP_CODE = 3000

DOC_DATE = SY-DATUM

PSTNG_DATE = SY-DATUM

FISC_YEAR = 2008

FIS_PERIOD = 03

DOC_TYPE = KZ

TABLES

-


ACCOUNTGL

-


ITEMNO_ACC = 1

GL_ACCOUNT = 113100

DOC_TYPE = KZ

COMP_CODE =

FIS_PERIOD = 03

FISC_YEAR = 2008

PSTING_DATE = SY-DATUM

DE_CRE_IND = H

ACCOUNTPAYABLE

-


ITEMNO_ACC = 2

VENDOR_NO = 205203

COMP_CODE = 3000

PYMT_CUR = USD

PYMT_AMT = 100

CURRENCYAMOUNT

-


1ST LINE

-


ITEMNO_ACC = 1

CURRENCY = SGD

AMT_BASE = -100

2ND LINE

-


ITEMNO_ACC = 2

CURRENCY = SGD

AMT_BASE = 100

Thanks

Santhikumar

13 REPLIES 13
Read only

Former Member
0 Likes
1,649

Hi,

Use the test sequences in SE37.

GOto - SE37 -> Function module -> TEst -> Test sequences..

Give the function module BAPI_ACC_DOCUMENT_POST

BAPI_TRANSACTION_COMMIT.

Execute the first FM and then the commit..

Regards,

Omkaram.

Read only

0 Likes
1,649

Hi Omkaram Yanamala,

I used test sequences in SE37 also, but still it is not updating, what might be the problem?

Thanks

santhikumar

Read only

0 Likes
1,649

Have you tested with u r test data??

Read only

0 Likes
1,649

Hi Omkaram Yanamala ,

I used the test data also, but it is not updating.

Thanks

santhikumar

Read only

Former Member
0 Likes
1,649

hi,

i think it is very important to fill the following elements in the

DOCUMENTHEADER structure



OBJ_KEY
OBJ_SYS
BUS_ACT

please look at sap note 1045412 & 561175 for values

please award some points, if useful

regards

markus

Read only

0 Likes
1,649

Hi Markus tradt,

I am pssing BUS_ACT, even though in Documentation it is mention that OBJ_SYS and OBJ_KEY are mandatory, without passing them also we can create document. Only thing it is not updating in database. what might be the problem? . Object key means the doc number, it has to generate doc number and give it in export parameter.

Thanks

Santhikumar

Read only

0 Likes
1,649

in KEY you should store the doc. number from the external system, that creates the original document, SYS is the ID of the external system

try to populate the fields with dummy values at first, then the document should be written to DB

Read only

0 Likes
1,649

TTYP is the table where values are strored for these parameters

Read only

0 Likes
1,649

Hi Markus Tradt,

What are the values should exist for RFBU reference procedure in TTYP table to update in database table?

Thanks

Santhikumar

Read only

Former Member
0 Likes
1,649

Hi,

Please call the FM BAPI_TRANSACTION_COMMIT after you have finished executing BAPI_ACC_DOCUMENT_POST.

Only after you do a commit will you be able to see the DB updated.

Hope it works,

Thanks,

Sandeep.

Read only

0 Likes
1,649

Hi Sandeep Ram,

I am calling BAPI_TRANSACTION_COMMIT after that, vene though it is not updating in database. what might be the problem?

Thanks

Santhikumar

Read only

Former Member
0 Likes
1,649
Read only

0 Likes
1,649

Hi Omkara Yanamala,

I checked your blog, I am passing same as the code as you send , but still it is not updating in database? Is there any cutomizatiion settings required for RFBU reference procedure to update in database?

Thanks

santhikumar.