‎2006 Oct 03 7:08 PM
Hi all,
I am using BAPI_ACC_DOCUMENT_POST for posting of my invoices.
It is posting the document but in the posting key column "PK" it is displaying number "11" instead of "01".
11 is used for credit memo's.
01 is used for Invoices.
Is there any way i could handle this change in my program?
i saw few psoting in forum but it is not clear.
what should i do? Any help with really appreciated.
‎2006 Oct 03 7:14 PM
I think it depends on the business transaction you pass in the header. What are you passing?
Rob
‎2006 Oct 03 7:14 PM
HI,
Maintain the t030b table with the required posting keys.
System determines the posting based on the transaction key whatever you pass it from BAPIACGL09-kTOSL.
FYI .. please Check the program LACC9F20 line 951, this is the place where it fills the posting key
Regards
Sudheer
‎2006 Oct 03 7:19 PM
‎2006 Oct 03 7:27 PM
HI Sudhir,
The table is already maintained. So, there are couple of entries -
Transaction Debit Credit
AGD 01 11
HRD 01 11
so which one should i be using?
mine should be credit entry = 01
debit entry = 40.
how can i reference them?
thanks and regards,
Vasu.
‎2006 Oct 03 7:15 PM
u may not be able to make the change from your program as the BAPI implicitly call a FM to determine the posting key.
There is some BTE/ EXIT that has to be implemented.
If its urgent and all the records have the same posting then better do a BDC as i had the same problem. Cause the BAPI messes up the CREDITS AND DEBIT MEMO'S with invoices.
‎2006 Oct 03 7:36 PM
Hi,
Check the amounts that are you passing..Make sure the negative/positive sign is correct in the CURRENCYAMOUNT parameter...
Thanks,
Naren
‎2007 Apr 06 6:31 AM
Create a implemtention of BADI ACC_DOCUMENT, set the value directly in method if_ex_acc_document~change. Table T030B is not needed.
METHOD if_ex_acc_document~change.
DATA:
ls_extension2 TYPE bapiparex,
lv_posnr TYPE posnr.
FIELD-SYMBOLS:
<fs_accit> TYPE accit.
LOOP AT c_extension2 INTO ls_extension2.
CASE ls_extension2-STRUCTURE.
WHEN 'BSCHL'. "posting key
lv_posnr = ls_extension2-valuepart1+0(3).
READ TABLE c_accit ASSIGNING <fs_accit> WITH KEY posnr = lv_posnr.
IF sy-subrc = 0.
<fs_accit>-bschl = ls_extension2-valuepart1+3(2).
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDLOOP.
ENDMETHOD.