How to remove Draft Documents using DIAPI?
DIAPI help says that Remove Method is not supported because "SAP Business One does not allow to remove a document object from the database".
However, in SBO UI, you can remove Draft Documents. Is there another way or workaround in DI API for deleting Draft Documents?
Juha
Juha, why do you think so?
The following snippet shows you how to kill Purchace-draft:
SAPbobsCOM.Documents oDraft;
oDraft = (SAPbobsCOM.Documents)pCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts);
oDraft.DocObjectCode = SAPbobsCOM.BoObjectTypes.oPurchaseInvoices;
oDraft.GetByKey(<DraftDocEntry>);
resCmpTo = oDraft.Remove();
if (resCmpTo != 0)
pCmp.GetLastError(out errNum, out errStr);
MessageBox.Show("oDraft.Remove(): " + errNum.ToString() + "n" + errStr);
HTH
Similar Messages
-
How to remove the Sessions used in the application
Hai Techies,,,
i am using many number of sessions in my application, for example i am using 5 sessions in reports module
my application is a web based application
if can't remove the sessions it contains the huge amount of data , my application is going into mess, and the application performance will be decreased..
Can anybody tell the solution for this Problem
How to remove the Sessions used in the application
Hoping a reply
Thanks & Regards
Krishna mangamuriHai Gita,
i am not able to do the session invalidate method bcoz, i am mainatainting the session from login along with the current userid who is login into the system and putting some of the data in session....
thats session is to be valid upto when i click on logoff link
except that i have to remove the sessions in my application
while navigating from one jsp to another i have to remove the sessions, bit somes times that sessions may be used somewhere
Can u Understand My problem
session remove method may also helpful to me but some times it will casue some prob to me
Is there any other Way to remove the sessions in the Application ????
Thanks & Regards
Krishna Mangamuri -
Print Draft Document using Crystal Report in SAP 8.8
I created a Crystal Report Layout using SQL View as data source for AR Invoice which prints out fine. (everthing on 1 page)
To print Draft Invoice, I copied the view to use ODRF/RDF1 instead of OINV/INV1, copied the Crystal report and updated the data source to the new view. When print Draft Invoice, it prints 3 pages - page 1 blank, page 2 just the "DRAFT" watermark, page 3 the crystal report without watermark.
Steps to print Draft Invoice: Sales-A/R > Sales Report > Document Drafts Report > Open selected Draft Invoice document > File > Select Layout and Print...
What is happening behind the scene when printing Draft documents? What is the correct way to print Drafts (e.g. special settings designing Crystal Reports)?
Thanks,
GraceThank you for your reply. It works in this specific report.
But we have both PLD and Crystal Report in the system, changing the settings means the PLD will lose their watermark...
Also, I don't know how the Draft is displayed, but when select Print Preview for Draft, it's asking for parameter (DocEntry), which I have setup a DocKey@ in Crystal Report and set it in the Selection Manager. Does SAP provide DocEntry in Draft Invoice (ODRF) the same way as in Invoice (OINV)?
Thanks,
Grace -
How to remove trailing zeros using EngineeringFormatInfo?
HI,
I found a measurement studio formatter for SI notation.
For details, see the NI document.
Here, I want to know how to remove any trailing zeros. I could not find any information about this.
For example,
code : string result = string.Format(EngineeringFormatInfo.Default, {0:s5}, double value)
if value = 1.2345678E-3, result is 1.23457E-3. It is ok.
if value = 1.2E-3, result is 1.20000E-3. But I want to get "1.23m".
In labview, I usually use "%#.5p" format string.diluculo wrote:
HI,
I found a measurement studio formatter for SI notation.
For details, see the NI document.
Here, I want to know how to remove any trailing zeros. I could not find any information about this.
For example,
code : string result = string.Format(EngineeringFormatInfo.Default, {0:s5}, double value)
if value = 1.2345678E-3, result is 1.23457E-3. It is ok.
if value = 1.2E-3, result is 1.20000E-3. But I want to get "1.23m".
In labview, I usually use "%#.5p" format string.
I don't understand how you are getting 1.23457E-3 ? And claiming that is okay.
If you are using the format string that you claim you are using, then you should be getting 1.23457m.
It sounds like you are using string result = string.Format(EngineeringFormatInfo.Default, {0:E5}, value) -
Can u tell me how to remove or delete the documents which are remain in the Recent section after I have moved them to the respective follders. Thanks.
The same question by the same user.
Please see the other post for the reply.
After the latest update, documents from adobe reader moved to respective folders remain the the Recent. Why? Please advise -
How to attach a document using the Send mail component
Hello,
I would like to know how to attach a document in a email using the Send mail component.
There are these nodes into the atom but I don't know how to use it.
<attachment doc="/ds/grp/doc" pltype="xml">
<xsl:copy-of select="/vpf:Msg/vpf:Body/vpf:Payload[@Role='S']/vpf:Msg/vpf:Body"/>
</attachment>
Does anyone know ?
Thank you.Hello All,
Regarding to the mail adapter, here are some updates:
1. B1i will support sending HTML attachemnt via "Send Email" atom in B1 882 PL09. An example here:
<attachment doc="test.htm" pltype="htm">
<![CDATA[<html>
<head>
<title>Enter the title of your HTML document here</title>
</head>
<body>
<p>Enter the body text of your HTML document here</p>
</body>
</html>]]>
</attachment>
2. In addition, B1i will support sending binary attachment and sending html content in Q1,2013.
Thanks & Best Regards,
Qiaoli -
How to create Draft Document in CR
Hi all,
I try to create draft document in CR using store procedure script.
So i can preview the document if it's in draft mode and non draft mode.
When i preview it in draft mode , every thing is ok
But when i preview it in non draft mode, the draft and non draft data combine together.
Here is my code
Create Procedure PO
@Dockey numeric(19,6)
@ObjectId numeric(19,6)
as
begin
select PO.* from
select 'DR' as tipedoc,ODRF.DocNum ,ODRF.DocEntry ,ODRF.CardCode,ODRF.CardName,ODRF.ObjType ,
ODRF.DocDate,TaxDate, DRF1.ItemCode as itemcode, DRF1.Quantity ,DRF1.unitMsr ,
OITM.ItemName ,OITM.CodeBars
from ODRF
inner join DRF1 on ODRF.DocEntry = DRF1.DocEntry
inner join OITM on DRF1.ItemCode = OITM.ItemCode
where ODRF.ObjType = 22
union all
select 'ND' as tipedoc,OPOR.DocNum ,OPOR.DocEntry ,OPOR.CardCode,OPOR.CardName,OPOR.ObjType ,
OPOR.DocDate,TaxDate, POR1.ItemCode as Itemcode, POR1.Quantity ,POR1.unitMsr ,
OITM.ItemName ,OITM.CodeBars
from OPOR
inner join POR1 on OPOR.DocEntry = POR1.DocEntry
inner join OITM on POR1.ItemCode = OITM.ItemCode
)PO
where PO.docentry = @Dockey
and PO.Objtype = @ObjectId
end
Do i miss some thing in my code
Thanks in advance
Regards
KahkianHello, I think something more efficent could be like this: (ignore the RFQ calculation as it is for integration with an external database other than SAP Business ONE)
create
procedure SP_PO_FORMAT
@DOCKEY
INTEGER,
@OBJECTID
INTEGER
AS
if
@OBJECTID = 112 begin
select
t0.docentry,T0.docnum,T0.lictradnum,T0.address,T0.address2, T0.CardCode, T0.CardName, T0.DocDate, T0.DocDueDate, T0.comments,T2.slpname,T3.officetel,T3.email,T4.pymntgroup,T5.firstname, T5.lastname, T5.E_MailL, T5.tel1,
case
when T0.doccur = 'USD' THEN T0.DocTotalFC ELSE T0.DocTotal END AS DOCTOTAL, case when T0.doccur = 'USD' THEN T0.vatsumfc ELSE T0.vatsum END AS vatsum,T0.DocCur,
case
when T0.Comments like 'Basada en Cotizacion a Proveedores%' then
case when ISNUMERIC(SUBSTRING(T0.comments,36,CHARINDEX('.',T0.comments,1)-36)) = 1
then convert(int,SUBSTRING(T0.comments,36,CHARINDEX('.',T0.comments,1)-36))
else
case when T0.Comments like 'Basada en solucitud de eProcurement%'
then
case when ISNUMERIC(SUBSTRING(T0.comments,37,CHARINDEX('.',T0.comments,1)-37)) = 1
then convert(int,SUBSTRING(T0.comments,37,CHARINDEX('.',T0.comments,1)-37))
else 0
end
else 0
end
end
else
case
when T0.Comments like 'Basada en solucitud de eProcurement%'
then
case when ISNUMERIC(SUBSTRING(T0.comments,37,CHARINDEX('.',T0.comments,1)-37)) = 1
then convert(int,SUBSTRING(T0.comments,37,CHARINDEX('.',T0.comments,1)-37))
else 0
end
else 0
end
end
as rfq,
T1
.LineNum,
T1
.ItemCode, T1.Dscription, T1.freetxt,T1.unitmsr,T1.Quantity,T1.packqty, T1.Price, T1.vatprcnt,case when T0.doccur = 'USD' THEN T1.totalfrgn else T1.linetotal end as linetotal from sbo_mno.dbo.ODRF T0
inner
join sbo_mno.dbo.DRF1 T1 on T0.DocEntry = T1.DocEntry
left
join OSLP T2 on T0.slpcode = T2.slpcode
left
join OHEM T3 on T2.slpcode = T3.salesprson
left
join OCTG T4 on T0.groupnum= T4.groupnum
left
join OCPR T5 on T0.cntctcode = T5.cntctcode
where
T0.Docentry = @DOCKEY
END
ELSE
select
t0.docentry,T0.docnum,T0.lictradnum,T0.address,T0.address2, T0.CardCode, T0.CardName, T0.DocDate, T0.DocDueDate, T0.comments,T2.slpname,T3.officetel,T3.email,T4.pymntgroup,T5.firstname, T5.lastname, T5.E_MailL, T5.tel1,
case
when T0.doccur = 'USD' THEN T0.DocTotalFC ELSE T0.DocTotal END AS DOCTOTAL, case when T0.doccur = 'USD' THEN T0.vatsumfc ELSE T0.vatsum END AS vatsum,T0.DocCur,
case
when T0.Comments like 'Basada en Cotizacion a Proveedores%' then
case when ISNUMERIC(SUBSTRING(T0.comments,36,CHARINDEX('.',T0.comments,1)-36)) = 1
then convert(int,SUBSTRING(T0.comments,36,CHARINDEX('.',T0.comments,1)-36))
else
case when T0.Comments like 'Basada en solucitud de eProcurement%'
then
case when ISNUMERIC(SUBSTRING(T0.comments,37,CHARINDEX('.',T0.comments,1)-37)) = 1
then convert(int,SUBSTRING(T0.comments,37,CHARINDEX('.',T0.comments,1)-37))
else 0
end
else 0
end
end
else
case
when T0.Comments like 'Basada en solucitud de eProcurement%'
then
case when ISNUMERIC(SUBSTRING(T0.comments,37,CHARINDEX('.',T0.comments,1)-37)) = 1
then convert(int,SUBSTRING(T0.comments,37,CHARINDEX('.',T0.comments,1)-37))
else 0
end
else 0
end
end
as rfq,
T1
.LineNum,
T1
.ItemCode, T1.Dscription, T1.freetxt,T1.unitmsr,T1.Quantity,T1.packqty, T1.Price, T1.vatprcnt,case when T0.doccur = 'USD' THEN T1.totalfrgn else T1.linetotal end as linetotal from sbo_mno.dbo.OPOR T0
inner
join sbo_mno.dbo.POR1 T1 on T0.DocEntry = T1.DocEntry
left
join OSLP T2 on T0.slpcode = T2.slpcode
left
join OHEM T3 on T2.slpcode = T3.salesprson
left
join OCTG T4 on T0.groupnum= T4.groupnum
left
join OCPR T5 on T0.cntctcode = T5.cntctcode
where
T0.Docentry = @DOCKEY -
How to remove infopath ribbon using Master Page?
Hi All,
I would like to remove infopath ribbon using Master Page, using f12 removed like "<div id="s4-ribbonrow"
class="s4-pr s4-ribbonrowhidetitle" style="display:none">". But how to perform in original master page? Thanks in advance!Hi,
Based on your description, my understanding is that you want to remove InfoPath ribbon using Master Page.
using F12 to find the <div id=”RibbonWrapper”> section:
Navigate to :C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\ FormServer.aspx. Add the following CSS into <head runat="server"></head>section:<style type="text/css">
#RibbonWrapper
display: none !important;
</style>
Best Regards,Lisa Chen
Lisa Chen
TechNet Community Support -
How to remove YouTube videos using ipad2?
I can't figure out how to remove videos from YouTube using ipad2? Is there any way?
I'm sorry, but there is not. You just have to access your account online. From there, go to "Your Videos" then check mark each video you would like to remove, then select "Delete" to remove. Hope this helps!
-
How to: Send any document using mail via "Right click"
Hello-
Does anyone know how to send a document, whether it is a Word, Eccel, Pages doc, etc. via a "Right Click" or similiar key stroke as we can on a WinPC? I am certain it is possible, and the closest commandIi have found is the "Services:Mail" drop down which is seemingly useless (i.e. I do not know how to make use of it). Any suggestions are appreciated. Thx
MacBookPro 15" Mac OS X (10.4.6)thexr6,
Welcome to Apple Discussions.
Try this if you want to add an attachment to a new mail message:
1. Open Automator.
2. In the Library column, click on Mail.
3. In the Action column, double click on New Mail Message.
3. In the Action column, double click on Add Attachments to Front Message.
4. In Automator>File>Save As Plug-In...>Save Plug-in As: (Type your desired name here) Plug-in for: Finder>(Save)
Right click on the file you wish to attach and select Automator>(your desired name).
If you know where you actually want to send the message, enter the specific information required in step 3, and add/select "Send Outgoing Messages" after step 3.
;~) -
Urgent !!! How to change Accounting document using Billing document numb
Hi experts,
I have one requirement where I have to modify the accounting document using report. User will enter billing document no and I have to find out respective accounting document and change header data of it.
I am very new to these modules so please give me solution.
Thanks
SameerHi
Go to VF03- Display Billing document. From here you should be able to find the corresponding accounting document. Do note that there are only limited field such as text that is allowed to be changed once posted.
Rgds
Nadini -
Urgent !!! How to change Accounting document using Billing document number
Hi experts,
I have one requirement where I have to modify the accounting document using report. User will enter billing document no and I have to find out respective accounting document and I have to change header data..
I am very new to these modules so please give me solution.
Thanks
SameerHi,
Get a record from BKPF where
AWTYP = 'VBRK' & AWKEY = VBRK-VBELN .Once you get the accounting header document you can always fetch item level records from BSEG where bukrs =bkpf-bukrs
BELNR = BKPF-BELNR & GJAHR = BKPF-GJAHR.
I hope this helps,
Regards
Raju chiatle -
How to creating pdf documents using c# and Adobe SDK
I downloaded Adobe SDK and go through the samples given in sdk. But i couldn't find any sample code how to create PDF file using C# code.
Please, help me with this.
Thanks.For desktop-based solutions, look at the Adobe Acrobat SDK which enables development around Acrobat itself. Or if you wish a stand-alone solution (for either desktop or server), we offer the Adobe PDFLibrary, which is the same technology used by all of Adobe's applications.
For the server, we have our LiveCycle products including LC Generator.
Leonard -
How to remove unwanted audio using audio effects?
The audio effects in question: http://help.adobe.com/en_US/premierepro/cs/using/WS1c9bc5c2e465a58a91cf0b1038518aef7-7d80a .html
I've been meaning to learn how to do this for a while so I thought I'd get started.
I want to learn how to clean up my audio. I don't have very professional audio gear, I'm using a Rode videomic pro on a canon 60D so the quality isn't the best but it's ok for now. There is a lot I want to learn but right now there are 2 things on my mind:
1. I have a deadcat wind muff on my rode but still when the wind hits it I get this unwanted wind sound on my soundtrack. I know there has to be a way to remove or reduce this somehow using the audio effects.
2. Slight white noise over my audio. I know this is a result of recording directly from my camera but there has to be a way to reduce the white noise in order to get clearer audio. I've seen people recording right out of their camera and they have way better results than me.I know there has to be a way to remove [wind noise]
There is. It's called ADR.
there has to be a way to reduce the white noise
There is. Better equipment.
Sorry but, I think you may be expecting to much of your post production tools. -
How to open Word Document using java?
Respected Sir/ Madam,
I am doing my project in Network Security using java. I have to transfer the files from server to the client. Each transferred file should have some of the access privileges such as read, write and exeucte. If the transferred file is a word document means then automatically the client should open Microsoft word and if the file is having Read Permission alone then the save, Save As, cut,copy, paste options in the MS - Word should be disabled. This is similar for all the files that i have transferred. That is if the transferred file is excel, audio, video,txt file the corresponding application should be opened properly. How could I acheive this. If the file is having write permission then if the user clicks the save option then the contents of the file should be saved in the server machine not in the client machine, Could we achieve this???? Can anyone help me regarding this? Please give me your views about this query?Respected Sir / Madam,
Thank you very much for your reply. Could we use Microsoft API inside java program to achieve my doubts?? Could U explain it more????
Maybe you are looking for
-
Metadata with Multichannel Audio doesn't work...
I've been attempting to create metadata entries for some movie files and have found that the data will display properly only if the file has 2-channel audio. Other files with multichannel audio will not display the info correctly from within iTunes.
-
JDeveloper OC4J - client method calls
I am having trouble in getting result while I was calling a clientt method in OC4J. The SQL query used was not fetching results. when I run the query in a SQL developer it is working fine. Showing no error but not bringing any results. The client met
-
Problem sync iCloud Photo Library
Why in my iCloud Photo Library are indicated 4 video and my devices download in Photo only 3 but fail to download the 4th? They are constantly trying to download it without success for four days. How can i solve it? Please help me. Thanks
-
Table entry for assignment of merchandise category to characater profile
Hi MM expert, could anyone tell me in which table , assignment of merchandise category to character profile is saved. Regards, Santosh Edited by: santosh jaiswal on Sep 29, 2009 10:48 AM
-
Finding and changing image size in a Layer
I am using CS4 on a Windows 7 platform. I am creating a collage of several photos. I want to see and adjust the size of just the one photo on the layer I am working with. When I look at Image Size it shows the whole size, based on the background size