Using RANGES in current logic used - Urgent

Hi everyone, need your help again
This is what i have done and it works. However, according to the consultant, i should use the RANGES statement and later do a DELETE...WHERE... statement in my logic as it is more efficient, especially in a scenario where field EBELN from table EKKO would have more than 1 line containing the same PO number.
Any suggestions or comments on this? I need to deliver asap.
FORM WRITE_ALLP.
SELECT A~EBELN B~EBELP C~EINDT C~MENGE
        INTO CORRESPONDING FIELDS OF TABLE ITAB
        FROM ( EKKO AS A
               INNER JOIN EKPO AS B
                 ON B~EBELN = A~EBELN
               INNER JOIN EKET AS C
                 ON C~EBELN = B~EBELN AND
                    C~EBELP = B~EBELP AND
                    C~ETENR = '1')
        WHERE B~WERKS IN I_WERKS AND
              B~LOEKZ = ' ' AND
              A~BUKRS IN I_BUKRS AND
              A~BSTYP = 'F' AND
              A~EBELN IN I_EBELN AND
              A~LIFNR IN I_LIFNR AND
              B~MATNR IN I_MATNR AND
              B~RETPO = ' ' AND
              A~BEDAT BETWEEN V_BEDAT-LOW AND V_BEDAT-HIGH
        ORDER BY A~EBELN B~EBELP.
CHECK NOT ITAB[] IS INITIAL.
*--> PO NO. WITH MOVEMENT TYPE 101 SELECTED
SELECT EBELN EBELP BELNR BUDAT LFBNR
  INTO CORRESPONDING FIELDS OF TABLE INT_101
  FROM EKBE
  FOR ALL ENTRIES IN ITAB
  WHERE EBELN = ITAB-EBELN AND
        EBELP = ITAB-EBELP AND
        VGABE = '1' AND
        BEWTP = 'E' AND
        BWART = '101'.
SORT INT_101 BY EBELN EBELP.
*--> PO NO. WITH MOVEMENT TYPE 102 SELECTED
SELECT EBELN EBELP BELNR BUDAT LFBNR
  INTO CORRESPONDING FIELDS OF TABLE INT_102
  FROM EKBE
  FOR ALL ENTRIES IN ITAB
  WHERE EBELN = ITAB-EBELN AND
        EBELP = ITAB-EBELP AND
        VGABE = '1' AND
        BEWTP = 'E' AND
        BWART = '102'.
SORT INT_102 BY EBELP EBELP.
*--> COMPARE INT_101 MAT DOC NO WITH INT_102 REF NO
*--> DELETE IF THEY MATCH (GR THAT HAVE REVERSAL)
LOOP AT INT_102.
  DELETE INT_101
    WHERE BELNR = INT_102-LFBNR.
ENDLOOP.
*--> MOVE LINES OF NON-REVERSED GR FROM INT_101 TO ITAB
LOOP AT INT_101.
  MOVE: INT_101-BUDAT TO ITAB-BUDAT,
        INT_101-LFBNR TO ITAB-LFBNR,
        INT_101-BELNR TO ITAB-BELNR,
        INT_101-BWART TO ITAB-BWART.
  MODIFY ITAB TRANSPORTING BUDAT LFBNR BELNR BWART
    WHERE EBELN = INT_101-EBELN AND
          EBELP = INT_101-EBELP.
ENDLOOP.
  FORMAT COLOR 5.
  WRITE: / SY-ULINE(86).
  WRITE: /1  '|', 20 'EVALUATION REPORT FOR ALL DELIVERY ITEMS',
          86 '|'.
  WRITE: /1  '|', 25 'FROM', V_BEDAT-LOW, 'TO', V_BEDAT-HIGH,
          86 '|'.
  FORMAT COLOR OFF.
  FORMAT COLOR 5.
  WRITE: / SY-ULINE(86).
  WRITE: /1  '|', 5 'PO No.',
          14 '|', 16 'PO Item No.',
          28 '|', 'PO Delivery Date',
          47 '|', 'Actual Delivery',
          65 '|', 'Overdue Days (+/-)',
          86 '|'.
  FORMAT COLOR OFF.
  WRITE: / SY-ULINE(86).
  NEW-LINE.
LOOP AT ITAB.
  IF NOT ITAB-BUDAT IS INITIAL.
*--> IF BUDAT CONTAINS A DATE, CALCULATE DATE DIFFERENCE
    V_OVERDUE = ITAB-BUDAT - ITAB-EINDT.
  ELSE.
*-- IF BUDAT DOES NOT CONTAIN A DATE, LEAVE BLANK
    CLEAR V_OVERDUE.
  ENDIF.
*--> ALTERNATE COLORS FOR EACH LINE OF OUTPUT, EASIER VIEW FOR USER
    IF LINE_CHECK = 0.
      FORMAT COLOR COL_NORMAL INTENSIFIED ON.
      LINE_CHECK = 1.
  ELSE.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    LINE_CHECK = 0.
  ENDIF.
*--> DISPLAY BOTH ON-TIME AND OVERDUE ITEMS
  WRITE: /1  '|', 3 ITAB-EBELN,   "PO NO
          14 '|', 19 ITAB-EBELP,  "PO ITEM NO
          28 '|', 33 ITAB-EINDT,  "PO DELIVERY DATE
          47 '|', 51 ITAB-BUDAT,  "ACTUAL DELIVERY DATE
          65 '|', V_OVERDUE,      "OVERDUE DAYS
          86 '|'.
  IF SY-LINNO >= 65.
    NEW-PAGE.
    FORMAT COLOR 5 INTENSIFIED ON.
  WRITE: / SY-ULINE(86).
  WRITE: /1  '|', 20 'EVALUATION REPORT FOR ALL DELIVERY ITEMS',
          86 '|'.
  WRITE: /1  '|', 25 'FROM', V_BEDAT-LOW, 'TO', V_BEDAT-HIGH,
          86 '|'.
  FORMAT COLOR OFF.
  FORMAT COLOR 5.
  WRITE: / SY-ULINE(86).
  WRITE: /1  '|', 5 'PO No.',
          14 '|', 16 'PO Item No.',
          28 '|', 'PO Delivery Date',
          47 '|', 'Actual Delivery',
          65 '|', 'Overdue Days (+/-)',
          86 '|'.
  FORMAT COLOR OFF.
  WRITE: / SY-ULINE(86).
  NEW-LINE.
  ENDIF.
