Posting an accounting document with material using BAPI (ver 4.6c)
Hello!
Can anyone help me out with this one please?
I need to post an accounting document using BAPI. Since the customer's SAP is 4.6c, the BAPI I found closest is BAPI_ACC_GL_POSTING_POST.
The posting has 2 specific requirements:
1. For the Vendor item, the tax needs to be calculated; and
2. For the G/L items, the corresponding material/quantity needs to be entered
So, my questions are:
1. How do you enable the "Calculate Tax" option, which is the Calculate Tax checkbox in F-02?
2. How do you enter the material and quantity for the G/L items?
Thanks a lot!
Hi,
Before posting your document please check first whether this is reversal or not.
please use BAPI_ACC_DOCUMENT_REV_CHECK to check reversal document
Have a Nice Day,
Regards,
Sujeet
Similar Messages
-
BAPI for Posting the WIP document with respect to profit center
Hi All,
as per the SAP standards SAP posts the WIP revaluation to the profit center of the subcomponents instead of profit center of the manufactured material..
But now i have write a logic to make correcting entries for WIP revaluation to the Profit Center of the Manufactured Product.
I have to Post an accounting document with the adjustment posting (Revaluation Document) as of the last day of the Period.
If the Revaluation Amount is POSITIVE, the DEBIT is to Profit Center of the Manufactured Material and CREDIT is to the Profit Center of Subcomponent Material/ Activity.
If the Revaluation Amount is NEGATIVE, the CREDIT is to Profit Center of the Manufactured Material and DEBIT is to the Profit Center of Subcomponent Material/ Activity.
Can any one suggest me the Function module which available to post the this type of document ?
Regards,
PraveenHi Ajit,
My requirement is to get the total of GL balances for the respective profit center.
But in Report i didn't found profit center parameter.
Thanks -
BAPI to park G/L Account document with ledger
Hi Experts,
I have been looking for BAPI to park G/L account document with ledger (FV50L).
Can you please let me know, if you have know about it.
I have found the one for posting BAPI_ACC_DOCUMENT_POST, but It should not be used in our case.
It is park G/L account document without ledger.
Thank you in advance.
Kyongkeum Im.
Edited by: Kyoung Keun Im on Aug 13, 2010 1:11 PM
Edited by: Kyoung Keun Im on Aug 13, 2010 1:12 PMHi,
There is not function module for that. I am using BDC to park GL document. For BDC parking you can use Function module -
POSTING_INTERFACE_START and POSTING_INTERFACE_DOCUMENT.
Sample Logic:
Loop at header.
populate header.
loop at item.
populate item.
endloop.
call function POSTING_INTERFACE_START
call function POSTING_INTERFACE_DOCUMENT
call function POSTING_INTERFACE_END
BAPI COMMIT.
Endloop. -
Problems in Posting an Accounting Document using BAPI_ACC_DOCUMENT_POST
Hi All,
I am facing a problem when I try to post an accounting document using the BAPI "BAPI_ACC_DOCUMENT_POST".
While passing data to the structure "ACCOUNTTAX", I get the errors "Required field AMT_BASE was not transferred in parameter CURRENCYAMOUNT" and "Required field TAX_CODE was not transferred in parameter ACCOUNTTAX".
Till now I was not passing the ACCOUNTTAX structure to the BAPI and posting was happening fine.
Any pointers / solutions in this direction will be most helpful.
Thanks in advance.
Regards,
KeerthiHi
As u told earlier it was fine , so it may there is some config. change done by func. so this error is coming.
For minimum required fields fo BAPI , u can go to SE37 and click on Function Module Documentation on Application tool bar.
here u will find good help.
Regards
Sachin -
Hi Friends,
I want to create a material using BAPI, can anyone give me some sample program or can any one give me links which earlier posted this problem.
Points for sure for sample program.
thanks and regards
Vijayahi
good
go through this REPORT z_bapi_salesorder_create.
Parameters
Sales document type
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Material
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Quantity.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Data declarations.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
Initialization.
INITIALIZATION.
v_text = 'Order type'.
v_text1 = 'Sales Org'.
v_text2 = 'Distribution channel'.
v_text3 = 'Division'.
v_text4 = 'Sold-to'.
v_text5 = 'Ship-to'.
v_text6 = 'Material'.
v_text7 = 'Quantity'.
v_text9 = 'Plant'.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
header-doc_type = p_auart.
headerx-doc_type = 'X'.
Sales organization
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
Distribution channel
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
Division
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
Partner data
Sold to
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
Ship to
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
APPEND item.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI to create the sales order.
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = v_vbeln
TABLES
return = return
sales_items_in = item
sales_items_inx = itemx
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_partners = partner.
Check the return table.
LOOP AT return WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
Commit the work.
COMMIT WORK AND WAIT.
WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF.
thanks
mrutyun^ -
The user exit on the sap post the account document
Dear all.
I use the t-code mb01 or migo to receipt goods for purchase order.When I execute post or save,the sap generate the material document and the account document.The account documents have two item with account 12110000 and account 12010000.And I know this two account was configure in the t-code omwb.
Now my company have a new requirement:
When the sap generate the account documents,I need to write some code to do some judgement and change the account 12110000 to account 35510000 or other account.The logic of the code was complex and it's impossible to do in sap standard configure.So I want to find the user exit on the sap post the account document.In the user exit I would write some code to do some judgement and change the account 12110000 to account 35510000 or other account.
But I can't found the user exit.So I need the experts to give me some reference.
Regard
YodaHi,
You may use ZXF48U01 of EXIT_SAPLF048_001 of enhancement F180A001 for the same.
Please note that control comes here for no of transactions hence you need to specifically check for sy-tcode, for which your 'exit' logic needs o be executed.
I hope this helps,
Regards
Raju Chitale -
Posting a parked document with a BI session
Hi, I am trying to post a parked dokument in FI through a batch input session.
The problem is that the parked dokument is yet not complete and I want to complete it with the missing line items and post it in one step, meaning with one batch input. is that possible? especially in using the RFBIBL for triggering the batch input session.
Is it possibel to post a parked document with FB01 when parked dokument and 'new posted document' have the same document ID? what happens with the parked document if this is possible?
thanks! for your help
deniseHi
I suspect it may not be possible. The only option i could see in FBS1, is Post with reference, but again it would not accept parked document as reference
Thank You, -
Posting the accounting document to RM-CA not to FI G/L
Hi guys,
I'm working on the system which include RM-CA for netting the open issues with payments. I have a problem with posting of the accounting document to the FI G/L. Usually (in standard) the accounting document is posted from SD to the G/L automatically. Now I send the accounting document with "home made" FM like FKK_EBS_DOC idoc (only that it is for outbound sending) to the RM-CA through output for ALE messages, which works fine. It is filled from accounting document. Now this document is sent to the RM-CA (through output determination) and in the same time (automatically) to the G/L so it is posted twice (connection from RM-CA to G/L is also established). RM-CA is separated system.
My question is, how to prevent the accounting document from SD to be posted to the G/L.
Any sugestions would be apreciated.
Regards,
MatijaHello,
One possible solution for that would be to take the current ( first configuration of SO>DLY>INVOICE) that you have mentioned in the first statement
add a user exit like
EXIT_SAPLV60B_008: Change the transfer structure ACCCR, ACCIT and ACCHD
make all the values that are passed to accounts and costing as zero . through this there would be no accouitng document generated for nil values and even if generated would be for zero values
the actual posting can be done through the Idoc
Hope this helps
Thanks
akasha -
Posting the MIRO Document with reference of PO
Hello friends
while user posting the MIRO Document with reference of PO , he is getting difference in balance
Total amount is 31,237.00
Posting amount is 28,320.05
Balance amount is 2,916.95 this balance amount not getting post in MIRO
Before that i have seen GR amount is 28,320.05 but In IR amount same 28,320.05 but withholding tax tab not appering withholding tax amount
Can any body please help me on the same
Regards
sudharshana vamsi
Edited by: asuvamsi on Feb 24, 2010 1:43 PMHello friends
Thanks For all my problem was resloved
Solution is
An message has been occuring like withhold tax has been refreshed. it is just an information message not an error message. this message will trigger when the trans. type is non project type activity. No back end process has been disturbed due to this message. it just passing the information to the user.
we changed the trans. type to manufacturing activity and it is working fine.
I hope it ll help in future
Thanks and Regards
vamsi -
Posting a CO document with internal order
Hi,
Can anybody let me know the procedure of posting a CO document with internal order?
Regards,
PrasadHello Naga,
The CO document will be created automaticallywhen you posta document in FICO with a cost object assignment. By cost object assignment I mean u put the internal order number in oreder field of GL line item. The GL will be a primary cost element in kost cases of expense type.
Hope I had been able to help you. please assign points.My points had been pending with you for last query resolution also.
Rgds
Manish -
Is it possible to retrieve data using RFC alone with out using BAPI ?
Hi ,
Is it possible to connect SAP to Non-SAP systems to retrieve data using RFC alone with out using BAPI ?
thanks
RamaHello Nelson,
Could you please explain how this can be done. Because my understanding is that only BAPI can be used to connect Non SAP and SAP system not RFC function module.
Regards
Farzan -
Create material using bapi ' bapi_material_savedata'
Hi Experts,
i was tring to create material using bapi ' bapi_material_savedata' but the material is not updating in the table.
please find the code and suggest me if any modification
data: la_headdata type BAPIMATHEAD,
la_clientdata type BAPI_MARA,
la_CLIENTDATAX type BAPI_MARAX,
la_return type BAPIRET2.
data: i_materialdescription type table of BAPI_MAKT,
wa_materialdescription like line of i_materialdescription.
*la_headdata-MATERIAL = int_matnum-MATERIAL.
*LOOP AT int_matnum.
la_headdata-MATERIAL = int_matnum-MATERIAL.
write : int_matnum-material.
*ENDLOOP.
la_headdata-MATERIAL = '100000518'."int_matnum-MATERIAL.
la_headdata-IND_SECTOR = p_indsr.
la_headdata-MATL_TYPE = p_matype.
la_clientdata-BASE_UOM = 'FT3'.
la_clientdata-pur_valkey = ' '.
la_CLIENTDATAX-BASE_UOM = 'X'.
la_clientdata-MATL_GROUP = '01'.
la_CLIENTDATAX-MATL_GROUP = 'X'.
wa_materialdescription = 'TEST'.
append wa_materialdescription to i_materialdescription.
clear: wa_materialdescription.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = la_headdata
CLIENTDATA = la_clientdata
CLIENTDATAX = la_CLIENTDATAX
PLANTDATA =
PLANTDATAX =
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
STORAGELOCATIONDATA =
STORAGELOCATIONDATAX =
VALUATIONDATA =
VALUATIONDATAX =
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA =
SALESDATAX =
STORAGETYPEDATA =
STORAGETYPEDATAX =
FLAG_ONLINE = ' '
FLAG_CAD_CALL = ' '
IMPORTING
RETURN = la_return
TABLES
MATERIALDESCRIPTION = i_materialdescription
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
Please Help me
Regards,
NareshHi all,
Now it is asking me for the other fields,
E ,
The field MARA-XCHPF/BAPI_MARA-BATCH_MGMT is defined as a required field; it does not contain an entry
i have passed this val as
la_clientdata-batch_mgmt = 'X'.
even though i am getting the same error.
can you help me to solve the issue.
Tthanks
Naresh
Edited by: naresh.k.dasari on Jan 4, 2011 10:36 AM -
Excise value posting to account document
Hello,
I have an invoice type ZDWR ( Sales return without reference Invoice) in which I want the excise component (Condition Type) to be automatically get posted to Accounting Document when I save the invoice. I had made the changes in pricing control where statistic is check marked and account key is "EXC". Is there any other changes in config ???
Pls advise ...
Thanks in advance
Regds,
Dinesh SawantHello,
This is already assigned (EXC) :
ZDWRLR 100 0 ZWRR WITHOUT REF PRICE
ZDWRLR 109 0 ZMRP MRP mat./batch wise
ZDWRLR 110 0 UTXJ Tax Jurisdict.Code
ZDWRLR 120 0 JMOD IN A/R BED
ZDWRLR 130 0 JCES IN A/R CESS
ZDWRLR 131 0 JEX2 IN A/R BED EXC ED & Cess deflation EXC
ZDWRLR 132 0 JECX IN A/R ECESS EXC ED & Cess deflation EXC
ZDWRLR 150 0 ZCRR COPY BASIC PRICE
ZDWRLR 160 0 ZWNV SUB TOTAL VALUE 1
Regds,
Dinesh Sawant -
Issue in posting a accounting document using BAPI BAPI_ACC_DOCUMENT_POST
Hi All,
I 'm able to post a document using BAPI ' BAPI_ACC_DOCUMENT_POST ' but the problem i face is the header text is not getting updated for the document that is getting posted. Even though i'm populating the header text in the parameters i'm passing to the BAPI.
Any pointers to this would be highly appreciated.
Regards,
ChaitanyaHi,
put a break in subroutine FORM fill_acchd
and execute the bapi.
Here you have:
CLEAR gs_acchd.
MOVE-CORRESPONDING gs_aw TO gs_acchd.
gs_acchd-usnam = gs_bapi_acchd-username.
gs_acchd-awsys = gs_bapi_acchd-obj_sys.
gs_acchd-bktxt = gs_bapi_acchd-header_txt."---->¡¡¡CHECK THIS!!!
gs_acchd-glvor = gs_bapi_acchd-bus_act.
gs_acchd-tcode = sy-tcode.
gs_acchd-acc_principle = gs_bapi_acchd-acc_principle.
Check if there is something wrong there.
Best regards -
Create material with reference using BAPI
Hi
I need to create material using refrence to another material for all material Views. Can I use BAPI_MATERIAL_SAVEREPLICA.
Which parameter I need to fill for reference materia
Moderator message: please do your own research before asking.
Edited by: Thomas Zloch on Jan 12, 2011 3:18 PMHi Goutam,
You can use the BAPI BAPI_MATERIAL_SAVEDATA, which will create/update the material. You can pass the reference material in the filed BAPI_MARA-PL_REF_MAT. And you can pass reference material for all view like this.
Maybe you are looking for
-
Hey, We are running GW 8.0.2 HP2 right now and we need to upgrade to SP3 and are wondering (since the documentation for update was not very clear on that point) do I have to down all domains and poa's during the upgrade or is it just the domain/poa t
-
How do you select SOME messages?
My method for dealing with spam which is the bulk of my mail was to SELECT ALL then deselect the one or two messages I wanted to look at, then press DELETE and then read my wanted messages. Now I get an unwanted view of any message I select and have
-
Listening to several different events. Help!
Just a very simple question. I need a sample code that could show me performing the following tasks: There are two JComboBox and two buttons added on two different JPanel. A user of this application has to first choose items from the first JComboBox,
-
Can't start database as open , only mount
We are currently running Oracle 10g release 1. We had a power failure on Sunday and since then we are having this problem. The database start up with mount but do not want to open. Do anybody have some answers?
-
hi all, I need to make changes using the admin login, how do i login using the admin account. I undestand that we need to press "G" to login as admin, but thats just for the 1st time setup Everytime i power on the 6215 it auto login to user. How do i