06-17-2009 8:55 PM
This is what I am passing to this BAPI
FORM F_POST_REV_GL_TRANSACTION .
DATA: gv_doc_header LIKE bapiache08,
refresh lt_reversal.
lt_reversal-COMP_CODE = gv_bukrs.
lt_reversal-AC_DOC_NO = gv_Posted-doc_num.
append lt_reversal.
CALL FUNCTION 'BAPI_ACC_GL_POSTING_REV_POST'
EXPORTING
REVERSAL = lt_reversal
IMPORTING
OBJ_TYPE = gv_doc_header-obj_type
OBJ_KEY = gv_doc_header-obj_key
OBJ_SYS = gv_doc_header-obj_sys
TABLES
RETURN = lt_return.
ENDFORM. " F_POST_REV_GL_TRANSACTION
I am getting this error on the return:
Required field OBJ_TYPE was not transferred in parameter REVERSAL
Required field OBJ_KEY_R was not transferred in parameter REVERSAL
Required field OBJ_SYS was not transferred in parameter REVERSAL
06-17-2009 10:42 PM
Hi,
refer the below link......
hope it may help u.......
http://www.sapfans.com/forums/viewtopic.php?p=546963&sid=9a339f6928b96dbd46eda53286a0e11d
regards
kanishak
06-17-2009 9:10 PM
It's all available in BKPF when you retrieve the document data to be reversed.
Rob
06-17-2009 9:15 PM
thanks for the info on bkpf... I am trying to find out what is all needed to make this BAPI work?
Right now I am only passing comp_code and the document number.
anyone know how this BAPI works?
06-17-2009 10:42 PM
Hi,
refer the below link......
hope it may help u.......
http://www.sapfans.com/forums/viewtopic.php?p=546963&sid=9a339f6928b96dbd46eda53286a0e11d
regards
kanishak
06-18-2009 2:10 PM
thanks K.
I am still looking for the answer for what are the 'required fields' to make this BAPI work?
also, do I need to populate the obj-sys, obj_type, obj_key for the reversal record? and would they just be taken from the docuemnt that I just posted in BAPI_ACC_GL_POSTING_POST.
06-18-2009 2:50 PM
Hello Keith,
If you read the BAPI documentation, then you will find the following params are required to be passed :
OBJ_TYPE Sender ID
OBJ_KEY Reference number of the reversal document (source document)
OBJ_SYS Logical system
OBJ_KEY_R Reference number of the document to be reversed.
And i feel you are not passing these values when calling this BAPI.
BR,
Suhas
06-18-2009 3:57 PM
Thanks Suhas,
here is what I am passing:
lt_reversal-obj_sys = lv_obj_sys.
lt_reversal-OBJ_KEY_R = gv_posted-doc_num.
lt_reversal-obj_type = lv_obj_type.
lt_reversal-obj_key = lv_obj_key.
lt_reversal-REASON_REV = '02'.
lt_reversal-FIS_PERIOD = '06'.
lt_reversal-COMP_CODE = gv_bukrs.
lt_reversal-AC_DOC_NO = gv_Posted-doc_num.
lt_reversal-PSTNG_DATE = gv_psting_dt.
append lt_reversal.
CALL FUNCTION 'BAPI_ACC_GL_POSTING_REV_POST'
EXPORTING
REVERSAL = lt_reversal
IMPORTING
OBJ_TYPE = gv_doc_header-obj_type
OBJ_KEY = gv_doc_header-obj_key
OBJ_SYS = gv_doc_header-obj_sys
TABLES
RETURN = lt_return.
I am getting the errors:
Reversal in component Financial Accounting not possible
Reversal not possible, accounting document for the ref. does not exist
06-18-2009 4:15 PM
Hi All,
here is what I am trying to do:
1) BAPI BAPI_ACC_GL_POSTING_POST - create document
2) BAPI_TRANSACTION_COMMIT - commit document
3) if the file type is an accrual call BAPI_ACC_GL_POSTING_REV_POST - reverse document
does this sound correct?
06-18-2009 4:44 PM
I found that to facilitate my requirements I would only need to populate the Reversal Reason (which is on part of the structure bapiache08 for the BAPI we are using already BAPI_ACC_GL_POSTING_POST) and Reversal Date
Reversal Date which is on Table BKPF field STODT, then everything else is taken care of the system.
Any ideas?
06-18-2009 6:00 PM
anyone know if it would be possible to populate the tabel BKPF and fill in that field STODT after the document has been created?
06-19-2009 9:04 AM
Hello Keith,
This field cannot be populated while creating an a/c'ing doc. While calling the BAPI may be you need to pass this value (for e.g., you can pass SY-DATUM or SY-DATUM + 5) and the BAPI will update this field in the DB.
Hope i am clear.
BR,
Suhas
06-19-2009 1:18 PM
Suhas,
I tried upping (adding + 15 to sy-datum) the posting date to see if it would populate the Reversal date but, it did not.
Is that what you are suggesting?
thanks
Keith
08-12-2015 2:09 PM
How to determine OBJ_TYPE? mine only works with OBJ_TYPE BKPFF, others will fail.