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 an document through BAPI_ACC_DOCUMENT_POST

Former Member
0 Likes
1,968

Hi,

Im using BAPI_ACC_DOCUMENT_POST bapi to post a parked document ( vendor invoice document ).

Although BAPI is showing result as successful but the status of that document is not getting updated in table BKPF.

Also I did commit work and BAPI_TRANSACTION_COMMIT. Still showing status as 'V' - parked doc.

what is the relevance of obj_type field?

im using BUS_ACT = 'RFBU'. Is this correct.

Please reply soon.

Thanks ,

Divya

11 REPLIES 11
Read only

Former Member
0 Likes
1,285

BUS_ACT = 'RFBU' is correct. What is the output in RETURN structure ?

Regards

Vinod

Read only

0 Likes
1,285

thnx.

the ruturn msg is "Document posted successfully: ZBKPF 0900000140007 2009 DPA003".

Im trying different entried in OBJ_TYPE from its master table TTYP, but still not working.

I have tried

OBJ_TYPE = 'BKPF' / 'BKPFF' / 'BKPFI' ,

but its giving error as incorrect enrty in obj_type.

Read only

0 Likes
1,285

Check IBKPF

Read only

0 Likes
1,285

Check with IBKPF For For vendor posting 'BKPFF', also if you set a different year or period from the value that you have in the posting date you might get this error.

Read only

0 Likes
1,285

Hi,

Don't pass anything in Import parameters (OBJ_TYPE,OBJ_KEY,OBJ_SYS) if your SAP version is ECC5 or above.

Regards

Vinod

Read only

0 Likes
1,285

yeah vinod..im not passing anything to import parameters..

nothing is working..tried a lot....

I have ECC5.0.....is ther note or something related to this BAPI.

Read only

0 Likes
1,285

Divya,

Check OSS notes 561175, 938165

Read only

0 Likes
1,285

Hi,

Are you getting "0900000140007" document in BKPF ?

Regards

Vinod

Read only

0 Likes
1,285

yes Vinod...

actually the doc im trying to post is 90000006 007 2010, status = 'V'

and it was recreation of the doc 9000000140 007 2009, status 'W'

so in the result its showing the object key which is same as earlier doc with status = 'W'.

suggest me pls.

i hv tried the checked above given notes also they r already apllied in system.

Read only

0 Likes
1,285

Hi,

Are you filling the reference parked document number details to following structure fields while calling BAPI?

documentheader-AC_DOC_NO

documentheader-FISC_YEAR

Regards

Vinod

Read only

Former Member
0 Likes
1,285

Check this way

lw_cab-username   = sy-uname.
lw_cab-doc_type   = 'KR'.
lw_cab-comp_code  = '0001'.
lw_cab-bus_act = 'RFBU'.     <-------------" Is Correct.
lw_cab-obj_type = 'BKPFF'.
lw_cab-obj_key = '190000032000012007'.
lw_cab-obj_sys = 'HRDCLNT100'.
 
 
* I only want to modify this field.
lw_cab-ref_doc_no = 'NEW'.
 
 
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
    EXPORTING
      documentheader = lw_cab
    IMPORTING
      obj_key        = l_obj
    TABLES
      currencyamount = li_currencyamount
      return         = li_return