Bapi for VF01 of internal credit note IG
Hi,
i'm looking for a bapi/function module that does the same thing as transaction VF01 with :
billing type : IG (internal credit note)
document from : an invoice.
I know the the bapi's for creating an billing doc from a sales order, but can ik use this one also for the creation of a credit note from an invoice.
regards,
Hans
Check this sample code of creating the billing document using the bapi BAPI_BILLINGDOC_CREATEMULTIPLE.
DATA: t_success TYPE STANDARD TABLE OF bapivbrksuccess WITH HEADER LINE.
DATA: t_billing TYPE STANDARD TABLE OF bapivbrk WITH HEADER LINE.
DATA: t_return TYPE STANDARD TABLE OF bapireturn1 WITH HEADER LINE.
t_billing-salesorg = vbak-vkorg.
t_billing-DISTR_CHAN = vbak-vtweg.
t_billing-DIVISION = vbak-spart.
t_billing-DOC_TYPE = vbak-auart.
t_billing-ref_doc = vbak-vbeln.
t_billing-ref_item = vbap-posnr.
t_billing-doc_number = vbak-vbeln.
t_billing-ITM_NUMBER = vbap-posnr.
t_billing-ordbilltyp = 'BILLING TYPE'.
t_billing-price_date = sy-datum.
t_billing-ref_doc_ca = vbak-vbtyp.
t_billing-sold_to = vbak-kunnr.
t_billing-material = vbap-matnr.
t_billing-plant = vbap-werks.
APPEND t_billing.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
TABLES
billingdatain = t_billing
return = t_return
success = t_success.
commit work.
Similar Messages
-
Crystal Reports layout for AP/AR Invoice, Credit Note
Hi
I am currently designing layouts for AP and AR procedures.
The Quotations, Orders and Goods Receipt PPO's all work fine using the Dockey@ parameter but neither the purchasing invoice and credit notes or the sales credit notes seem to connect at all during the design stage.
Do i need to set a new/different parameter for these particular layouts or am I doing anything else wrong?
Regards
PeterI am using version 8.8 SP.00 PL.10
It is very strange that I cannot get the layout connected to the database as I have followed the same steps for all layouts. It all works fine until I get to the invoice stage and then I cannot make the connection.
(I dont need to worry about the sales invoice as this was provided at installation point by our vendor) -
Showing Monthly Sales Analysis for Sales Employees (including credit notes)
Hi Experts,
I want to show a report for my director so we can accurately decide upon sales targets for each sales employee for 2012.
The Monthly Report > Invoices by posting date in the Sales Analysis module is not ideal because it does not appear to include credit notes so the totals are incorrect.
How could I create a query which gave me a total for each month of 2011 for every sales employee which includes invoice minus credit notes.
Unfortunately my SQL is not great but I started something which might help - this is only for first 2 months of the year. I presume I would need a select statement for each month if I wanted to have the sales employee name followed by a total for each month. Maybe this is too intensive a query to run anyway.
SELECT T1.[SlpName],
(select(sum(t2.doctotal)-(t3.doctotal)) where (Month(t2.docdate)=1 and t3.docdate=1) FROM OCRD T0 INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode INNER JOIN OINV T2 ON T0.CardCode = T2.CardCode INNER JOIN ORIN T3 ON T0.CardCode = T3.CardCode)
(select(sum(t2.doctotal)-(t3.doctotal)) where (Month(t2.docdate)=2 and t3.docdate=1) FROM OCRD T0 INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode INNER JOIN OINV T2 ON T0.CardCode = T2.CardCode INNER JOIN ORIN T3 ON T0.CardCode = T3.CardCode)Hi,
I have moved your posting here because it belongs here.
You may check this first: Re: Top Customers report
Thanks,
Gordon -
Need BAPI for uploading "Qty in Delivery Note" in MIGO
Hi All,
Please find the details of my requirement as below :
Goto T-code MIGO and select goods receipt for a PO , here under material Item tab there is a field as "Qty in Delivery Note" under Quantity tab.
I need to update this field using my BAPI. Is there is any FM , RFC for getting this output.
Right now i am using BAPI BAPI_GOODSMVT_CREATE, please let me know if any field of this BAPI can be used for thid purpose.
Thanks,
Mahesh.Gattu
9900380302It is been done by implementing one implicit enhancement in FM: MAP2I_B2017_GM_ITEM_TO_IMSEG
I have added the below functionality at the end of the function module.
Just i have maped the ERFMG i.e ent_qnt(Received quanity) with LSMNG i.e qty.in del note
All best for others.
$$-Start: (1)----
$$
ENHANCEMENT 1 Z_EV_IMP_GOODSMOVEMENT. "active version
Populate the delivery note quantity and UoM
IF IMSEG-ERFMG IS NOT INITIAL.
MOVE IMSEG-ERFMG TO IMSEG-LSMNG.
MOVE IMSEG-ERFME TO IMSEG-LSMEH.
ENDIF.
ENDENHANCEMENT.
Thanks,
Mahesh.Gattu
Edited by: Maheshkumar gattu on Dec 3, 2010 4:35 PM -
What is d BAPI for reversal of Good Receipt Note(GRN) for movement type 102
Hi ABAPers,
I have got requirement like this , I have done Goods Receipt Note (GRN) based on Purchse order Number using '.BAPI_GOODSMVT_CREATE' with 101 movement type.
But now my requirement is reversal of good receipt note(GRN) based on Material Document Number (or) Purchase Order Number with 102 movement type. what is the bapi name i need to use. and i need to give reason for the reversal of GRN.
please tell me the field name for reason in bapi.
i have searched in the net, but i could not get proper answer to this isse.
Highly appriciate who gives answer as early as possible. I need to complete this task EOD. please give replies.
Thanks & Regards,
Vinay Kumar.Hi,
If your material document has specific movement type i.e. 101, if you cancel document using BAPI_GOODSMVT_CANCEL, it automatically picks associated movement type 102 defined in customizing setting, you don't need to pass 102 explicitly while cancelling.
I have not seen reason code in this bapi, but it is required to pass reason code then you may try transaction code MBST using BDC.
Thanks,
Ashok Veer -
BAPI for Vendor Invoice and Credit memo - FB60
Hi
Iam using BAPI_ACC_DOCUMENT_POST for creating Vendor invoice and Credit memo ..Could you please tell me which fields to be populated on the below structures?
what will be the value i should use for BAPIACHE09-BUS_ACT...RFBU or RMRP?
ACCOUNTPAYABLE ( BAPIACAP09)
ACCOUNTGL(BAPIACGL09)
CURRENCYAMOUNT( BAPIACCR09)
Only the fields which needs to be populated on these structures when we do FB60 invoice and credit memo using bapi..
Thanks in advance
GoviHi,
Populate in Document_header : (User name, Comp code, Doc DAte, Doc type, Ref Doc No)
Account GL : ItemNo_Acc, GL Accuont, REf Key1, Refkey2, Refkey3, Account Type = 'A', Doc Type, Comp code
Account_number, Cost_center
Account Payable: ItemNo_Acc, Vendor_No, Rey_key1, Ref_key2, Ref_key3
Currency Amount: Item No_Acc = 2, 1
Curr = USD, USD
Amt_Doccur
At last use commit bapi.
Thanks,
Krishna -
How to create a single invoice from several delivers? (BAPI for VF01)
Hi all,
I want to create a single invoice from several delivers, just like VF01.
I just tried BAPI_BILLINGDOC_CREATEMULTIPLE, and the problem is that this bapi creates an invoice for each deliver, and i need to create only one invoice.
Can you tell me how to do it?Here you go....
wa_vbsk_dummy-smart = 'F'.
wa_vbsk_dummy-ernam = sy-uname.
v_posting = 'E'.
v_datum = sy-datum.
IT_KOMFK willhave delivery numbers, billing doc type date etc.
CALL FUNCTION 'RV_INVOICE_CREATE'
EXPORTING
invoice_date = v_datum
vbsk_i = wa_vbsk
with_posting = v_posting
id_no_enqueue = c_true
IMPORTING
vbsk_e = wa_vbsk
TABLES
xkomfk = it_xkomfk
xkomv = it_xkomv
xthead = it_xthead
xvbfs = it_xvbfs
xvbpa = it_xvbpa
xvbrk = it_xvbrk
xvbrp = it_xvbrp
xvbss = it_xvbss.
Cheers
Ravish -
Bapi for Debit/Credit Note data
Hi All,
Can someone help me finding an standard BAPI for getting the Debit/Credit note history of a customer.
Thanks in Advance,
Abhi.......Raj you can try with these also:
use...
'BAPI_CRED_MEMO_CREATEFROMDAT2'
data: con_cr_memo_bus_obj like BAPIUSW01-OBJTYPE value 'BUS2094'.
CALL FUNCTION 'ZBAPI_CRED_MEMO_CREATEFROMDAT2'
EXPORTING
ORDER_HEADER_IN = bapi_hdr
business_object = con_cr_memo_bus_obj
convert = 'X'
IMPORTING
SALESDOCUMENT = bapi_salesdoc
TABLES
return = bapi_ret_tbl
ORDER_ITEMS_IN = bapi_itm
ORDER_PARTNERS = bapi_prtnr
ORDER_ITEMS_inx = bapi_itm_out
order_schedules_in = bapi_schd_lin
order_text = bapi_text.
AND in the cloned ZBAPI above in SE37/80, add this Importing parameter: BUSINESS_OBJECT LIKE BAPIUSW01-OBJTYPE
Please have a look in older topics:
<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="95866"></a>
<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="82006"></a>
Also:
Did you try BAPI_INCOMING_INVOICE_CREATE with DOC_TYPE (CREDIT MEMO) field in BAPI_INCINV_CREATE_HEADER.
Amit. -
SQL Query for full paid invoices and payed out credit notes
Hi alltogether,
I have some problems with a sql query.
I want to export all closed (full paid) invoices and credit notes in a table with the paid date.
The problem is that I have several internal reconciliations for one invoice or credit note.
So with my current query I get all these dates in the result but only for invoices, not for credit notes.
I only need the last internal reconciliation date as payment date for all invoices and credit notes where the open amount is 0.
In SAP B1 the finance team has service invoices and credit notes imported out of an ERP system.
These documents are marked with an 'Y" in the coloumn "U_I_Imported" in the table "OINV" or "ORIN".
SELECT
OINV.DocTotal - OINV.PaidToDate as Offen, OINV.NumAtCard, OINV.U_I_Imported, ORCT.DocDate as 'Zahlungsdatum'
SELECT
OINV.DocTotal - OINV.PaidToDate as Offen, OINV.NumAtCard, OINV.U_I_Imported, ORCT.DocDate as 'Zahlungsdatum'
FROM
OJDT inner join
ORCT on OJDT.BaseRef = ORCT.DocNum inner join
RCT2 on ORCT.DocNum = RCT2.DocNum inner join
OINV on RCT2.BaseAbs = OINV.DocEntry
where
OINV.DocTotal - OINV.PaidToDate = 0 and OINV.U_I_Imported = 'Y'
group by
OINV.NumatCard, OINV.DocTotal - OINV.PaidToDate, OINV.U_I_Imported, ORCT.DocDate
order by
ORCT.DocDate
I hope you can help me.
Kind regards,
MaxThe solution for my problem:
select
OINV.DocTotal - OINV.PaidToDate as 'Offen', OINV.CardCode as 'Kundennummer', OINV.NumAtCard as 'DIAMOD Rechnungsnummer', OINV.DocNum as 'Dokumentennummer', max(ORCT.DocDate) as 'Zahlungsdatum', case when ORCT.DocCurr = (select MainCurncy from OADM) then RCT2.DcntSum else RCT2.DcntSumFC end as 'SkontoRechnungswährung',
RCT2.DcntSum as 'SkontoFirmenwährung'
from
JDT1 inner join
OJDT on JDT1.TransId = OJDT.TransId inner join
ORCT on OJDT.BaseRef = ORCT.DocNum inner join
RCT2 on ORCT.DocNum = RCT2.DocNum inner join
OINV on RCT2.BaseAbs = OINV.DocEntry
where
JDT1.TransType in ('24') and
OINV.U_I_Imported = 'Y' and
OINV.DocTotal - OINV.PaidToDate = 0
group by
OINV.NumAtCard, OINV.DocNum, OINV.CardCode, OINV.DocTotal - OINV.PaidToDate, ORCT.DocCurr, RCT2.DcntSum, RCT2.DcntSumFC
union all
select
OINV.DocTotal - OINV.PaidToDate as Offen, OINV.CardCode as 'Kundennummer', OINV.NumAtCard as 'DIAMOD Rechnungsnummer', OINV.DocNum as 'Dokumentennummer', max(OITR.ReconDate) as 'Zahlungsdatum',
0.0 as 'SkontoRechnungswährung',
0.0 as 'SkontoFirmenwährung'
from
OITR inner join
ITR1 on OITR.ReconNum = ITR1.ReconNum inner join
OINV on ITR1.SrcObjAbs = OINV.DocEntry
where
OINV.DocTotal - OINV.PaidToDate = 0 and ITR1.SrcObjTyp = 13 and OINV.U_I_Imported = 'Y'
group by
OINV.NumatCard, OINV.DocNum, OINV.CardCode, OINV.DocTotal - OINV.PaidToDate
union all
select
ORIN.DocTotal - ORIN.PaidToDate as Offen, ORIN.CardCode as 'Kundennummer', ORIN.NumAtCard as 'DIAMOD Rechnungsnummer', ORIN.DocNum as 'Dokumentennummer', max(OITR.ReconDate) as 'Zahlungsdatum',
0.0 as 'SkontoRechnungswährung',
0.0 as 'SkontoFirmenwährung'
from
OITR inner join
ITR1 on OITR.ReconNum = ITR1.ReconNum inner join
ORIN on ITR1.SrcObjAbs = ORIN.DocEntry
where
ORIN.DocTotal - ORIN.PaidToDate = 0 and ITR1.SrcObjTyp = 14 and ORIN.U_I_Imported = 'Y'
group by
ORIN.NumatCard, ORIN.DocNum, ORIN.CardCode, ORIN.DocTotal - ORIN.PaidToDate -
Belgium Tax Code for Invoices & Credit Notes
Hi,
According to SAP note 174811 (Configuring a Belgian Company Code) a distinction must be made between the VAT codes for SD invoices and credit notes:
"... distinction which is obligatory, is the distinction between
invoices and credit notes for which separate codes have to be
created. The reason is that the VAT generated by an input tax code
on credit notes must be posted to an output VAT account instead of
an input VAT account, and reversals of invoices must be seen as an
invoice in minus and not as a credit note."
However the standard MWST condition record does not provide the option of splitting the tax code determination by document type (VK11). Has anyone encountered this issue before or can you suggest a solution to this problem?
Your help is very much appreciated.
Kind regards
PHi Riaan,
Could you confirm your current path set is correct to the shared folder? It should be something like
YourServer\B1_SHR\WordDocs\*LanguageCode*. Check if you have that kind of folder on your B1 shared server.
Thanks,
Gordon -
Free of charge with internal tax (not to customer)
Hi,
I have a problem with the case of free of charge items.
I have order OR and item category TANN. I need for legal requirements to book the VAT for that item internally and not to the customer.
Can anyone help on that?
Thank you!Hi,
this can be solved by having a separate static ocndition type on which the tax is to be calculated only in the case of TANN.
The total of the condition type should not fall within the total of pricing as the same will be considered for the Free of charge deduction also.
This does not require any requirement or alt.cond.type but it wil be effective if you have one as your requirement is that the VAT amount should not be posted to customer account.
Regards,
S.Balaji. -
Hi All,
i have to migrate Bonds & Guarantees, i search now a BAPI for the Bonds, but imk not sure if i have the right one (BUS5200??), i have to migrate the advance payment Bonds, Performance Bonds and other Bonds, this are the Product types.
I have some additional things like Loans (BUS???), Deposit (BUS5510) and Foreign Exchange(BUS5600) but i think they should be ok.
Please can somebody help me?!
Thanks a lot for the help,
kind regards
AlexHi All,
i found the BAPI BUS5200 (Security Transactions), but here the problematic is that i not have all fields wiche i need (the memo fields are missing), because if i take the transaction FTR_CREATE then i have the choice of some tabs whiche i need , but i dont find a Bapi wiche is similar or near to be the same.... i hope you can help me, thanks a lot
kind regards
Alex -
Hi,
I am creating a report to monitor the volume of credit notes raised/issued and the areas these credit notes refer to so we can identify why we have so many credits and the reasons behind the credits.
The report needs to show the following:
Customer
Material
Invoice Qty (Original)
Invoice Value (Original)
Credit Qty
Credit Value
Diff (Invoice Value u2013 Credit Value)
I have tried to build this query in the billing cube however, not picking up the original invoice value / qty.
Could you advice on how best to proceed with this requirement.
Thanks in advance,
MilindHi.
Could you provide the technical name of the billing cube you are referring to?
Depending on how credit notes are handled in the source system, you should be able to identify them in BW. Maybe not in your existing cube, but in the FI flow:
Check if you are loading GL line items with datasource 0FI_GL_4. Here you should find 0AC_DOC_TYP, which gets values from the document type used in R/3 (BLART-BKPF). The list of possible values is rather long, but as you will see from the descriptions used, only some would make sense to use for credit memos. See list below.
Check for some of the credit notes which value(s) is used, in the ODS 0FIGL_o02 or ask line of business how they book credit notes. I would check the actual postings anyway, just to make sure
Based on the flow to your cube for the AC_DOC_TYP field, you can identify the credit notes and start building the logic you want.
Regards,
Jacob
AA Asset Posting
AB Accounting Document
AF Depreciation Pstngs
AN Net Asset Posting
CH Contract Settlement
DA Customer Document
DG Customer Credit Memo
DR Customer Invoice
DZ Customer Payment
EU Euro Rounding Diff.
EX External Number
KA Vendor Document
KG Vendor Credit Memo
KN Net Vendors
KP Account Maintenance
KR Vendor Invoice
KZ Vendor Payment
ML ML Settlement
PR Price Change
RA Sub.Cred.Memo Stlmt
RB Reserve for Bad Debt
RE Invoice - Gross
RN Invoice - Net
RV Billing Doc.Transfer
SA G/L Account Document
SB G/L Account Posting
SK Cash Document
SU Adjustment Document
UE Data Transfer
WA Goods Issue
WE Goods Receipt
WI Inventory Document
WL Goods Issue/Delivery
WN Net Goods Receipt
ZP Payment Posting
ZR Bank Reconciliation
ZS Payment by Check
ZV Payment Clearing -
Hi Expert,
Can u please suggest any work around/ option for following scenario.
Scenario -
Retailer purchased 10 Nikon DSLR camera @ 1000 USD each.
Over the period he sold 5 cameras, Nikon came up with price reduction as they launch new model. So now camera price is 800 for retailer, instead of credit note for 1000 USD Nikon will give other accessories worth 1000 USD .
But if retailer will sell these camera @ 900 USD then in systm, it will be treated as loss.
Is thr any option where we can link the Credit Note in kind with Item price??
thanks in advance
Regards,
LimYou will need to make a manual price adjustment to the items by using stock revaluation to bring down the item cost of these items.
Do a Goods Receipt to bring the other replacement items into stock at their value.
You can change the GL account this will hit in the document so the two offset each other in the GL account -
Hi SAP Gurus,
I am using BAPI_ACC_DOCUMENT_POST
for transaction FBS1. I am able to get the document No from this bapi.
when I am pasing this doc no in BKPF table I find an entry against that but
Reversal posting Date (STODT) and Reversal flag (XSTOV) is coming blank.
I didn't find where to pass STODT in bapi?
Or do I need to use any other function mod or BAPI by passing doc no.
Thanks,
KrishnaHi Krishna,
hi, there is no BAPI for FBS1 and BAPI_ACC_DOCUMENT_POST does not do it despite having the reversal reason as a header segment field! helpful... I think not.
The options are either BDC or RFBIBL00..
I wrapped the standard BAPI and within this either called the standard BAPI or called BDC code if the posting was to be an FBS1.
Thanks
Saurabh
Maybe you are looking for
-
To run a java program on windows xp startup
hi , i have a sample HelloWorld.java program. i wrote a batch file to run this program as follows: set PATH=%PATH%;C:\Program Files\Java\jre1.6.0\bin; cd c:\test java HelloWorld This program runs when i click on the bat file. Next i add this batch fi
-
My Mac only works on the mains
Hello, i have a problem my macbook only works when it's connected to the mains. when i click on the battery icon it says battery is not charging and when i push the button on the battery i get five green lights. in the system profiler it says: Charge
-
How to do a full load in DAC for a particular Module?
Hi, We have one Execution plan loading all the BI Analytics module as of now. 1)Financials, 2)Procurement and Spend, 3)Supply Chain and Order Management and 4)EAM Issue is if i go to Tools-->ETL Management-->Reset Data Sources in DAC, it refreshes
-
Event for browse button for fileupload control
I'm creating an application, where I need to check which file is choosen for the file-upload. Depending on the file upload, 2 other fields will be filled in because the filename is concerning a certain standard. Can I do this with javascript for exam
-
Mute key & num lock not working on my mac pro
the mute button & num lock key on my keyboard do not do anything. I have checked everywhere and can find no control for this. the f11 & f12 button work fine. any ideas?