SP to work in AR Invoice row for Project Code excluding One Document Series

Hi Experts,
I have a SP and its working fine to check wether project code is entered in the row level of the invoice. Now I have 4 document series named 1) Wholesale 2) Trading 3) Manufacturing 4) General
I want this this stored procedure should only check and give error for the series 1) Wholesale 2) Trading 3) Manufacturing and not for series General. Can it be done for SP to warn for specific series and if there is no Project Code given in General Series then the document should be added to the system.
My SP is as under :
----Project Code
IF @transaction_type IN ('A', 'U') AND @object_type = '13'
begin
if exists (SELECT DISTINCT ISNULL(T0.Project,'') FROM [dbo].[inv1] T0 WHERE T0.Docentry=@list_of_cols_val_tab_del)
begin
SELECT @error = 10, @error_message = N' Project Code is missing....'
end
end
Is there any options by which I can use the same SP for all marketing document by making a single Stored Procedure or I have to make seperate for each individual marketing document.
Regards,
Kamlesh
Edited by: Kamlesh Gupta on Mar 21, 2009 1:15 AM

Hi,
I am trying to write a SP as under :
----Project Code
IF @transaction_type IN ('A', 'U') AND @object_type IN ('13','15','16','17')
begin
if exists (SELECT DISTINCT ISNULL(T0.Project,'')
FROM [dbo].[inv1] T0 INNER JOIN [dbo].[OINV] T1 ON T0.DocEntry = T1.DocEntry,
FROM [dbo].[dln1] T0 INNER JOIN [dbo].[ODLN] T1 ON T0.DocEntry = T1.DocEntry,
FROM [dbo].[rdn1] T0 INNER JOIN [dbo].[ORDN] T1 ON T0.DocEntry = T1.DocEntry,
FROM [dbo].[rdr1] T0 INNER JOIN [dbo].[ORDR] T1 ON T0.DocEntry = T1.DocEntry
WHERE T0.Docentry=@list_of_cols_val_tab_del
begin
SELECT @error = 10, @error_message = N' Project Code is missing....'
end
end
to block documents which does not have poject code but I am getting an error while executing it as under :
Msg 156, Level 15, State 1, Procedure SBO_SP_TransactionNotification, Line 275
Incorrect syntax near the keyword 'FROM'.
Also note that when I am having only one SP as under :
AR Invoice Project Code
IF @transaction_type IN ('A') AND @object_type = '13'
begin
if exists (SELECT DISTINCT ISNULL(T0.Project,'') FROM [dbo].[inv1] T0 WHERE T0.Docentry=@list_of_cols_val_tab_del)
begin
SELECT @error = 10, @error_message = N' Project Code is missing....'
end
end
then if in AR invoice there is No project Code then its giving an error to put to project code but after putting the project code in the row level also the AR invoice is not getting added to the system. It gives me the error as
[ADOC] Project Code is missing....'
What might be the problem please let me know.
regards,
kamlesh
Edited by: Kamlesh Gupta on Mar 21, 2009 11:25 AM
Edited by: Kamlesh Gupta on Mar 21, 2009 12:28 PM

Similar Messages

  • Using the content aware move tool, I want to move an item from one image to another image but it does not seem to work. I think I need two layers on one document so how do I do this

    Using the content aware move tool, I want to move an item from one image to another image but it does not seem to work. I think I need two layers on one document so how do I do this

    Good day!
    A simple Paste does not work for you?
    It should place the clipboard content as a new Layer which you can then move around.
    If there is any chance that the elements need to be scaled, rotated etc. I would prefer to place them as Smart Objects (File > Place …) and do the masking that is specific to the images themselves in those.
    Regards,
    Pfaffenbichler

  • Same nr range in Logistics Invoice Verification for the MM and FI document

    I customised Logistics Invoce verification (on ECC6) with the same nr range for MM and FI.  That were done by changing the nr range of doc type RE (in FI) to nr range 52 andcreated the nr range for the company code for fiscal year 2007 and 2008 (our fiscal year 2008 start 1.10.07) and made it external nr assignment.  In MM I changed RD and RS to a new range 05 to which I assigned the nr range 5200000000 to 5299999999 (internally assigned).  For the vendor consignment I created a new document type and assign that to nr range 51 (as the original invoice verification settings).
    This process works quite nice with the same document nr for MM and FI, however I still do have a problem. (I work through the article on above as per FI Expert issue of Sept 07, but even in there my problem was not mentioned.
    If I do an invoice verification for previous period with price changes on the system, Sap want to post 2 accounting docs (1 for the previous month - on which I did have stock and 1 for current month - one which I did not have any stock).  The system only send 1 document nr for FI who needs 2 doc nrs.  I now get the error  message that I must use a document in the nr range 5200000000 and 529999999.
    How do I rectify this or can I not use this functionality if we allow backdating to the previous period
    Regards
    Anna-Marie Robson

    I customised Logistics Invoce verification (on ECC6) with the same nr range for MM and FI.  That were done by changing the nr range of doc type RE (in FI) to nr range 52 andcreated the nr range for the company code for fiscal year 2007 and 2008 (our fiscal year 2008 start 1.10.07) and made it external nr assignment.  In MM I changed RD and RS to a new range 05 to which I assigned the nr range 5200000000 to 5299999999 (internally assigned).  For the vendor consignment I created a new document type and assign that to nr range 51 (as the original invoice verification settings).
    This process works quite nice with the same document nr for MM and FI, however I still do have a problem. (I work through the article on above as per FI Expert issue of Sept 07, but even in there my problem was not mentioned.
    If I do an invoice verification for previous period with price changes on the system, Sap want to post 2 accounting docs (1 for the previous month - on which I did have stock and 1 for current month - one which I did not have any stock).  The system only send 1 document nr for FI who needs 2 doc nrs.  I now get the error  message that I must use a document in the nr range 5200000000 and 529999999.
    How do I rectify this or can I not use this functionality if we allow backdating to the previous period
    Regards
    Anna-Marie Robson

  • Custom Column for Project Code Number & Search Box to search Content in Project Server 2013

    Hi all,
    I want to add a custom column in Project Center view for showing some Numerical Projects codes like 4523, 5248,8956 like that... Each code will represent Project assigned with that code in Project Server 2013. Also let me now if i can add some search box
    in Project Center page through which i can search Project Code or Project Name. Currently, provided search bar not working in Project Server 2013.
    Need it urgent..Kindly help

    Hi,
    If you want to add this column in a project center view, be careful to choose a project view in the "manage views" views' list. Also it must be a project custom field and not a task field. As Paul said, we assume that the field with the code exists
    and has been previousky created by you.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, MCP |

  • TOCs for separate chapters in one document

    Hi all,
    I am desperately looking for a way to include separate TOCs in one document to get the information for each chapter. Additionally, table of pics and so on should cover the complete document. Any helP? Thanks
    Ronni

    Go to Layout > Table of Content Styles…
    Create a New ToC style based on the wanted
    When you go to insert the new ToC mark not to teplace the old one.
    I would recommend to seperate each chapter into its own document collected into one single book file indb. So you can add for each document a ToC which does not include the whole book and in the beginning another Toc which will include all book files.
    Take care that not every ToC will create an additional entry into the PDF bookmarks (Toc style setting), otherwise you will have duplicated entries in this situation.

  • Invoice Class for Project Billing Transactions

    We are using 2 types of Invoices for our customers. Normal monthly billing and Debit Notes
    We have implemented Expenditures for normal monthly billing and Events based billing for Debit Notes (travel and other reimbursements charged to customer)
    We want to track these 2 types of Invoices separately in GL Account Analysis. Currently, we have Projects Invoices and Projects Credit Memo as 2 Transaction Types. If we add another transaction Type called Debit Note, then can we select Invoice Class as Debit Note while doing Event based billing? Currently, Invoice Class field (in Project Billing module) is uneditable. So, by default, all invoices get accounted as Projects Invoice
    Do let us know. In reporting, we are able to differentiate between 2 types of invoices but receivable account in GL includes both types and we need a mechanism in system to distinguish the 2 types
    Regards,
    Ketan

    Hi
    Transaction Types are set up in Receivables. You can set up Transaction Types for Source Project Invoices.
    The process - PRC: Interface Invoices to Receivables calls a client extension that allows you to select the transaction type, for each draft invoice. It is called AR Transaction Type Extension, and it uses the procedure - pa_client_extn_inv_transfer.
    I'm not sure if the system is limiting transaction types for the classes - Invoice and Credit Memo. You may try setting up transactions types in AR and assign them the class - Debit Memo.
    However, you may still have a problem with accounting. Projects AA does not allow you to create a different account by transaction type, nor by transaction class.
    Dina

  • Invoice split for more than 1001 preceding documents

    Hello to all,
    We are trying to create one billing document based on 2600 delivery notes using collective billing program SDBILLDL, but instead of creating one billing document program creates 3 documents. So something is influencing that split, I think it could be very large number of preceding documents, because first two document are created on the basis of 1001 preceding delivery notes and third is the rest of 898.
    I tried to compare those splited invoices but there is no reason why they are created. In delivery relate billing copy control, we use our custom routine based on routine 007 with filling VBRK-ZUKRI filed, and that filed is the same for all 3 document, also all other VBRK fields that can cause split are the same.
    I also try to think maybe this is because of FI interface but there is a summation in that area, for BSEG.
    Is this standard SAP behaviour in delivery related billing, or generally in SD billing that one can not create one billing document based on more than 1001 preceding documents?
    We are using SAP ERP 4.7C with SAP_APPL support package SAPKH47033
    Thank you.
    Ivana

    Thank you Ivano, I fount that limit in SD_COLLECTIVE_RUN_EXECUTE function module, but I do not understand why did program took in process 1001 preceding document, maybe there is a bug or something.
    But never mind, thank you for the OSS note, because I couldn't find anything regarding that on OSS.
    Hence, I am closing this thread.
    Regards,
    Ivana

  • Hello. I just bought an iPod mini and I it says I need a pas code to initiate. The first time I turn it on it worked now it is asking for pass code and I didnt put one on it. What can I do?

    I bought an iPod mini and I was able to work on it one night. Now it says I need a 4 digits pass code to initiate and is blocked. What can I do?

    You will need to restore your iDevice from the same computer that you most recently synced to.
    Read this: http://support.apple.com/kb/ht1212
    If you can't do the restore then you will need to try recovery mode.
    Read this: http://support.apple.com/kb/ht1808

  • Yesterday suddenly the search function of the App store stopped working.  I can search for an App, select one from the suggestions then i get nothing but a white screen.

    Anyone else have this issue?  How did you resolve?

    Anyone else have this issue?  How did you resolve?

  • Installing software for HP All-in-one 6200 series printer/sc​anner to computer with Windows 8

    My old computer had a Vista operating system, my new one has Windows 8.  I am able to print and copy, but not scan.  .  I tried downloading the software that came with the printer, but it is too outdated to recognize the Windows 8 operating system.  What do I need to do to get my new computer to recognize the printer

    Hello, beguinn,
    Please perform the below mentioned steps ..
    - uninstall the existing printer software.
    - Restart the PC.
    - Please download and run the HP Printer Install Wizard from www.hp.com/go/tools
    Regards,
    Jabzi
    Give Kudos to say "thanks" by clicking on the "thumps Up icon" .
    Click "Accept as Solution" if it solved your problem, so others can find it.
    Although I am an HP employee, I am speaking for myself and not for HP.

  • Where I can get HP 140 and hp 141 Ink Cartridge for my All in one C4200 series printer ?

     Hello to all,  I have C4200 serie all in one Hp printer which I have bought from Middle East. But at present I am in India , and here the same printer model comes with different design of cartridge. I cant find Hp 140 and hp 141 cartridge in any of the shop here. Please tell what to do ? also flipkart and ebay do not have all these cartridges !!!!!

    Hi,The 140 ink cartridges are intended for the Middle East and Africa. In India you may find the 860 and 861 ink cartridges which compatible with your printer:http://h10060.www1.hp.com/pageyield/en-150/yields/PSAIOC4200_page.html?cCode=in Get both the 860 and 861 genuine HP ink cartridges (otherwise you won't be entitled for a free phone support for a such), then contact HP support to reset your printer to accept the local cartridges. You may find the local phone number in the following link:http://www8.hp.com/in/en/contact-hp/phone-assist.html#section1 You may find more about the proccess in the following document:http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02558798&cc=us&dlc=en&lc=en&product=4066452&tmp_track_link=ot_search Shlomi

  • Getting the first row for each group

    Hi Everyone,
    I have a query which returns a number of rows, all of which are valid. What I need to do is to get the first row for each group and work with those records.
    For example ...
    client flight startairport destairport stops
    A fl123 LGW BKK 2
    A fl124 LHR BKK 5
    B fl432 LGW XYZ 7
    B fl432 MAN ABC 8
    .... etc.
    I would need to return one row for Client A and one row for Client B (etc.) but find that I can't use the MIN function because it would return the MIN value for each column (i.e. mix up the rows). I also can use the rownum=1 because this would only return one row rather than one row per group (i.e. per client).
    I have been investigating and most postings seem to say that it needs a second query to look up the first row for each grouping. This is a solution which would not really be practical because my query is already quite complex and incorporating duplicate subqueries would just make the whole thing much to cumbersome.
    So what I really new is a "MIN by group" or a "TOP by group" or a "ROWNUM=1 by group" function.
    Can anyone help me with this? I'm sure that there must be a command to handle this.
    Regards and any thanks,
    Alan Searle
    Cologne, Germany

    Something like this:
    select *
    from (
       select table1.*
       row_number() over (partition by col1, col2 order by col3, col4) rn
       from table1
    where rn = 1In the "partition by" clause you place what you normally would "group by".
    In the "order by" clause you define which will have row_number = 1.
    Edit:
    PS. The [url http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions004.htm#i81407]docs have more examples on using analytical functions ;-)
    Edited by: Kim Berg Hansen on Sep 16, 2011 10:46 AM

  • EDI invoice failed for Service- multiple tax code at service item level

    Hi Guys,
    Please understand below scenarios, it is very critical to our client.
    purchase order has 3 parent
    line item which having the 3 services with tax code (P1-P1-P1 and P2-P2-P2 and (P2-P1-C1)
    (P1=10%, P2=10% and C1=10%)
    PO Outbound Idoc -
    Similar tax codes(P1-P1-p1 and P2-P2-P2) - Carries total tax amount and
    tax rate at parent level also it carries indvidual service line item
    tax amount and tax rate at service item level
    Mulitple tax codes(P2-P1-C1)- Carries only total tax amount at parent
    level and no tax rate at parent level. It carries indvidual service
    line item tax amount and tax rate at service item level
    SES Outbound Idoc -
    Similar tax codes(P1-P1-p1 and P2-P2-P2) - Carries total tax amount at
    parent level segment and tax rate at parent item level also it carries
    indvidual service line item tax amount and tax rate at service item
    level
    Mulitple tax codes(P2-P1-C1)- Carries only total tax amount at parent
    level and no tax rate at parent level. It carries indvidual service
    line item tax amount and tax rate at service item level
    But while creating the invoice for parent line item which includes 3
    services, it carries correct tax amount(as per PO and SESR) but it is
    asking for tax rate at parent level not at service item level.
    It is working fine for similar tax code at service line item (e.g P1-P1-p1 for 3 services or P2-P2-P2 for all 3 services) but when we use the combination of tax code or multiple tax code at service line items (e.g. P2-P1-C1), the inbound Idoc gets failed.
    Expectation - How EDI invoice posted for mulitple Services under one parent line item which having multiple tax codes at service item level
    Thanks
    Sanjay
    9930851236

    This is an ongoing problem with lots of clients - did anyone solve it ?

  • Approval query to check on project code status cannot work

    Hi all,
    I setup project codes using SAP project master. I create a user-defined field in project master call 'status' with list down options 'O-open' or 'C-close'.
    when user create a document, example sales quotation, user will enter project code in the accounting tab the BP project field. In the project field at row level, use will also enter project code.
    I want to have a approval check that the project selected in sales quotation is not in closed status. If the project status is close, then need to submit for approval.
    i created a query below to check on the header level project code but cannot work:
    SELECT DISTINCT 'TRUE'
    FROM OQUT T0  INNER JOIN OPRJ T1 ON T0.Project = T1.PrjCode
    WHERE $[OPRJ.U_Status] ='C'
    Can anyone advise what is wrong with my query?
    Also how can i do include the row level project code check into the query.
    Thanks.

    Hi Veron,
    Please find below a query requesting an approval when a selected project has u201CClosedu201D status in Project Codes table.
    SELECT 'TRUE'
    FROM OPRJ T0 WHERE T0.U_Status ='C' AND T0.PrjCode = $[OQUT.Project]
    hope it helps,
    Regards,
    Ladislav
    SAP Business One Forum Team

  • Aging report - detailed needs invoice project code

    Dear All,
    Would it be possible for us to have project code (on A/R invoice header) on Aging report - detailed print layout? I found all fields in Aging report - detailed PLD are sys var. Is there a way for us to figure out which sys var is for project code of the invoice? Thanks a lot.
    Regards,
    Yuka

    Unfortunately you can't, you have to recreate it using crystal. In all SAP std reports you only able to show/print what it already shows.

Maybe you are looking for