‎2010 Sep 16 8:20 AM
Hi All,
I am using bapi BAPI_ACC_DOCUMENT_POST its asking OBJECT TYPE AND OBJECT KEY which parameters I have to enter ?
Please guide me.
Thanks in advance .
Regards,
Suresh Babu
‎2010 Sep 16 8:41 AM
Read documentation of BAPI"BAPI_ACC_DOCUMENT_POST".It gives details regarding each and every parameter.Most of the BAPIs are very well documented,so if you go through the documentation,you will get answers of most of your queries .
‎2010 Sep 16 9:18 AM
Hi ,
I gon through that document but I am getting errors as
required field obj_type was not tranfered in parameter DOCUMENT HEADER
required field obj_key was not tranfered in parameter DOCUMENT HEADER
required field obj_sys was not tranfered in parameter DOCUMENT HEADER
Please guide me.
Regards,
Suresh
‎2010 Sep 16 9:26 AM
As suggested by Suhas,post a document via F-29 and then go to se11 and check values in fieds AWTYP,AWKEY and AWSYS.
If you have gone through the documentation,then you must have read that :The following fields must be filled:
o OBJ_TYPE Sender identification
o OBJ_KEY Reference number of source document
o OBJ_SYS Logical system of source document
are required fields in document header.you need to populate these fields with appropriate values.
‎2010 Sep 16 9:45 AM
Hi,
Thank you for giving reply.
I tried but its giving errors as
ERROR IN DOCUMENT BKPF 9700000003ZSUR2010 SPDLNCLNT800
INCORRECT ENTRY IN FIELD OBJECT_TYPE BKPF
Please guide me.
Regards,
Suresh
‎2010 Sep 16 10:06 AM
Hello,
You shouldn't be checking BKPF-AWTYP, rather check BKPF-GLVOR as mentioned in my previous post.
BR,
Suhas
‎2010 Sep 16 10:19 AM
Hi Suha,
I checked based on your guidline only what I did will elabrate to you.
I posted 50000 Rs amount in customer account by using tcode f-29 .
Later I checked bkpf table based on that now I am trying to post through BAPI but its giving error message like this.
Regards,
Suresh
‎2010 Sep 16 10:26 AM
Hi,
I think you should use BKPFF as the value to OBJ_TYPE. This SDN Wiki may be helpful [FI Document Interface|http://wiki.sdn.sap.com/wiki/display/ABAP/BusinessTransactionEvent-RWBAPI01-ForAccountingDocument+Interface].
Regards
Vinod
‎2010 Sep 16 10:38 AM
>
> I posted 50000 Rs amount in customer account by using tcode f-29 .
>
> Later I checked bkpf table based on that now I am trying to post through BAPI but its giving error message like this.
Hello,
What is the value in the field BKPF-GLVOR for the resulting a/c'ing doc?
@Vinod: If i read the BAPI documentation, only the a/c'ing docs for the Business Transactions(BKPF-GLVOR) RFBU, RMRP, SD00 & RMWA can be posted. In your Wiki is see that you've passed 'RFBU' to BUS_ACT as well. So setting OBJ_TYPE = 'BKPFF' won't help if business transaction for F-29 is different.
Hope i'm clear.
BR,
Suhas
‎2010 Sep 16 10:44 AM
Hi Vinod,
Thank you for giving reply I tried with BKPFF getting same error.
Regards,
Suresh
‎2010 Sep 16 10:49 AM
Hi
@Suhas : I have created an entry through F-29. Value of BKPF-GLVOR is RFBU.
Edit : Currently my system is ECC 5.0. As mentioned in the Wiki, when I pass the values of OBJ_KEY system is giving error and not posting the Accounting document. But if I comment the part of assinging values to OBJ_KEY, OBJ_TYPE, OBJ_SYS, Accounting document is created successfully.
Do you know the reason behind this behaviour ?
Regards
Vinod
Edited by: Vinod Kumar on Sep 16, 2010 3:19 PM
‎2010 Sep 16 11:00 AM
Hey Vinod,
Me on ECC6.0 & i see that these fields are "must be filled". What does the ECC5.0 documentation state ?
BR,
Suhas
‎2010 Sep 16 11:12 AM
Hi Suhas,
Documentation says these fields MUST BE filled. But the code I have mentioned in WiKi is working correctly in Production(ECC 5) Further, When I pass these values, Bapi returns an error.
Earlier I used the same code with values passed to these fields (with 4.7), It started giving errors after migrating to ECC5.0. As a trial and error method, I tried to call the bapi without these parameters and it worked (still confused how it is working correctly in Production)
Regards
Vinod
‎2010 Sep 16 11:16 AM
Hello,
Never faced this situation. Did you check any underlying config which might be missing in DEV system ?
BR,
Suhas
‎2010 Sep 16 11:17 AM
Hi Vinod,
Currently I am working on 4.7 version may be due to that its giving error.Please let me know.
Regards,
Suresh
‎2010 Sep 16 11:36 AM
Hi Suhas,
The code in LACC9F20 reads. Means even if I didn't pass values to these parameters, system determines it internally. Is this same in ECC 6.0 also. The first validation if BKPFF was not there in 4.7 which is new in ECC 5.0.
*FI Belegnummer als Referenz
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.
form reference_create_prelim
changing e_awtyp type awtyp
e_awkey type awkey
e_awsys type awsys.
data: log_sys type logsys.
e_awtyp = 'BKPFF'.
e_awkey = '$'.
call function 'OWN_LOGICAL_SYSTEM_GET'
importing
own_logical_system = log_sys
exceptions
own_logical_system_not_defined = 1
others = 2.
if sy-subrc is initial.
e_awsys = log_sys.
endif.Regards
Vinod
‎2010 Sep 17 12:05 PM
Hi Vinod and Suhas,
Thank you very much for giving reply.
I am unable to find the solution for this issue still I am getting error like in correct entry in the field obj_type : BKPF .Even I posted manully with f-29 its happening latter I check with bapi BAPI_ACC_DOCUMENT_CHECK there also I am getting same error.I am not getting why its happening.
Regards,
Suresh
‎2010 Sep 20 8:25 AM
Hi Vinod and Suhas,
Now we cahnged version to ECC 6.0 but here I am getting error as "enter a payment currency different to EUR".
Please guide me.
Regards,
Suresh
Edited by: sureshbabusure on Sep 20, 2010 9:25 AM
Edited by: sureshbabusure on Sep 20, 2010 9:26 AM
‎2010 Sep 20 8:45 AM
Hello Suresh,
Try posting with the same data in F-29, are you getting this error message ?
BR,
Suhas
‎2010 Sep 20 9:29 AM
Hi,
I checked by posting with F-29,its working fine.
Regards,
Suresh
‎2010 Sep 16 9:17 AM
Hello,
BAPI_ACC_DOCUMENT_POST can post documents for these business transactions (field BKPF-GLVOR): RFBU, SD00, RMRP & RMWA. As already mentioned the BAPI is well documented you should read it before using it.
Try posting a doc via F-29 & check the BKPF-GLVOR field of the resulting doc & revert back. I'm not able to post a doc via f-29, some config issues.
BR,
Suhas
‎2010 Sep 20 10:58 AM
Thank you Vinod and Suhas Problem has been solved that is due to currency problem like company code having currency of EUR but customer is paying with currency USD.