Stored Procedure for Outgoing Payment Approval
Hi
I am writing a stored procedure for Outgoing Payment (Draft) which is not validating my fields
1.Outgoing Draft (Procedure Not Working)
If @object_type = '140' and @transaction_type = 'A'
begin
if exists(select t0.DocEntry from OPDF T0 inner join PDF4 T1 on
T0.DocNum = T1.DocNum where t1.ObjType ='46' AND (T0.Series = '15' AND T1.OcrCode <> 'U-1')
and T0.DocEntry = @list_of_cols_val_tab_del)
begin
set @error = 1
set @error_message = 'Check Unit'
end
End
Regards
John
Edited by: JohnSmith@B1 on Sep 9, 2011 4:49 PM
John......
Try this.....
IF (@object_type = '140' And (Select ObjType From OPDF
Where DocEntry = @list_of_cols_val_tab_del)='46'
AND @transaction_type IN ('A'))
BEGIN
if exists(select t0.DocEntry from OPDF T0 inner join PDF4 T1 on
T0.DocNum = T1.DocNum where t1.ObjType ='46' AND (T0.Series = '15' AND T1.OcrCode != 'U-1')
and T0.DocEntry = @list_of_cols_val_tab_del)
begin
select @error = 1,
@error_message = 'Check Unit'
end
End
Above SP will only work when your Series Code is 15 and OcrCode is not equal to 'U-1'....
Please confirm........
And Object type for Payment Draft 140 is right.....
Regards,
Rahul
Similar Messages
-
Approval procedure for Outgoing payment
Dear all expert,
I want to know how to make approval procedures for outgoing payment. So, everytime user create outgoing payment, it can't be printed until it's approved by Chief Acct. Where do i set this approval, because i see in the approval module, there is no outgoing payment document.
ThanksI have checked that, at least until 2007A version PL49 Outgoing payment has not yet added to Approval Template. You may use SP Transaction Notification to block some users for posting.
Thanks,
Gordon -
Outgoing Payment Approval Procedure - Payment Wizard
Hi,
I was having an issue with the SAP Approval Procedures I was hoping I could get answered.
I have created an Approval Procedure for Outgoing Payments in SAP 8.82 to always require approval.
The approval procedure works fine when I create an Outgoing Payment by going to Banking >> Outgoing Payment >> Outgoing Payment.
If I try to create an Outgoing Payment via the Payment Wizard, it does not go through the approval process.
I have made sure that I have enabled the "Activate Approval Procedures in DI" functionality under General Settings. It still does not do the trick.
Can someone please tell if this is an SAP bug or not? If not a bug, any suggestions as to what I might be doing wrong.
Thanks,
KrishnanHi Krishnan,
I believe this is by system design or another word a system limitation. The logic here is: if you are able to run the Payment Wizard, you have authorization already.
A work around may be creating a user alert whenever you have the Payment Wizard run.
Thanks,
Gordon -
Approval procedure on outgoing payment for Cash and bank transfer
Dear Expert
I want to know about outgoing payment approval
Is it possible to set approval on payment means base ?
Like I need to set approval for my user
case 1 is : - If my user make payment by cash more then 5000 then approval it should be approved by manager
And if my user make a outgoing payment by cash more then 100000 then it should be approved by MD
Case 2 is If my user create outgoing payment by Bank transfer then more then 25000 then it should be approved by manager
And if it is by bank transfer more then 500000 then it should be approved by MD
IS it possible ????? Please guide me
Thanks
RinyHello Sir
Thanks for reply , Well I created query and executed but its giving false value but when i attached this query on approval , Its not working ..
Please help me and also please comment on my another thread which is about No matching record found error
Thanks -
Approver name for outgoing payment
Hi Friends,
I want a query for outgoing payment with the Username of the person who approved this and along with requester (originator) name .To print on crystal report one for requester name and other approved person name.Hi Pradyuman,
Please check below Query for Approver Name for Outgoing Payment.
SELECT T3.U_NAME
FROM OVPM T0
INNER JOIN OWDD T1 on T0.DocEntry = T1.DocEntry
INNER JOIN WDD1 T2 on T1.WddCode = T2.WddCode
INNER JOIN OUSR T3 ON T2.UserID = T3.USERID
WHERE T2.Status = 'Y' and T1.ObjType = 46 And T0.DocNum = $[OVPM.DocNum]
Please try below Query for User Name for Login User.
SELECT T0.U_NAME FROM OUSR T0 WHERE INTERNAL_K = $[USER] FOR BROWSE
Please put above Two FMS in Two Different UDF to Get Result of above FMS.
Please also check below links.
Approved by User name query
Name of authorizers within an approval procedure
Hope this helps
Regards::::
Atul Chakraborty -
Can set approval procedures in outgoing payment?
hi all,
can we set approval procedures in outgoing payment?Hi Grace,
at this point approval procedures for Purchasing are only supported on the following Business One document types:
- Purchase Order
- Goods receipt PO
- Goods return
- A/P Invoice
- A/P Credit Memo
Typically you would use purchase orders to facilitate a business process that requires approval for purchasing items.
What is your Business Process that would otherwise require an approval procedure to be in place before releasing payment?
A different approach could be to enhace the application utilizing our APIs.
Regards,
Torsten Budesheim -
Approval procedure for Incoming Payments
Hi All,
I need to setup an approval procedure in such a way that not all incoming payments raised from "User1" should be approved by "user2". Incoming payments rased only for particular doument series should be approved by "user2".
Answers will be appreciated.
Thankyou,
Sree.Hi
It not possible to raise Approval procedure for Incoming Payments
Thanks
Kevin -
Approval Query for Outgoing Payment
Hi All Experts,
I have to Create Approval for Outgoing Payment where payment means is Cash,Cheque or Bank Transfer but not Credit Card.
In other words approval should be raised for all payment means other than Credit card payment means.
For which I have Created Query as follows
select Distinct 'true' FROM dbo.OVPM T0
Left join dbo.VPM3 T1 on T0.DocEntry=T1.Docnum
WHERE T0.CreditSum=0 And T1.CreditAcct is null
payments goes for approval but Credit Card payment also goes for Approval which is not required.
Please Help me to Correct the Query.
Regards,
Gayatri Shukla.Hi,
Little modification to your query. Try this.
select Distinct 'true' FROM dbo.OVPM T0
Left join dbo.VPM3 T1 on T0.DocEntry=T1.Docnum
WHERE T0.CreditSum = 0
Regards,
Amrut Sabnis. -
Stored Procedure for Accounts Receivable
Hi. First off, apologies in advance if I have put this question into the wrong topic. Secondly, I first saw SAP 3 weeks ago when I stared my new job and have had no training so please bear with me if some of what I ask doesn't make much sense.
OK, the issue is this. In SAP B1, there is a built in Report called "Customer Receivables Aging" which allows you to see Customer Receivable Accounts by age (e.g 0-30, 31-60, 61-90, 90+) and so on. The problem with the built in report is that it doesn't show all the fields I want - it only shows the Customer Name, balance, and then the aging balances. I want to be able to see things like the customer's contact details, etc. I know this makes no sense because the whole point of the report is to be able to drill down into the different rows, but this report needs to be issued in printed form, hence the need for the extra fields.
Since I can't seen any way from within SAP to change the fields returned by this report, I thought I'd have a stab at writing my own SQL to select out the same data along with the extra fields I wanted. That's when the problems began...try as I might, I cannot get my figures to tally with the SAP Report.
They are almost correct, but not quite. I am sure that I am missing a selection or some other element of the logic that B1 uses to create the built in report.
If you want, I can post the SQL I'm using....I'm not an SQL guru by any means, but I do know my way around it; the biggest problem I have is that I cannot find any documentation as to the 4 letter tables that SAP uses and their relationships except on the most basic level (e.g ORIN is Open Return Invoice [maybe])
Then I thought maybe it might be possible to edit that report section in B1 using the SDK. That would be a better solution as I would not have to 'reinvent the wheel', I can just SELECT an extra field or three to include in the report.
So my question is
->Does anyone have a stored procedure for SQL Server that can replicate correctly the SAP B1 "Customer Receivable Aging", even just the process SAP uses to gather this data would be good.
OR
is it possible to edit this report in SAP to put in the extra fields I want.
Or, am I totally barking up the wrong tree? Thanks in advance, I know this is a long post.Hi Stephen,
There should be a print layout attached to the on-screen report. This can be altered to show the additional fields you want without resorting to SDK or SQL development.
When you have the Customer Receivables Ageing report open on screen, choose Tools-Print Layout Designer or click on the Print Layout Designer icon on the toolbar. When prompted, choose the layout you wish to edit and you'll be taken to the layout design. In the layout, you can add additional fields and should be able to add most business partner fields. As the report is set to portrait by default, I recommend changing it to landscape so you have lots more space to add the extra fields you want. This report writer is fairly intuitive, if a little basic.
You will need to save this new report design, set it to be the default layout and then when you select to print the Customer Receivables Ageing report (ie Print Preview or Print) you will see the new report.
Hope this helps,
Owen -
Stored Procedure For Web Service in Visual Composer 7.1
Hello,
I want to use stored procedure for Webservice in Visual Composer 7.1
I can find this Web service but not supported. ( ex) prcreleased_test - Not supported )
Log.
Message: Error in connection - Can' t execute Web service.
Date: 2008-07-01
Time: 16:41:43:906
Category: com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent
Location: com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.processExecution:
Application: sap.com/test~kmshim_wf_impl
Thread: HTTP Worker [1]
Data Source: j2ee\cluster\server0\log\defaultTrace_00.trc
Correlator ID: 240496500000034715
Argument Objects:
Arguments:
DSR Component: n.a.
DSR Transaction: cb4b3560473711dd9fb4001e4f3b8fcb
Log2
Message: Stopped further execution since the interpreter is unusable
Date: 2008-07-01
Time: 16:41:43:906
Category: com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent
Location: com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.XGLInterpreter
Application: sap.com/test~kmshim_wf_impl
Thread: HTTP Worker [1]
Data Source: j2ee\cluster\server0\log\defaultTrace_00.trc
Correlator ID: 240496500000034715
Argument Objects:
Arguments:
DSR Component: n.a.
DSR Transaction: cb4b3560473711dd9fb4001e4f3b8fcb '
Help me^^ plz..Hi Tanna.
Thanks for your reply^^
I create webservice that access my stored procedure.
But not supported.
http://dmp.humaxdigital.com/HumaxCmdwService/Service1.asmx?wsdl
There are two service. (Hello World - Test, prcrelease_test - Stored Procedure )
'Hello World' is supported but prcrelease_test is not supported. I can't drag to storyboard.
Our company's DB is MSSQL2005.
please help me^^ -
Stored Procedure for Crystal Reports
Hi All,
I developed this test stored procedure to see wheather we could a stored procedure for crystal reports. It compiled without any problem, but when I run it, it gives me error message. Here is the stored Procedure..
CREATE OR REPLACE PROCEDURE WOLD1SIM.TEST_PROCEDURE(
TEST_CURSOR IN OUT TEST_PACKAGE.TEST_TYPE,
TEST_PARAMETER IN TEST_TABLE.ID%TYPE)
AS
BEGIN
OPEN TEST_CURSOR FOR
SELECT *
FROM TEST_TABLE
WHERE TEST_TABLE.ID = TEST_PARAMETER;
END TEST_PROCEDURE;
And
This is the error message..
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00201: identifier 'TEST_PROC' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
I have created the package sucessfully.
I was wondering If any one of you can advice me where I am making the mistake.
Thank youCREATE OR REPLACE PROCEDURE WOLD1SIM.TEST_PROCEDURE(TEST_CURSOR IN OUT TEST_PACKAGE.TEST_TYPE,
TEST_PARAMETER IN TEST_TABLE.ID%TYPE)
...you have 2 parameters in your procedure WOLD1SIM.TEST_PROCEDURE(). you should also use two parameters when you execute the procedure. -
Stored Procedure for restrict to close documents
Hi,
I want to create a Stored Procedure for restrict to close sales orders for some users, because in Standard Authorizations you have one option to restrict to close, but I need that some users can close quotations and also this users can´t close sales orders. I have this query :
F @object_type='17' AND (@transaction_type='a' or @transaction_type='U' )
BEGIN
IF EXISTS (
SELECT T0.DOCENTRY FROM adoc T0 WHERE T0.[ObjType] = '17'
AND T0.[UserSign] = '1' AND T0.[DocStatus] = 'C' AND
T0.DOCENTRY= @list_of_cols_val_tab_del )
BEGIN
SELECT @Error = 1, @error_message = 'You are not permitted to close Sales Orders'
END
END
But It doesn´t work. I need help!!!
ThanksHi Jose,
You have to correct your transaction type parameters. When you perform close or cancel operations on document; the trasnsaction notification receives parameters u201CCu201D for Cancel and u201CLu201D for Close. So instead of checking add u201CAu201D or update u201CUu201D; you have to modify your transaction type filters for cancel u201CCu201D or close u201CLu201D. It will go like belowu2026
IF @object_type='17' AND (@transaction_type='C' or @transaction_type='L')
Please try above and let me know the results.
Thanks & Regards,
Nitin
Manager, SAP Business One
Greytrix
It's time to think outside the box.
Email: sap at greytrix.com | Web: www.greytrix.com
u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
Development Partners for SAP B1 -
I created a stored procedure for send data from a source bd to the bd destination with a link between BD
But it will not work
CREATE OR REPLACE PROCEDURE archivage ( source IN VARCHAR2, destination IN VARCHAR2)
BEGIN
/ * - Prepare a cursor to select from the bd_source: * /
source_cursor: = dbms_sql.open_cursor;
DBMS_SQL.PARSE (source_cursor,
'SELECT table_name FROM dba_tables' | | source,DBMS_SQL.NATIVE);
LOOP i in source_cursor
/* Or i use this !!!!
SELECT object_name FROM dba_objects WHERE owner = 'SCOTT' AND object_type = 'TABLE'*/
DBMS_SQL.DEFINE_COLUMN (source_cursor, i);
end loop
ignorer: DBMS_SQL.EXECUTE = (source_cursor);
/ * - Prepare a cursor to insert into the destination db: * /
destination_cursor: = DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE (destination_cursor,
'INSERT INTO' | | destination | | DBMS_SQL.NATIVE);
/ * - Fetch a row from the source table and insert it into the destination table: * /
loop
if DBMS_SQL.FETCH_ROWS (source_cursor)> 0 ALORS
- Obtenir des valeurs de colonne de la ligne
DBMS_SQL.COLUMN_VALUE (source_cursor,i);
DBMS_SQL.BIND_VARIABLE (destination_cursor,i);
ignorer: DBMS_SQL.EXECUTE = (destination_cursor);
ELSE
EXIT;
End If;
END LOOP;
/*-Close cursor */
COMMIT;
DBMS_SQL.CLOSE_CURSOR (source_cursor);
DBMS_SQL.CLOSE_CURSOR (destination_cursor);
EXCEPTION
WHEN OTHERS, THEN
if
DBMS_SQL.IS_OPEN (source_cursor)then
DBMS_SQL.CLOSE_CURSOR (source_cursor);
End If;
if DBMS_SQL.IS_OPEN (destination_cursor) then
DBMS_SQL.CLOSE_CURSOR (destination_cursor);
End If;
RAISE;
END;find 10 differences ... :(
CREATE OR REPLACE PROCEDURE archivage (source IN VARCHAR2,
destination IN VARCHAR2)
IS
source_cursor INTEGER;
destination_cursor INTEGER;
ignorer INTEGER;
BEGIN
/* - Prepare a cursor to select from the bd_source: */
source_cursor := DBMS_SQL.open_cursor;
DBMS_SQL.
PARSE (source_cursor,
'SELECT table_name FROM dba_tables' || source,
DBMS_SQL.NATIVE);
FOR i IN source_cursor
LOOP
/* Or i use this !!!!
SELECT object_name FROM dba_objects WHERE owner = 'SCOTT' AND object_type = 'TABLE'*/
DBMS_SQL.DEFINE_COLUMN (source_cursor, i);
END LOOP;
ignorer := DBMS_SQL.EXECUTE (source_cursor);
/* - Prepare a cursor to insert into the destination db: */
destination_cursor := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.
PARSE (destination_cursor,
'INSERT INTO ' || destination,
DBMS_SQL.NATIVE);
/* - Fetch a row from the source table and insert it into the destination table: */
LOOP
IF DBMS_SQL.FETCH_ROWS (source_cursor) > 0
THEN
--ALORS
-- Obtenir des valeurs de colonne de la ligne
DBMS_SQL.COLUMN_VALUE (source_cursor, i);
DBMS_SQL.BIND_VARIABLE (destination_cursor, i);
ignorer := DBMS_SQL.EXECUTE (destination_cursor);
ELSE
EXIT;
END IF;
END LOOP;
/*-Close cursor */
COMMIT;
DBMS_SQL.CLOSE_CURSOR (source_cursor);
DBMS_SQL.CLOSE_CURSOR (destination_cursor);
EXCEPTION
WHEN OTHERS
THEN
IF DBMS_SQL.IS_OPEN (source_cursor)
THEN
DBMS_SQL.CLOSE_CURSOR (source_cursor);
END IF;
IF DBMS_SQL.IS_OPEN (destination_cursor)
THEN
DBMS_SQL.CLOSE_CURSOR (destination_cursor);
END IF;
RAISE;
END;
/ -
Stored Procedure for Batch Number Format and Block Duplicate Batch Number
Hi Experts !
I am new one in forum asking question.. I want Stored procedure for Batch Number Format. I want fix one Batch number format in Stored Procedure.
Example :
My Batch number format Like BATCH00001 - It should be first five digit is text format and next five is Numeric.
IF create Goods receipt PO or Goods receipt stage I create batch number like BATCH 00001 or any other number means don't add that document and also duplicated batch number also does not allowed. please give me the solutions. I am sorry for my bad english .Dear Nagarajan K.
Thanks for your replay ..
IF @transaction_type IN ('A','U') AND (@object_type = '106' )
BEGIN
set @item = LEFT( @list_of_cols_val_tab_del, CHARINDEX(CHAR(9), @list_of_cols_val_tab_del,1) - 1)
set @batch = substring(@list_of_cols_val_tab_del, len(@item)+1, (CHARINDEX(CHAR(9), @list_of_cols_val_tab_del,len(@item)+2)) - (len(@item)+1))
--set @base =( select basetype from ibt1 where batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
set @count = (select count(*) from oibt quantity > 0 and where batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
if @count > 1
begin
set @error = 1
set @error_message = 'Please enter different Batch Code for batch ''' + @batch + ''' for item ' + @item
select @error, @error_message
END
END
I used above Stored Procedure. here we can use one batch number for different item but i want to block one batch we should use one item and one time only after than we never use that batch number for same item and another item.
After that I want format for Batch, we should follow unique Batch number for all items. -
Hello all,
yesterday I got one task in that I have to stored procedure for getting host name, host instance and status of that host is it running or stopped.
any body knows where exactly, In which table this details are there in BizTalk databases.
thanksStatus of the host instance is not stored in the SQL database for you to query the status using stored procedure. You have to either use Powershell or WMI to get the status.
In SQL, following table contains the details about the host like Name, LoginName, IsDisables etc but status of the host instance is not stored in the database.
SELECT * FROM BizTalkMgmtDb..adm_HostInstance
Powershell to get the status:
http://axonolympus.nl/?page_id=186&post_id=969&cat_id=6&lang=en
WMI to get the status:
https://msdn.microsoft.com/en-us/library/aa561820.aspx?f=255&MSPPError=-2147217396
https://msdn.microsoft.com/en-us/library/aa578621.aspx
Regards,
M.R.Ashwin Prabhu
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.
Maybe you are looking for
-
Why does my iPod touch (4th Gen) no longer sync with my computer?
So... One day I had downloaded 2 new songs to my iTunes library and I wanted to put them on my iPod so I connected it and it wouldn't sync... Both my iPod and iTunes are fully updated. I have tried everything such as: Restarting my iPod Restarting my
-
I have a Mac Pro 3,1 2008 8-Core. I was recently hit with a storm and the power when out when the Mac Pro was still on, I unplugged it shortly after. A few days later I got power back and plugged it back in, but noticed that every time I turn it on a
-
AccessControlException while an applet is executing
Hi to all: I am developing an applet and I show it in the main JSP page of a service place in Tomcat (Linux). The applet needs to access to some data in a smartcard and I use another class for this purpose. This class uses javaxsmartcardio and JNA.ja
-
How do I email a document?
I have created a document and want to send it to a colleague by e mail. When I hit File no Share option comes up, not is there an icon for this. There always used to be!
-
How to do a Course Evaluation Form?
Hi, We want to know the best way of doing a course evaluation sheet ( happy sheets) which - don't count towards the users score - the scores and feedback are recorded We would prefer also that it can't be done until the course is complete, but this i