Document Numbering Series and Query Generator

Hi Experts!
I have a query with a Query!
I have more than one numbering series, say one document series is YYY and the other document series is ZZZ.  YYY is for posting period 2009 Sales Order document numbers 1, 2 - 10.  ZZZ is for posting period 2010 Sales Order documents 1, 2 -10.
When I go to Sales Orders and click the 'Find' icon and search for Sales Order Number 3, SBO gives me the option to choose either Sales Order document 3 for the YYY series, or Sales Order document 3 for the ZZZ series.
I make a Query which includes Sales Order DocNumber and has the Posting Period as a variable so either 2009 or 2010 has to be chosen prior to executing the query.
I chose to run the Query for ZZZ, so I should expect all data relating to 2010 to be shown.
My query results show document number 3 with a Doc Posting Date of 2010, but when I click on the Document Orange Navigation Arrow the actual document is Sales Order 3 but for Document Numbering Series YYY, and therefore is for 2009.  But I need it to be for document numbering series ZZZ.
It seems SBO is returning the first record it finds, which is for the older series.
Can you help me please?
Many thanks!!
Caroline

Hi
Try this,
SELECT TOP 100 T0.DocNum as 'SO. No.', S0.[SeriesName],
T0.DocDate as 'SO. Date',
T2.DocNum AS 'Del.Doc.No.', S1.[SeriesName],
T2.DocDate AS 'Delivery Date',
M.DocNum as 'A/R Invoice No.', S2.[SeriesName],
M.DocDate as 'Inv. Date',
M.CardName as 'Vendor Name',
M.NumAtCard as 'Bill No. & Date',
ISNULL(L.ItemCode,'Service Item') as 'Item Code',
L.Dscription,
L.Quantity,
M.DocTotal as 'Total (Rs.)'
FROM ORDR T0
INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN NNM1 S0 ON T0.Series = S0.Series
INNER JOIN ODLN T2 ON T2.DocEntry = T1.TrgetEntry
INNER JOIN DLN1 T3 on T3.DocEntry = T2.Docentry
INNER JOIN NNM1 S1 ON T2.Series = S1.Series
INNER JOIN OINV M ON M.DocEntry = T3.TrgetEntry
INNER JOIN INV1 L on L.DocEntry=M.DocEntry
INNER JOIN NNM1 S2 ON M.Series = S2.Series
WHERE T0.CardCode = '[%0]'
ORDER BY T0.DocEntry DESC
SELECT TOP 100 T0.DocNum as 'SO. No.', S0.[SeriesName],
T0.DocDate as 'SO. Date',
T2.DocNum AS 'Del.Doc.No.', S1.[SeriesName],
T2.DocDate AS 'Delivery Date',
M.DocNum as 'A/R Invoice No.', S2.[SeriesName],
M.DocDate as 'Inv. Date',
M.CardName as 'Vendor Name',
M.NumAtCard as 'Bill No. & Date',
ISNULL(L.ItemCode,'Service Item') as 'Item Code',
L.Dscription,
L.Quantity,
M.DocTotal as 'Total (Rs.)'
FROM ORDR T0
INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
LEFT JOIN NNM1 S0 ON T0.Series = S0.Series
LEFT JOIN ODLN T2 ON T2.DocEntry = T1.TrgetEntry
LEFT JOIN DLN1 T3 on T3.DocEntry = T2.Docentry
LEFT JOIN NNM1 S1 ON T2.Series = S1.Series
LEFT JOIN OINV M ON M.DocEntry = T3.TrgetEntry
LEFT JOIN INV1 L on L.DocEntry=M.DocEntry
LEFT JOIN NNM1 S2 ON M.Series = S2.Series
WHERE T0.CardCode = '[%0]'
ORDER BY T0.DocEntry DESC
Regards,
Madhan.

