Bapi to save as completed an incoming invoice
Hi,
is there a bapi allowing to create an incoming invoice an saving it as completed?.
i don´t need to park it.
i´d like to save the document as completed.
(i did try with BAPI_INCOMINGINVOICE_PARK but what i got was a parked document and what i need is a document saved as completed).
it is as if you cliked "Saved as completed" button of transaction MIR7.
Best regards.
To all people interested this is how i solved the question:
CALL FUNCTION 'BAPI_INCOMINGINVOICE_PARK'
EXPORTING
headerdata = x_in_header
IMPORTING
invoicedocnumber = lc_belnr
fiscalyear = lc_gjahr
TABLES
itemdata = i_in_item
return = i_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
CALL FUNCTION 'MRM_INVOICE_READ'
EXPORTING
i_belnr = lc_belnr
i_gjahr = lc_gjahr
IMPORTING
e_rbkpv = s_rbkpv
TABLES
t_drseg = tab_drseg
t_rbselbest = l_t_selbest
t_rbsellifs = l_t_sellifs
t_rbselfrbr = l_t_selfrbr
t_rbselwerk = l_t_selwerk
t_rbselerfb = l_t_selerfb.
PERFORM drseg_complete(SAPLMR1M) USING s_rbkpv
'V'
space
CHANGING tab_drseg[].
* As the next routine checks ok-code not initial i have to
* pass a value to the ok-code
DATA: c_okqu(17) TYPE c VALUE '(SAPLMR1M)OK-CODE'.
FIELD-SYMBOLS: <fs_okqu> TYPE ANY.
ASSIGN (c_okqu) TO <fs_okqu>.
<fs_okqu> = 'COMP'.
DATA: ok-code(20).
DATA: l_trtyp LIKE t169-trtyp value 'V'.
CONSTANTS: l_okcode LIKE ok-code VALUE 'COMP'.
PERFORM document_park(SAPLMR1M) USING s_rbkpv
tab_drseg[]
l_t_selbest[]
l_t_selfrbr[]
l_t_sellifs[]
l_t_selwerk[]
l_t_selerfb[]
l_trtyp "akt_typ
l_okcode. "fcocomp.
Note that the key here was the two routines drseg_complete and document_park
Best regards.
Edited by: pablo casamayor on Apr 24, 2008 8:27 AM
Edited by: pablo casamayor on Apr 24, 2008 8:29 AM
Similar Messages
-
Parking Invoices -- "Save as completed" -- MIR7
Hi All,
Can you please let me know if there is any BAPI/FM available to change the status of the Invoice receipt (RBKP-BSTAT) from "Parked" (A) status to "Parked and completed" (B)?
Thanks,
Raj.Hi,
check this thread:
bapi to save as completed an incoming invoice
Best regards.
Edited by: Pablo Casamayor on Sep 16, 2009 4:27 PM -
BAPI for MIRO Incoming Invoice
Hi All,
I want BAPI for MIRO Posting ie for Incoming Invoice.
.here MIRO is being done with Delivery Note number
Following are the necessary entries for MIRO Posting
Invoice date
Reference
Amount
Calculate Tax
Tax amount
Delivery Note
Vednor
Business Area
Please suggest me suitable BAPI for MIRO Incoming Invoice Posting with sample code.
immediately.Please give some sample code for my reference.
Rewards will be given.
Regards.
UlhasHi,
BAPI for Invoice Verification: Post Invoice
BAPI_INCOMINGINVOICE_CREATE
The method can only carry out your function if no error messages were
generated in the Return table. This is the case if the header data and
all the items were processed successfully.
Transaction control is not implemented. The calling program therefore
has to execute the Commit Work itself after this method has been
successfully called (in other words, if no errors were reported in the
Return parameter). -
BAPI to do save as completed a journal
Hi
We need a BAPI to park or save as completed a Journal.Inspecific we want to have save as completed of a Journal through BAPI.Hi ...,
I Don't think so there is such parking BAPI for FI invoices (Not MIRO) in SAP. But there is 2 methods to achive parking and Posting in SAP.
1 ) There is standard BAPI BAPI_ACC_DOCUMENT_POST to post all FI invoice respective subledgers also.You can use smae BAPI as park documents and Commit whenever business want through ABAP development.
OR
2 ) Create BDC for Parking t.code and Use PRELIMINARY_POSTING_POST_ALL bapi for posting parking documents.
Best Rgds
SumaMani -
Error in BAPI while creating incoming invoice
Hi Experts,
Im creating incoming invoice by using the BAPI, 'BAPI_INCOMINGINVOICE_CREATE'.
when im going to posting my invoice it is showing the error like 'EDI: Error in customizing for differential invoicing'.it is a urgent requirement and need to solve this ASAP.Pls help me out with this error
Im passing following parameters to BAPI:
wa_header-invoice_ind = 'X'.
wa_header-doc_date = sy-datum. "Enter the document date
wa_header-pstng_date = sy-datum . "Enter the posting date
* wa_header-ref_doc_no = '5000008590'.
wa_header-comp_code = '1000'.
*wa_header-gross_amount = '50.11'. "Enter the gross amount(aft. tax) for the invoice
*wa_header-calc_tax_ind = 'X'.
wa_header-currency = 'INR'.
wa_header-INV_TRAN = 'X'.
wa_header-SIMULATION = 'X'.
wa_item-invoice_doc_item = '000001'.
wa_item-po_number = '3700000557'. "Enter the PO number
wa_item-po_item = '00010'. "Enter the PO item number
* wa_item-ref_doc = '5000008590'. "Enter the GR number
* wa_item-ref_doc_year = '2014'. "Enter the GR fiscal year
* wa_item-ref_doc_it = '0001'. "Enter the GR item number
* wa_item-tax_code = 'V0'. "Enter the tax code applicable
wa_item-item_amount = '50.60'. "Enter the item amount
* wa_item-quantity = '2380'. "Enter the invoice quantity
* wa_item-po_unit = 'EA'. "Enter the UoM
APPEND wa_item TO it_item.
CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
EXPORTING
headerdata = wa_header
* * ADDRESSDATA =
IMPORTING
invoicedocnumber = g_invno
fiscalyear = g_fyear
TABLES
itemdata = it_item
* * ACCOUNTINGDATA =
* * GLACCOUNTDATA =
* * MATERIALDATA =
* * TAXDATA =
* * WITHTAXDATA =
* * VENDORITEMSPLITDATA =
return = it_ret
* * EXTENSIONIN =
IF g_invno IS NOT INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
* * IMPORTING
* * RETURN =Thanks every one for your valuable solutions.
Issue is Solved by unchecking the flag.
wa_header-INV_TRAN = 'X'.
Thanks & Regards,
Ramjee. -
BAPI for attachment to incoming invoice
Hello,
I am creating documents for incoming invoices with an RFC that uses BAPI_INCOMINGINVOICE_CREATE. I also want to attach an external file to the document created. Is it possible to achieve this with a BAPI or an fm?
Thanks in advance,
AliHi,
I am giving a brief about the flow you should follow.
PERFORM file_upload USING p_file. (This is the perform in which you will upload your file with the business object of the document, document key, archiv type, the local path of attachment etc...)
PERFORM validate_file. ( This is to validate your entries from the file)
PERFORM bo_existence_check. (This is to check the the existence check of the business object and document key in the system)
LOOP AT gt_upload_file INTO gs_upload_file. (This is looping through the file for each entry i.e. each document)
PERFORM upload_attachment. ( This is to upload scanned attachment to optical archiv drive)
Use FM SCMS_AO_FILE_PUT_FE for uploading the file
PERFORM link_archiv. (This is to link the uploaded document in archiv drive with the document in SAP system)
USE FM ARCHIV_CONNECTIONTABLE_INSERT for linking the document and attachment.
ENDLOOP.
Let me know if you find it useful.
Thanks and Regards,
Kiran Mohan -
Archiving incoming invoice via BAPI
I have a scenario were we receive incoming invoice as a formatted text-file with a corresponding pdf image of the invoice. The concept is to first create an archived document reference of the PDF (via a BAPI call) and then send the archive-doc-id with the INVOIC01 Idoc and link these so that the PDF appears as an attachment in the MM invoice in transaction MIR4. The middleware used is MS BizTalk.
The problem is that the BAPI seems to require a dialog user to post the PDF, and returns the message "RFC partner does not allow to start any program" (CMS057).
Does anyone have experience with this?
The BAPI coding:
function z_bapi_archivobject_createfile .
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_ARCHIV_ID) TYPE BAPITOAV0-ARCHIV_ID
*" VALUE(I_DOCUMENT_TYPE) TYPE BAPIARCPAR-DOC_TYPE
*" VALUE(I_FILEPATH) TYPE SAPB-SAPPFAD
*" EXPORTING
*" VALUE(E_ARCHIV_DOC_ID) TYPE TOAV0-ARC_DOC_ID
*" VALUE(E_BAPIRETURN) TYPE BAPIRET2
call function 'ARCHIVOBJECT_CREATE_FILE'
exporting
archiv_id = i_archiv_id
document_type = i_document_type
path = i_filepath
importing
archiv_doc_id = e_archiv_doc_id
exceptions
error_archiv = 1
error_communicationtable = 2
error_upload = 3
error_kernel = 4
others = 99.
if sy-subrc <> 0.
call function 'BALW_BAPIRETURN_GET2'
exporting
type = sy-msgty
cl = sy-msgid
number = sy-msgno
par1 = sy-msgv1
par2 = sy-msgv2
par3 = sy-msgv3
par4 = sy-msgv4
importing
return = e_bapireturn.
endif.
endfunction.Hi,
You can check whether the invoice has been processed via FM. IDOC_INPUT_BBP_IV in R3 system.
If the invoice has been processed via FM IDOC_INPUT_BBP_IV, then you can check which user-exits can be used for duplicate invoice check within FG BBPI.
In standard BAPI processes system can't support the functionality for
duplicate invoice check. Thanking you -
Dear Guys,
After completing the intercompany scenario i face a problem with the posting of the incoming invoice (From the delivering Sales Org to the Receiving sales org°) to the accounting. I have to book this incoming invoice to the accounting. Please Help
thanksHi
1) when you do intercompany invoice one you will do with "F2 Billing document type" you willbe saving.--right-----? which you are sending to the customer
2) second one you do with "IV billing docment type and you willbe saving -
right----
which is intercompany billling document.
3) when you save this documents automatically posting will happen because we maintained reference condition types -
right------?.
4) we willbe assigning inter customer to the ordering sales orgnisation--right--
posting will happen automatically. don' worry
i hope you have understood.
your doubt is clear don'tforget to reward.
thanks
surya -
Hi,
I want to park the incoming invoice through Tcode MIR7, When I enter the respective PO number and other details and simulate it shows correct calculation, Problem is when I am going to Save it as parked document It throws an Error as (Tax code V1 in procedure is invalid) , But If I saved it as completed it gets Posted correctly.
How to remove this Error during Parking Invoice, I am doing this for the first time
Thanks
mmsaperphi,
For taxcode invalid problem try following and revert back
Transaction : FV11
select any condition from TAXINN e.g JMOP
select tax classification instead of plant vendor material
put ur tax code here.
Now do MIRO
Do it in dev and revert with outcome.
Regards
Kedar -
Fm to park a FI doc as save as Completed
is there any fm or BAPI to save a parked doc as 'Save as Completed'?
It sounds as if you are not filling one of the input structures correctly. Filling the BBKPF structure is fairly easy since its field names are the same as the BKPF field names. BBSEG is a bit more complex since it can hold different types of lines (defined by the contents of the NEWBS posting key field) and some its field names (such as NEWBS) are not the same as the BSEG fieldnames.
Fill all the fields as you would do when posting a parked journal directly via FBV1, remembering that the following BBSEG fields are different from BSEG:
NEWBS (posting key) = BSEG-BSCHL
NEWKO (account) = BSEG-HKONT (on journals this is always the case, on vendor
or customer invoices on certain lines this value
can end up in BSEG-LIFNR or BSEG-KUNNR)
NEWBK (company code) = BSEG-BUKRS
All blank fields in all the structures must be set to / (the symbol for an empty field), otherwise you will get an error.
One annoying thing which might be the cause of your problem. On journals, the BUKRS for the first line is taken from the header BBKPF structure and the NEWBK field on the first line of the data file must be set to / otherwise you will get an error. -
DMS document attachment with Incoming Invoice
Hi All,
We are creating one DMS document and want to attach it to an Incoming Invoice (MIRO).
We are using the bapi BAPI_DOCUMENT_CREATE. What are the fields to pass in Objectlink.
Please help us to achieving it.
ThanksWe have created an Incoming Invoice already using 'BAPI_INCOMINGINVOICE_CREATE'. We are now creating a DMS document using 'BAPI_DOCUMENT_CREATE' and want it to be linked to the existing Invoice. For this we are trying to use the 'OBJECTLINKS' table.
The linked document should be visible in T-Code FBL1N. Can you please throw some light on how to do this?
Edited by: Himansu.P on Jun 14, 2011 3:06 PM -
Incoming invoice from third party system
Hi All,
Could you please help in choosing functional module or bapi or badi's for incoming invoices that are receiving from third party system. I have no ideal about that but the SAP has to be loaded using idocs. what is the reason to choose the above ones
Thanks in advance for response.Why not starting with docu?
The general process is explained well in help.sap.com
As a service, put this into your Google: vendor invoice edi site:help.sap.com -
Posting a previously parked incoming invoice
Hi all,
Can anybody help me with the following scenario:
I am parking incoming invoice document using BAPI_INCOMINGINVOICE_PARK. It gives me a document no.
Later I want to post this document. I don't know which BAPI or fm to use for this. Is it possible to post parked documents with BAPI_INCOMINGINVOICE_CREATE?
Thanks
Ali
Edited by: Ali Abbasgil on Aug 4, 2010 12:59 PMHi ,
invoice_change facilitates your requirement...
But there are certain constriants as of the following points:
pls see if these points help.
1.It is not possible to change invoice documents flagged for invoice verification in the background using this method.
2.Furthermore, no invoice documents saved within the framework of the EDI process can be changed with this method.
regards,
umakanth.. -
Can we Use T Code MIRA instead of MIRO for posting incoming invoice?
Hi All,
Can we Use T Code MIRA instead of MIRO for posting incoming invoice?
While trying to post a incoming invoice using MIRO, I am getting a error "HKONT is EMPTY". But when using MIRA i could get the invoice posted.
And in which situations we use MIRA?
Thanks in Advance
Gopi KrishnaHello
MIRA is for Invoice Verification in the Background
Purpose
This process is suitable for the following transactions:
Posting invoices with mass amounts of data for which no item check is required
Posting invoices referring to transactions not yet entered in the system
Entering Invoices for Verification in the Background (Without Item List)
When verifying invoices in the background, you enter only a small set of document header data, such as the invoice amount, the currency and the tax information. You also allocate the incoming invoice to a purchasing document or a vendor. The system saves the data and allocation criteria you enter.
At a later point, the system verifies the invoice in the background. It uses the allocation criteria you entered to determine the item list. It then calculates the net total from the item list.
If the net total = gross amount invoiced - tax amount (+/- tolerance), the system posts the invoice in the background.
If the net total ¹ gross amount invoiced - tax amount (+/- tolerance), the system does not post the invoice in the background. It saves the document header data and the items determined in the background; the saved document then has to be processed manually in Invoice Verification.
With Invoice Verification in the background, the system does not check for any quantity or price differences at item level. Since you do not enter any actual invoice item data, the system uses the default data for comparison.
Regards
Gregory Mathews -
Hi,
Please suggest me the best approach to post Incoming invoice (Customer Invoice, Invoice, GL Account) as the data is there in legacy system and my middle ware is XI system. Please suggest best approach among the below methods.
1) XI will call a BAPI(BAPI_INCOMINGINVOICE_CREATE) and data will be posted accordingly.
2) XI will generate Idocs and R/3 system will pick those Idocs and post. (Please tell me the IDOC type and Message type for the same).
3) XI will place a file at application server level and ABAP will pick that file and post the data using BAPI (BAPI_INCOMINGINVOICE_CREATE).
Note: while posting the customer invoice, the customer account number that is coming from legacy system is different from customer account number that is in R/3. So, when ever posting the data I need to change the legacy customer a/c numbmer with R/3 customer a/c number which is maintained in R/3.
Please let me know the better approach ASAP. If you suggest first or second approach please let me know the enhancement or BADI name to achieve the functionality specified in NOTE....
Looking forward for some good answers.
Regards,
Chandu.hi thr...
http://help.sap.com/saphelp_45b/helpdata/en/b4/8a7415dc4ad111950d0060b03c6b76/content.htm
kindly go thru the above data and do reward if helpful.
Maybe you are looking for
-
Gif loader for background image
I simply want to run an animated gif while my background image loads for a slideshow. I've searched the web and this forum for hours and can't get the various bits of code tips (ajax, jquery) to work because I'm a totaly idiot when it comes to code..
-
I am having this problem on several websites including my iGoogle page, the home page of my nonprofit and others. Also, features like the quick add button in Google Calendar on my iGoogle page are missing or don't work.
-
Hello, We are using Robohelp 9 - 9.0.1.232 It happens that some topics contain the <span style="color: Transparent;"> build tag. It seems that RH9 sets this tag by its own. We do not manage such tags. We come upon this while viewing one of our compil
-
Is there a way to track a missing ipod touch
How can I track my daughters missing ipod touch
-
I need to buy multiple copies of Lion
How do I do it on the App Store with my Mac? Or, do I have to go to n computers and do it on each?