ENDLOOP.
  WRITE: / SY-ULINE(86).

Hi!
Here the order of the replies is a little bit confused (didn't see your second question up to now).
l_index can be local or global variable (by naming local):
data l_index type i.
data itab_sel like itab.
(And yes, you should have a second table like itab.)
L_index should store current line of loop at int_101. Internal 'current line' of SAP will be changed by read statement, so simple 'delete int_101' would get the wrong line.
With
read table int_102 transporting no fields
             with key lfbnr = int_101-belnr
             binary search.
is done a search for reversals; in case of success, current GR is removed (by deleting line l_index out of table int_101).
Regards,
Christian
P.S.: I always forget, if sy-index or sy-tabix are holding current line in loop / after read table. Just check in debugger or help of statements.

Similar Messages

  • SFLIGHT is NOT defined for the current logical database.

    I have just started learning ABAP and bought an ABAP Objects book by Horst Keller. I have installed 4.6d mini sap and SAP GUI 6.4 on win XP Prof. I executed S_FLIGHT_MODEL_DATA_GENERATOR to load DB tables.
    (1). When I tried to check a sample program, I get an error message SFLIGHT is not defined for the current logical database.
    Here is the partial code:
    REPORT zbcb01f1 .
    TABLES: sflight, sbook.
    DATA: BEGIN OF sr OCCURS 100,
          carrid LIKE sbook-carrid,
          connid LIKE sbook-connid,
          fldate LIKE sbook-fldate,
          bookid LIKE sbook-bookid,
          order_date LIKE sbook-order_date,
          loccuram LIKE sbook-loccuram,
          END OF sr.
    GET sflight.   <---- Error is pointed here
    (2). I am also not getting Graphical Screen Painter when selecting Layout for a screen. Instead, I am getting alphanumeric editor.
    Someone please help me.  
    Raizak.

    Hi Raizak,
    the easiest way is to go to service.sap.com/notes and enter the note number. For this time I've copied the 2 notes below.
    Best regards,
    Christian
    Symptom
    The Graphical Layout Editor of the Screen Painter either does not start or terminates.Error message 37527 is displayed in the session in which the call was made (Graphical Layout Editor not available.
    Additional key words
    () EUNOTE, EUSCREENPAINTER, 37 527
    Cause and prerequisites
    This note comprises all the common causes for error message 37527 and provides you with information on how to systematically trouble shoot the problem.
    1. Windows32 or UNIX/motif?
    As of Release 4.6B there is only the program version for 32bit Windows (NT, 95, 98, 2000 ff.).Up to Release 4.6A there was also a version for UNIX/Motif.All of the more current notes (with the exception of Note 45490) refer only to the Windows version.
    2. Termination at the start or during use?
    The following diagnostic steps refer to the causes of the errors which prevent the Graphical Layout Editor from starting. However, there are also known error causes, which result in the program terminating when the application is being used and which also produce the 37527 error message. This affects -
    Rel.4.6C/D: Termination when attempting to read texts in the logon language -> Note 375494
    Crash after transferring program and dictionary fields. Termination after transferring program and dictionary fields -> Note 189245
    Release 3.1I: Termination after inputting field text -> Note 113318
    3. Is the SAPGUI installation correct?
    The Graphical Layout Editor is automatically installed during the standard installation of the SAPGUI.If you chose a non-standard installation, then you should have explicitely selected its installation (component "Development Tools - Graphical Screen Painter").
    The program executable is called gneux.exe.During the SAPGUI installation it is placed in the same directory as the SAPGUI programms (for example, front.exe) (usually C:\Program Files\SAPpc\sapgui). The following belong to the program:
    - An additonal executable gnetx.exe (RFC starter program)
    - the DLL eumfcdll.dll
    - various eusp* data files (that is, the names all begin with eusp.)
    You can check the completeness of the program installation by starting the program gneux.exe locally in the SAPGUI directory (for example, by double-clicking on the program name in the Explorer window).The Layout Editor is displayed with German texts and an empty drawing area for the pseudo screen EUSPDYND 0000.
    If the installation is not complete, an error dialog box provides information regarding the cause of the error, for example, sometimes the DLL eumfcdll.dll is missing after reinstalling the SAPGUI. For example, the eumfcdll.dll DLL was sometimes missing after the SAPGUI was reinstalled.
    4. System link defined and okay?
    The Graphical Layout Editor is a separate program which is started by the Screen Painter Transaction (SE51) on the Frontend machine.
    Up to Release 3.0F, the programs communicated with each other via the graphics log of the SAPGUIs (gmux).The definition of the environment variable SAPGRAPH may be the cause for the program not being being found where it is.
    As of Release 3.1 G, the programs use a separate RFC link which is set up in addition to the SAPGUI's RFC link.Missing or incorrect definitions of the RFC destination EU_SCRP_WN32 or problems with the creation of the RFC link are the most frequent causes for error message 37527 being displayed.Below you can find the correct settings for the RFC destination EU_SCRP_WN32 (under "Solution").Note 101971 lists all the possible causes for problems with the RFC link set-up. Attention:The Graphical Layout Editor may not be operated through a firewall (for example between the SAP and the customer system) because this does not allow an additional RFC connection in addition to the SAPGUI.
    Solution
    ad 1 UNIX/Motif
    Note 45490 describes possible errors resulting from an incorrect program installation under UNIX/Motif (up to Release 4.6A).
    ad 2 Termination when using
    The above-mentioned notes may contain options for solving individual problems.However, you usually have to replace the program with an corrected version.You can do this either by downloading a patch from sapservX or by installing a more current SAPGUI.The patch is mentioned in the respective note.
    ad 3 Installation
    You either need to reinstall the SAPGUI or manually copy the missing file into the SAPGUI directory.In both cases you should make sure beforehand that a Graphical Layout Editor is no longer running.To do this you can either remove all processes gneux.exe from the process list by using a tool such as Task Manager (on WindowsNT) or exit the Graphical Layout Editor from the Screen Painter Transaction menu via Edit -> Cancel Graphical Screen Painter). Attention:For each session or system an individial Layout Editor process may exist so that, if need be, several processes should be cancelled.
    ad 4 System link
    Up to Release 3.0F:you can either delete the environment variable SAPGRAPH or copy all the files of the Graphical Layout Editor into the directory which is specified by SAPGRAPH.
    As of Release 3.1G:you can use Transaction SM59 to check the RFC destination EU_SCRP_WN32 (expand the TCP/IP connections, select destination EU_SCRP_WN32).If the destination is missing, then you should create it with the following settings:
    - Connection type "T" (start of an external program via ...)
    - Activation type "Start"
    - Start on "Front-end workstation"
    - Front-end workstation program "gnetx.exe" (caution! NOT gneux.exe)
    - Description (optional) "Graph. Screen Painter (Windows32)
      Start Program gneux.exe using the gnetx.exe starter program."
    If you want to start the program from a different directory than the SAPGUI standard directory, then replace the default value under Frontend work station by the complete path name for program gnetx.exe.Transaction SM59 also allows you to check the RFC connection via the pushbutton "Test connection").In this case the system attempts to localize and start the program gnetx.exe.If there are errors, a message is displayed regarding the possible causes (for example, gateway problem, timeout problem or the like).Note 101971 provides a detailed explanation of the problems involved with an RFC connection set-up.As the Graphical Screen Painter requires a functional RFC connection as of Release 3.1G, contact the System Administrator or create an message on the topic Middleware (BC-MID-RFC) if you encounter RFC problems.
    If the program gnetx.exe can be found and started, the banner dialog box with logo, release data and version number is displayed briefly.As the Layout Editor itself is not started, the error cause must be in the installation of the Layout Editor program gneux.exe if the connection test was successful.
    Release 4.5A to 4.6B: Use with Releases <3.1G>.
    The Graphical Layout Editor is downward-compatible as regards the system connection, that is, an RFC-based Layout Editor for example from Release 4.6C can also be used on a non-RFC-based Screen Painter, for example of Release 3.0F.However, the releases mentioned above have a program error which causes a crash due to memory violation in the start phase of the program.Note 197328 describes the solution by installation of the corrected program version.
    Important: Trace file dev_euspNNN!
    If none of the diagnosis steps leads to the cause of the error and to the solution of the problem via the corresponding note, then you should add the contents of the trace files dev_euspNNN (NNN = process number) to the message for SAP, if possible.You can find this file in the current directory of the SAP System, for example under Windows NT in C:\Winnt\Profiles\<user>\SAPworkdir.If several such trace files can be found there, make sure that you use the file which matches the termination time with respect to date and time of creation.In most cases the ERROR message in the last lines of this trace file provides an important note on the cause of the error.
    Source code corrections
    Symptom
    The graphic layout editor of the Screen Painter cannot be started (RFC version).
    Other terms
    () EUNOTE, EUSCREENPAINTER
    Reason and Prerequisites
    This is generally caused by the fact that the RFC connection between the frontend graphics layout editor and the calling screen painter program at the backend cannot be set up.
    Possibility 1: Route permission denied
    In the trace file dev_eusp<Process Id> of the graphics layout editor you find the entry "ERROR in RFCMgr_accept: not accepted", and in the RFC trace file dev_rfc.trc you have an entry of the form "ERROR route permission denied (<Front-Id> to <BackId>,<Service>)".
    If there is a firewall between frontend computer and application
    server, you need to decide whether the port for the RFC of the graphical layout editor can be released here (see Solution 1 below).
    In case no firewall exists between the frontend computer and the application server, in its route permission table, the SAProuter contains either no entry for the frontend computer, on which the graphics layout editor is started, or the entry says that the link is saved by a password.Since the connection is denied, the graphics editor processes exits again, and the screen painter switches to the alphanumeric layout editor.
    Possibility 2: Service 'sapgw<ServiceId>' unknown
    In the trace file dev_eusp<ProzessId> of the graphics layout editor you have the entry "ERROR in RFCMgr_accept: not accepted", and in the RFC trace file dev_rfc.trc you have an entry of the form "ERROR service 'sapgw<ServiceId>' unknown".
    The service sapgw<ServiceId> (for example, sapgw00) is not known on one of the computers participating in the RFC communication because the corresponding entry is missing in its service file. The affected computer can be the frontend computer or the gateway computer.
    Possibility 3: The system parameter gw/cpic_timeout value is too low
    This system parameter determines how many seconds the gateway is waiting for the RFC connection to be set up.In case of a high network load, the default value of 20 seconds is too small with the result that the connection cannot be created on time.Here the graphics layout editor process also exits with the trace file entry "ERROR in RFCMgr_accept: not accepted".
    Possibility 4: System parameter abap/no_sapgui_rfc set
    The profile parameter abap/no_sapgui_rfc of the system is set (that is, it has a value not equal to space or 0).This prevents the program of the graphics layout editor from being started with RFC at the frontend.
    Possibility 5: Unnecessary authorization check
    The error message "No RFC authorization for user xxxxxx" is generated although the check of the RFC authorization was deactivated by profile parameter auth/rfc_authority_check (value = space or 0). The problem is caused by a program error, that ignores the value of the profile parameter let during the call of the RFC authorization check (see Note 93254). This error can occur as of Release 4.5.
    Solution
    ad 1) If a Firewall is installed between frontend computer and the application server, you need to decide whether the port for the RFC link of the graphical layout editor shall be released in the firewall. This is port 33nn, where nn is the 2-digit system number of the SAP application server. As of Release 3.1G, the graphical layout editor needs an RFC link for communication with the application server in addition to the already existing linkof the SAP GUIs. Such a second link is not allowed by the firewall in general because it would contradict the security concept (password protection, logging of the connection).
    If no firewall exists, you should check whether the frontend computer can be added to the route permission table or whether the password option can be removed from out of the available entry.
    For details refer to chapter 4.4 of the attached Note 30289.
    ad 2) Include service sapgw<ServiceId> in the service file.
    Refer to Note 52959 for details.
    ad 3) Increase value for system parameter gw/cpic_timeout. 60 seconds should be sufficent as a timeout limit.
    ad 4) Set the system parameter abap/no_sapgui_rfc to space or 0
    Start the application server so that the new parameter value comes into effect.
    ad 5) Import the Support Package specified in the attachment for the release in question or implement the advance correction in the source code as described in the attached correction instructions.
    As a workaround, assign RFC authorizations as described in Note 93254.

  • "PERNR" is not defined for the current logical database.

    Hi Experts,
    I have developed a program for HR salary variance but when i execute i getting error in the line " get PERNR"
    the "PERNR" is not defined for the current logical database. so plz suggest me to avoid this issue.
    Thanks,
    Rajesh

    the codes are has below,
    *& Report  ZHRSAL_COMP
    REPORT  ZHRSAL_COMP.
    tables: pernr,
            t512t.                      "Wage type texts
    infotypes: 0001. "Organizational Assignment
    *Tables data containing directory to PCL2 payroll results file.
    data: begin of rgdir occurs 100.
            include structure pc261.
    data: end of rgdir.
    data: result type pay99_result.
    data: rt_header type line of hrpay99_rt.
    data: country like t001p-molga,
          number  like pc261-seqnr. "Number of last payroll result
    types :begin of struc_p0001,
           pernr type  p0001-pernr,
           ename type  p0001-ename,
           werks type  p0001-werks,
           btrtl type  p0001-btrtl,
    end of struc_p0001.
    data : gtab_p0001 type table of struc_p0001,
           gwa_p0001 type struc_p0001.
    types : begin of struc_payroll,
            text(10) type c,
            date     type dats,
            month(2) type c,
            year(4)  type c,
            abkrs(2) type c,
            end of struc_payroll.
    data : gtab_payroll type table of struc_payroll,
           gwa_payroll type struc_payroll.
    types : begin of struc_result,
           lgart type lgart,
           lgtxt type t512t-lgtxt,
           betrg type betrg,
            end of struc_result.
    data : gtab_result type table of struc_result,
          gwa_result type struc_result.
    get pernr.
      rp_provide_from_last p0001 space pn-begda pn-endda.
      call function 'CU_READ_RGDIR'
        exporting
          pernr          = p0001-pernr
        importing
          molga           = country
        tables
          in_rgdir        = rgdir
        exceptions
          no_record_found = 1
          others          = 2.
      if sy-subrc = 1.
        write: / 'No records found for '(001), pernr-pernr.
      endif.
      call function 'CD_READ_LAST'
        exporting
          begin_date      = pn-begda
          end_date        = SY-DATUM
        importing
          out_seqnr       = number
        tables
          rgdir           = rgdir
        exceptions
          no_record_found = 1
          others          = 2.
      if sy-subrc = 1.
        write: / 'No payroll result found for'(002), pn-paper.
      else.
        call function 'PYXX_READ_PAYROLL_RESULT'
             exporting
                  clusterid                    = 'RX'
                  employeenumber               = p0001-pernr
                  sequencenumber               = number
            READ_ONLY_BUFFER             = ' '
            READ_ONLY_INTERNATIONAL      = ' '
            CHECK_READ_AUTHORITY         = 'X'
       IMPORTING
            VERSION_NUMBER_PAYVN         =
            VERSION_NUMBER_PCL2          =
             changing
                  payroll_result               = result
             exceptions
                  illegal_isocode_or_clusterid = 1
                  error_generating_import      = 2
                  import_mismatch_error        = 3
                  subpool_dir_full             = 4
                  no_read_authority            = 5
                  no_record_found = 6
                  versions_do_not_match        = 7
                  others                   = 8.
        if sy-subrc = 0.
          perform print_rx.
        else.
          write: / 'Result could not be read (003)'.
        endif.
      endif.
          FORM PRINT_RX                                        *
          Print Payroll Result                                 *
    form print_rx.
      format intensified on.
      write: / p0001-pernr,
               p0001-ename(15),
               p0001-werks,
               p0001-btrtl.
      format intensified off.
      skip 1.
      move p0001-pernr to gwa_p0001-pernr.
      move p0001-ename(15) to gwa_p0001-ename.
      move p0001-werks to gwa_p0001-werks.
      move p0001-btrtl to gwa_p0001-btrtl.
      append gwa_p0001 to gtab_p0001.
      write: / 'For period/payroll area: '(004),
               30 result-inter-versc-fpper+4(2),
               result-inter-versc-fpper+0(4),
               result-inter-versc-abkrs,
               / 'In-period/payroll area: '(005),
               30 result-inter-versc-inper+4(2),
               result-inter-versc-inper+0(4),
               result-inter-versc-iabkrs.
      skip 1.
      gwa_payroll-text = 'For'.
      move result-inter-versc-fpper to gwa_payroll-date.
      move result-inter-versc-fpper+4(2) to gwa_payroll-month.
      move result-inter-versc-fpper+0(4) to gwa_payroll-year.
      move result-inter-versc-abkrs to gwa_payroll-abkrs.
      append gwa_payroll to gtab_payroll.
      gwa_payroll-text = 'In'.
      move result-inter-versc-fpper to gwa_payroll-date.
      move result-inter-versc-inper+4(2) to gwa_payroll-month.
      move result-inter-versc-inper+0(4) to gwa_payroll-year.
      move result-inter-versc-iabkrs to gwa_payroll-abkrs.
      append gwa_payroll to gtab_payroll.
      write: 'Results table: '(006).
      skip 1.
      loop at result-inter-rt into rt_header.
        perform re512t using result-inter-versc-molga
                             rt_header-lgart.
        write: / rt_header-lgart,
                 t512t-lgtxt,
                 rt_header-betrg currency rt_header-amt_curr.
    move rt_header-lgart to gwa_result-lgart.
    move t512t-lgtxt to gwa_result-lgtxt.
    move rt_header-betrg to gwa_result-betrg.
    append gwa_result to gtab_result.
      endloop.
    endform.                    "print_rx
          FORM RE512T                                          *
          Read Wage Type Texts
    form re512t using value(country_grouping)
                      value(wtype).
      check t512t-sprsl ne sy-langu
         or t512t-molga ne country_grouping
         or t512t-lgart ne wtype.
      select single * from t512t
                  where sprsl eq sy-langu
                  and   molga eq country_grouping
                  and   lgart eq wtype.
      if sy-subrc ne 0.
        clear t512t.
      endif.
    endform.                                                    "re512t

  • How to get the current logical system?

    Dear Abapers:
    I can't find the logical system value from the table SYST, pls tell me how to get the current logical system name, Thanks!

    Hi,
    Check with the table T000, the Logical system field name is LOGSYS.
    Regards
    Thiru

  • To get the list of queries in which a particular variable is used - urgent

    Hi Friends,
    I have a list of variables which were used in some queries, now I need to know list of queries in which the given variable is used.
    for example: There is a variable called ZVBASMNT and used in some queries, I want to get the names of the queries in which it was used.
    please give some short method for this, if there is any table or Tcode for this please provide, its bit urgent.
    Thanks & points will be given for the helpful answer
    Regards...
    Ganesh

    Dear Ganesh,
    Yes, You can find.
    Goto Metadata Repository in RSA1.
    Click on Query
    Selct / Click on a Query which uses your variable ZVACITY
    Click on your variable
    Just observe the USED BY list.
    Regards,
    Ram.

  • Compression tecniques for website use urgently needed

    Hi there
    I am creating short movies (about 2-5 mins) in Imovie HD and i want them to be downloadable from my website as a file (not streamed etc). I want the picture quality to be very good but the sound can be mono as its not as important. I need to keep file sizes to about 20mb or less. I am told that 320 x 240 is the size to go for websites - is that true?
    My problem is that both PC and Mac users will be wanting to download the movies so compatability is very important. What file type should i go for (mpg, mov, avi, wmv) and what compression should i choose for the best cross platform compatability?
    If anyone can help, i would be so grateful. If anyone has any good settings that they have tried and tested - that would be fantastic.
    Many, many thanks
    Daniel

    I would create .mov ..that's to say QuickTime.. files: every Mac user has QuickTime on their machine, and Windows users often already have it, or can be guided to simply download it.
    I've tried an assortment of compression codecs, and have found that a 'hardwired' codec-in-a-chip, rather than using software to compress, gives the fastest and sharpest results. So I run my mini-movies through an Archos recorder/player (..predecessor of the video iPod..) which encodes all incoming video in DivX format.
    This plays great in QuickTime, except for the sound, which is - by default - hidden. So I run the resultant small video file through a little free program called 'DivX Validator', which resets the sound to the proper QuickTime format.
    I then post that 'validated' compressed file on the web (..on my Homepage..) and it's playable by all versions of QuickTime, both old and new. [NOTE that only the latest QuickTime 7 seems to be able to play back videos encoded through the recent QT 7 H.264 hi-quality codec ..but DivX looks just as good, and can be played in any QT versions.]
    Here's what a DivX-encoded movie looks like.. [This is a still slideshow burned to a DVD ..when it starts.. not moving video, and DivX really does justice to the hi-quality stills. And as DivX produced a small file size, it can be downloaded quickly!]
    Other people will probably have other recommendations..

  • Performance Tunning - Connect By and Outer Join Used - Urgent

    Hi,
    I have written a query with the outer join and connect by prior since to establish the parent child relation ship.
    All the tables having 2 lakhs record but the final result set is 20 thousand rows.
    The query is taking 5 minutes to complete the execution. How could i improve the performance.
    The query is
    SELECT
    'ABC' hrchy_id,
    SUBSTR(c.abc_cd,1,1) ,
    a.org_no bu_node_id,
    SUBSTR(d.abc_cd,1,1) ,
    a.prnt_org ,
    level hrchy_lvl_nb,
    a.eff_from_dt,
    a.eff_to_dt,
    FROM ((parent a INNER JOIN f_org b ON (a.org_no = b.org_no))
         left join org c on ( (a.org_no = (c.abc_cd)))
    ) left join org d on ( (a.prnt_org = d.abc_cd)))
    WHERE a.co_cd ='000'
    START with a.prnt_org = '0'
    CONNECT BY a.prnt_org = PRIOR a.org_no
    ORDER SIBLINGS BY a.org_no;
    Please suggest any idea or commands to improve the performance.
    Thanks in advance.

    Can you provide the structure of tree based SQL.
    Thanks in advance.But you have it already :-)
    SELECT
    'ABC' hrchy_id,
    a.org_no bu_node_id,
    a.prnt_org ,
    level hrchy_lvl_nb,
    a.eff_from_dt,
    a.eff_to_dt,
    FROM parent a WHERE a.co_cd ='000'
    START with a.prnt_org = '0'
    CONNECT BY a.prnt_org = PRIOR a.org_no
    ORDER SIBLINGS BY a.org_no;Regards
    Dmytro

  • Handling Ranges in Script Logic

    Hi Experts
    Is it possible to put logic to check a range of values in Script Logic.
    For example, if I need to check if the value in Quantity Account is between 200 and 800, then only some Quantity Discount is calculated against this.
    What command should one use for this
    Any input would be very helpful.
    Regards
    Krishnendu

    Hi Krishnendu,
    I believe that you can use MDX or a BADI to do this. Using MDX, for example, the following should write 100 to the QUANT_DISC account in the event that QUANTITY is greater than 200 and less than 800:
    [ACCOUNT].[QUANT_DISC] = IFF(([ACCOUNT].[QUANTITY]) > 200,IIF(([ACCOUNT].[QUANTITY])<800,100,0),0)
    This is just example MDX code - you'll have to adapt and test yourself. I suggest using the script logic tester to speed the process. Performance may be less than ideal, and you can certainly implement this in a BADI in that event.
    It would be nice if it were possible to do this using WHEN/IS statements in script logic, but at present conditional logic based on measure values is not supported in that context.
    Ethan

  • Substitution Logic- Very Urgent

    Hi,
    Background: I never done substitution in past. Customer  wants partial payment, credit memo, debit memo baseline date should be the same with reference to cutomer's original invoice baseline date. e.g.
    1. Customer invoice 01/01/2007 and baseline date is 01/01/2007
    2. Partial payment 06/10/2007 and baseline date is 01/01/2007
    3. Credit memo 09/15/2007 and baseline date is 01/01/2007
    To achieve we have user exit to replace the current baseline with original invoice baseline date. This user exit will be assigned to my substitution rule. Before do that i want make sure my substitution rule logic is correct:
    I have written following prereqiuest(Formula) in substitution rule in order to meet baseline date.
    "BSEG-KOART='D' AND BKPF-BLART='DR,DZ,RK,DZ'"
    "AND BSEG-ZFBDT='08'" TRUE
    Do you foresee any problem here?. If yes please let know so that i correct it.
    Your immediate action is highly appreciated.. I will also assign double points..
    Regrds,
    Jagadeesan

    There is an issue with the logic
    1) You want to use this logic for fields at BKPF (Header Level) and also BSEG (Line item Level).. Some times this does not work. You might want to try this out in your instance. The system works best when you have substitution either at a line item level or at a header level . It has an option for substitution for the whole document as well.. but in a lot of cases I tried it ..it did not work.
    2) If the fields at both line item and header are avbl to you in your substitution for whole document , then your logic will work. (so the logic that you have given -- functionally it should work) constraint : as described in 1 above.
    3) If this does not work ..then i would suggest the following approach
    Option A - drop the KOART and the Base line date from your logic and work only with Doc Type + Co Code + Reference Procedure + T Code - since these are all Header level
    Option B - Work with some BTE ..go to FIBP.. see if there is some BTE which you can use.
    For SD documents there are a number of user exits avbl which modify the values passed from SD to the FI document ..
    Hope this helps
    Option B

  • All po's released in a given date range:EXIT M06E0004,logic?

    Hai,
      After lot of browsing in the forum,I came to the conclusion that to capture ALL RELEASED PO in a date range one ahs to use
    CDHDR/CDPOS or implement EXIT and populate ZTABLE.
    Now i have seen the exit M06E0004 triggers upon lot of actions(change PO / release PO etc)..
    Now how should I develop a Logic so as to  identify if the user action was to RELEASE the PO when the exit is triggered..
    I can see that the values of RELEASE in table EKKO dont change while in the exit,though the user RELEASES the PO.

    Whether the specified fields are available in the Structure "CEKKO"?  Standard Structure of CEKKO doesn't have these fields.
    If the structure having these fields, CEKKO-FRGZU holds the status of Release during this enhancement.
    Regards
    Vinod
    Edited by: Vinod Kumar on Apr 29, 2010 4:05 PM

  • Group By element ID and continuous date range as a single row - URGENT!!!!

    Hi All,
    I have a source table and a target table.
    Source Table Target Table
    Element ID Period_dt Element ID Effective date End date
    DD001 200901 DD001 200901 200903
    DD001 200902 DD001 200906 200908
    DD001 200903 DD002 200801 200803
    DD001 200906
    DD001 200907
    DD001 200908
    DD002 200801
    DD002 200802
    DD002 200803
    I want the result as in the target table. Basically, continuous date range should be grouped and shown as single row even it falls under the same elment_id.
    I have tried the LAG and LEAD function and RANK function as well but unsuccessful.
    I was able to get like this in the target table using MIN and MAX function.
    DD001 200901 200908
    DD002 200801 200803
    For DD001, you can see there is a break in the months. 200901 - 200903 and 200906 - 200908. we are missing 4th,5th month. 1 to 3rd month and 6th to 8th month should be grouped and shown as separate rows in the target table for the same DD001 element_ID
    I will post the SQL query tommorrow. Please give your suggestions.
    Regards
    Balaji

    Thanks guys. It worked perfectly. I apologize for using the 'U' word. This is my first post here.
    select prod_element_cd,
    min(period_dt) effective_date,
    max(Last_day(period_dt)) end_date,
    SUM(Fixed_factor),
    SUM(var_factor),
    val1
    from (
    select prod_element_cd, period_dt,Fixed_factor,var_factor, val, last_value(val ignore nulls) over(partition by prod_element_cd order by period_dt) val1
    from (
    select prod_element_cd,
    period_dt,
    NVL(Fixed,0) Fixed_factor,
    NVL(variable,0) var_factor,
    lag(period_dt) over(partition by prod_element_cd order by period_dt) dt,
    case when add_months(period_dt,-1) = lag(period_dt) over(partition by prod_element_cd order by period_dt)
    then null
    else rownum end val
    from pmax_land.TMP_COST_CASH_STD_INPUT)
    group by prod_element_cd, val1
    order by prod_element_cd
    The above query pulls the below result
    PROD_ELEMENT_CD EFFECTIVE_DATE END_DATE FIXED VARIABLE VAL1
    DDA001 01/01/2009 03/31/2009 4.20 7.62 1.00
    DDA001 06/01/2009 11/30/2009 4.80 0.72 10.00
    DDA001 01/01/2010 01/31/2010 0.75 0.50 13.00
    DDA002 07/01/2008 09/30/2008 2.40 0.36 11.00
    DDA002 02/01/2008 03/31/2008 1.50 1.00 14.00
    one more logic added to the requirement
    for each occurance, for eg: DDA001, the last row of DDA001 should be taken and the end_date of that should be hardcoded to 12/31/9999
    here we have two cases
    last row for DDA001 end_date
    DDA001 01/01/2010 01/31/2010 0.75 0.50 13.00
    end date is 01/31/2010 for this above row of DDA001. It should be hardcoded to 12/31/9999
    similarly
    last row for DDA002 end_date
    DDA002 02/01/2008 03/31/2008 1.50 1.00 14.00
    end date is 03/31/2008 for this above row of DDA002. It should be hardcoded to 12/31/9999
    Similarly for DDA003,DDA004.......... etc
    Thanks for your previous replies. Please give your suggestions.
    Regards
    Balaji
    Edited by: user12119826 on Oct 27, 2009 11:49 PM

  • Number Range for Excise Invoice.(Urgent !!!)

    Hi Gurus,
    Scenario :
    Business want's serial excise invoice numbers irrespective of the transaction it is excuting i.e If i am using local excise invoice  or Export Excise invoice the excise invoice for both of them have to be in serial meaning if i have an local excise invoice number running at 191 and if i generate export excise invoice the excise invoice number should be 192.
    Is this possible ? since the object for local excise invoice ( J_1IEXCLOC) and object for export excise invoice(J_1IEXCEXP) are different and the number range you assign to them cannot be same.
    Kindly advice me how to handle this......Is there any user exit for this ???
    Rgds
    VIVEK.

    Hi,
    When you go to transaction code <b>"SNUM"</b> to create the number range, after entering the relevant object the system asks for the "<b>series group"</b>. Try keeping the series group same for both the export as well as domestic sales. For creating the series group follow the path:
    IMG - logistics general - tax on goods movement - India - Basic setings - <b>Maintain series groups</b>.
    Here create a new one and save it.
    IMG - logistics general - tax on goods movement - India - Business transactions - Outgoing Excise Invoices - <b>Maintain Default Excise Groups and Series Groups</b>.
    Here for the combination of <b>"sales area"</b>, <b>"shippiong point"</b>, <b>"plant"</b>, <b>"excise group"</b> enter the <b>"series group"</b>. When you create the excise invoice in <b>"J1IIN"</b> at that time the system will automatically fetch the required excise group  & series group.
    Reward points if solution helps.
    Regards,
    Allabaqsh G. Patil

  • Logic needed urgent

    Hi Friends,
    I need logic (code for the following requirement.
    1. Bank guarantees received are entered by F-57 transaction as a noted item in system and the following data will be captured in the respective field.
    Document date: Bank Guarantee date
    Posting date: Date of entry         
    Reference field: BG Number
    Document header text: Bank guarantee type
    Assignment: Bank name
    Special G/L Assignment: Bank account number
    Text: Bank address
    Due date: Claim end date
    2. Posting keys (BSEG-BSCHL) 39 & 29 are used in F-57 transaction with special G/L Indicator (BSEG-UMSKZ) at time of Entering statistical postings and Reversal respectively
    3. Cross check the period of validity of bank guarantee by comparing the due date (BSEG-ZFBDT) at the time of entering statistical postings and Document date (BKPF-BLDAT) at the time of Reversal.
    4. If the bank guarantee cancels or reversed before due date (BSEG-ZFBDT) cancellation date i.e. Document date of reversal is to be populated in the report and in other case the due date is to be populated in the report.
    Selection screen has the fields
    BKPF-BUKRS   Mandatory
    LFA1/BSEG-LIFNR     Optional
    BSEG-ZFBDT     Optional
    BKPF-BLADT     Optional
    The o/p structure has the following fields
    BKPF-XBLNR     BG NO(Reference)
    BSEG-LIFNR     Vendor code
    LFA1-NAME1     Vendor Name
    BKPF-BLDAT     Start date(Document date)
    BSEG-ZFBDT     End date(Due date)
    BSEG-WRBTR     Amount
    BKPF-WAERS     Currency
    BSEG-ZUONR     Bank Name(Assignment)
    BSEG-SGTXT     Bank Address
    BSEG-HZUON     Account Number
    BKPF-BKTXT     BG Type
    BSEG-ZFBDT     Claim end date

    Hi,
    define internal table
    It_bseg with fields BURKS, BELNR,GJAHR, BUZEI and other field (look the output fields).
    it_bkpf with fields BURKS, BELNR,GJAHR anmd other required fields.
    it_lfa1 with fields LIFNR and NAME1.
    NOw
    SELECT BURKS, BELNR,GJAHR ,<other required fileds>
             into table it_bkpf  from BKPF
    where BUKRS  in/= <selectionscreen-burks>
    and bladt in/= <selectionscreen--bladt>.
    If it_bkpf[] is not initial.
    select BURKS, BELNR,GJAHR, BUZEI and other fields
       into  table it_bseg from bseg
    for all entries in it_bkpf
    where burks = it_bkpf-burks
    and belnr = it_bkpf-belnr
    and gjahr = it_bkpf-gjahr
    and ZFBDT in/= <selection screen ZFBDT>
    endif.
    Now
    select lifnr name1 from lfa1 into it_lfa1
    where lifnr in <selection scfreen lifnr>.
    YOu have three tables now..
    you can loop at 1st table get the output fields put in into work area
    read 2nd table relevant to first one and then read IT_LFA1 table with lifnr same as lifnr in BSEG and fill the final internal table.
    Any doubts in retrieving please feel free to post your question
    rewards if useful,
    regards,
    nazeer
    Message was edited by:
            'Nazeer'

  • Get mapl gives ' mapl not defined in the current logical database'.

    Hello,
    i am going through the report RCPDRK00, i found a statement get plkod , get mapl .
    When i try to run this statement in my test program it says ' not defined in the curent logical database' .
    How to link with  logical database.
    regards,
    kevin.

    GET statements will provide your program with database records based on the code for the logical database. The program in this case is SAPDBPNM.
    Each GET will be supplied with data by the corresponding PUT subroutine.
    Read the help about the logical databases. This is considered obsolete technology, but still, they can be very useful.
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm

  • Bytes paged out Logical standby (urgent!!!!!)

    Hi,
    We are having  a 3 node  LOGICAL STANDBY RAC ,it is continuoulsly  paging out bytes to disk.
    SQl > select from v$logstdby_stats;*
    NAME     VALUE
    number of preparers     2
    number of appliers     27
    maximum SGA for LCR cache     3072
    parallel servers in use     32
    maximum events recorded     100
    preserve commit order     FALSE
    transaction consistency     NONE
    record skip errors     Y
    record skip DDL     Y
    record applied DDL     N
    record unsupported operations     N
    coordinator state     IDLE
    transactions ready     0
    transactions applied     0
    coordinator uptime     10848
    realtime logmining     Y
    apply delay     0
    Log Miner session ID     1
    txns delivered to client     3425760
    DML txns delivered     3315152
    DDL txns delivered     1072
    CTAS txns delivered     153
    Recursive txns delivered     109536
    Rolled back txns seen     4226
    LCRs delivered to client     20249373
    bytes of redo processed     29038698292
    bytes paged out     4482430016
    seconds spent in pageout     8677
    bytes checkpointed     0
    seconds spent in checkpoint     0
    bytes rolled back     0
    seconds spent in rollback     7
    seconds system is idle     0
    SQL > SELECT TYPE, HIGH_SCN, STATUS FROM V$LOGSTDBY;
    TYPE     HIGH_SCN     STATUS
    COORDINATOR     61551734060     ORA-16116: no work available
    READER     61551732712     ORA-16127: stalled waiting for additional transactions to be applied
    BUILDER     61551732695     ORA-16243: paging out 607512 bytes of memory to disk
    PREPARER     61551732695     ORA-16127: stalled waiting for additional transactions to be applied
    PREPARER     61551732692     ORA-16127: stalled waiting for additional transactions to be applied
    ANALYZER     61551732694     ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    APPLIER          ORA-16116: no work available
    The main issue is LogMiner is busy mining 1 logfile(512mb) from last 6 hrs and the value of " bytes paged out" is continuoulsy increasing and many log switches are happening on the logical standby but still no new transactions are getting applied on logical standby .
    we took an AWR report for the given period and found that no SQL were being fired upon...but still generatiing archives of 512mb each .
    Database version :- 10.2.0.2 RAC
    OS : Solaris 10
    Kindly help me to resolve this issue?????????
    Edited by: user8974795 on Sep 26, 2011 2:15 AM

    Hi,
    please execute the following steps:
    1. Copy the partially corrupted file over from primary.
    2. Re-register the logfile if needed.
    alter database register or replace logical logfile 'xxxxxxxxxxxxx';
    3. Restart Logical Apply

Maybe you are looking for

  • DVI to S-video connector?

    I'm looking at buying a cable to extend my display onto a TV. Apple sells the mini-DVI to S-video/Composite adapter but doesn't say if it works for the Powerbook G4 15". I would assume that if it works for the 12" it would also work for the 15" and 1

  • Hard drive died on my iMac how to retrieve from Time Machine

    HI, My Hard drive died on our iMac (we were on Snow Leopard).  We replaced it with a larger Hard drive and the Tech put Lion on it.  Sorry if this is a dumb question, but how do I retrieve my entire back up from the Time Capsule.... I search and read

  • HT201262 Fonts and graphics are slightly "fuzzy". Colors are not correctly displaying

    After Mavericks installation on my Macbook Pro mid-2012 (non-retina), the fonts appear slightly fuzzy, the graphics seems less crisp and the colors are just "off". This issue seems to be system wide but is much worse whilst using Safari for some reas

  • Thinkpad T61 - Embedded Web Camera, Lenovo Camera Center issues

    Hello, Recently purchased a T61 with the embedded web cam.  The notebook comes with "Lenovo Camera Center" software (which is more like a portal for camera-related software) but there is no useful software that enables me to actually use the camera -

  • HP 8530w - SSD not detected

    Hello, Recently I managed to get an SSD from work, namely the A-Data S596 (500 SERIES). When putting it into my HP Elitebook 8530w, the disk was not detected. I have already upgraded the BIOS to the newest version. The SSD's firmware has also recentl