on 08-06-2013 11:08 AM
Hi Experts,
I am getting error while applying BAPI: BAPI_ACC_DOCUMENT_REV_POST.
kindly guide me.
Errors:--
E | RW | 609 | Error in document: BKPF 00400000000110002012 MEDCLNT200 |
E | RW | 632 | Document BKPF 00400000000110002012 MEDCLNT200 cannot be reversed |
E | RW | 628 | Incorrect entry in field OBJ_TYPE: BKPF |
Code i have been written for this are as follows:----
rev-obj_type = 'BKPF'.
rev-obj_key = '00400000000110002012'.
rev-obj_key_r = '00400000000110002012'.
rev-obj_sys = 'MEDCLNT200'.
rev-reason_rev = '01'.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_REV_POST'
EXPORTING
reversal = rev
bus_act = 'RFBU'
IMPORTING
obj_type = gv_obj_type
obj_key = gv_obj_key
obj_sys = gv_obj_sys
TABLES
return = gt_return.
Regards,
Rishi
Hi ,
Plz check BDC or Rev FM:You may need to cover cross company/ normal one in BDC but i believe FM covers both .
* Normal one reversal sample is given below ..Cross company tcode differs
PERFORM sub_populat_bdc_data USING:
'SAPMF05A' '0105' c_x,
'BDC_CURSOR' 'RF05A-GJAHS' ' ',
'BDC_OKCODE' '/00' ' ',
'RF05A-BELNS' docno ' ',
'BKPF-BUKRS' header-ccode ' ',
'RF05A-GJAHS' header-fyear ' ',
'BSIS-BUDAT' postingdate ' ',
'UF05A-STGRD' postingreason ' ',
'SAPMF05A' '0105' c_x,
'BDC_CURSOR' 'RF05A-BELNS' ' ',
'BDC_OKCODE' '=BU' ' ',
'RF05A-BELNS' docno ' ',
'BKPF-BUKRS' header-ccode ' ',
'RF05A-GJAHS' header-fyear ' ',
'UF05A-STGRD' reason ' '.
CALL TRANSACTION 'FB08'
USING bdcdata
MODE mode
MESSAGES INTO t_bdcmsgcoll.
OR
**--BAPI for FI document reversal
CALL FUNCTION 'BAPI_ACC_GL_POSTING_REV_POST'
EXPORTING
reversal = header
IMPORTING
obj_type = header-obj_type
obj_key = header-obj_key
obj_sys = header-obj_sys
TABLES
return = y_return.
Hope this helps.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rishi!
Which Object Type has the Document you whant to reverse.
BKPF-AWTYP?
regards,
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Rishi,
Please check this
http://scn.sap.com/message/9539660
https://scn.sap.com/thread/1625915
by
buz_sap
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.