Approval procedure in Add On
Dear All
In SAP B1 new version 8.82 have approval procedure. please help me a question below:
In SAP. user account 01 create A/R credit memo DocNo(01) --> it save approval pending.
user manager --> approval A/R credit memo DocNo(01) --> A/R credit memo DocNo(01) is created. --> End process. --> success.
In Add On. I use account: user account 01 Create A/R credit memo DocNo(02) -> it save --> A/R credit memo DocNo(02) is created. -->End process. --> no success with approval procedure
I want to Add On with approval procedure the same as in SAP
And Add On Code below:
Input A/R invoice with Object = 13, DocEntry > to add A/R Credit memo> no success with approval procedure
Public Function SO_Return(ByVal DocEntry As Integer, ByVal ObjType As Integer) As Integer
Dim i As Integer = -1
Try
Dim oObj As SAPbobsCOM.Documents
If ObjType = 13 Then
oObj = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
' set properties of the Order object
oObj.GetByKey(DocEntry)
Dim oARCreditMemo As SAPbobsCOM.Documents
oARCreditMemo = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCreditNotes)
oARCreditMemo.CardCode = oObj.CardCode
oARCreditMemo.DocDueDate = oObj.DocDueDate
oARCreditMemo.NumAtCard = oObj.NumAtCard
If oObj.Lines.Count = 1 Then
oARCreditMemo.Lines.ItemCode = oObj.Lines.ItemCode
oARCreditMemo.Lines.Quantity = oObj.Lines.Quantity
oARCreditMemo.Lines.Price = oObj.Lines.Price
oARCreditMemo.Lines.BaseEntry = DocEntry
oARCreditMemo.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oInvoices
oARCreditMemo.Lines.BaseLine = 0 'first line
Else
MessageBox.Show("A/R Invoice have " + oObj.Lines.ItemCode.ToString() + " rows, don't return. if want, use SAP.")
Return i
End If
i = oARCreditMemo.Add
End If
Return i
End Function
it add success but don't approval procedure
This code is no success with approval procedure. Please help me.
Thanks.
Dear friend,
Thanks for replying,
But what does it mean "User must add the document through UI to trigger it"?
Because this function is built for user input data outside SAP, I have to develop by SDK with DI.
Similar Messages
-
Approval Procedures for Add-On generated documents
Hi All,
How do you create some Add-on generated documents into Business One through Approval Procedures?
Thanks
VenkatHi SVReddy,
You can use the SDK to acheive your requirement,
so post the thread to SDK Forum
Regards
Jambulingam.P -
Wrong stage in Approval Procedure
Hi All.
Recently, we've upgrade our SBO (2007A) to SP01, PL08 and then we noticed a strage problem regarding Approval Procedures.
Our Approval Procedure Template (for POs) has 2 stages as below:
First stage - st1
Defined Approvals - 2
Required - 1
Second stage - st2
Defined Approvals - 5
Required - 2
Scenario
1.Document Add, the Approval Procedure takes into action and goes to st1. OWDD: CurrStep = st1, MaxReqr = 1.
2.One of the approvals in st1 approves and document goes to st2. OWDD: CurrStep = st2, MaxReqr = 2.
3.One of the approvals in st2 approves. OWDD: CurrStep = st2, MaxReqr = 2.
and here comes the surprise:
When another user of st2 approvals approves the document, the document does not become Approved, but is still suspended. When checking OWDD, I see that CurrStep = st1, MaxReqr = 2 !!!
SBO had "jumped" the process back to st1, but now it requires (somehow) 2 approvals.
Did anybody see such a behaviour? Do you know any solution?
10x in advance,
Beni.hi,
try to do this as your work around,
1. try to edit your Approval template and updated it
2. try to make a new Approval template identical (2 approval templates that does not behave the way u want)
in this case u cant test your old approval template and new approval template.
best regards.
FIdel -
Enhanced Approval Procedure Functions- authorization issue
Dear Expert,
I have activated the enhances approval procedure function as per below screen shot:
Granted authorization as mention in New ChaRM Feature with SP 10: Enhanced Approval Procedure Functions by Michael. With SM_APP_AP with 02, 22 and 75.
But the Request for change procedure selection and approval steps was disabled
The requestor able to change the approval procedure and approval steps only if i granted the user with 70 (administer).
Please help as i want the requestor to be able to select the approval procedure and approval steps but not approving the CR. Im following the chart below but seem like is not working.
Role
SAP standard roles
Activity for
Change Manager
SAP_CM_SMAN_CHANGE_MANAGER
37 (approve) approval step, 75 (delete approval step), 22 (add approval step), 02 (change approval procedure assignment)
Potential Approvers
SAP_CM_SMAN_DEVELOPER
SAP_CM_SMAN_OPERATOR
SAP_CM_SMAN_TESTER
37 (delivered inactive)
Power User, Administrator
SAP_CM_SMAN_ADMINISTRATOR
70 (administer), 37 (approve) approval step, 75 (delete approval step), 22 (add approval step), 02 (change approval procedure assignment)
Thanks
Regards,
JunnieHi Jansi,
I have added activity 22 (add approval step) and 02 (change approval procedure assignment) but the approval procesure and approval step are disabled and not allow the requestor to select /add/ male changes.
So im not sure which part is going wrong.
Thanks
Regards,
Junnie -
Hi,
I need a query for outgoing payment approval, if cash is more than 1000 then approval should get activated.
Below query is not working. Any chages?
Select 'true' where $[$ovpn.CashSum] > 1000
Regards
Shashihi shashi,
Read this Note 1165619 - Cannot add outgoing payments in approval procedures
https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1165619
Edited by: Jeyakanthan A on Sep 12, 2009 10:13 AM -
Query base multiple levels PO approval procedure
Hi,
My customer is having following requirement for PO approval procedure and would like to seek for solution.
The suppliers are either CAPEX or OTHERS supplier which I think of using UDF U_CAPEXSUPPLIER=Y or N in BP master setup.
OTHERS supplier PO
<RM2000 approved by local accounts
>RM2000 approved by CFO or one of directors
CAPEX supplier PO
<RM5000 approved by CFO
>RM5000 approved by one of Board of Directors
The 2000 and 5000 figures are applicable to both local and foreign purchase. ie if it USD suppliers then limit is USD2000
Thanks and regards
ThomasThomas,
Open Query Generator....Click Execute.....With the Red message at the bottom..you will see the SELECT *
click on the Pencil icon and copy over each of my queries and save it using a different name.
Then Add an Approval Stage for each Approver..
Using the Approval Template..Give a Name...Make Sure Active check box is CHECKED next to the Name
Select the Originators (users whose document should go through the approval process)..In the document tab select the documents for which this approval applies..Stages Tab..select the associated Approval Stage defined earlier..
Term tab: Select When the following Applies
In the lower window...double click onn the first row under Query Name..Select your query and ADD.
Make Sure Active check box is CHECKED next to the Name
Suda -
Approval procedure should trigger on PO updation
Hi,
After adding the Purchase Order, i will do some changes on the same PO.
Approval procedure is required updation or changes in the same PO.
any one can suggest me.
Regards,
Vikramset ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(25), -- SBO Object Type
@transaction_type nchar(1), -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
begin
-- Return values
declare @error int -- Result (0 for no error)
declare @error_message nvarchar (200) -- Error string to be displayed
select @error = 0
select @error_message = N'Ok'
-- ADD YOUR CODE HERE
IF (@object_type=22) -- 22 for Purchase Order
BEGIN
if (@transaction_type='A') or (@transaction_type='U') -- A For Add and U for Update
BEGIN
-- ADD YOUR CODE HERE
END
END
-- Select the return values
select @error, @error_message
end -
Approval procedure vs Transaction Notification
Hello dear experts,
I have an issue with the approval procedures and the validations I have to do using the Transaction Notificacion Stored procedure.
this is the scenario and conditions to consider:
1.A purchase order (Doctotal) that are between 0 and 25,000 USD needs an approval.
2. A purchase order needs to have all the project column filled in before the approval procedure. this column is in the detail of a document, so all the rows have to be filled in with the right project code otherwise when your request have been submmited and your receive the approval you are not allowed to do any changes in the Detail Document.
I realized that the approval procedure is launched before the Transaction Notification SP.
So I decided to add a query for the approval procedure considering the validations in the project column:
SELECT distinct 'true'
FROM OPOR
WHERE $[OPOR.DocTotalSy.number] Between 0 and 24999.99 ---This part works perfeclty!!!
AND LEN(isnull($[POR1.Project.0],''))>0 and $[POR1.U_SubJob.0]>0 ) --This part does not work
As you see in the query, I am trying to validate that all the rows have the project code (Project) and a UDF (U_SubJob) filled in.
Have anybody been done this before? How can I access to the detail values of the document? It is easy to acces values on the header.
I appreciate any help on this. Thank you very much
Regards,
MaryHi,
You must use both in approval procedure or use both in SBO store procedure transaction notification.
To request approval for a project, you this following approval query:
if (SELECT $[$38.31.0]) > ' '
select 'true'
the other query is for doctotal approval as follows:
if ($[opor.doctotalsys.number]) between 0 and 24999.99
SELECT 'true'
or
select distinct 'true' FROM OPOR
WHERE $[OPOR.DocTotalSy.number] Between 0 and 24999.99
Both are able to use and work simultanously.
JimM -
Approval procedure for the creation of a new item
I would like to have an approval procedure for the creation of new items. In that when one gets added, it gets placed on hold immediately and an alert gets sent to a manager.
thx, RichardThe solution would be the combination of SBO_SP_TransactionNotification stored procedure allowing only for some authorized persons to add an item with not On Hold status, and an alert to the authorized persons.
-
Approval Procedure Not Triggered on Updating Document
Hi,
When Adding a new Sales Order, if the document meets the criteria laid down by an Approval Template, the Approval Process is started.
However, if an old Sales Order is Updated, the Sales Order the Approval Process is ignored.
This is a problem for certain customers who have Approval Procedures which prevent users Adding Sales Orders which would take a Business Partner over the Commitment and/or Credit Limit.
The user can get around the Approval Procedure by adding a Sales Order for a value which keeps the BP under the set limit. If they then Update the Order, they can enter any value.
For example, a user may be prevented from adding an Order totalling £1000.00. If they Add the Order for £0.00 instead, they could later amend the Order to any amount as the Approval Process is not fired !Could you clarify what you mean by "The credit limit exceeded is in negative numbers"
Negative number: the system message I get when I create a delivery note for a customer, exceeding the credit limit is the following:
Customer has exceeded credit limit - 95.479 EUR
Customer has exceeded commitment limit - 95.479 EUR
Continue (Y/N)
Make sure the Credit Limits are set in the BP Master. --> OK, credit limit is set to 100 EUR, Commitment limit to 100 EUR
Also use Great than in Ratio and try to use a small number like 10 in the value --> I am using 1 EUR
Also, check in System Initialization > General Settings..BP Tab Activate approval procedure is checked. --> it is checked.
Using the range option does not solve the problem, in fact even if I use 'Deviation from Credit Limit does not equal 1 EUR' the approval is not triggered. When I use the same Approval template, but I alter the terms to Total document greater than 1 or Discount% greater than 1 the approval is triggered.
Edited by: Rui Pereira on Apr 29, 2009 1:19 PM -
Approval Procedure with multiple Approver
Dear All,
Good day!
We have currently setup approval procedure when creating a particular document. In our setup, we have 2 authorizer but it requires only one approver. Result shows that when originators created a document a message prompts to the authorizer. But the problem is, if one of the authorizer approves the document it still sends to the other approver. Can we have a system message that automatically sends that this particular document was already approved by one of the approver? Or is there any setup that when one of the approver approves it will not prompt in the other approver?
Thank you and Regards,
ErickaHi,
1. Can we have a system message that automatically sends that this particular document was already approved by one of the approver?
There is no such system message in SAP B1.But the first approver can add his comments on "Remarks" field, for example, "this document already approved me".
Whenever second approver open the document to approve, he can see this remarks under "Display history". So he no need to approve the document again. Refer below screen shot:
2. is there any setup that when one of the approver approves it will not prompt in the other approver?
There is no such setup in standard approval procedure.
Thanks & Regards,
Nagarajan -
Approval Procedure to change the price of items
Hi!
i 'm trying to create a query to an Approval Procedure to change the unit price in the Purchase Order i create this query:
SELECT DISTINCT 'True' FROM POR1 T0 INNER JOIN OITM T1 ON T0.[ItemCode] = T1.[ItemCode] WHERE T1.[ItemCode] = $[$38.1.0] AND T1.[LastPurPrc] <> $[$38.14.0]
as you see this query compare is the Last Purchase Price is different than the actual unit price, and these for each line of item.
I think this is correct, and i configure the Approval Procedure, but when i check the AP in the Purchase Order changing the Unit Price, it gets me an error that says
1) [Microsoft][SQL Native Client][SQL Server] Error converting data type nvarchar to numeric.
What happend?
Am i doing something wrong ?
In easy term, i just want to execute an approval procedure when the user change the unit price in the purchase order.
Hope you can help me !
Thanks in Advance
Best Regards !Xavier,
maybe you are with a problem thar you dont' know, i can to expain this point,
1. if you want one approval at level line (comparing prices), not possible to make this way the approval, because you don't have control at level line while the document isn't in database.
2. i bealeve that the better way is to make a store procedure for to insert each record into temp table while to add line in purchase order without (formatead seaches), now, when you create a purchase orden you need create a query for to search record in the temporal table with the condicion that you needed.
3. now, if you want to call a value on the screen (money), the better way is $[$38.1.number]
Good look,
OSCAR KLENNER
> Hi!
> i 'm trying to create a query to an Approval
> Procedure to change the unit price in the Purchase
> Order i create this query:
> SELECT DISTINCT 'True' FROM POR1 T0 INNER JOIN OITM
> T1 ON T0.[ItemCode] = T1.[ItemCode] WHERE
> T1.[ItemCode] = $[$38.1.0] AND T1.[LastPurPrc] <>
> $[$38.14.0]
> as you see this query compare is the Last Purchase
> Price is different than the actual unit price, and
> these for each line of item.
>
> I think this is correct, and i configure the Approval
> Procedure, but when i check the AP in the Purchase
> Order changing the Unit Price, it gets me an error
> that says
> 1) [Microsoft][SQL Native Client][SQL Server] Error
> converting data type nvarchar to numeric.
>
> What happend?
> Am i doing something wrong ?
>
> In easy term, i just want to execute an approval
> procedure when the user change the unit price in the
> purchase order.
>
> Hope you can help me !
> Thanks in Advance
> Best Regards ! -
APPROVAL PROCEDURE THROUGH QUERY
Dear Suda,
Now i am telling wat i have actually done and wat is its result. Please try to understand it.
First of all I have made the querry below-
SELECT DISTINCT 'True', T1.DiscPrcnt AS 'Discount % per Row', T0.SlpName AS 'Sales Employee Name' FROM [dbo].[OSLP] T0 INNER JOIN [dbo].[RDR1] T1 ON T1.SlpCode = T0.SlpCode WHERE (T1.DiscPrcnt > 25 )
In this querry i have typped DISTINCT 'TRUE' manually but keeping the SELECT table as it is.In this case the system is not asking me for any kind of discount (not greater than 25% or not less than 25%)
After that i have modified above querry as below-
SELECT DISTINCT 'TRUE' FROM [dbo].[OSLP] T0 INNER JOIN [dbo].[RDR1] T1 ON T1.SlpCode = T0.SlpCode WHERE (T1.DiscPrcnt > 25 )
In this qurry i have typped DISTINCT 'TRUE' manually. When i executed this qurry i jst get the true in first row first column place.When i have attached this querry to approval, and after that when i have started for creating purchase order with the originators log in then in this case the system is asking approval for every discount from 0% to 100%.
Wat shud i do now...Please reply ASAP.
SwapnilHi, Swapnil!
You are on the right path, but I'm not sure if you can run this approval procedure at the line level.
The queries you had are against the wrong table (RDR1 is a Sales Order table) and are missing the link to the active document. You have to add the reference to the active document or else you are pretty much querying against the entire RDR1 table.
You need something like this:
SELECT CASE WHEN ($[$38.15.Number] > 25) THEN 'True' ELSE 'False' END
38 is the grid and 15 is the column for the discount.
I tried a basic case and it didn't work. I think you need to loop through all the lines, but I'm not sure how to do this.
You might have to create a header level UDF that changes automatically when the discount column changes, and has some logic to keep the highest discount you have on all the lines (something like: if discount greater than already stored value, update stored value) In the end, monitor this UDF for your approval procedure.
Hope this helps!
Liviu -
Condition in Approval Procedure Rule in ChaRM not working properly
Hi experts,
We are on 7.1 SP8.
We have Z-partners defined and included those in the Approval Procedure too. In order to fill the approval procedure steps with the default partner, we defined a rule policy.
For example step ZMCR000001 needs to be filled with BPE by default.
This works fine.
But when we want to overwrite the default value with another value, the default is always put back over the manual entered value.
Also manually added process steps get that same value.
It looks as if the last step of the condition is not working properly (i.e. the check to see if the approver is already filled).
Can somebody tell me how we can get manually entered values in there?Hi ,
You can play with User status, add to condition in which user status you dont wont this to be triggered.
Example add "And User status equal ZMCR Created":
On staus created you get automatic approval determination with default partner ID's
Now on Validation the rule will not be triggered and your manually added values saved as is.
Rg Dan. -
Approval Procedure for User Form
Dear All,
I am developing a Requisition add-on. It contains 2 stages. First user creates a requisition & then the authorized person approves this requisition. My problem is that when user creates a requisition, an automatic alert should be on the authorized person side. I can use Alert for this process. But my client wants the same functionality as the Approval Procedure in Admin Module. Can I use the approval procedure for the add-on forms also. ? If yes, then how can I do that because Approval Procedure does not show the user form. Help me regarding this. Any reply would be appreciated.Hi,
Approval Procedure is not available to User Form. You may try to create the similar process by SDK but that needs too much coding.
Thanks,
Gordon
Maybe you are looking for
-
You are not a receiver of the work item in ESS Leave
Hi, We are using standard ESS leave application in our portal, where employee can raise leave and his manager can approve/reject his leave. But I want in case manager rejects the leave, the rejected leave should not come into MSS UWL of employee, we
-
How to Reset Windows 8 Admin Password without Disk
Problem:Forgot Windows 8 admin password and no reset disk available, how can I reset Windows 8 admin password? On the occasion, how to reset password on Windows 8 seems to be our problematic issue. However, the problem looks difficult, not difficult
-
Why Can't I see or access my external hard drive anymore using finder
I have a MacBook using Lion 10.7.5 and I use a Seagate 1 TByte external hard drive to store large photo and video files so that these won't take up space on my system hard drive. I also use the drive to share files with friends, colleagues and family
-
Is it too much to ask from apple, an option for different volumes levels from different apps, including alarm, text, email, basically from every posible app?
-
WRT54G v7 max. Wifi bandwith only around 10MBit/950KB/s???
Hi there, I have a small question: I recently got a WRT54G v7 router; and it actually works fine (no resets etc), except that I am unable to get more than 10Mbit when using the Wifi connection. This might not sound like a problem to some, but as my I