Display  Purchase order, PO Item , Order Number ,entry sheet quantity ,entry sheet price ,invoice quantity, invoice price  against each line number

hello all,
i have an ALV report requirement like this,
on the initial screen i have displayed(for a given agreement number like in ME33K )
in the selection screen i have taken agreement number as EKPO-EBELN.
purchase document number        item number        short text        target quantity      net price
5400000019                                  1                      xxx                  1.000                  304300.00
                                                    2                     xxxx                 1.000                  500000.00
the above fields i have taken from EKPO table.....
and on double clicking the  item number i have displayed
line number          service number       short text           quantity    units    gross price   quantity released
1                           swr10                   xxxx                 2.00          kg          500             2
2                           swr11                    xxxx                5.00          EA         500             2
the above fields i have taken from ESLL (esll-extrow, esll-srvpos, esll-ktext1 , esll-menge  etc......)
this i have done by passing EBELN to ESLH and getting PACKNO and passed this PACKNO to ESLL.
now my question is i need to display  Purchase order, PO Item , Order Number ,entry sheet quantity ,entry sheet price ,invoice quantity, invoice price
against each line number above.....
from which table do i need to take these fields.....
please guide me....
thankq....

Thanks Andra,
The problem is the multiple invoices is for non goods receipt item so there will be no delivery.At the time of creating a PO the GR is not checked so there will be no delivery .
Also this setting is for invoices which are comming from Vendors.But if we are genrating the invoices manually it is not blocking those invoices.Also i there is nowhere mentioned in Incomming invoice to set tolerence for incomming invoice.Are you talking about Vendor tolerences?
Thanks in advance
Edited by: Metroid01 on May 14, 2009 6:52 PM