Similar Messages

  • Document Numbering Series and navigation buttons in SBO

    Hi there,
    A new set of document numbering is created for new financial year.
    e.g. SO11-100001 is for financial year 2011 and SO12-100001 is for financial year 2012.
    Due to this setup, we have encountered a problem to use SAP navigation button to search between documents such as when I continue to click u201CNEXTu201D button, the documents would be popup in following sequence:
                    SO11-100001  SO12-100001  SO11-100002  SO12-100002  u2026u2026
    Is there a way to just navigte through SO12 series documents only?
    If I use series grouping under "Authorizations", this will totally block the previous year's documents. There may still be open docuemnts from last year and therefore, using "Authorizations" is not a wise option.
    If there is a workaround, kindly share with me.
    Thanks,
    Yadana

    hi Yadana
    in that case u can create a user query displaying the fields u want on the basis on the period indicator i.e. 2011 & 2012
    hope this would suffice your concern
    Regards,
    Manish

  • Document Numberring Series Prb.

    Hi Experts,
    When adding A/P Invoice or A/P Credit Memo error occures as to generate this document, first define document series in Administration Module.
    I checked Posting Period Indigator it's set on Default and status is unlocked.
    Checked also Numbering series It's on default.
    When I go randomly on form I can able to open it but at the time of adding document it's giving error.
    What could be the reason for that?
    Any help will be appreciated.
    Regards,
    Ravi

    HI
    You have to provide normal authorisation to that user.
    Administration->System initialisation-> Authorisation->General.
    In that select the appropriate user and you provide authorisation for Administration->system initialisation->Numbering series.
    and assign the correct group for the authorisation...
    Thats it...it will solve ur problem
    Edited by: kambadasan on Jun 10, 2011 6:08 PM

  • Error while creating document numbering series via SDK add on

    Dear Experts,
    We receive the following error while creating the document numbering series through the SDK add on
    [Microsoft][SQL Server Native Client 10.0][SQL Server]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
    From the above error message I can suspect the following possibilities
    1. The limit for the document numbering must be less or equal to 2100.
    2. There is a problem in the coding in SDK where it does not allow more than 2100 lines in the database.
    We tried to create manually for the same fiscal year and period indicator disconnecting the add on, the same error occured.
    Then we created a seried for a single document with the period indicator for the next fiscal year, it allowed.
    After creating the document numbering for the next fiscal year, we were able to create the numbering for the previous year also.
    Kindly help us on how to solve the same.
    With regards,
    Yeshwanth Prakash

    Hi
    You have, as far as i can determine without seeing the template,defined no Part Appraiser Column (PAPP) in your template. But you have defined a function on the template to automaticly default the part appraisers.
    On the Appraisal document persons (appraiser / appraisee) are getting defaulted as part-appraisers although no part appraisal column excist,and therefor 00 Part Appraisers are allowed. This gives the error. Remove the Part Appraisers default functionality from the template and this problem will be solved.
    FYI: The reason why this doesn't give a business check error is that the functions to default participants are BAdI's and we have no means of determining wether or not a BAdI implentation will create an inconsistency on the appraisal document.
    Also, the reason that it occurs as a S message and not as E or W is because of programming restrictions in combination with messages. All errors on the Appraisal Document will come as 'S' messages.

  • Document numbering series error

    Hi Experts,
    Our client has been using SBO 2005A for a long time but recently they are having document numbering series error regardless what users and even the manager account that has full authorization to all and a superuser cannot add document. No updates or modification recently with SBO settings.
    Steps taken:
    Restarted the server and workstation -  no good
    Used manager account with full access and superuser - no good
    Tried different database - working in different database
    Tried different series - no good
    Restarted License Server - no good
    Here are some of the logs I got from the event viewer:
    Failure Audit:
    The description for Event ID ( 1 ) in Source ( B1Logger ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Wrong user name or password (User: manager)
    What could be the problem?
    Thank you.

    Hi Gordon,
    It was just a slight in configuration settings. We did noticed that the last number series of the Journal Entry was already consumed, which resulted to this error. We just defaulted another document series for Journal Entry and it was already ok.
    Thanks.

  • Document numbering series for add-ons

    At the start of each year, we want to restart the document numbering series for add-on forms along with SAP forms, starting from '1.' However, we are able to define new series in the document numbering series form for add-ons also, but this does not update the ONNM table and when we go to the form and click add the document the document number does not increment and shows as '0.' Does this have a solution? Pl. help.

    The same number by different series would always be problematic.  If it is not legal requirement, avoid such attempt. 
    Thanks,
    Gordon

  • Document Numbering Series

    Why there is no Option to define  Numbering Series for SALES OPPURTUNITY?

    Sankar,
    A Sales Opporunity is not really a marketing document as it provides for linking with marketing documents.
    The Sales Opportunities has it own auto numbering through field OpprID.
    This is probably why the design of the product is not made to be included in the number series.

  • Error in Opening Document - error messgae as "First Define Numbering Series

    Dear All
    With new financial year starting one of our customer define new posting periods (12 periods for each month) and assigned one period indicator for all the periods. They also defined some user groups and assigned this groups to document numbering series for that user. Now while opening the document (e.g. Sales Order) for that user system displays the following message:
       "To generate this document, first define the numbering series in the Administration module"
    Therefore user can not open the document. Same procedure was followed in previous period also without any error.
    Please suggest procedure to be followed.
    Thanks & with regards
    Aloke Bandyopashyay

    Hi
    PLs find this link takes to you to authorization Document, as you said cant be given full authorization to all, But you should know proper knowledge before giving authorization bcoz all modules are interlinked. SO pls go through the document first :
    https://websmp208.sap-ag.de/~form/sapnet?_FRAME=OBJECT&_HIER_KEY=701100035871000529280&_SCENARIO=01100035870000000183
    https://websmp208.sap-ag.de/~sapidb/011000358700001216762007E/HowTo_DefAut_2007A_B.pdf
    For to access Both u should have S user Id.
    Giridharan V

  • Linking a Period Indicator to a Posting Period and Document Numbering

    Dear All,
    Could you please tell me that, what will be the consequences if I do not link a Period Indicator to a Posting Period and use the Period Indicator in any document numbering?

    Hi,
    The use of the period indicators depends on the accounting practice of the company.
    The consequence you will face when you are not using period indicators:
    1.Your document numbering series will be continued from year to year,for ex.if your last document numbering series for AP Invoice is 3489 for FY200809,then the starting series for the FY200910 will be 3490.
    2.You should perform period end closure before proceeding to the next financial year,which would not be possible(Atleast one month in the new financial yr) as we may need to use adjustment transaction for accounting/auditing purpose
    3.Unless you perform year end closure the new series can not be continued,if you continue there must be accepted/explained in the accounts auditing too .
    4.But you don't use period indicator,there will not be any necessity to create new document series for every new financial year.
    Also check this document on [Period indicators|https://websmp105.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700000513532005E] for better understanding.
    Hope this is helpful!

  • Sales report from query generator

    Hi Experts,
    Im using query generator i had given selection criteria like, Posting date from and To, Profit centre, Numbering series name,
    query:
    SELECT T0.[DocNum], T0.[VatSum], T0.[DocTotal], T1.[PrcCode], T1.[PrcName], T1.[Balance] FROM OINV T0 , OPRC T1 INNER JOIN NNM1 T2 ON T0.Series = T2.Series WHERE T0.[DocDate] > ='[%0]' AND  T0.[DocDate] < ='[%1]' AND T1.[PrcCode] ='[%2]', T2.[SeriesName] ='[%3]'
    Error:
    1.     1)(Microsoft)SQL Native client)(SQL Server)Incorrect syntax error near u2018 u2018,Microsoft(SQL Native client) (SQL Server)statement u2018User Defined Valuesu2019 (CSHS)(1) could not be prepared.
    can u give any idea to solve this problem,
    thanks in advance,
    anand.r

    Hi,
    I made a mistake in the variables:
    SELECT     T0.DocNum, T0.VatSum, T0.DocTotal, T1.PrcCode, T1.PrcName, T1.Balance
    FROM         dbo.OPRC AS T1 INNER JOIN
                          dbo.OINV AS T0 INNER JOIN
                          dbo.NNM1 AS T2 ON T0.Series = T2.Series ON T1.PrcCode = T0.Project
    WHERE     (CAST(T0.DocDate AS VarChar) <= [%1]) AND (T1.PrcCode = [%2]) AND (T2.SeriesName = [%3]) AND (CAST(T0.DocDate AS VarChar) >= [%0])
    Kind regards,
    Hendri Wessels
    EDIT: I see that the variables do work in B1UP like this, but not in SAP Query generator.
    Edited by: Hendri Wessels on Jul 27, 2009 8:58 AM

  • Document numbers missing while posting a batch of GL documents via BDC FB01

    Hi all,
    While posting a batch of GL documents using a BDC program for FB01, all the documents are posted except for a few document numbers getting skipped while posting. For instance, in posting 100 documents, if 101-200 is the document numbers expected to be generated, we are getting a list of doc. numbers from 101-185 and 187-201 thereby skipping the document number 186. But when we post another set of GL documents, the skipped doc. number 186 is first taken and remaining from doc. number 202. Could any one have comes across this scenario or somebody can help to throw some light for the reason behind this. Thanks.

    Hi Mahalingam,
    There could be various reasons for document number skipping. SAP has given various notes on this.
    Note 175047 - Causes for FI document number gaps (RF_BELEG). The note is very comprehensive and has a reference of lot many notes.
    Thanks
    Aravind

  • Document numbering in SAP B1 2005 B

    Hi
    I have defined two series for each document type and alloted them to different user like A and B (both A & B are not super user). When i am logging in SAP B1 as A or B and trying to make a document. SYSTEM is showing that "You need to define the Document Numbering Series for the document"

    Hi,
    Log in using manager.
    Go to administration module > Sys.Initialisation > General authorisations
    Click  the concerned user name and
    Give acces in administration - system initialisation -series.
    note: give authorisation to the concerned series to that user and check wheather it is working or not.
    Regards
    Suresh Kannan

  • Document Numbering Issue in user defined form

    Dear All,
    There is UDO with manageseries = true. Series and DocNum fileds are binded to database (Combobox And Edittext). I can easly get next number and assign to Docnum field while selecting series from Combobox. The problem is when i choose series diferent than default and add document i get warning message "The actual posted document number is :XXXXXXX". No matter which series i choose system always takes default one. I found other threads accourding to this issue but no solution found.
    Regards,
    Guru

    Hello,
    How guru. Is your problem solved? As i'm have a similar peroblem -
    I have created a user form using screen painter and want to save data to my user defined table -
    Document - U_OPCD
    Document Rows - U_OPCD1
    First i was using the SAPbobsCOM.UserTable object to save data to my usertable. But after registering it as a UDO (as i wanted document numbering series for it) i'm unable to save data using this SAPbobsCOM.UserTable object. As i'm uable to access the default fields (DocNum, DocDate, Series....)  added to the table by SAP.
    Can u help please?

  • Document Numbering for specifc users

    Hi Everyone,
    Is it possible to set up a specific numbering series for a specific user? 
    For example, we would like one of the order entry people to have a series of 100 while another order entry person has a series of 5000. 
    If I am able to set it up this way, how do I do it?
    I appreciate your help.
    Thanks,
    Amanda

    Hello Amanda,
    The document numbering series can be assign to
    different group and you can grant different user authorization to the
    group, it mainly includes two steps:
    1. Define Series:
    - Go to Administration -> System Initialization -> Document Numbering.
    - Double-click on the row number of the document type for which you want
    to define the numbering. The Serials window opens. Here you can assign
    number ranges to a group.
    - Up to ten different groups can be defined.
    - Only super users can create and maintain number ranges.
    - A user who is not defined as a super user can only change the
    definition of his or her own default number range, assuming he or she is
    authorized to maintain number ranges at all.
    2. Define Authorization:
    In Administration -> System Initialization -> Authorization -> General
    Authorization window, you select the user in the left and define his
    authorization under Administration
    ->System Initialization -> Series - Group.
    After the two steps above, a specific user can only view and add the
    documents within the series which has been assigned to a specific group
    that he has been fully authorized.
    Is this what you expect?
    Regards,
    Wilma Wang
    SAP Business One Forums Team

  • Regarding Authorisation for Document Numbering

    Dear All
    I want to give authorisation for Groups in Document Numbering series. How do i do it ?
    for example : i have three department and i have created seperate series for each department and each department will have different group;
    Dept1: series will be A1, A2, A3, A4 and this will be under group 1
    Dept2: series will be B1,B2,B3,B4 is under group 2
    Dept3: series will be C1,C2,C3,C4 is under group 3
    now i want to give authorization for this group i.e. whenever a person belonging to one dept logs in to the b1, system should show the series pertaining to group 1 only.
    i tried by giving authorization for the group , but it is not accepting.
    do let me know if any options are avialable.
    Regards
    Kashinath

    Hai!
    Log in SAP B1 as a super user.
    Go to Administrator > Sys init > Autho > General Autho
    Select a User their
    Go to Admin > Sys init > Series > Series - Group 1 > Full Autho
    Go to Admin > Sys init > Series > Series - Group 2 >No Autho
    like that..

Maybe you are looking for

  • Mac Pro 3,1 GeForce 8800 GT not working after Lion update

    Hi everyone. I'm from Spain, so please excuse my English. My Mac is booting, but video card is not recognized. Could get in using Screen Share and no video card appears in system profile. Tried to restore Snow Leopard and Leopard in target disk mode,

  • Error while trying to assign an empty value

    Hi , In my bpel process i get an error while trying to assign an empty output to a variable. It occurs in assign activity copy operation. What can i do? How can i skip this? Sometimes there may be null /empty values ...below is the error message Erro

  • Change shop in AppStore

    How dó I change shop in AppStore from Germany to Denmark? Once I was asked if I would like to Update an app in another shop, where this Update were more appropriate. Moe I cannot comeback back to the danish shop.

  • Post PO

    Hi,   I am new to SRM. Any help is appreciated. 1. How do I debug the PO creation function. It is done from the portal. Is there a corresponding BSP application that I can execute in SAP. 2. The PO is actually created in R3. If I want to pass more va

  • Application exceptions in ejbStore()

    I'm throwing application exceptions in ejbStore() to reflect failure of the store operation due to violation of a unique constraint in the database. Apparently these get wrapped and returned in a weblogic.transaction.RolledBackException. I tried to i