‎2007 Sep 17 4:29 AM
Hi Experts,
I want to create FI Doc through BAPI BAPI_ACC_DOCUMENT_POST. but I do not know how to get the below fields for import parameters DOCUMENTHEADER:
OBJ_TYPE
OBJ_KEY
BUS_ACT
I try to use the function module GET_NEXT_FI_DOCUMENT_NUMBER to get above fields but it do not work, Because OBJ_KEY is the FI doc number, How I can get the FI doc number before calling the BAPI. I try to use the function module NUMBER_GET_NEXT to get next doc number but it seems that it is not a good idea, Would you please give me an example for this issus?? Thanks very much and you will be rewarded if it is helpful.
‎2007 Sep 17 4:33 AM
Joe,
Please leave all the three header fields of the blank :
I think the fields are OBJ_TYPE, OBJ_KEY, and OBJ_SYS. This should be left blank if your are posting an accounting document which has an internal numbering range.
You can probably use ''RFBU' as your BUS_ACT.
Hope it helps.
‎2007 Sep 17 4:33 AM
Joe,
Please leave all the three header fields of the blank :
I think the fields are OBJ_TYPE, OBJ_KEY, and OBJ_SYS. This should be left blank if your are posting an accounting document which has an internal numbering range.
You can probably use ''RFBU' as your BUS_ACT.
Hope it helps.
‎2007 Sep 17 4:42 AM
Here's a snippet of code from a place we have used it, which agrees with the post above... our FI document numbers are internally assigned.
Jonathan
* Document header
*
* Sender ID - We don't have an external ref, so let SAP set these
*
ls_fi_doc_header = is_fi_doc_header.
ls_fi_doc_header-obj_type = space.
ls_fi_doc_header-obj_key = space.
ls_fi_doc_header-obj_sys = space. "blank for same as current
*
* Fill in some known knowns :-)
*
ls_fi_doc_header-comp_code = gc_bukrs. "Our Company code
ls_fi_doc_header-username = sy-uname. "Current user
ls_fi_doc_header-bus_act = gc_glvor_fi_posting. "RFBU
if ls_fi_doc_header-pstng_date is initial.
ls_fi_doc_header-pstng_date = sy-datum. "Post today
endif.
if ls_fi_doc_header-doc_date is initial.
ls_fi_doc_header-doc_date = sy-datum. "Assume today
endif.
*" etc etc
‎2007 Sep 17 6:02 AM
Hi Srihari Hebbar and Jonathan Coleman , the problem had been solved and the issued was closed. Thanks for your kindness.
Joe