Similar Messages

  • Handling Unit Number against each PO Number/Sales Order

    Dear All,
    I have a query regarding identification of Handling Unit/s Number/s (Handling Unit Management) against each PO Number in Sales Order. E.g. I created 2 Sales Order with 5 and 7 line items respectively. Now I combine them into one Delivery which becomes as 12 Line items. Now against each PO Number/Sales Order line items I have done multilevel packing, similarly I have done this for 2nd PO Number/Sales Order line items while creating Outbound Delivery.
    As per my client's requirement, he wants to print the Handling Unit Number as per Sales Order PO Number. I have checked VEKP and VEPO where I am not able to segregate the Handling Unit Number against each Sales Order/PO Number. Please find below Screen Shot.
    Please help me out.
    Regards:
    Abhishek

    Hello,
      I'm not sure to understand completely your requirement.
    Anyway in VBFA you should have the complete flow of the documents:
    enter in VBFA with
    "Follow-on doc." (VBELN) = your HU number
    "Subs.doc.categ." (VBTYP_N) = 'X - Handling unit
    "Prec.doc.categ." (VBTYP_V) = 'J - Delivery"
    In this way for each Handling Unit you'll get the delivery number and item,  and from that you can branch to the corresponding Sales Order item number and get the customer's PO number.
    On top of that, in table VEPO you have the reference to Delivery number and item. The only thing you need is one more step using VBFA again, to get from the delivery and item numer, the corresponding Sales Order number and item.
    Best regards,
    Andrea

  • Open Purchase Order Separation from item Order Qty

    Hi All,
    Kindly  suggest me how to separate open Purchase order from Item Order Qty.if i have 2 WH with different Order qty.in report it will be shown total order qty of both WH's.like
    Item            WH              Order Qty
    A                 01               100
    A                 02                 50
                      or
    A                 01                  0
    i need like this A--150   OR A--50(order qty).
    plz look into my query and suggest me how to do this.
    select distinct t3.CardName as SuplierName,t2.[ItemCode], t2.itemname,t2.[U_pperson]as PP,((SELECT sum(T4.[OnHand])FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = '01')
    +(SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = 'EWH')) as Stock,t2.MinLevel as 'Min Bin',(((SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = '01')
    +(SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = 'EWH'))-t2.MinLevel) as balance,
    sum(t1.openqty)
    as OrderQty,
    t2.MaxLevel as 'Max Bin',(((SELECT  sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = '01')
    +(SELECT sum( T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = 'EWH'))-t2.MaxLevel)as 'Balance II' from OPOR t0 inner join POR1 t1 on t0.DocEntry=t1.DocEntry inner join OITM t2 on t2.ItemCode=t1.ItemCode inner join ocrd t3 on t3.CardCode=t2.CardCode inner join OITW t4 on t4.ItemCode=t1.ItemCode and t4.WhsCode=t1.WhsCode   where t2.validFor='y' and  t2.[U_pperson]='p1' or t2.[U_pperson]='p2'  or t2.[U_pperson]='p3' group by t3.CardName,T4.[OnHand],t2.[ItemCode], t2.itemname,t2.[U_pperson],t2.MinLevel,t2.MaxLevel,t1.OpenQty
    Thanks&Regards,
    P.Pratap

    Hi,
    Try this:
    select distinct t3.CardName as SuplierName,t2.[ItemCode], t2.itemname,t2.[U_pperson]as PP,((SELECT sum(T4.[OnHand])FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = '01')
    +(SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = 'EWH')) as Stock,t2.MinLevel as 'Min Bin',(((SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = '01')
    +(SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = 'EWH'))-t2.MinLevel) as balance,
    sum(t1.openqty)
    as OrderQty,
    t2.MaxLevel as 'Max Bin',(((SELECT  sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = '01')
    +(SELECT sum( T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND  T4.[WhsCode] = 'EWH'))-t2.MaxLevel)as 'Balance II'
    from
    OPOR t0 inner join POR1 t1 on t0.DocEntry=t1.DocEntry inner join OITM t2 on t2.ItemCode=t1.ItemCode inner join ocrd t3 on t3.CardCode=t2.CardCode inner join OITW t4 on t4.ItemCode=t1.ItemCode and t4.WhsCode=t1.WhsCode   where t2.validFor='y' and  t2.[U_pperson]='p1' or t2.[U_pperson]='p2'  or t2.[U_pperson]='p3'
    group by t3.CardName,t2.[ItemCode], t2.itemname,t2.[U_pperson],t2.MinLevel,t2.MaxLevel
    Thanks & Regards,
    Nagarajan

  • Oracle BI Answers: Illegal ORDER BY item

    Hi,
    I made a basic report that is a client count; I want to know how many clients the company have.
    But, when I run this report, Oracle BI Answers returned error:
    "Query Status: Query Failed: [nQSError: 16001] ODBC error state: S1000 code: -1005018 message: [Sybase][ODBC Driver][Adaptive Server Anywhere]Illegal ORDER BY item Order Item: 'N0',
    -- (opt_OrderBy.cxx 429) .
    [nQSError: 16011] ODBC error occurred while executing SQLExtendedFetch to retrieve the results of a SQL statement."
    I saw the log to see the SQL that was generated and Oracle BI used a alias for the Client Key. Incorrectly, in the "order by" sentence, Oracle BI used the alias insted the column that I choose.
    The SQL generated was:
    select 'N0' as c1,
    count(*) as c2
    from
    (select distinct T1416.CLIENT_INTER_KEY as c1
    from
    (select *
    from prd.D_SERVICE where SOURCE_SYS in ('ARBOR','PPB') and DW_SERV_ST_ID in (100000003,100000009)) T1836,
    (select *
    from prd.D_CLIENT) T1416,
    (select *
    from prd.D_CUSTOMER_ACCOUNT where SOURCE_SYS In ('ARBOR','PPB')) T1515
    where ( T1416.DW_CLIENT_ID = T1515.DW_CLIENT_ID and T1515.DW_CUST_ACCT_ID = T1836.DW_CUST_ACCT_ID and T1836.MSISDN = '917330340' )
    ) D1
    order by c1
    Do you know how can I resolve this problem???
    Regards,
    Susana Figueiredo

    Note: Oracle at the time of installation to ensure that directory can not be installed with Chinese characters (if the first installation of a “database error loading areasQueries” mistake, the general is because Oracle installation directory with Chinese characters to the directory).
    1. Cessation of all on the Oracle services.
    2. Delete Oracle installation directory, mainly located in two places(As with the D-and C-directory below Program Files Below), when prompted to delete the mistake can not be deleted, restart the machine to remove it.
    3. Registry, delete the contents.
    HKEY_LOCAL_MACHINE \ SOFTWARE delete Oracle directory
    HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services beginning of the keys to Oracle.
    Note: Oracle at the time of installation to ensure that directory can not be installed with Chinese characters.
    If you have ArcSDE For Oracle, Oracle in the deletion of the key, can not be removed with the key ArcSDE keywords, or likely to cause ArcSDE can not run.
    http://www.killtest.com.tw/

  • How to implement notification with response against each order lines

    We have a requirement wherein the multiple order lines should be displayed in one notificaiton and the response (Approve/Reject) should be line wise.
    For exmple, if an order has 3 lines, the approver should get one notification with all 3 lines displayed in the notification. Approver should be able to approve say 2 lines
    and reject the third line.
    If reponse is not possible line wise, is it possible for including a drop down/checkbox/text against each line which would enable the approver to approve/reject the line and the approver response against each line should be captured.
    How do we implement this?

    Hello,
    we are evaluating BC4J/JClient. In our application we have a navigation tree
    in a Java client from which we can call nested dialogs to set attributes,
    call business logic etc.
    Is it possible to open more than one sub-dialog from our starting navigation tree
    at the same time? Each sub-dialog should have its own transaction context.
    To our knowledge we need a new application module for each sub-dialog in order
    to start a new transaction. But how is the navigation tree updated if data
    from the sub-dialogs is commited? The dialogs and the navigation tree don't share
    the same model, do they? The navigation tree might have to show lots of data
    retrieved over a slow connection, so simply updating the entire model is not a solution.
    This could work if an intelligent caching fetches only the changed data.
    So: What is the best way to implement sub-dialogs with their own transaction plus an
    update mechanism?To create a UI like this, see the sample on OTN at
    http://otn.oracle.com/sample_code/products/jdev/jclient/jclient_binding_demo.html
    YOu'd have to tweak this sample so that each sub-window comes up with it's own AM (as you've right suggested).
    Regarding commit, yes, if you do not want to query the whole model on the navigator, you may use Transaction.commitAndSync() method to commit changes instead of simply performing a commit() call.
    See javadoc on this method for details on how it works.
    Thanks for any help!

  • Web ADI GL Journal Template - Journal Line Number

    Is anyone know if you can add the journal line number to a web adi journal template.
    Our users create journals in a spreadsheet and upload in to Oracle vua web adi. They print a hard copy of the journal in Excel ADI template format as well as an output from Oracle of the journal to which their backup is attached. This is required for our audit/SOX requirements.
    Our users/audit review team are frustrated that the order of the lines in the adi xls file is not the same as in the actual oracle journal.
    Having looked at the journal template document I cannot find the journal line number as an option when creating the adi template. Is there any other way of ensuring that the line number in excel is the same as in Oracle (aside from re-ordering the excel lines into code combination order).
    We are running on Oracle Applications : 11.5.10.2
    Thanks

    As per (How To Add Line Number Column To Journal Entry Webadi Template [ID 1102405.1]) this feature is not available in R12 so this implies that it is not available in 11i.
    Thanks,
    Hussein

  • Line number in a *.class file, please help, advanced language guys

    dear all,
    i use c++ to open a *.class file and try to read line number of code in the file, i have 2 questions:
    1. i read line number in a method successfully, but i can not understand the meaning of start_pc, following are one of those data, please explain:
    s = start_pc,n = line_number
    s , n
    0 , 123
    8 , 125
    23 , 126
    29 , 127
    34 , 129
    38 , 130
    2. i can not find where the class's line number are, i.e. class start line and class end line, or field's line number.
    does these info exist inside a *.class file?
    thx for any light

    jdb gets line number of fields from class file, not
    source file definitely.I'm not really sure how you tested this, but here's my test, and JDB definitely gets its listing from the source file.
    First, I created and compiled class Tester:
    public class Tester
        public static void main( String[] argv )
        throws Exception
            Tester x = new Tester();
            System.out.println(x.toString());
        int     x;
        int     y;
        private Tester()
            x = 0;
            y = 1;
    }Then, I ran this in JDB. Note lines 16 and 17 in the output from "list":
    H:\Workspace>jdb Tester
    Initializing jdb ...
    stop in Tester.mainDeferring breakpoint Tester.main.
    It will be set after the class is loaded.
    runrun Tester
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Tester.main
    Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
    12            Tester x = new Tester();
    main[1] list
    8    {
    9        public static void main( String[] argv )
    10        throws Exception
    11        {
    12 =>         Tester x = new Tester();
    13            System.out.println(x.toString());
    14        }
    15
    16        int     x;
    17        int     y;
    main[1] quit
    Tester@b82368Then I edited the source file. Again, look at lines 16 and 17:
    H:\Workspace>jdb Tester
    Initializing jdb ...
    stop in Tester.mainDeferring breakpoint Tester.main.
    It will be set after the class is loaded.
    runrun Tester
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Tester.main
    Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
    12            Tester x = new Tester();
    main[1] list
    8    {
    9        public static void main( String[] argv )
    10        throws Exception
    11        {
    12 =>         Tester x = new Tester();
    13            System.out.println(x.toString());
    14        }
    15
    16        int     a;
    17        int     b;
    main[1]

  • How to find proc/func name from package name and line number?

    Hi,
    We are using the pl/sql call stack dump (dbms_utility.format_call_stack) for some debugging purposes. But in the case of a package body execution, the dump does not return the name of the procedure/function that is being executed, but only the name of the package and the line number being executed. So, we have a requirement wherein we need to extract the type and name of a package subunit from the package name and line number.
    e.g.
    From the information package 'A', line number 739
    we should be able to deduce that line 739 is a part of *'function A.f'*
    Does the oracle database provide any native mechanism (PL/SQL packages or otherwise) to support such functionality? If it does not, how can we achieve the desired result?
    Thanks in advance,
    Shashank

    The approach we are currently planning to take up is this :
    1. Write PL/SQL code to parse the entire source (user_source) and build a database table with a structure like this :
    PACKAGE_NAME | UNIT_TYPE | UNIT_NAME | START_LINE | END_LINE
    =============================================
    A | PROCEDURE | P1 | 20 | 345
    A | FUNCTION | F1 | 347 | 629
    etc..
    2. Start PL/SQL package execution.
    3. Keep dumping call stack snapshots whenever a custom debug procedure is called.
    4. Dump the package name and line number to a log file.
    5. Using the package name and line number, query the table built in step 1 and build the final report which shows the control flow in a readable form.
    What we want is to get rid of step 5 and by some means get the logic to extract the unit type and name in step 4 itself.
    Keep them coming..
    Thanks and regards,
    Shashank

  • Print line number on print layout

    Hi all,
    Is there a way to print the line number on the print layout?
    Thanks,
    Jane

    Hi,
    Try this, you will get Line Number in Print.
    1st Method,
    ->> Open your PLD. Create 1 System Variable Field in Repetetive Area.
    ->> Put Variable No. - 77
    Else, 2nd Method,
    ->> Open your PLD. Create 1 Formula Field in Repetetive Area.
    ->> Put this Formula LineNum().
    Regards,
    Madhan.

  • Can not set breakpoints due to missing line number attributes

    Hi,
    I am using Eclipse 3.0, Jboss to run my Java applications. Till yesterday I could set breakpoints and everything was working fine.
    I didn't change any settings but it is not allowing me to set breakpoints anymore.
    Error is:
    Unable to install breakpoints due to missing line number attributes
    I double checked the settings in window->preferences->compiler->classfiles
    Add line number to class files is checked.
    Is there anything else I can do?
    Any help on this would be greatly appreciated.
    Thanks
    nmadhava

    I'm facing the same problem (no line number information) on the following configuration:
    Eclipse 3.1.1 SDK with WTP 1.0 feature, Weblogic 7.1, running on weblogic provided JVM: JDK 1.3.1_08
    I have already done the following:
    1/ Re-checking debug preferences in Eclipse and rebuild all projects in the workspace then redeploy via ANT.
    2/ Building via ANT1.6.2 with all javac tasks set to debug="on" and redeploy
    Breakpoint is located in code section residing in one of the workspace's projects. But I don't know weather 3rd-party jar resources have been compiled with debug enabled or not; I suppose however it does not matter as I do not try to debug 3rd-party code but ours.
    Any suggestion appreciated.
    Regards

  • Line number error in Exception stack trace does not work in J2SDK 1.4

    why the line number when your progam fails (in Java 1.3)
    don�t shows the line number but in Java 1.4.2:
    in a run fail prints something like:
    at SomeClass.someMethod()<unknow source>
    why: <unknow source>
    should I modify the (java or javaw) command arguments to specify that prints the line numbers when has throwns any exception and print the StackTrace ??

    Hi,
    I have another but related question:
    I am using a testing tool, called as Fitnesse. When an exception is thrown, it shows the exception trace but the line numbers are not shown, because the source code is unknown to the tool. It is an open source tool, so I want to change the settings such that it shows the line numbers.
    I know, maybe I should ask the question to the tool-forum. But I think, this problem is a general one, not related to a specific tool. How can "java" know the line number of the source code, where an exception is thrown?
    Thanks and best regards
    Mert Nuhoglu

  • Defining Purchase Order Number as a Required Entry

    Dear All,
    I've cut and pasted the contents of sap.help.com below, I'm trying to make the Purchase order Number in sales order document a required entry but I'm unable to locate the checkbox in VD02 as mentioned in help text. can some one help me out.
    Defining Purchase Order Number as a Required Entry:
    Use:
    If a customer order number appears on the order for that customer, you can define the PO number (purchase order number) field as a required entry.
    Procedure:
    Choose Logistics ® Sales/distribution ® Master data ® Business partners ® Sold-to party ® Change ® Change.
    Enter the customer and select the Control data view in the General data area of the screen and choose Enter.
    The system now displays the Customer Change: Control Data screen. In the Reference data/area section, select the Purchase order req. checkbox. Save the customer master.
    Result:
    You will have to enter the purchase order number on the Order Entry screen for this customer in all future orders.

    Hi
    TRy transaction VOV8
    select sales document type and go to general control and select Enter PO number check box.
    Otherwise you can create your own incompletion procedure in OVA2 and maintain whatever field you want mandatory and asign this procedure to  sales document type with transaction VUA2 and mark IC dialog.
    regards
    Srinivas

  • Displaying Purchase order in report

    Hi Expert
    I am modifing a report for Mangement , They want to display purchase order in the report .....So I did the following modification but when I run the report all the fields are displaying and purchase order is showing empty, though I have added the po in the table and if you see my coding for adding po
    data:  vbkd-bstkd.
      clear po_number.
      select single bstkd into po_number
        from vbkd
        where vbeln = s903-vgbel.
          call function 'RSAQRT_TEXTFIELD_CONTEXT'
               exporting name  = 'S903'
                         struc = S903.
          call function 'RSAQRT_TEXTFIELD_CALL'
               exporting struc = S903
                         name  = 'S903'
                         fname = 'MATNR'
               importing text  = TEXT_S903_MATNR.
    Can anyone help me please ....................it is very urgent
       include /1BCDWB/IQ000000000226DAT
    *{   INSERT                                                           2
    constants:
      begin of %iqid,"type aqliqid
        workspace type aql_wsid   value ' ',
        usergroup type aql_ugroup value 'SALES',
        query     type aql_query  value 'BILL_DEL',
        lid       type aql_lid    value 'G00',
        struct    type aql_tname  value '/1BCDWB/IQ000000000226',
        infoset   type aql_iset   value 'S903',
      end of %iqid.
    data %runmode type aqlimode.
    data %seloptions type table of rsparams with header line.
    field-symbols <%selopt> type rsparams_tt.
    data TEXT_S903_FKART like TVFKT-VTEXT.
    data TEXT_S903_FKSTO like DD07D-DDTEXT.
    data TEXT_S903_GEWEI like T006A-MSEHL.
    data TEXT_S903_KDKG1 like TVKGGT-VTEXT.
    data TEXT_S903_KDKG2 like TVKGGT-VTEXT.
    data TEXT_S903_KDKG3 like TVKGGT-VTEXT.
    data TEXT_S903_MATNR like MAKT-MAKTX.
    data TEXT_S903_MATNR_01 like MAKT-MAKTX.
    data TEXT_S903_PERIV like T009T-LTEXT.
    data TEXT_S903_PKUNAG like KNA1-NAME1.
    data TEXT_S903_PKUNAG_07 like KNA1-NAME1.
    data TEXT_S903_PKUNWE_01 like KNA1-NAME1.
    data TEXT_S903_PMATN like MAKT-MAKTX.
    data TEXT_S903_SPART like TSPAT-VTEXT.
    data TEXT_S903_VKBUR like TVKBT-BEZEI.
    data TEXT_S903_VKBUR_05 like TVKBT-BEZEI.
    data TEXT_S903_VKORG like TVKOT-VTEXT.
    data TEXT_S903_VKORG_03 like TVKOT-VTEXT.
    data TEXT_S903_VOLEH like T006A-MSEHL.
    data TEXT_S903_VRKME like T006A-MSEHL.
    data TEXT_S903_VSTEL like TVSTT-VTEXT.
    data TEXT_S903_VTWEG like TVTWT-VTEXT.
    data TEXT_S903_VTWEG_04 like TVTWT-VTEXT.
    data TEXT_S903_WAERK like TCURT-LTEXT.
    data TEXT_S903_WERKS like T001W-NAME1.
    data TEXT_S903_WERKS_01 like T001W-NAME1.
    data TEXT_S903_ZZ_MGN like DD07D-DDTEXT.
    data SP_ADD like VBPA-ADRNR.
    data CUST_NAME like KNA1-NAME1.
    data SHADD like VBPA-ADRNR.
    data SHNAME like KNA1-NAME1.
    data ADDRS like ADRC-STREET.
    data MANDCK like LIKP-BOLNR.
    data CMDDOC like LIKP-XABLN.
    data EXT_DEL like LIKP-LIFEX.
    *****ADD BY PIROZ
    data PO_NUMBER like VBKD-BSTKD.
    *data TEXT_S903_MATNR like MAKT-MAKTX.
    TOTAL
    data %Z_0001 like S903-NETWR.
    CON_MARG
    data %Z_0004 like %Z_0001.
    CON_MRG_PC
    data %Z_0005 like %Z_0001.
    tables S903.
    Function----
    FUNCTION /1BCDWB/IQ000000000226EXTR.
    ""Local interface:
    *"       TABLES
    *"              %SELOPT STRUCTURE  RSPARAMS
    *"              %DTAB STRUCTURE  /1BCDWB/IQ000000000226
    *"       CHANGING
    *"             VALUE(%RTMODE) TYPE  AQLIMODE
    *"       EXCEPTIONS
    *"              NO_DATA
    *"              NO_AUTHORIZATION
    *"              ILLEGAL_PACKAGE
    *"              CURSOR_NOT_OPEN
      call function 'RSAQRT_SET_IDENTIFICATION'
           exporting iqid        = %iqid
                     sscr_report = sy-repid
           changing  rtmode      = %rtmode.
      if %rtmode-pack_on = space or %rtmode-first_call = 'X'.
        call function 'RSAQRT_FILL_SELECTIONS'
             tables   selopt = %selopt
             changing rtmode = %rtmode.
      endif.
      call function 'RSAQRT_INIT_TEXTHANDLING'
           exporting class   = 'CL_TEXT_IDENTIFIER'
                     wsid    = ' '
                     infoset = 'S903'.
      if %rtmode-no_authchk = space
         and ( %rtmode-pack_on = space or %rtmode-first_call = 'X' ).
        refresh %auth_tabs.
        append 'S903' to %auth_tabs.
        call function 'RSAQRT_AUTHORITY_CHECK'
             exporting
                auth_tabs         = %auth_tabs
             changing
                rtmode            = %rtmode
             exceptions
                NO_AUTHORIZATION  = 1.
        if sy-subrc = 1.
          raise no_authorization.
        endif.
      endif.
      data: %l_no_further_fetch type flag, " stop fetching
            %l_hits_cnt         type i.    " cnt for %dbtab entries
      if %rtmode-pack_abort = 'X'.
        if not %dbcursor is initial.
          close cursor %dbcursor.
        endif.
        exit.
      endif.
      if %rtmode-pack_on = space or %rtmode-first_call = 'X'.
        if not %dbcursor is initial.
          close cursor %dbcursor.
        endif.
        open cursor with hold %dbcursor for
        select FKDAT VBELN FKART VKORG PKUNAG PKUNWE_01 MATNR VKBUR FKIMG VRKME FKSTO WERKS NETWR WAERK MWSBP VGBEL VGPOS ERNAM POSNR
               VSTEL AUBEL KZWI1 KZWI2 ZZ_CART ZZ_MINCAR ZZ_WKND ZZ_FUEL UMSMNG KZWI4 KZWI3 ZZ_MGN WAVWR SPTAG
               from S903
               where SPTAG in SP$00001
                 and ERNAM in SP$00012
                 and WERKS in SP$00008
                 and MATNR in SP$00006
                 and PKUNAG in SP$00004
                 and VKORG in SP$00005
                 and FKART in SP$00007
                 and VBELN in SP$00002
                 and FKDAT in SP$00003.
      endif.
      if %dbcursor is initial.
        raise cursor_not_open.
      endif.
      while %l_no_further_fetch = space.
        fetch next cursor %dbcursor
              into corresponding fields of S903.
        if ( ( %rtmode-acc_check = 'X' and
               sy-dbcnt > %rtmode-acc_number )
            or sy-subrc <> 0 ).
          %l_no_further_fetch = 'X'.
        else.
          call function 'RSAQRT_TEXTFIELD_REFRESH'.
    additional coding:
      data:  vbpa-kunnr,
             vbpa-parvw,
             vbpa-adrnr.
      clear sP_add.
      select single adrnr into SP_ADD
         from vbpa
         where vbeln = s903-vbeln and
               kunnr = s903-pkunag and
               parvw = 'AG'.
    additional coding:
      select single name1 into cust_name
         from adrc
         where addrnumber = sp_add.
    additional coding:
      data:  adrc-name1,
             adrc-addrnumber.
      clear shadd.
      select single adrnr into SHADD
         from vbpa
         where vbeln = s903-vbeln and
               kunnr = s903-pkunwe_01 and
               parvw = 'WE'.
    additional coding:
      clear shname.
      select single name1 into shname
         from adrc
         where addrnumber = shadd.
    additional coding:
    *{   REPLACE                                                          1
    \ data:  adrc-street.
    \ select single street into addrs
    \   from adrc
    \    where addrnumber = shadd.
    data:  adrc-street.
    select single street into addrs
       from adrc
        where addrnumber = shadd.
    *}   REPLACE
    additional coding:
      data:  likp-bolnr.
      clear mandck.
      if s903-vgbel ne space.
        select single bolnr into mandck
          from likp
          where vbeln = s903-vgbel.
      endif.
          check SP$00009.
    additional coding:
      data:  likp-xabln.
      clear cmddoc.
      select single xabln into cmddoc
        from likp
        where vbeln = s903-vgbel.
          check SP$00010.
    additional coding:
      data:  likp-lifex.
      clear ext_del.
      select single lifex into ext_del
        from likp
        where vbeln = s903-vgbel.
          check SP$00011.
    additional coding:
      data:  vbkd-bstkd.
      clear po_number.
      select single bstkd into po_number
        from vbkd
        where vbeln = s903-vgbel.
          call function 'RSAQRT_TEXTFIELD_CONTEXT'
               exporting name  = 'S903'
                         struc = S903.
          call function 'RSAQRT_TEXTFIELD_CALL'
               exporting struc = S903
                         name  = 'S903'
                         fname = 'MATNR'
               importing text  = TEXT_S903_MATNR.
    additional coding:
       %Z_0001 = S903-NETWR + S903-MWSBP .
          %dtab-FKDAT = S903-FKDAT .
          %dtab-VBELN = S903-VBELN .
          %dtab-FKART = S903-FKART .
          %dtab-VKORG = S903-VKORG .
          %dtab-PKUNAG = S903-PKUNAG .
          %dtab-CUST_NAME = CUST_NAME .
          %dtab-PKUNWE_01 = S903-PKUNWE_01 .
          %dtab-SHNAME = SHNAME .
          %dtab-ADDRS = ADDRS .
          %dtab-MATNR = S903-MATNR .
          %dtab-TEXT_S903_MATNR = TEXT_S903_MATNR .
          %dtab-VKBUR = S903-VKBUR .
          %dtab-FKIMG = S903-FKIMG .
          %dtab-VRKME = S903-VRKME .
          %dtab-FKSTO = S903-FKSTO .
          %dtab-WERKS = S903-WERKS .
          %dtab-NETWR = S903-NETWR .
          %dtab-WAERK = S903-WAERK .
          %dtab-MWSBP = S903-MWSBP .
          %dtab-WAERK001 = S903-WAERK .
          %dtab-VGBEL = S903-VGBEL .
          %dtab-VGPOS = S903-VGPOS .
          %dtab-MANDCK = MANDCK .
          %dtab-CMDDOC = CMDDOC .
          %dtab-EXT_DEL = EXT_DEL .
          %dtab-ERNAM = S903-ERNAM .
          %dtab-%Z_0001 = %Z_0001 .
          %dtab-WAERK002 = S903-WAERK .
          %dtab-POSNR = S903-POSNR .
          %dtab-VSTEL = S903-VSTEL .
          %dtab-AUBEL = S903-AUBEL .
          %dtab-KZWI1 = S903-KZWI1 .
          %dtab-WAERK003 = S903-WAERK .
          %dtab-KZWI2 = S903-KZWI2 .
          %dtab-WAERK004 = S903-WAERK .
          %dtab-ZZ_CART = S903-ZZ_CART .
          %dtab-WAERK005 = S903-WAERK .
          %dtab-ZZ_MINCAR = S903-ZZ_MINCAR .
          %dtab-WAERK006 = S903-WAERK .
          %dtab-ZZ_WKND = S903-ZZ_WKND .
          %dtab-WAERK007 = S903-WAERK .
          %dtab-ZZ_FUEL = S903-ZZ_FUEL .
          %dtab-WAERK008 = S903-WAERK .
          %dtab-UMSMNG = S903-UMSMNG .
          %dtab-VRKME001 = S903-VRKME .
          %dtab-KZWI4 = S903-KZWI4 .
          %dtab-WAERK009 = S903-WAERK .
          %dtab-KZWI3 = S903-KZWI3 .
          %dtab-WAERK010 = S903-WAERK .
          %dtab-ZZ_MGN = S903-ZZ_MGN .
          %dtab-WAVWR = S903-WAVWR .
          %dtab-WAERK011 = S903-WAERK .
          %dtab-PO_NUMBER = PO_NUMBER .
          append %dtab.
          %l_hits_cnt = %l_hits_cnt + 1.
          if %rtmode-pack_on = 'X'
             and %l_hits_cnt >= %rtmode-pack_size.
            %l_no_further_fetch = 'X'.
          endif.
        endif.
      endwhile.
      if %l_hits_cnt = 0.
        if not %dbcursor is initial.
          close cursor %dbcursor.
        endif.
        raise no_data.
      endif.
      if %rtmode-pack_on <> 'X'.
        close cursor %dbcursor.
      endif.
      read table %dtab index 1 transporting no fields.
      if sy-subrc ne 0.
        raise no_data.
      endif.
    endfunction.

    I had Done Like this All comments are as they are i.e. this code gives error (for endselect there is no select) so i commented the endselect statement.
    read below code and plz do some improvement in it.
    SELECT ekkoebeln ekkobedat ekpo~werks into CORRESPONDING FIELDS OF TABLE it_so    FROM EKKO
                      INNER JOIN EKPO ON EKKOEBELN = EKPOEBELN
                      WHERE ekko~EBELN IN S_EBELN
                      AND   BEDAT IN S_BEDAT
                      AND   WERKS IN S_WERKS.
      "SELECT hEBELN hMATNR hWERKS e FROM EKPO INTO CORRESPONDING FIELDS OF TABLE it_so
          "                 WHERE EBELN IN S_EBELN
          "                 AND WERKS IN S_WERKS.
    MOVE EKKO-EBELN TO TNAME.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    ID = 'F02'
    LANGUAGE = 'E'
    NAME = TNAME
    OBJECT = 'EKKO'
    ARCHIVE_HANDLE = 0
    "IMPORTING
    " HEADER = HTEXT
    TABLES
    LINES = LTEXT
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS = 8.
    LOOP AT LTEXT.
    IF LTEXT-TDLINE NE ''.
    MOVE LTEXT-TDLINE TO IT_SO-TDLINE. " Header Note Selected.
    MOVE EKKO-EBELN TO IT_SO-EBELN.
    APPEND IT_SO.
    endif.
    ENDLOOP.
    clear it_so.
    "ENDSELECT.

  • Sale order with item category TAN not getting displayed in md04

    Hi,
    We have a sale order with item category TAN, Schedule line category CP, MRP type ND and availability check as 07. This is not getting reflected in md04. But item category TAB gets displayed under the PR number.
    Please let me know what checks to be made or changes to be done for the sale order with item category TAN to get displayed in md04 screen
    Thanks & Regards

    Hi all,
    I changed the MRP type to PD, and from the next sale order, line item onwards, it was getting displayed in md04 screen. The already created one anyway dint get reflected. So I had to delete the line item and create a new one.
    Thanks all for the help
    Regards,
    Jegashree

  • ORA-01785: ORDER BY item must be the number of a SELECT-list expression

    I have a dynamic SQL on a page. The SQL is dynamic because there are 3 LOV fields from which the user may make selections, and those field values are used in the WHERE clause. Also, the 2nd LOV field is populated with AJAX based on the 1st LOV's selection. And, the SQL joins to another table. The report has 7 sortable columns. The main table the SQL runs over has about 1,000 rows in it.
    The 2nd table has about 500 rows. (Sorry, I'm not sure what information you might need to help me, so I listed several details.)
    The application, and page, have been working flawlessly for several weeks. Then, yesterday the page was being used and the user received the "ORA-01785: ORDER BY item must be the number of a SELECT-list expression" error. The error just appeared out of the blue, so to speak. After weeks of of usage this is the first time this error has appeared. The application had not been changed, but they had been entering data into the main table and the table joined to in the SQL. The application is in production, so I can't put the application into DEBUG, etc. to see what SQL is being built.
    Anyway, I was trying to debug the page today and was doing selections and seeing what would display, then as suddenly as the page quit working it started working correctly. No code changes made, no server changes made (to my knowledge), and no data changes made.
    I'm new to both Oracle and Apex, and am not a SQL, Oracle or Apex expert. So, I am very perplexed and don't have any idea of what could be happening.
    I don't know if it's an issue with the SQL, AJAX not loading the select fields properly, a corrupted table, a server load issue, or something else all together.
    Any suggestions?
    Also, I'm not familiar with Oracle error messages. Can they be red herrings sometimes? Because, I don't programmaticly code the ORDER BY of the SQL. Apex appends that part. So, how could that aspect quit working. And, then suddenly start working.
    Sorry, but I'm extremely confused. :-) Any suggestions or help will be greatly appreciated.
    Thanks, Tony

    Hi Dan,
    Thanks for the feedback. I'm not going to be dogmatic about possible cause, but it has myself and another Oracle developer (who writes SQL and PL/SQL in his sleep) stumped. He doesn't think it's the SQL. Your suggestion was one of the first things we thought of considering the error message we got, but from Scott's reply that it could be a red herring, and after additional testing we've ruled the SQL out for now.
    I understand what you're saying, but the SQL selects all the columns (about 40 columns are selected) that are sortable columns on the report. I've sorted by all the columns by clicking on them and that aspect works without error.
    The SQL is created dynamically and is quite large. I've included below just for information purposes.
    Thanks, Tony
    = = = = = = =
    DECLARE
    q VARCHAR2 (4000);
    BEGIN
    q := 'select ';
    q := q || 'hd."ID", hd."MODEL", hd."YEAR", hd."HIN", hd."BOAT_STATUS", hd."SPECIAL_ACTIVITY", hd."PARTIAL_KIT_VALUE",
    hd.OPTION_NUMBER || '' - '' || e.DESCRIPTION OPTION_NUMBER,
    hd."OPTIONS_HOURS", hd."OPTIONS_MATERIAL", hd."STATION", hd."ACTIVITY_COMMENT", hd."BI_EQUIV_MATERIAL",
    hd."BI_EQUIV_LABOR", hd."EI_EQUIV_MATERIAL", hd."EI_EQUIV_LABOR", hd."BASE_BOAT", hd."SA_ENGINES",
    hd."SA_OPTIONS", hd."DY_STANDARD_MATERIAL", hd."DY_STANDARD_LABOR", hd."DY_STANDARD_OVERHEAD",
    hd."DY_STANDARD_ENGINE", hd."DY_ENGINE_ENGINEUP", hd."DY_ENGINE_MATERIAL", hd."DY_ENGINE_LABOR",
    hd."DY_ENGINE_OVERHEAD", hd."DY_OPTIONS_MATERIAL", hd."DY_OPTIONS_LABOR", hd."DY_OPTIONS_OVERHEAD", hd."EI_STANDARD_UNITS", hd."EI_STANDARD_MATERIAL", hd."EI_STANDARD_LABOR", hd."EI_STANDARD_OVERHEAD", hd."EI_STANDARD_ENGINE", hd."EI_ENGINE_ENGINEUP", hd."EI_ENGINE_MATERIAL", hd."EI_ENGINE_LABOR", hd."EI_ENGINE_OVERHEAD", hd."EI_OPTIONS_MATERIAL", hd."EI_OPTIONS_LABOR", hd."EI_OPTIONS_OVERHEAD",
    htmldb_item.hidden(50,hd.ID) idalias ';
    q := q || 'from "PLP_HIN_DETAIL" hd , "PLP_ENGINES" e ';
    IF
    :P10_SEARCH_MODEL IS NOT NULL
    AND :P10_SEARCH_MODEL <> '%null%'
    AND :P10_SEARCH_YEAR IS NOT NULL
    AND :P10_SEARCH_YEAR <> '%null%'
    AND :P10_SEARCH_STATUS IS NOT NULL
    AND :P10_SEARCH_STATUS <> '%null%'
    THEN
    q := q || 'WHERE
    (instr(upper(hd.MODEL),upper(nvl(:P10_SEARCH_MODEL,hd.MODEL))) > 0
    AND instr(upper(hd.YEAR),upper(nvl(:P10_SEARCH_YEAR,hd.YEAR))) > 0
    AND instr(upper(hd.BOAT_STATUS),upper(nvl(:P10_SEARCH_STATUS,hd.BOAT_STATUS))) > 0)
    AND e.OPTION_NUMBER (+) = hd.OPTION_NUMBER and e.YEAR (+) = hd.YEAR AND e.MODEL (+) = hd.MODEL AND e.PLP_ID (+) = hd.PLP_ID';
    ELSE
    IF
    :P10_SEARCH_MODEL IS NOT NULL
    OR :P10_SEARCH_YEAR IS NOT NULL
    OR :P10_SEARCH_STATUS IS NOT NULL
    THEN
    q := q || 'WHERE
    (instr(upper(hd.MODEL),upper(nvl(:P10_SEARCH_MODEL,hd.MODEL))) > 0
    AND instr(upper(hd.YEAR),upper(nvl(:P10_SEARCH_YEAR,hd.YEAR))) > 0
    or instr(upper(hd.BOAT_STATUS),upper(nvl(:P10_SEARCH_STATUS,hd.BOAT_STATUS))) > 0)
    AND e.OPTION_NUMBER (+) = hd.OPTION_NUMBER and e.YEAR (+) = hd.YEAR AND e.MODEL (+) = hd.MODEL AND e.PLP_ID (+) = hd.PLP_ID';
    else
    q := q || 'WHERE e.option_number = hd.option_number and e.year = hd.year and e.model = hd.model and e.plp_id = hd.plp_id';
    END IF;
    END IF;
    q := q || ' AND :P0_PLP_ID = hd.PLP_ID';
    return q;
    END;

Maybe you are looking for

  • DVI to Video problem

    Hi everyone ! I've got a big problem using my MacMini with TV. I bought the Apple DVI to Video converter, and connected my Philips cathodic TV to the Mac. But the TV only displays gray and deformed pictures. I tried all resolutions available, but not

  • Logic 9 + Mountain Lion = Performance Problems

    Hi, After months of debating to upgrade to Mountain Lion, I did it (and regret it like iOS 6). I'm just wondering if anyone gets the issue with Logic 9, where it works for around an hour no problems, then the CPU meter goes mental and causes glitchin

  • Can't "print to PDF" from Word with Acrobat XI

    I recently upgraded from Acrobat X to Acrobat XI and now I don't seem to be able to "Print to PDF" from within a Word document. It tries to generate the PDF then produces an error log which says: "Adobe PDF Settings file read error in :C:\ProgramData

  • EPM 11.1.2 with Windows 7 and Office 2010

    Hi all, We are getting majorly upgraded to Windows 7 and Office 2010 soon. We use EPM 11.1.2 suite of products. Will all the end-user web applications still work? I already found out that Smartview 11.1.2 is not supported for Office 2010. Does anybod

  • Japanese: Composing on iPhone is easy!

    I spent hours looking for information on the Apple support site for instructions on how to compose Japanese text on the iPhone, and if it is there, it is buried. But composing Japanese on the iPhone is simple. 1. Go to KEYBOARD and enable Japanese (o