ā2011 Oct 04 7:26 AM
Dear experts,
We need help in one of the BAPI's BAPI_ACC_DOCUMENT_CHECK to post document.
BAPI working successfully if company code at header and item level is same but if items are from different company codes then we received error saying "Required fieldsOBJ_TYPE, OBJ_KEY, OBJ_SYS are blank.".
When searched forums on this, we found these fields are not mandatory however we receive the error message.
Also, found many threads on this but didnt get a proper link as to how can we proceed to resolve this issue.
Can you please help us if any data we entered is incorrect or we are missing with some functional configuration.
Thanks for your time.
ā2011 Oct 04 8:12 AM
Hi
See SAP Note 306504 - Collective note: BAPIs for the AC interface, about these fields.
Regards
Eduardo
ā2011 Oct 04 8:12 AM
Hi
See SAP Note 306504 - Collective note: BAPIs for the AC interface, about these fields.
Regards
Eduardo
ā2011 Oct 04 1:51 PM
Thanks Eduardo. We did checked this note earlier but didnt found helpful to resolve our issue.
ā2011 Oct 04 2:10 PM
Hi
You have different company code between item and header for the same document?
Max
ā2011 Oct 04 2:16 PM
Hi Park,
If item-company code NE header-company code then you need to pass profit center in item level this is based on configuration it will work.
BAPI_ACC_DOCUMENT_CHECK is for to check all the itmes are correct or not . Not to post the document
Bettter to use BAPI_ACC_DOCUMENT_POST to post the documents .
ā2011 Oct 04 2:16 PM
ā2011 Oct 04 2:22 PM
Hi Devireddy,
Before posting we check the data and if no errors we pass the same data to FM "BAPI_ACC_DOCUMENT_POST".
We are also entering the Profit Center and Cost Center values for each line item.
Thanks.
ā2011 Oct 04 2:29 PM
Uhm
I've never posted document having a different company code between header and item...can you give us the class and number message?
Max
ā2011 Oct 04 3:35 PM
More thoughts we would like to share, If Header & items are of same Company Code the same BAPI is working good however an
error is encountered for cross Company Codes.
Message Class for the errors messages are --
TYPE: E, ID : RW, NUMBER: 602, Message: Required field was not trnasferred DOCUMENTHEADER - OBJ_TYPE
message id : RW, message No. 602 and Message : Required field was not trnasferred DOCUMENTHEADER - OBJ_TYPETYPE: E, ID : RW, NUMBER: 602, Message: Required field was not trnasferred DOCUMENTHEADER - OBJ_TYPE
erroe message, message id : RW, message No. 602 and Message : Required field was not trnasferred DOCUMENTHEADER - OBJ_TYPE
Gunasekhar -
We are not sure what values we need to provide for OBJ_TYPE Sender identification, OBJ_KEY Reference number of the source document, OBJ_SYS Logical system of the source document.
We tried creating a dummy entry at TTYP but things got worse and received a dump.
Dummy values we entered -
OBJ_TYPE - ZBKKPF
OBJ_KEY - $
OBJ_SYS - QU-NAM
ā2011 Oct 05 11:15 AM
ā2011 Oct 05 11:31 AM
Try to check the routine check_and_fill_acc_document, here you should see the following code:
IF document_header-obj_type = 'BKPFF'.
PERFORM append_msg_to_return
USING 'E' "TYPE
'RW' "ID
'628' "NUMBER
'BKPFF' "MESSAGE_ONE
'DOCUMENTHEADER' "MESSAGE_TWO
'DOCUMENTHEADER' "PARAMETER
1 "ROW
'OBJ_TYPE'. "FIELD
ENDIF.
IF document_header-obj_type IS INITIAL AND
document_header-obj_key IS INITIAL AND
document_header-obj_sys IS INITIAL AND
document_header-ac_doc_no IS INITIAL.
LOOP AT account_gl WHERE NOT stat_con IS INITIAL
or NOT ac_doc_no IS INITIAL.
EXIT.
ENDLOOP.
IF NOT sy-subrc IS INITIAL.
PERFORM reference_create_prelim
CHANGING document_header-obj_type
document_header-obj_key
document_header-obj_sys.
document_header-bus_act = 'RFBU'. "note1045412
ENDIF.
ENDIF.The routine reference_create_prelim should be called and those fields should be filled
Max
ā2011 Oct 04 2:27 PM
Import parameter "DOCUMENTHEADER" is mandatory and it has fields AWTYP - Reference Transaction, OBJ_KEY - Reference Key, OBJ_SYS - Logical system of source document.
Parameters for the transfer of document header data.
The following fields must be filled:
OBJ_TYPE Sender identification
OBJ_KEY Reference number of the source document
OBJ_SYS Logical system of the source document
COMP_CODE Company code
PSTNG_DATE Posting date
BUS_ACT Business transaction
USERNAME Document creator
Fill these fields and try again.
ā2013 Mar 16 2:19 PM
Hi Park Anderson,
I want to add two more fields through extension1 in Bapi_acc_documnet_check. Can anyone explain me what I should do?? and also explain me what is documentheader importing parameter. What are the necessary fields I have to fill in that? thanks in advance.