How to print the grade of sal?.

how to print grade based on sal. think my table is having ename,sal columns.
how to print the grade?. where i have to write the code?. pls give some tips
i want to print like
grade      ename sal
1 abc0     5000
2     abc1     4000
2     abc2     4000
3     abc3     3500
4     abc4     3000

Hi,
Definitely an interesting Q.
Here is what you can do:
1. Create a Placeholder column "last_sal" at the report level (outside any groups)
2. Create another Placeholder column "grade" at the group level (inside the group where you have salary).
3. Create a formula column inside the group. Write the following formula:
function CF_1Formula return Number is
begin
if :last_sal is null then
     :last_sal := :salary;
     :grade := 1;
end if;
if :last_sal > :salary then
     :grade := :grade + 1;
     :last_sal := :salary;
end if;
return 1;
end;
Print grade in your report layout. This should give you the desired result.
Navneet.

Similar Messages

  • Delivery document how to print the BOM Parent and Child items

    Hi,
    I have a production BOM. In Delivery document how to print the Parent and Child items Item Code and Qty.At the time
    of add a delivery document Inventory stock redused only in Parent Item not child item because child item stock already reduced in issue for production.

    If you need to print both the BOM Parent and Child items, you have to create your own report. BOM is only for production if it is not Sales type.
    Thanks,
    Gordon

  • How to print the script  before realasing?

    how to print the script  before realasing?

    Do you want to see the output of your SAPscript??and print it?? before you release.
    Then goto NACE tcode and configure your script.
    Example :
    Goto Transaction NACE --> Select Application V1(Sales) --> Click on Output Types --> Select the output type as BA00 (as generally BA00 is the output type associated with Sales Order ) --> Double click on the Processing Routines folder on the left and it will display the Form name and the corresponding driver programs name.
    Goto tcode VA03, and display the output from menu and do your printing.
    Close the thread once your question is answered.
    Regards,
    SaiRam

  • How to print the receipt details both on the console and on receipt

    Hi All
    In ORPOS, Can anybody know how to print the sale transaction details on receipt and console as well
    After configuring with printer we can print only on receipt, if we want both on receipt and console as well
    Appreciate your suggestions and ideas
    Regards
    Ramakrishna

    Hi Rama
    This would not be any configuration change
    You can print receipt in both pinter and console by adding a sysout just before string is sent for printing
    Regards
    Saurabh
    [email protected]

  • In cursor i have two queries where put the condition and how to print the d

    hi i have 2 tables 1 is emp(empid,empname,dept,grade)
    2 is salary(grade,salary)
    in cursor when ever grade is increased salary automatically increased
    in 2 diffrent queries where i will put the if condition and how to print the output.
    any one can please suggest me.
    finally my required out put is
    empid,empname,grade,salary
    thanks

    It is always helpful to provide the following:
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to print the rows vertically

    Hi
    how to print the results vertically, like this
    SELECT eno, ename, deptid FROM emp_asign
    WHERE ROWNUM<3
    ENO     104
    ENAME     Bruce Ernst
    DEPTID     60
    ENO     106
    ENAME     Maximus
    DEPTID     60

    well, let's start from the inside and work our way out, shall we?
    the "WITH" clause is just to alias a subquery that he used as an example. I'll assume you know that, and just put it inside the main query (and I'll use all the columns)
    select rpad(t.column_value.getrootelement(),20) || ': ' || t.column_value.extract('//text()') out
    from table(xmlsequence(xmltype(cursor(select * from emp where rownum<4)).extract('ROWSET/ROW/*'))) t
    SQL> select cursor(select * from emp where rownum<4) from dual;
    CURSOR(SELECT*FROMEM
    CURSOR STATEMENT : 1
    CURSOR STATEMENT : 1
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
    3 rows selected.
    1 row selected.
    SQL> select xmltype(cursor(select * from emp where rownum<4)) from dual;
    XMLTYPE(CURSOR(SELECT*FROMEMPWHEREROWNUM<4))
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <EMPNO>7369</EMPNO>
      <ENAME>SMITH</ENAME>
      <JOB>CLERK</JOB>
      <MGR>7902</MGR>
      <HIREDATE>17-DEC-80</HIREDATE>
      <SAL>800</SAL>
      <DEPTNO>20</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7499</EMPNO>
      <ENAME>ALLEN</ENAME>
      <JOB>SALESMAN</JOB>
      <MGR>7698</MGR>
      <HIREDATE>20-FEB-81</HIREDATE>
      <SAL>1600</SAL>
      <COMM>300</COMM>
      <DEPTNO>30</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7521</EMPNO>
      <ENAME>WARD</ENAME>
      <JOB>SALESMAN</JOB>
      <MGR>7698</MGR>
      <HIREDATE>22-FEB-81</HIREDATE>
      <SAL>1250</SAL>
      <COMM>500</COMM>
      <DEPTNO>30</DEPTNO>
    </ROW>
    </ROWSET>
    1 row selected.
    SQL> select xmltype(cursor(select * from emp where rownum<4)).extract('ROWSET/ROW/*') from dual;
    XMLTYPE(CURSOR(SELECT*FROMEMPWHEREROWNUM<4)).EXTRACT('ROWSET/ROW/*')
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <MGR>7902</MGR>
    <HIREDATE>17-DEC-80</HIREDATE>
    <SAL>800</SAL>
    <DEPTNO>20</DEPTNO>
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>20-FEB-81</HIREDATE>
    <SAL>1600</SAL>
    <COMM>300</COMM>
    <DEPTNO>30</DEPTNO>
    <EMPNO>7521</EMPNO>
    <ENAME>WARD</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>22-FEB-81</HIREDATE>
    <SAL>1250</SAL>
    <COMM>500</COMM>
    <DEPTNO>30</DEPTNO>
    1 row selected.
    SQL> select xmlsequence(xmltype(cursor(select * from emp where rownum<4)).extract('ROWSET/ROW/*')) from dual;
    XMLSEQUENCE(XMLTYPE(CURSOR(SELECT*FROMEMPWHEREROWNUM<4)).EXTRACT('ROWSET/ROW/*'))
    XMLSEQUENCETYPE(XMLTYPE(<EMPNO>7369</EMPNO>
    ), XMLTYPE(<ENAME>SMITH</ENAME>
    ), XMLTYPE(<JOB>CLERK</JOB>
    ), XMLTYPE(<MGR>7902</MGR>
    ), XMLTYPE(<HIREDATE>17-DEC-80</HIREDATE>
    ), XMLTYPE(<SAL>800</SAL>
    ), XMLTYPE(<DEPTNO>20</DEPTNO>
    ), XMLTYPE(<EMPNO>7499</EMPNO>
    ), XMLTYPE(<ENAME>ALLEN</ENAME>
    ), XMLTYPE(<JOB>SALESMAN</JOB>
    ), XMLTYPE(<MGR>7698</MGR>
    ), XMLTYPE(<HIREDATE>20-FEB-81</HIREDATE>
    ), XMLTYPE(<SAL>1600</SAL>
    ), XMLTYPE(<COMM>300</COMM>
    ), XMLTYPE(<DEPTNO>30</DEPTNO>
    ), XMLTYPE(<EMPNO>7521</EMPNO>
    ), XMLTYPE(<ENAME>WARD</ENAME>
    ), XMLTYPE(<JOB>SALESMAN</JOB>
    ), XMLTYPE(<MGR>7698</MGR>
    ), XMLTYPE(<HIREDATE>22-FEB-81</HIREDATE>
    ), XMLTYPE(<SAL>1250</SAL>
    ), XMLTYPE(<COMM>500</COMM>
    ), XMLTYPE(<DEPTNO>30</DEPTNO>
    1 row selected.
    now that we know what that looks like, we can put it in the TABLE() and make it the FROM clause
    SQL> select * from table(xmlsequence(xmltype(cursor(select * from emp where rownum<4)).extract('ROWSET/ROW/*')));
    COLUMN_VALUE
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <MGR>7902</MGR>
    <HIREDATE>17-DEC-80</HIREDATE>
    <SAL>800</SAL>
    <DEPTNO>20</DEPTNO>
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>20-FEB-81</HIREDATE>
    <SAL>1600</SAL>
    <COMM>300</COMM>
    <DEPTNO>30</DEPTNO>
    <EMPNO>7521</EMPNO>
    <ENAME>WARD</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>22-FEB-81</HIREDATE>
    <SAL>1250</SAL>
    <COMM>500</COMM>
    <DEPTNO>30</DEPTNO>
    23 rows selected.I'm getting bored. I'm sure you can break down the remaining parts of the statement to see what they return, and how it all comes together.

  • How to print the superscript in smartform

    Hi gurus,
    Please tell me the procedure how to print the superscript in middle of the text displaying?
    when we are displaying the smartform its converted to some special character like & .
    please let me know procedure at the earliest
    Regards
    Raj

    Hi thanks for ur patience.
    see my requirment was to print TM as superscript for HLL ,already smartstyle is there, and also a character format with superscript is also defined.
    then aftet HLL how it prints as superscript.
    for HLL we are using another character format and for superscript we are using the another character format.
    If posiible send me the code to write in smartforms
    Regards
    RAj
    Points are awarded for useful answers.

  • How to print the script in condensed mode

    Hi to all,
    Pls help me.
    How to print the script in condensed mode and particular window only print in the condensed mode.

    Hi,
    Hi
    It will remove the blank spaces in front of the variable
    and if you use the extension NO-GAPS
    It will remove all the blank spaces in the variable field.
    DATA: ws_val1 type char12.
    ws_val1 = ' 100 123'.
    Condense ws_val1.
    Write / ws_val1.
    Condense ws_val1 no-gaps.
    write / ws_val1.
    It will give output as
    100 123
    100123
    The CONDENSE statement deletes redundant spaces from a string:
    CONDENSE c NO-GAPS.
    This statement removes any leading blanks in the field c and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.
    Please check this link for sample code.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb33e6358411d1829f0000e829fbfe/content.htm
    Regards,
    Raj.

  • How to print the text in points wise in sap script

    hi friends,
    how to print the text in points wise in sap script.
    ex: if suppose paragraph consists of 15 lines. then according to one sentence or one fullstop (.) it should give point 1. like that...
    1. hai how ru.
    2. what r  u doing.
    3.where r u.
    like this i want numbering.. waiting for ur replys.
    thanks,
    kiran

    declare a counter
    data : cnt type char 4.
    print :
    cnt = cnt + 1.
    &cnt& &text&
    cnt = cnt + 1. and so on.
    or.
    if the data is in an internal table
    loop at internal_table.
    cnt = cnt + 1.
    write form.
    in script -&cnt& &text&
    endloop.
    Edited by: NIKHILKUMAR POOJARI on Nov 17, 2008 11:18 AM

  • How to print the text in only last but one page in sapscripts

    hiiiiiiiiiii,
             explian how to print the text in only last but one page in sapscripts? wher to write the code? plz if possible explain in detail with an example?

    Hello,
    The total no pages is given by &SAPSCRIPT-FORMPAGES& command.
    So u can handle the situation in ur form like this
    /: if &PAGE&  = &SAPSCRIPT-FORMPAGES&
    p1 TEXT
    /: endif
    Try in this way it may help u.
    Regards

  • How to print the message in 2 lines?

    How to print the message in 2 lines?
    Here i am having it like this... MESSAGE i000(zm) WITH lv_uname.
    here I want to print lv_uname in 2 lines because it lengthy one.
    Thanks,
    Sridhar.

    No man, itas not comming..I am using the below logic to print my message:
        CONCATENATE text-I01 lv_printdate1 text-I02 INTO lv_printname
    SEPARATED BY space.
        MESSAGE i002(zm) WITH lv_printname.
    its printing in a single line...

  • How to print the file name in sap

    Hi All,
    I have requirment like,
    there is a folder in my local system, inside that folder there are 10 Excel file like file1.xls,file2.xls..............file10.xls
    how to print the file name of all these file in SAp like
    file1.xls
    file2.xls
    file3.xls
    file4.xls
    file10.xls
    Appropriate points will be rewarded.
    Thanks in Advance
    Arun kumar

    Hi,
    Still you are facing any problem with this code expalin the problem with details , otherwise close this thread.
    Use Method <b>cl_gui_frontend_services=>directory_list_files</b> to read file names for a given directory
    after reading the files then Use FM : <b>RSPO_SX_OUTPUT_TEXTDATA</b> to create spool from internal table data and print the data.
    <b>sample code :</b>
    data: desktop_dir type string.
    data: ifiles type table of string.
    data: xfiles type string.
    data: count type i.
    data: filepath type string.
    call method cl_gui_frontend_services=>get_desktop_directory
      changing
        desktop_directory    = desktop_dir .
    call method cl_gui_cfw=>flush.
    call method cl_gui_frontend_services=>directory_list_files
      exporting
        directory                   = desktop_dir
    *    filter                      = '*.xls'
         files_only                  = 'X'
    *        DIRECTORIES_ONLY            =
      changing
        file_table                  = ifiles
        count                       = count.
      DATA : x_name       LIKE tsp03d-name,
             x_dest       LIKE tsp03d-padest VALUE 'LOCL',
             x_rows       LIKE sxpcklsti1-body_num VALUE 0,
             x_startrow   LIKE sxpcklsti1-body_start VALUE 1,
             x_pages      LIKE rspotype-pages VALUE 1,
             x_pages_1    TYPE p DECIMALS 2,
             x_rqtitle    LIKE sxpcklsti1-obj_descr,
             x_rqcopies   TYPE i VALUE 1,
             x_rqowner    LIKE trdyse01cm-username,
             x_immediate  LIKE pri_params-primm VALUE ' ',
             x_rqid       LIKE tsp01-rqident,
             i_contents    LIKE  solisti1 OCCURS 0 WITH HEADER LINE,
          x_pages   = 1.
          x_rqowner = sy-uname.
          x_dest     = 'LOCL'.
          x_startrow = 1.
          x_rqcopies = 1.
          x_immediate = 'X' .
          CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
           EXPORTING
    *       name                 =   x_name
             dest                 =  x_dest
             rows                 =  x_rows
             startrow             =  x_startrow
             pages                =  x_pages
             rqtitle              =  x_rqtitle
             rqcopies             =  x_rqcopies
             rqowner              =  x_rqowner
             immediately          =  x_immediate
           IMPORTING
             rqid                 =  x_rqid
           TABLES
             text_data            = i_contents
           EXCEPTIONS
             name_missing         = 1
             name_twice           = 2
             not_found            = 3
             illegal_layout       = 4
             internal_error       = 5
             size_mismatch        = 6
             OTHERS               = 7.
          IF sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    Regards
    Appana
    *Reward Points for helpful answers
    Message was edited by: L Appana

  • How to print the Cheques in Oracle Payroll in R12

    After Running the Cheque Writer Process in Oracle Payroll how can one print the Cheque Leaves in the Payroll module for each employee that is to be paid through cheque.
    Please give the Navigation for the same.
    Regards,
    Chetan

    Please if there is any one who has tried out some customisation on how to print the cheques after running the cheque writer process kindly share it with me as i am in big trouble here....

  • How to print the HEX values of non-displayable characters!

    I am trying to tokenize a string that contains non-displayable characters i.e. EBCDIC or ASCII. How can I print the HEX values of the non-displayable characters. e.g.
    "StartTEST1TEST2TEST3TEST4TEST5TEST6TEST7TEST812END"
    How can print the HEX values of in the above string. Any help is appreciated.
    Thanks

        char ch = 28; // or whatever character you want to look at.
        String hexString = Integer.toHexString(ch);
        System.out.println(hexString);

  • How to print the components in scrollpane

    hi there,
    can anyone tell me how to print the scrollpane components, i mean the headers & the main view of the component. i've a scrollpane with the following code and i want to print the components:
    JScrollPane pane = new JScrollPane(aTextPane);
    pane.setRowHeaderView(aLineNumberComponent);my requirement is i've a editor & lineno component as textpanes and added to scrollpane & when asked to print it should print the lineno component which resides in scrollpane's row header & the editor textpane which is the main view in the scrollpane. how can i achieve this?
    i'd would appreciate any suggestions & codes given.
    thanx in advance.

    After adding/removing components to/from a panel try:
    panel.revalidate();
    panel.repaint() // sometimes this is also needed, I'm
    not sure whyI'm not certain, but I think that panel.revalidate() implicitly calls repaint() only if something actually changed in the layout. If nothing changed, it sees no reason to repaint; hence, if something changed in appearance but not in layout, you have to repaint it yourself.
    Or something like that. I'm no expert. ;)

Maybe you are looking for

  • Requirement in Service Ticket Search based on Notes

    Hi All, We have a requirement in CRM for searching the service tickets based on the notes(additional notes) added to the order(say Service Tickets). Is there any class/method existing in the current system or how do we handle it? Please suggest your

  • Combo Box inside dataGrid

    I have looked everywhere and I am having a hard time finding a good example of how to use a combo box in a datagrid. I want to use a dataprovider for my datagird but as soon as I get inside my itemRenderer it throws an error saying Access of undefine

  • How much will i be charged for this album pre-order

    4 of the songs for ultraviolence have already been released. how much will i be charged for the rest of the album if there are 11 songs remaining?

  • Fcpx - can't copy & paste between projects

    I'm building a program that has several distinct parts to it and I need to put some of those parts together into one sequence - or "project" as fcpx calls it.  The media length is about 30 minutes.  It should be as simple as copy & paste.  I've tried

  • Cascading LOV does not work when setting the value of the parent LOV with DA

    Hello All, Using APEX 4.2.2. I have tow LOVs Parent LOV item is: P50_TYPE Child LOV item is :  P50_PROJECT_ID In other words in the attributes of the item P50_PROJECT_ID we have : > Cascading LOV Parent Item(s): P50_TYPE > Page Items to Submit: P50_T