BAPI_ACC_DOCUMENT_POST does not update BKPF/BSEG tables
Hello,
I used bapi_acc_document_post to post a accounting document The following routine says that the document is successfully posted, however, does not update the acccounting tables. I read several messages on the SDN and unable to get the correct answer.
Your help is appreciated.
Regards
William
REPORT ze_bapi_acc_document_post .
SELECTION-SCREEN BEGIN OF BLOCK bl01 .
SELECTION-SCREEN ULINE.
PARAMETERS:
ref_key LIKE bapiache01-obj_key DEFAULT 'TEST000001BAPICALL',
dest LIKE bdi_logsys-logsys DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK bl01 .
DATA:
gd_documentheader LIKE bapiache09,
gd_customercpd LIKE bapiacpa09,
gd_fica_hd LIKE bapiaccahd,
it_accountreceivable LIKE TABLE OF bapiacar09 WITH HEADER LINE,
it_accountgl LIKE TABLE OF bapiacgl09 WITH HEADER LINE,
it_accounttax LIKE TABLE OF bapiactx09 WITH HEADER LINE,
it_criteria LIKE TABLE OF bapiackec9 WITH HEADER LINE,
it_valuefield LIKE TABLE OF bapiackev9 WITH HEADER LINE,
it_currencyamount LIKE TABLE OF bapiaccr09 WITH HEADER LINE,
it_return LIKE TABLE OF bapiret2 WITH HEADER LINE,
it_receivers LIKE TABLE OF bdi_logsys WITH HEADER LINE,
it_fica_it LIKE TABLE OF bapiaccait WITH HEADER LINE,
it_accountpayable LIKE TABLE OF bapiacap09 WITH HEADER LINE,
it_paymentcard LIKE TABLE OF bapiacpc09 WITH HEADER LINE,
it_ext LIKE TABLE OF bapiacextc WITH HEADER LINE.
PERFORM fill_internal_tables.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
DESTINATION dest
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
return = it_return.
WRITE: / 'Result of check all:'. "#EC NOTEXT
PERFORM show_messages.
DATA: l_type LIKE gd_documentheader-obj_type,
l_key LIKE gd_documentheader-obj_key,
l_sys LIKE gd_documentheader-obj_sys.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
IMPORTING
obj_type = l_type
obj_key = l_key
obj_sys = l_sys
TABLES
accountgl = it_accountgl
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
return = it_return
EXCEPTIONS
OTHERS = 1.
WRITE: / 'Result of post:'. "#EC NOTEXT
PERFORM show_messages.
REFRESH IT_RETURN.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
IMPORTING
RETURN = IT_RETURN.
COMMIT WORK. .
BREAK-POINT.
Form fill_internal_tables
FORM fill_internal_tables.
PERFORM fill_header.
PERFORM fill_accountgl.
PERFORM fill_accountap.
PERFORM fill_accounttax.
PERFORM fill_currencyamount.
ENDFORM. " fill_internal_tables
Form Show_messages
FORM show_messages.
IF it_return[] IS INITIAL.
WRITE: / 'no messages'.
ELSE.
SKIP 1.
LOOP AT it_return.
WRITE: / it_return-type,
(2) it_return-id,
it_return-number,
(80) it_return-message,
it_return-message_v1,
(20) it_return-parameter,
(3) it_return-row,
it_return-field.
ENDLOOP.
ENDIF.
ULINE.
ENDFORM. " Show_messages
FORM fill_accountgl *
FORM fill_accountgl.
Actual invoice line
CLEAR it_accountgl.
it_accountgl-itemno_acc = 2.
it_accountgl-gl_account = '0000009223'.
it_accountgl-item_text = 'Line Iten'. "#EC NOTEXT
it_accountgl-profit_ctr = 'DNDDUMMY'.
it_accountgl-comp_code = '0180'.
it_accountgl-tax_code = 'IG'.
it_accountgl-FUNDS_CTR = '1985BA'.
it_accountgl-COSTCENTER = '1985BA'.
it_accountgl-FUND = 'C113'.
it_accountgl-TAXJURCODE = 'CAON'.
APPEND it_accountgl.
ENDFORM. "fill_accountgl
FORM fill_header *
FORM fill_header.
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
own_logical_system = gd_documentheader-obj_sys.
OBJ_TYPE has to be replaced by customers object key (Y* or Z*)
gd_documentheader-obj_type = 'BKPFF'.
gd_documentheader-obj_key = ref_key.
gd_documentheader-BUS_ACT = 'RMRP'.
gd_documentheader-username = sy-uname.
gd_documentheader-header_txt = 'BAPI Test'. "#EC NOTEXT
gd_documentheader-obj_key_r =
GD_DOCUMENTHEADER-reason_rev =
gd_documentheader-comp_code = '0180'.
GD_DOCUMENTHEADER-AC_DOC_NO =
gd_documentheader-fisc_year = '2008'.
gd_documentheader-doc_date = sy-datum.
gd_documentheader-pstng_date = '20070901'.
GD_DOCUMENTHEADER-TRANS_DATE = SY-DATUM.
GD_DOCUMENTHEADER-VALUE_DATE =
GD_DOCUMENTHEADER-FIS_PERIOD =
gd_documentheader-doc_type = 'RE'.
gd_documentheader-ref_doc_no = '6000009268'.
GD_DOCUMENTHEADER-COMPO_ACC = 'FI'.
gd_documentheader-bus_act = 'RFBU'.
ENDFORM. "fill_header
FORM fill_ap *
FORM fill_accountap.
vendor line
CLEAR it_accountpayable.
it_accountpayable-itemno_acc = 1.
it_accountpayable-comp_code = '0180'.
it_accountpayable-pmnttrms = '0006'.
it_accountpayable-TAX_CODE = 'IG'.
it_accountpayable-vendor_no = '0001200051'.
it_accountpayable-item_text = 'Vendor Line'. "#EC NOTEXT
APPEND it_accountpayable.
ENDFORM. "fill_accountap
FORM fill_tax *
FORM fill_accounttax.
tax line
CLEAR it_accounttax.
it_accounttax-itemno_acc = 3.
it_accounttax-gl_account = '0000081710'.
it_accounttax-tax_code = 'IG'.
it_accounttax-acct_key = 'VST'.
it_accounttax-TAXJURCODE = 'CA00'.
APPEND it_accounttax.
ENDFORM. "fill_accounttax
FORM fill_currencyamount *
FORM fill_currencyamount.
CLEAR it_currencyamount.
it_currencyamount-itemno_acc = 1.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'CAD'.
it_currencyamount-amt_base = '106.00'.
APPEND it_currencyamount.
CLEAR it_currencyamount.
it_currencyamount-itemno_acc = 2.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'CAD'.
it_currencyamount-amt_base = '100.00'.
APPEND it_currencyamount.
CLEAR it_currencyamount.
it_currencyamount-itemno_acc = 3.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'CAD'.
it_currencyamount-amt_base = '6.00'.
APPEND it_currencyamount.
ENDFORM. "fill_currencyamount
U have to implement the BADI for this.. ‘AC_DOCUMENT’
Add source code into Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK,
*---<SAPLBPFC> is for Posting with BAPI: BAPI_ACC_DOCUMENT_POST
*---<SAPCNVE > is for Posting(Tax) with BAPI: BAPI_ACC_DOCUMENT_POST
*---<SAPMSSY1> is for Test(Check) with BAPI: BAPI_ACC_DOCUMENT_CHECK
DATA: wa_header TYPE acchd.
IF sy-xprog NE ' SAPMSSY1 '.
CLEAR wa_header.
wa_header = im_document-header.
ex_document-header-bktxt = wa_header-bktxt.
CLEAR wa_header.
ENDIF.
Similar Messages
-
BAPI_ACC_DOCUMENT_POST does not update BKPF/BSEG
Hi,
I am using BAPI_ACC_DOCUMENT_POST in an user exit for transaction MIGO to make GL postings during Goods Receipt. The BAPI returns success message saying that the 'document is posted successfully'. But I cannot see the entries when I use the FI documents link in the posted GR. I have searched the forums for relevant posts and have tried the following approaches, but it doesnt work:
I have used BAPI_TRANSACTION_COMMIT after the above BAPI.
I tried giving the obj_type and obj_key blank, but the BAPI throws an error saying they are mandatory parameters
I have tried changing obj_type to 'BKPF' and 'BKPFF', but the BAPI gives an error message
Please help me in this regard. Thanks in advance.For the header structure I put this :
[code]
documentheader-obj_type = 'BKPFF'.
documentheader-obj_key = '$'.
CONCATENATE sy-sysid sy-mandt INTO documentheader-obj_sys.
documentheader-bus_act = 'RFBU'.
[/code]
Do u have something like this ?
What is the error msg when u post with BKPFF ? -
Tax Amount is not updated into BSEG
Dear All,
I have recently added a tax amount field MWSTS from table BSEG into FBL1N - Vendor Line Item Display. To my surprise the input tax amount is not updated into BSEG table. The input tax is normally posted using either MIRO or FB60.
Any one has the same problem? Can please kindly share how to fix the problem?
Thanks in advance for your kind assisstance.
rgds,
DahliaThanks Andreas,
However I do believe that it should be updated into BSEG - MWSTS as we have mutliple companies in different countries in the system. All the other companies have the input rate updated into BSEG - MWSTS for the vendor line item, only the company for India is not updated.
Yes, BSET do have the tax amount updated but I can't use BSET table in FBL1N. I need to provide the tax amount information for each vendor line item in FBL1N.
thks
Dahlia -
Bug in PL/SQL - Does not update Table if table name & variable name same in
Dear All,
If tabale name & vairable name is same in a Stored Procedure, UPDATE to table does not take place.
For example run following 2 procedures. First procedure does the insert properly to table but second procedure does not update the table.
create or replace procedure BugDemo1
as
LAST_NAME VARCHAR2(30);
FIRST_NAME VARCHAR2(30);
Begin
LAST_NAME := 'Prasad';
FIRST_NAME := 'Raghnandan';
Insert into com_people (id,Roles, LAST_NAME, FIRST_NAME) values (77777,'Patient', LAST_NAME, FIRST_NAME);
end;
create or replace procedure BugDemo2
as
LAST_NAME VARCHAR2(30);
FIRST_NAME VARCHAR2(30);
Begin
LAST_NAME := 'Pra';
FIRST_NAME := 'Raghu';
Update com_people set
LAST_NAME = LAST_NAME,
FIRST_NAME = FIRST_NAME
where id = 77777 ;
end;
------------------------------------------Hi,
It is not a bug. Oracle is updating the records. Here Oracle is treating the variable name as COLUMN_NAME. Since priority is higher for a COLUMN on variable so each column is getting updated by itself resulting no change in data.
SQL> CREATE TABLE com_people
2 (
3 id NUMBER (5),
4 Roles VARCHAR2(20),
5 LAST_NAME VARCHAR2(20),
6 FIRST_NAME VARCHAR2(20)
7 )
8 ;
Table created
SQL> Insert into com_people (id,Roles, LAST_NAME, FIRST_NAME) values (77777,'Patient', 'LAST_NAME', 'FIRST_NAME');
1 row inserted
SQL> COMMIT;
Commit complete
SQL>
SQL> create or replace procedure BugDemo2
2 as
3 LAST_NAME VARCHAR2(20);
4 FIRST_NAME VARCHAR2(20);
5 Begin
6 LAST_NAME := 'Pra';
7 FIRST_NAME := 'Raghu';
8
9 Update com_people set
10 LAST_NAME = LAST_NAME,
11 FIRST_NAME = FIRST_NAME
12 where id = 77777 ;
13
14 DBMS_OUTPUT.PUT_LINE('UPDATED ROWS ='||SQL%ROWCOUNT);
15 end;
16 /
Procedure created
SQL> set serveroutput on
SQL> execute BugDemo2;
UPDATED ROWS =1
PL/SQL procedure successfully completed
SQL> Regards -
Hi All,
I am new here . We have batch split in Delivery and 601 happens for the individual batches and billing we bill for the entire quantity . Hence the RG1 does not update the excise values for the batches and it is showing as zero (upon extraction in J2I6). Upon research through the program the latest note which i presume is patched
The latest note is N158234 which does not show in the program but seems have been patched considering we are using the Latest version of SAP .
As you see above in the billing we have billed for the whole quantity but RG1 does not update for the since the batches are zero .
My programmer says because of some note related to cancellation where it says about values H & J in vbfa table and due to which program does not go through the Note for the batch split .
Now i have checked few other projects in my company and they all seems to be following the program . So i am wondering whether my process or some customization is missing .
Sales order (no batch determination) , in delivery the batches are picked through wm to and batch split happens in the delivery . Then billling for the whole quantity . We have automatic excise invoice creation enabled so no J1IIN .
Can somebody help me .
Thank youMy programmer says because of some note related to cancellation where it says about values H & J in vbfa table and due to which program does not go through the Note for the batch split
Which field (H & J) they were referring in VBFA ?
i have checked few other projects in my company and they all seems to be following the program
How about the other projects' values in VBFA where your techinical team is guessing some issue. Have you compared this?
Since you have already the note 158234 implemented in your system, ideally, you should not face any issue.
G. Lakshmipathi -
PO no is not updateing in MSEG table for transfer posting wrt PO
Hi All ,
PO number not updateing in MSEG table field EBELN for transfer posting with reference to PO . What should be the reason . This is for subcontracting process .Hi Raghavendra Balegar
If u r doing through scheduling agreement then it will not sit in MSEG. only if u doing through standard PO i.e. NB then only u can view the data of PO in MSEG.
Regards
Ram -
Entry does not exists in check table -- Validation
Hi friends..,
I am able to create new entries in my table with INSERT statement through a function module.
But, the problem is..,
I am having one key field in my table, and T1(another table) is check table for this.
So while creating the entries through SE11, its giving error message like ENTRY DOES NOT EXISTS IN CHECK TABLE. But the same entry i am able map through my function module..!
Any extra settings reuired for this..?
Or.,
Am i need to write validation code?
Thanks,
Naveen.IHi...Rama chary..,
I am having separate function modules to do this..!
So here I can't to update two table at time.
My function module updating a table field with out checking it wrt its check table..!
Even i write code to check table , it will not meet the functionality of SE11 error..!??
so what can i do..?
Thanks,
Naveen.I -
Real time ROLAP or Automatic molap cubecube does not update the value
Hello Everyone,
I am working with Real time Rolap and Automatic MOLAP cube. I had created cube using AdventureWorks DW sample given by Microsoft Tutorial. when i fire insert query, It updates data. It works fine in both the cases after reconnecting in SSMS and SSAS browser.
But I have a one database table in SQL server with 4 varchar and 10 numeric fields [simple table with one primary key without any relationship with other table]. I tried to create both type of cube from direct database table [selecting varchar fields as
dimensions and numeric as measures], created partitions, specified server side tracking table. It processes the cube. but when i add rows into this table. It inserts record but does not update in SSAS browser or SSMS browser.
Please help me what is the problem???
Thanks in Advance!I noticed the same behavior reported by Bob: Not regarding the "process filter" or the "update frequency" selected "CPU Time" column is only updated when details dialog is open. I noticed it just today (which triggered the search here), I wonder if this "feature" has been always present or maybe activity monitor is getting lazy?
Regards,
Mauro -
Type 2 SCD -- does not update the old value.
I have following columns in the source table:
SSN, credit_score
In the target, I have following columns,
SK_ID, SSN, credit_score, flag
I am flagging the old credit_score as 'N' when updating the row and at the same time it is supposed to enter a new credit score with flag 'Y' in another row.
Second, If a row is completely new, It should be inserted with the flag 'Y'.
SK_ID is the surrogate key and SSN is the natural key, My trigger column is credit_score.
The problem is that when I run this type 2 mapping, it does not update anything but inserts the new rows only.
I have posted the screen shots at the following link.
http://www.box.net/shared/ea9v48r0xa
Thanks for your help in advance.First of all, thanks for the reply...
You can also look at the screen shots I posted in previous post.
Here is how I am updating the rows (update logic).
If source_SSN=target_SSN and source_credit_score!=target_credit_score
then flag = 'N' (this is the update from 'Y' to 'N' after which i will insert a new row containing new value of credit_score with flag 'Y')
As an example, if my old rows in the target table were:
sk_id SSN credit_score flag
101 2212 654 Y
102 3023 707 Y
Now let's say my source table has these values.
SSN credit_score
2212 648
2220 690
Then my target table should be like this:
sk_id SSN credit_score flag
101 2212 654 N
103 2212 648 Y
102 3023 707 Y
104 2220 690 Y
Do you see what I mean... -
Automatic payment program (F110) document are not update in PAYR table
Hi all,
I have make payment in F110 (automatic payment) to customer
But it is not update in PAYR table
Please guide me what I have to do for documents update in PAYR table
Thanks and Regards,
PrudhviHi,
It is possible to enter multiple documents.
You can enter a list of single documents or in intervals.
Enter the document number in ascending order.
Ex:
Individual documents.
10001,10003,10011
If the documents are in a sequence you can enter the Interval like this
(10001,10011)
Hope it helps you
Regards
Andrew
Edited by: Andrew J on May 28, 2009 4:26 PM -
[nQSError: 59014] The requested column does not exist in this table.
Hi
As you know this error has been discussed in other threads.. the difference in mine is that not only the time series measures but all the columns are giving me the error...none of the columns are being displayed... The rpd has no consistency errors. can anyone suggest what may be going on?
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 59014] The requested column does not exist in this table. (HY000)
SQL Issued: SELECT column1 saw_0 FROM Paint3 ORDER BY saw_0
Thank you
mm58I guess you have the column in RPD, and it is available for queries.
are you using any time measures? if so check you chronological keys. -
The requested column does not exist in this table
Hi All,
I am getting the following error:
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 59014] The requested column does not exist in this table. (HY000)
SQL Issued: SELECT "Customers - Dim".CITY FROM MVDEMO ORDER BY 1
When I tried viewing data online I am able to view the data in the physical Layer. Also I tried connecting thru ODBC Client and issued the same SQL (above) and it returns the data.
I am using Oralce BIEE 10.1.3.2.1 version.
Please let me know if any faced this kinda issue and how to resolve this.
Thank you.Check your column mapping in the BMM layer in your Customers - Dim logical table. Does the CITY column point to a physical table column?
-
Excise Base amount not updated in J_1iexcdtl table -reg
Dear Gurus,
We have used SAP Ecc 5.0 Patch level 21. In patch level 20, SAP admit without delivery , can do commercial billing and excise billing in foreground. After batch update SAP not support excise invoice creation in foreground. It support only background. We have 2 senario. 1 is capex sales . ie. without material stock we have raise the comm.billing and excise billing. 2 is supplimentary billing. both the senario now getting effected because of no delivery. Asper SAP advise we have setting for background process excise invoice creation. Excise invoice created. but excise base amount not updated in j_1iexcdtl table. Using J_1I7_USEREXIT_CALC_EXC_BASE user exit we are trying to update the same. For single material it works fine. But more than one material for the first material's base amount is updated in all materials. for your reference i have mentioned the codding . SAP advise it is possible to update excise base amount. But not possible to do. pl.adivse if any correct or guide to solve it.
FUNCTION J_1I7_USEREXIT_CALC_EXC_BASE.
""Local Interface:
*" IMPORTING
*" VALUE(EXCITM_BASE) TYPE KOMV-KAWRT
*" VALUE(POSNR) TYPE VBRP-POSNR
*" EXPORTING
*" VALUE(EXCITM_BASE) TYPE KOMV-KAWRT
*" TABLES
*" KONV STRUCTURE KONV
*{ INSERT RDSK925285 1
TABLES : KONV.
data : W_INDEX LIKE SY-TABIX.
DATA :ITAB LIKE TABLE OF KONV WITH HEADER LINE.
DATA :ITAB1 LIKE TABLE OF KOmV WITH HEADER LINE.
ITAB1[] = KONV[].
DATA : BEGIN OF I_TAB OCCURS 0,
KAWRT LIKE KONV-KAWRT,
POSNR LIKE VBRP-POSNR,
END OF I_TAB.
LOOP AT ITAB1.
READ TABLE ITAB1 WITH KEY KSCHL = 'JMOD' KPOSN = ITAB1-KPOSN.
IF SY-SUBRC EQ 0.
EXCITM_BASE = ITAB1-KAWRT.
POSNR = ITAB1-KPOSN.
ENDIF.
ENDLOOP.
*} INSERT
ENDFUNCTION.
Thanks & Regards
R.Udayakumarsolved with the same user exit
-
Current platform : Linux
Current firefox version : Firefox 4 beta 12
Issue : does not update to RC 1 using the check for update feature.
Background : previously downloaded beta 8 and then it automatically updated to beta 12 using update features but for RC1, it does not.
I know users under Windows platform had same problem but was resolved and they can now update via check for update feature.
Please implement for Linux users too.
Thanks !!If you can't update then you can download and install the full Firefox 4 RC version.
* http://www.mozilla.com/firefox/all-beta.html -
Can't add music my iPhone from iTunes.
When I try to drag a song over to my phone, I get the circle w/ the syncing line through it, but it does not update/load.
[Manually manage music and videos] is checked. And, this is the only Mac I have ever used to add music to my phone.
Also, just updated the phone's software today, and iTunes' software is already up to date.Hi Gregg,
Have you tried resetting the device (nothing will be lost): Hold down the Home and Power buttons at the same time and continue to hold them down until the Apple appears (up to 30 seconds). Once the Home screen redisplays, see if your Music app is behaving normally.
Cheers,
GB
Maybe you are looking for
-
Apex Listener prints ### instead of cyrillic symbols
Hi everybody! Apex listener (2.0.4/) prints ### insead of cyryllic symbols when printing to PDF from APEX. In Glassfish log I found next entries: [2013-10-02T10:31:44.040+0600] [glassfish 4.0] [WARNING] [] [org.apache.fop.apps.FOUserAgent] [tid: _Thr
-
View Word and PowerPoint in browser no longer working
Hi There, I have SharePoint 2010 environment. I configured Word Viewing Service and PowerPoint service accordingly and all working perfectly. But recently it didn't work any more. I deleted services and recreate services, even stop and restart the se
-
Is there a way to zoom out further than the website's width?
Especially in android browsers some websites have really big fonts etc. so that very few content can be shown on the screen without scrolling around. To get a better overview of the site, is it in any way possible to zoom out further than the width o
-
Please help!! Tried to download Photoshop CC but I have this error! Exit Code: 39 Please see specific errors below for troubleshooting. For example, ERROR: DW042 ... -------------------------------------- Summary ------------------------------------
-
IPhone 5s shuts down after being in the cold for a while
I have an iPhone 5s. I go outside jogging at noon and listen to the radio on the phone app. Since it is cold outside, it has happened several times that after about 20 minutes I come back into the building and take out and check my phone it shuts d