Attachments to an a/p invoice using a jco
Hello,
I am trying to add an attachment to an existing invoice using a jco, but couldn't find any useful info so far:
First I am trying to retrieve the document and then attach the files, but i receive a null object in the doc value.
doc = SBOCOMUtil.getDocuments(company,SBOCOMConstants.BoObjectTypes_Document_oPurchaseInvoices,inv_num);
Is there anything wrong in retrieving the document?
A sample code in dot net would be helpful too.
Thanks
Ramakanth
Have you tried to visualize the Draft you have created with B1 application and save it as document by directly using B1? Do you have the same error?
If you create the Draft with B1 and try to add it after that as document the DeliveryDate and TaxCode are missing, do you fill this information when adding your document?
I think you should open a message for support in SMP, they will try to reproduce your problem.
Regards
Trinidad.
Similar Messages
-
Error while raising a invoice using VF01
Hi,
I am getting an error while raising a invoice using VF01.
Error as follows
RV_MESSAGE_UPDATE
Update was terminated
System ID.... TIP
Client....... 300
User..... user1
Transaction.. VF01
Update key... E66E6454075548D8922BAC091E81F0CB
Generated.... 18.07.2007, 18:57:38
Completed.... 18.07.2007, 18:57:38
Error info... TD 443: WRITE_FORM
Pls help
Points will be rewarded.
ThanksHi,
This is an ABAP short dump. If you go through the error log, there will be a section where in you can see > What caused the problem.
Try to analyze this log and you can find a solution. Probably, you can also check whether there is any OSS note with this error message.
Thanks
Murali. -
Calculate Withholding taxes for VEndor Invoices using ABAP program.
Hi All,
I have to upload Vendor Invoices using FB60/Fb01 tcodes. I am able to post the Invoices using FB01/Fb60
but I have to calculate extended withholding taxes also using this program for the Invoices.
Is it possible to upload vendor Invoices and calculate withholding taxes using Program?
If yes,
Does anyone has any idea how do you calculate extended withholding taxes using any BAPI's?
I have used these two BAPI's
BAPI_ACC_DOCUMENT_POST
BAPI_acc_invoice_receipt_post
they are working fine but without withholding tax.
This is a requirement for country India.
Regards,
SushilHi,
Imho, you need to get (meaning, extract into separate fields) the different supplier types from Table1 first. Your key for Table1 is the vendor no, which is also the key in Table2 (or the key for Table2 is Vendor no & Type).
For better performance, better select multiple/all required entries from Table1 instead of doing a select endselect.
Depending on the format of the vendortypes in Table1, put them in a new itab (for our purpose named Table1New where vendor no & type are the only 2 fields. For example, if the type length is fixed to 2 chars, or divided by space,... use your coding accordingly.
Next step is to select all vendor no's in Table2 which you have selected in Table1. If in Table2, the vendor no is the only key (and the all vendor types are filled in a single record), then loop check the vendor types from Table1New against the types in Table2.
If the key of Table2 is vendor no & vendor type, then do a read table for the key.
The logic in pseudo-code:
Select from Table1 into table. If you'd like to limit the selection size, add package size statement.
extract the vendor types in to itab Table1New.
Select the vendor & types from Table2 by using the for all entries option (better performance).
loop at Table1New
check in Table2:
if the unique key is vendor no: check all fields for the vendor type from Table1New
if the unique key combo is vendor no & type: check by using a read table.
If not found => add entry to Table2
endloop.
endselect Table1 (when using package size)
I guess the most difficult step is to extract the types from Table1 into separate fields, all the rest seems straight forward. Please keep in mind the itab type definitions for a better performance.
Good luck!
Best regards,
Zhou -
How to create invoice using bapi base on delivery number with example
hi,
Pl give me one example to create invoice using bapi base on delivery number (PGI).Use this code
* Pass the delivery no to the FM to create the invoice
wa_vbsk-smart = u2018Fu2019.
wa_komfk-vbeln = nast-objky. u201CuF0DF-----delivery number
APPEND wa_komfk TO it_komfk.
CLEAR wa_komfk.
* To fill the message structure
* l_wa_error-vbeln_vl = nast-objky. " Delivery No.
* l_wa_error-fkart = wa_ztab-bil_doc_type." Billing Doc type
CALL FUNCTION 'RV_INVOICE_CREATE'
EXPORTING
* delivery_date = 0
invoice_date = v_date u201C<- date
* invoice_type = ' '
* pricing_date = 0
vbsk_i = wa_vbsk
with_posting = u2018Du2019
* select_date = 0
i_no_vblog = ' '
i_analyze_mode = ' '
id_utasy = ' '
id_utswl = ' '
id_utsnl = ' '
id_no_enqueue = ' '
id_new_cancellation = ' '
** IMPORTING
* VBSK_E =
* OD_BAD_DATA =
* DET_REBATE =
TABLES
xkomfk = it_komfk
xkomv = it_komv
xthead = it_thead
xvbfs = it_vbfs
xvbpa = it_vbpa
xvbrk = it_xvbrk
xvbrp = it_vbrp
xvbss = it_vbss
* XKOMFKGN =
* XKOMFKKO = -
Clearing an Invoice using the DI
Hello
I am experiencing a problem when I generate a Journal Credit that is matched to a invoice using the DI but the balance on the invoice does not reduce or clear. I am using the following code:
' Generate the Excess Invoice/Document
oJournal = oDICompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
oJournal.TaxDate = Now
oJournal.Memo = "Excess-" & oCustName.Value
oJournal.Reference = lDocNum
oJournal.Lines.AccountCode = sGLTradeAcc
oJournal.Lines.ContraAccount = oCustAcc.Value
oJournal.Lines.ShortName = oCustAcc.Value
oJournal.Lines.Debit = rExcAmt
oJournal.Lines.Credit = 0
oJournal.Lines.ReferenceDate1 = Now
oJournal.Lines.LineMemo = "Excess-" & oCustName.Value
oJournal.Lines.Reference1 = lDocNum
oJournal.Lines.Add()
oJournal.Lines.AccountCode = sGLTradeAcc
oJournal.Lines.TaxDate = Now
oJournal.Lines.ContraAccount = oInvParty.Value
oJournal.Lines.ShortName = oInvParty.Value
oJournal.Lines.Credit = rExcAmt
oJournal.Lines.Debit = 0
oJournal.Lines.ReferenceDate1 = Now
oJournal.Lines.LineMemo = "Excess-" & oCustName.Value
oJournal.Lines.Reference1 = lDocNum
oJournal.Lines.Add()
If (0 <> oJournal.Add()) Then
MsgBox("failed to add a journal entry")
Call oDICompany.GetLastError(nErr, ErrMsg)
If (0 <> nErr) Then
MsgBox("Found error:" + Str(nErr) + "," + ErrMsg)
End If
End If
oJournal = Nothing
Please help !
Regards
JohnHi John,
You can only "clear" (= "Close"?!) an Invoice by posting a Payment or a Credit Memo, if I am not totally wrong!
A Journal entry only has a connection to a document (through the Origin / Origin No. fields) when it is generated in the background of the document creation!
Sorry, Frank -
Printing Invoices using T VF03
Hi
I am trying to print invoices using Vf03. I can print most of the invoices (or the numbers that they gave me) but two.
When I enter the number for one of those two and tell it to print from the menu it says on the bottom "output could not be issues"
And if I double click on the error message, it opens up an window saying what might have cuassed the error, but not in detail.
This is what it says
"Output could not be issued
Message no. VF304
Diagnosis
An error occurred while output was being issued. It is possible, for example, that the form to be issued has not been activated or has an error. An error may also have arisen while the data to be issued was being edited.
Procedure
Check possible causes of the problem.
Now it prints othe invoices but these two. These are old invoices and needed to be reprinted.
Please help
Edited by: Anwarul Kabir on Sep 3, 2008 5:44 PMHI,
Please check the text elements in the smartform.
I mean there will be no error in the form but there may be some problems in the text elements. That too it will be while printing
For eg: if there are three text elements but you have only 2 Boxes to print it ( take it in Main window )
So if for some instances if all the three text elements are getting printed, then it will definitely give you an error like Output cannot be issued.
So you need to confirm these kind of errors also in the form. This will come into picture depending on the data what you are printing in the form.
So please check the othe data which is getting printed with the data which is not getting printed.
When ever " Output not issued ", Please check the text elements mostly. This means it is not finding proper place to print the data.
Some times in a row there will 2 columns. IF you pass 3 rows, then it will be definitely an error.
This is what i faced in 4.6 C Version.
Mostly In higer versions you can have the line and column number in the Text elements when you put them in Templates.
Regards,
Venkatesh -
when creating invoice using the API AR_INVOICE_AP_PUB.Create_Single_invoice Am Getting the below Error:
Transaction type is invalid with current transaction date
invalid transaction type
either an inventory item description must be provided
Kindly help me hereHi Team,
I tried creating the invoice and I got the above errors, however, when updated the batch source ID I am now getting this following error only, i am just left with the following Error only
Either an inventory item or description must be provided.
Please help me on this. -
CREATE SALES ORDER WITH REFERENCE TO INVOICE USING RECORDING
Hi,
I wanted to know if it was possible to create a sales order with reference to an invoice using recording(SHDB transaction).If there is some other method please explain the method in detail(Its very urgent)Hi,
You should be able to use BAPI_SALESORDER_CREATEFROMDAT2 instead of doing a BDC and you can populate the reference document in the relevant header field.
Gareth. -
Bapi to change payment method for vendor invoices using FB02 - VERSION 4.6C
Hi all,
I have a requirment to change payment method from 'A' to 'N' in vendor invoice using tcode FB02 .My system version is 4.6c.
I am looking for a BAPI which will serve the purpose. I tried but could not find anyone.
Please help me to find the same, or any OSS note which will help me in this matter.
Thanks in advance.
Vengal Rao.Hi,
I think there is no BAPI for this, but can use FM ' FI_ITEMS_MASS_CHANGE '.
In this FM pass field 'ZLSCH' to table IT_FLDTAB, w_bseg-ZLSCH = 'N'
and pass your BSEG data to table IT_BUZTAB. This will help
Can refer to threat [Any BAPI for "FB02";
Thanks,
Anmol. -
How to create Invoice using SDK?
Hi Friends,
I m creating invoice using SDK functions..
Company comp = new Company();
comp.Server = "CSNSYS026";
comp.CompanyDB = "SBODemo_US";
comp.UserName = "manager";
comp.Password = "manager";
comp.Connect();
comp.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_NodesAsProperties;
SAPbobsCOM.SBObob oSBObob = (SBObob)comp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge);
Documents inv = (Documents)comp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);
inv.ManualNumber = "20000";
inv.DocDate = DateTime.Now;
inv.DocDueDate = DateTime.Now;
inv.CardCode = "C40001";
inv.CardName = "EarthshakerCorp.";
inv.DocCurrency = "USD";
inv.Lines.ItemCode = "A00001";
inv.Lines.Quantity = 10;
inv.Lines.Price = 100;
inv.DocTotal = 1000;
int i = inv.Add();
MessageBox.Show("Invoice created "+i);
<b>While i execute the above c# code,Invoice din't created,Wht's missing in the above code</b>..
Thanks in Advance
regards
Sooriyakala.PHo Sooriya,
what is the returncode from inv.add?
If you call comp.getLastErrorDescription, you get the errordescription
you should also set handwritten to true
Regards
Ad -
How to post a cross-company invoice using the BAPI_TRANSACTION_COMMIT?
Hi
I would like to post an inter-company invoice using the BAPI_TRANSACTION_COMMIT.
There is a comp_code in the header strusture. The BAPI's documentation says that this is possible and in the ACCOUNTGL table there is a field COMP_CODE.
The only problem is that the field is not there
Does anybody know whet to do?
Thanks,
MagdalenaBAPI BAPI_TRANSACTION_COMMIT is not used for a specific application, but needs to be called always after any BAPI is called to post the data that were changed in the BAPI to the database.
You need to find the BAPI that is used to post the invoice and then call BAPI_TRANSACTION_COMMIT.
Always do:
call function 'BAPI_application_specific'
if sy-subrc eq 0.
call function 'BAPI_TRANSACTION_COMMIT'.
endif.
Check the documentation you have to see if you can find the application specific BAPI.
Hope that helps,
Michael -
Cannot open PDF attachments in email, get administrator logon using Acrobat X?
Cannot open PDF attachments in email, get administrator logon using Acrobat X?
I have no problem opening PDF attachments that arrive in my Outlook 2003 Inbox; they open fine with Adobe Reader 9. It may be an issue with your email client.
But if you think that Adobe Reader 8 will fix it, you can download it from http://download.adobe.com/pub/adobe/reader/win/8.x/8.1.3/enu/AdbeRdr813_en_US.exe - make sure that you uninstall Reader 9 first (and Acrobat.com & Adobe AIR). -
Update Rejection note in Invoice using Program
Hi,
We have one requirement to Reject & Approve the invoice using the POWL report. I have completed all the approval process, but while in rejection we have done one enhancement in invoice that invoice can't be rejected without entering the value in the Reason for rejection. I have called the method in this following sequence. There is no exception but Reason for rejection doesn't updated.
/SAPSRM/IF_PDO_DO_LONGTEXT~ADD_LONGTEXT
/SAPSRM/IF_PDO_DO_LONGTEXT~UPDATE_LONGTEXT_BUFFER
/SAPSRM/IF_PDO_BASE~SUBMIT_UPDATE
Give me some suggestion how i can achieve this.
Regards,
NishantHi,
I want to update the Rejection Note from Program in APPROVAL mode.
Below is the i wrote for update the REJECTION NOTE .
data lV_USER_TYPE TYPE BBP_IV_USER_TYPE VALUE 'PROFI' .
lv_mode = 'APPROVAL'.
lv_decision = 'REJECTED'.
lv_objecttype = /sapsrm/if_pdo_obj_types_c=>gc_pdo_invoice.
TRY.
CALL METHOD /sapsrm/cl_pdo_bo_inv_adv=>get_inv_adv_instance
EXPORTING
iv_header_guid = I_GUID
iv_wiid = I_IV_WIID
iv_mode = lv_mode
iv_subtype = IV_SUBTYPE"ls_header_INV-subtype'
iv_user_ID = I_APPROVER
iv_user_type = lV_USER_TYPE
RECEIVING
ro_instance = lr_inv_adv.
CATCH /sapsrm/cx_pdo_no_authorizatio .
CATCH /sapsrm/cx_pdo_parameter_error .
CATCH /sapsrm/cx_pdo_status_error .
CATCH /sapsrm/cx_pdo_incons_user .
CATCH /sapsrm/cx_pdo_abort .
CATCH /sapsrm/cx_pdo_lock_failed .
CATCH /sapsrm/cx_pdo_error .
CATCH /sapsrm/cx_pdo_be_comm_error .
ENDTRY.
data lr_message TYPE REF TO /SAPSRM/IF_PDO_MSG_CONSUMER.
data lo_pdo_notes TYPE REF TO /sapsrm/if_pdo_do_longtext.
data lr_message_update TYPE REF TO /SAPSRM/CL_PDO_MSG.
DATA: lx_abort TYPE REF TO /sapsrm/cx_pdo_abort.
CREATE OBJECT lr_message_update.
lr_message ?= lr_message_update.
lo_pdo_notes ?= LR_INV_ADV.
IF lr_inv_adv IS BOUND.
TRY.
* TRY.
CALL METHOD lo_pdo_notes->add_longtext
EXPORTING
iv_p_guid = I_GUID
iv_tdid = 'NOTE'
iv_tdspras = SY-LANGU
iv_tdformat = 'X'
iv_text_preview = 'Reason For Reject'.
* CHANGING
* co_message_handler =
CATCH /sapsrm/cx_pdo_abort .
ENDTRY.
TRY.
CALL METHOD lo_pdo_notes->update_longtext
EXPORTING
iv_p_guid = I_GUID
iv_tdid = 'NOTE'
iv_tdspras = SY-LANGU
iv_tdformat = 'X'
iv_text_preview = 'Reason For Reject'
* CHANGING
* co_message_handler = lr_message
CATCH /sapsrm/cx_pdo_abort INTO lx_abort .
* mo_cll_message_handler->set_abort( io_pdo_abort_exception = lx_abort ).
ENDTRY.
TRY.
DATA TEXT_ID TYPE TDID VALUE 'RREJ'.
CALL METHOD lo_pdo_notes->update_longtext
EXPORTING
iv_p_guid = I_GUID
iv_tdid = TEXT_ID
iv_tdspras = SY-LANGU
iv_tdformat = 'X'
iv_text_preview = 'Price Difference'
* CHANGING
* co_message_handler = lr_message
CATCH /sapsrm/cx_pdo_abort INTO lx_abort .
* mo_cll_message_handler->set_a1bort( io_pdo_abort_exception = lx_abort ).
ENDTRY.
CALL METHOD lr_inv_adv->/SAPSRM/IF_PDO_BASE~submit_update( ).
* CHANGING
* co_message_handler = lr_message
CATCH /sapsrm/cx_pdo_wrong_mode .
CATCH /sapsrm/cx_pdo_abort .
ENDTRY.
CALL FUNCTION '/SAPSRM/FU_WF_RFC_DECISION'
EXPORTING
iv_header_guid = I_GUID
iv_mode = lv_MODE
iv_botype = lv_OBJECTTYPE
iv_wiid = I_IV_WIID
iv_decision = lv_DECISION
iv_approver = I_APPROVER
IMPORTING
return_code = return_code
TABLES
message_lines = lt_message
EXCEPTIONS
error_in_pdo = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
After execute this function module i got message REJECTION NOTE IS MANDATORY.
Regards,
Nishant -
Need user exit when deleting an invoice using MIR6 transaction
Hi all,
I m trying to delete an Invoice using MIR6 transaction. And I need a user exit to be triggered on deletion of an Invoice.
Can anybody help me and let me know if any user exit is available there?
Points will be rewarded.
thanks
AshishHi
Business Add-Ins
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
As with customer exits (SMOD/CMOD [Page 40]), two different views are available:
In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
In contrast to customer exits, Business Add-Ins no longer assume a two-system infrastructure (SAP and customers), but instead allow for multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time.
In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example). All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard.
A single Business Add-In contains all of the interfaces necessary to implement a specific task. In Release 4.6A, program and menu enhancements can be made with Business Add-Ins. The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects
DEFINING THE BADI
1) execute Tcode SE18.
2) Specify a definition Name : ZBADI_SPFLI
3) Press create
4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
multiple use.
5) Choose the interface tab
6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
7) Dbl clk on interface name to start class builder . specify a method name (name,
level, desc).
Method level desc
Linese;ection instance methos some desc
8) place the cursor on the method name desc its parameters to define the interface.
Parameter type refe field desc
I_carrid import spfli-carrid some
I_connid import spefi-connid some
9) save , check and activate adapter class proposed by system is
ZCL_IM_IM_LINESEL is genereated.
IMPLEMENTATION OF BADI DEFINITION
1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
2) Specify aname for implementation ZIM_LINESEL
3) Specify short desc.
4) Choose interface tab. System proposes a name fo the implementation class.
ZCL_IM_IMLINESEL which is already generarted.
5) Specify short desc for method
6) Dbl clk on method to insert code..(check the code in AAA).
7) Save , check and activate the code.
Some useful URL
http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Now write a sample program to use this badi method..
Look for BBB sample program.
AAA
data : wa_flights type sflight,
it_flights type table of sflight.
format color col_heading.
write:/ 'Flight info of:', i_carrid, i_connid.
format color col_normal.
select * from sflight
into corresponding fields of table it_flights
where carrid = i_carrid
and connid = i_connid.
loop at it_flights into wa_flights.
write:/ wa_flights-fldate,
wa_flights-planetype,
wa_flights-price currency wa_flights-currency,
wa_flights-seatsmax,
wa_flights-seatsocc.
endloop.
BBB
*& Report ZBADI_TEST *
REPORT ZBADI_TEST .
tables: spfli.
data: wa_spfli type spfli,
it_spfli type table of spfli with key carrid connid.
*Initialise the object of the interface.
data: exit_ref type ref to ZCL_IM_IM_LINESEL,
exit_ref1 type ref to ZIF_EX_BADISPFLI1.
selection-screen begin of block b1.
select-options: s_carr for spfli-carrid.
selection-screen end of block b1.
start-of-selection.
select * from spfli into corresponding fields of table it_spfli
where carrid in s_carr.
end-of-selection.
loop at it_spfli into wa_spfli.
write:/ wa_spfli-carrid,
wa_spfli-connid,
wa_spfli-cityfrom,
wa_spfli-deptime,
wa_spfli-arrtime.
hide: wa_spfli-carrid, wa_spfli-connid.
endloop.
at line-selection.
check not wa_spfli-carrid is initial.
create object exit_ref.
exit_ref1 = exit_ref.
call method exit_ref1->lineselection
EXPORTING
i_carrid = wa_spfli-carrid
i_connid = wa_spfli-connid.
clear wa_spfli.
check the following user exits for MIR6
LMR1M001 User exits in Logistics Invoice Verification
LMR1M002 Account grouping for GR/IR account maintenance
LMR1M003 Number assignment in Logistics Invoice Verification
LMR1M004 Logistics Invoice Verification: item text for follow-on docs
LMR1M005 Logistics Inv. Verification: Release Parked Doc. for Posting
LMR1M006 Logistics Invoice Verification: Process XML Invoice
MRMH0001 Logistics Invoice Verification: ERS procedure
MRMH0002 Logistics Invoice Verification: EDI inbound
MRMH0003 Logistics Invoice Verification: Revaluation/RAP
MRMN0001 Message output and creation: Logistics Invoice Verification
Regards
Anji
Message was edited by:
Anji Reddy Vangala -
Partially Paying AR Invoices using DTW
I am trying to add a cash payment for $500 against a $1000 invoice using DTW by filling in the below fields. However, it is closing the invoice even though it hasn't been fully paid.
Are there additional fields that I need to fill in to specify that I want to keep the invoice open?
Thanks,
Mike
Payments Object:
Recordkey = 1
CardCode = "5AGRIL1"
CashAccount = "_SYS000000000951"
CashSum = 500.00
DocDate = 20050701
Payments_Invoices Object:
Recordkey = 1
DocEntry = 5
SumApplied = 500.00Hi Mike,
Here's a cleaned up snippet that makes the payment partial if the payment sum is less than the open total for the invoice. It's written in VB6 (sorry for that).
Henry
Public Function CreateIncomingPaymentForInvoice(inv As Documents, invoiceDocEntry As Long, inBankAccount As String, sumApplied As Double, paymentDate As Date, strGLAccount As String) As String
Dim pay As SAPbobsCOM.Payments
Dim lRetCode, lErrCode As Long
Dim sErrMsg As String
On Error GoTo PayFailed
Set pay = vCmp.GetBusinessObject(oIncomingPayments)
'The following line enables partial payment
pay.Invoices.sumApplied = sumApplied
pay.cardCode = inv.cardCode
pay.cardname = inv.cardname
pay.BankAccount = inBankAccount
pay.docDate = paymentDate
pay.TaxDate = paymentDate
pay.TransferDate = paymentDate
pay.docCurrency = "EUR"
pay.ApplyVAT = tYES
pay.TransferAccount = strGLAccount
pay.TransferSum = sumApplied
pay.Invoices.docEntry = invoiceDocEntry
pay.Invoices.DocLine = 1
pay.Invoices.InvoiceType = it_Invoice
lRetCode = pay.Add
If lRetCode = 0 Then
CreateIncomingPaymentForInvoice = "" ' no error
Exit Function
End If
PayFailed:
vCmp.GetLastError lErrCode, sErrMsg
CreateIncomingPaymentForInvoice = "" & lErrCode & ", " & sErrMsg
End Function
Maybe you are looking for
-
Extending a OAF Page - Errors OALL8 is in an inconsistent state.
Hi, I am trying to extend Item Creation page in PLM. The page is in OAFramework. Brought the page, to the client and trying to run it in client, JDeveloper throughs the following error. Any help is greatly appreciated. The applications version is 12.
-
Is There a Phone # for Verizon Customer Support?
I am trying to actually talk (not chat) with somone at Verizon customer support about my new account. I have hunted all over and I find it infuriating that a phone company does not have a phone number. Can anyone help me?
-
Image garbled when exporting to Photoshop CS5 from Lightroom 3
I posted this in the Lightroom forum, but I am cross-posting it here in case anyone has run into something similar... I purchased a new 2011 Sandy Bridge MacBook Pro. I loaded Lightroom 3.3 and CS5 Photoshop onto it. Unfortunately, whenever I exp
-
Hello All, I want to add a column in overview screen for W4 tax service for USA. I have created a new custom component configuration by copyning HRESS_CC_W4_US. And trying to assign this config in Z_HRESS_CC_W4_OVP_US. While doing so I get an error -
-
Printing correctly in Aperture and too dark in everything else.
New to photography and purchased LightRoom 2 on a friends recommendation. I really like the program. However, no matter what I tried it printed too dark. All sorts of profiles, printer driver color mangement yes/no and while I could get just a slight