Dynamically summing up the numeric fields in ALV output

Dear all,
I had report which contains of the stock overview for a particular date based on materials. I am having the fields as
Plant Storage location Quantity
HC01 H14f   12       
Hc01 H1w   13       
Whenever the layout is selected as
Plant and Quantity  . i have to get the output as
HC01 25  
But if the option is based on storeage location
H14F  12
H1W  13
One thing the layout will be selected in the output of alv only the user will not run the report again.
Is there any option to this

Hi Shreehari,
As per i understand your question u want  sum based on a particular field.
For that you first select the numeric filed for which you want sum and click on sum tab on screen .
After that select the field based on which you want subtotal.
Now beside Total tab there will be sub-total , just click on that and you will get the ouput in your desired form.
Hope it will help you.
Regards,
Ashish T.

Similar Messages

  • To Blank the Quantity field in ALV output

    Hi Gurus,
    I have an Internal Table & 'MENGE' is the field, but when i am passing 'SAPCE' to blank that particular field, it is showing 0.00 quantity in the output of ALV, but i want to make that field blank.
    Please tell me what should i do.
    Vicky

    hi  vicky ,
    declare the field
    xyz type   fkimg or  xyz l type vbrp-fkimg .
    i have  declared  like this  only and in  output it is showing blank  .
    also giving you the field catalogue  .
    fcat-fieldname = 'YFKIMG'.
      fcat-hotspot = ' '.
      fcat-outputlen = '000016'.
      fcat-just = 'L'.
      fcat-seltext_m = 'CRATE'.
      fcat-ddictxt = 'M'.
      fcat-inttype = 'Q'.
      fcat-datatype = 'QUQN'.
      fcat-do_sum   = 'X'.
      fcat-just     = 'R'.
      fcat-no_zero  = 'X'.
    *  fcat-decimals_out = 0.
      APPEND fcat.
      CLEAR fcat.
    regards
    ranjan

  • Negative sign for DMBTR field in ALV output

    Hi Experts,
    Before posting I have searched for more than 3 hours in the forums to get a solution for this.
    I did not get any solution so I am posting this problem which I need to resolve.
    I have to display the DMBTR field in ALV output for which a grand total will have to be displayed.
    Here for all the values in DMBTR which are negative are getting displayed as '-        6673.56','-       289956.23' as I am using the edit mask 'V_____________.__'.
    I have to get the value shown as '-6673.56', '-289956.23'.
    I tried to use convert this DMBTR to String and have successfully displayed the negative sign correctly in front of the value but I am not getting the totals which I need to have
    PLease check and suggest for a solution.
    Regards
    Kishore

    Hi,
      If this is the case, then you can use character field to display the sign on the left. Sum up the total and use the event end of list to display the same. Remember to set the TECH and NO_OUT in the field catalog.
    Hope this helps.
    Regards,
    Siva

  • ALV SUM for non numeric fields.

    Hello Gurus,
    I have a requirement where i have a alv output and i have a check field of char 1 length...and it displays X as the output. Now i need to have X at the sum line at the end.is there is any possibility with the fieldcatalogue.

    Hi
    U can not do sum for char type fields,it will only possible for numaric fields.
    This u can do by program,after populating the output data,do the sums for the required fields in program and append that to output table as last record.Display the last row with differant color.
    Regards,
    Raghu/

  • How to get a minus sign with the cost  field in ALV.

    Hi ,
    How to get a minus sign with the cost field in ALV.
    The Ouput will be displayed like  Rs -1500 instead of 1500-
    I can't use concatenate also as i may have to use the sum functionality of ALV .
    Cheers
    Sunny

    Hi sunny,
    1. The OTHER FIELD
       has to be character field of say length 15.
    2. Write the original numeric value to
       this character field (in a loop)
    3. But simply writing won't help.
    4. use this kind of logic.
    5.
    REPORT abc.
    DATA : m TYPE i.
    DATA : chr(15) TYPE c.
    m = -100.
    WRITE m TO chr.
    IF m < 0.
      SHIFT chr RIGHT BY 1 PLACES.
      CONDENSE chr.
      CONCATENATE '-' chr INTO chr.
    ENDIF.
    WRITE chr.
    regards,
    amit m.

  • Total for a Numeric field in ALV Grid display

    Hi all,
    I am not getting the Total for a Numeric field in ALV Grid output. What might be the problem.
    Regards,
    Balavardhan.K

    Check this code for subtotals and totals..
    REPORT ZYFI_REPT007
           NO STANDARD PAGE HEADING
           LINE-SIZE 300
           LINE-COUNT 50
           MESSAGE-ID ZYFI.
    TABLES : COOI, " Commitments Management: Line Items
             LFA1,                         " Vendor master (general section)
             VBEP,
             RKPLN.
          TABLE TYPES AND INTERNAL TABLES                                *
    DATA : BEGIN OF TYP_COOI ,
           OBJNR LIKE COOI-OBJNR,
           SAKTO LIKE COOI-SAKTO,
           MEGBTR LIKE COOI-MEGBTR,
           MEINH LIKE COOI-MEINH,
           WKGBTR LIKE COOI-WKGBTR,
           REFBN LIKE COOI-REFBN,
           RFPOS LIKE COOI-RFPOS,
           SGTXT LIKE COOI-SGTXT,
           BUDAT LIKE COOI-BUDAT,
           LIFNR LIKE COOI-LIFNR,
           END OF TYP_COOI.
    DATA : BEGIN OF TYP_LFA1 ,
            LIFNR LIKE LFA1-LIFNR,
            NAME1 LIKE LFA1-NAME1,
           END OF TYP_LFA1.
    DATA : BEGIN OF IT_OUTTAB OCCURS 0,
             OBJNR LIKE COOI-OBJNR,
             SAKTO LIKE COOI-SAKTO,
             MEGBTR LIKE COOI-MEGBTR,
             MEINH LIKE COOI-MEINH,
             WKGBTR LIKE COOI-WKGBTR,
             REFBN LIKE COOI-REFBN,
             RFPOS LIKE COOI-RFPOS,
             SGTXT LIKE COOI-SGTXT,
             BUDAT LIKE COOI-BUDAT,
             LIFNR LIKE COOI-LIFNR,
             NAME1 LIKE LFA1-NAME1,
           END OF IT_OUTTAB.
    DATA : IT_COOI LIKE TYP_COOI OCCURS 0 WITH HEADER LINE,
           IT_LFA1 LIKE TYP_LFA1 OCCURS 0 WITH HEADER LINE.
    *-- ALV Declarations
    TYPE-POOLS SLIS.
    DATA: IT_EVENTS            TYPE SLIS_T_EVENT,
          GS_EVENT             TYPE SLIS_ALV_EVENT,
          wa_fldcat            type slis_fieldcat_alv.
    DATA: S_LAYOUT TYPE SLIS_LAYOUT_ALV,
          GT_PRINT TYPE SLIS_PRINT_ALV.
    DATA: IT_FLDCAT       TYPE SLIS_T_FIELDCAT_ALV.
    DATA: IT_SORT             TYPE SLIS_T_SORTINFO_ALV.
    DATA: V_REPID LIKE SY-REPID.
                        SELECTION SCREEN                                 *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_KOKRS FOR COOI-KOKRS NO-EXTENSION NO INTERVALS,
                                           " Controlling Area
                     S_BUKRS FOR COOI-BUKRS NO-EXTENSION NO INTERVALS,
                                           " Company code
                     S_GJAHR FOR COOI-GJAHR NO-EXTENSION NO INTERVALS,
                                           " Fiscal Year
                     S_OBJNR FOR RKPLN-AUFNR MATCHCODE OBJECT ORDE,
                                                            " Internal order
                     S_SAKTO FOR COOI-SAKTO MATCHCODE OBJECT KART,
                                                              " Cost Element
                     S_BUDAT FOR COOI-BUDAT, " Debit Date
                     S_LIFNR FOR COOI-LIFNR. " Vendor
    SELECTION-SCREEN END OF BLOCK B1.
           S T A R T   O F   S E L E C T I O N                           *
    START-OF-SELECTION.
    *-- Read data
      PERFORM GET_DATA.
           E N D   O F   S E L E C T I O N                               *
    END-OF-SELECTION.
    *-- Process the data and prepare the output data
      PERFORM CALCULATE_FINAL_INFO.
    *--Display Report output
      PERFORM DISPLAY_REPORT.
          FORM CALCULATE_FINAL_INFO                                     *
        Process the data and prepare final internal table               *
    FORM CALCULATE_FINAL_INFO.
      DATA : L_OBJNR LIKE COOI-OBJNR.
      SORT IT_LFA1 BY LIFNR.
      DELETE ADJACENT DUPLICATES FROM IT_LFA1 COMPARING LIFNR.
      LOOP AT IT_COOI.
        L_OBJNR = IT_COOI-OBJNR+2(20).
        SHIFT L_OBJNR LEFT DELETING LEADING '0'.
        IF L_OBJNR IN S_OBJNR.
          READ TABLE IT_LFA1 WITH KEY LIFNR  = IT_COOI-LIFNR.
          IF SY-SUBRC EQ 0.
            IT_OUTTAB-NAME1 = IT_LFA1-NAME1.
          ENDIF.
          MOVE-CORRESPONDING IT_COOI TO IT_OUTTAB.
          CLEAR IT_OUTTAB-OBJNR.
          IT_OUTTAB-OBJNR = L_OBJNR.
          APPEND IT_OUTTAB.
          CLEAR IT_OUTTAB.
          CLEAR IT_LFA1.
          CLEAR L_OBJNR.
        ENDIF.
      ENDLOOP.
    ENDFORM.
    *&      Form  GET_DATA
         Fetch the Data from the table COOI and LFA1
    FORM GET_DATA.
      SELECT OBJNR
            SAKTO
            MEGBTR
            MEINH
            WKGBTR
            REFBN
            RFPOS
            SGTXT
            BUDAT
            LIFNR
            FROM COOI
            INTO TABLE IT_COOI
            WHERE   BUDAT IN S_BUDAT
            AND LIFNR IN S_LIFNR
            AND KOKRS IN S_KOKRS
            AND BUKRS IN S_BUKRS
            AND GJAHR IN S_GJAHR
            AND SAKTO IN S_SAKTO.
      IF SY-SUBRC EQ 0 .
    Get the Vendor name from LFA1
        SELECT LIFNR
               NAME1
               FROM LFA1
               INTO TABLE IT_LFA1
               FOR ALL ENTRIES IN IT_COOI
               WHERE LIFNR EQ IT_COOI-LIFNR.
      ELSE.
        MESSAGE I999 WITH TEXT-013.
      ENDIF.
    ENDFORM.                               " GET_DATA
    *&      Form  DISPLAY_REPORT
           Display the output
    FORM DISPLAY_REPORT.
      PERFORM BUILD_CATALOG.
      PERFORM FRM_PREPARE_EVENT_LIST TABLES IT_EVENTS.
      IF NOT IT_OUTTAB[] IS INITIAL.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
             EXPORTING
                  I_CALLBACK_PROGRAM      = V_REPID
                  I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
                  IT_FIELDCAT             = IT_FLDCAT
                  IT_SORT                 = IT_SORT
                  IT_EVENTS               = IT_EVENTS
             TABLES
                  T_OUTTAB                = IT_OUTTAB
             EXCEPTIONS
                  PROGRAM_ERROR           = 1
                  OTHERS                  = 2.
      ELSE.
        MESSAGE I999 WITH TEXT-013.
      ENDIF.
    ENDFORM.                               " DISPLAY_REPORT
    *&      Form  BUILD_CATALOG
          Build the Field catalog for the ALV Report
    FORM BUILD_CATALOG.
      DATA: V_INDEX LIKE SY-TABIX.
      V_REPID = SY-REPID.
      DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME         = V_REPID
                I_INTERNAL_TABNAME     = 'IT_OUTTAB'
                I_INCLNAME             = V_REPID
           CHANGING
                CT_FIELDCAT            = IT_FLDCAT
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE IT_FLDCAT WITH KEY FIELDNAME = 'WKGBTR'
                             TABNAME = 'IT_OUTTAB' INTO WA_FLDCAT.
      IF SY-SUBRC  EQ 0.
        WA_FLDCAT-DO_SUM  = 'X'.
        MODIFY IT_FLDCAT FROM WA_FLDCAT INDEX SY-TABIX.
      ENDIF.
      READ TABLE IT_FLDCAT WITH KEY FIELDNAME = 'OBJNR'
                                TABNAME =  'IT_OUTTAB' INTO WA_FLDCAT.
      IF SY-SUBRC EQ 0.
         WA_FLDCAT-SELTEXT_L = 'Order'.
         WA_FLDCAT-COL_POS = 1.
         WA_FLDCAT-DDICTXT = 'L'.
        MODIFY IT_FLDCAT FROM WA_FLDCAT INDEX SY-TABIX.
      ENDIF.
      LS_SORT-FIELDNAME = 'OBJNR'.
      LS_SORT-SPOS      = 1.
      LS_SORT-UP        = 'X'.
      LS_SORT-SUBTOT    = 'X'.
      APPEND LS_SORT TO IT_SORT.
    ENDFORM.                               " BUILD_CATALOG
    *&      Form  FRM_PREPARE_EVENT_LIST
          Build the Events
    FORM FRM_PREPARE_EVENT_LIST TABLES IT_EVENTS TYPE SLIS_T_EVENT.
      CLEAR GS_EVENT.
      GS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      GS_EVENT-FORM = 'TOP_OF_PAGE_REPORT'.
      APPEND GS_EVENT TO IT_EVENTS.
    ENDFORM.                               " FRM_PREPARE_EVENT_LIST
         TOP OF PAGE
    FORM TOP_OF_PAGE_REPORT.
      CALL FUNCTION 'Z_YREPORT_HEADER'
           EXPORTING
                DL_TITLE = SY-TITLE
                DL_REPID = SY-CPROG
                DL_LINSZ = SY-LINSZ
           EXCEPTIONS
                OTHERS   = 1.
    ENDFORM.                               " FRM_TOP_OF_PAGE_REPORT
    *&      Form  USER_COMMAND
      Drill Down Functionality to Call the Transaction ME23
    FORM USER_COMMAND USING    P_UCOMM    LIKE SY-UCOMM
                               P_SELFIELD TYPE SLIS_SELFIELD.
      DATA : L_INDEX LIKE SY-INDEX,
             L_REFBN LIKE COOI-REFBN.
      L_INDEX = P_SELFIELD-TABINDEX.       " holds the selected table index
      CLEAR L_REFBN.
      CASE P_UCOMM.
    *-- On Double Click
        WHEN '&IC1'.
          CLEAR L_REFBN.
    *-- Read the Current Line
          READ TABLE IT_OUTTAB INDEX L_INDEX.
          IF SY-SUBRC EQ 0.
            L_REFBN = IT_OUTTAB-REFBN.
            IF NOT L_REFBN IS INITIAL.
    *-- Set the BES Paramater Id to the Current line Purchase Order Number
              SET PARAMETER ID 'BES' FIELD L_REFBN.
    *-- Call the Transaction Purchase Order Display with the above PO Number
              CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
            ENDIF.
          ELSE.
            MESSAGE E999 WITH TEXT-014.
          ENDIF.
      ENDCASE.
    ENDFORM.                               " USER_COMMAND

  • I am not getting the headings of the fields in ALV output.

    I am not getting ALV out put but  the headings of the fields in ALV output.
    Please see my below code .
    TYPES : BEGIN OF ty_zgxmit.
              INCLUDE STRUCTURE zgxmit.
    TYPES : END OF ty_zgxmit.
    DATA : gt_zgxmit TYPE TABLE OF ty_zgxmit.
    *&      Form  alv_display                                              *
    This subroutine is to display the out put in ALV.                    *
    FORM alv_display .
    Local data
      DATA: y_x          LIKE boole  VALUE 'X'.
    DATA: lt_fieldcat  TYPE slis_t_fieldcat_alv.
      DATA: lf_fieldcat  TYPE slis_fieldcat_alv.
      DATA: lh_index     LIKE lf_fieldcat-col_pos.
    For variant
    DATA: ws_repid LIKE sy-repid,
          g_save TYPE c VALUE 'A',
          g_exit TYPE c,
          g_variant LIKE disvariant,
          gx_variant LIKE disvariant.
      For 1st field.( RPT_LOC )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'RPT_LOC'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'RPT_LOC'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 2nd field.( BAL_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'BAL_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'BAL_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 3rd field.( INC_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'INC_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'INC_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 4th field.( Z500_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'Z500_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'Z500_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program       = 'ZJV_2245'
                it_fieldcat              = lt_fieldcat
           TABLES
                t_outtab                 = gt_zgxmit
           EXCEPTIONS
                program_error            = 1
                OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " alv_display

    You can force the headings like so.
    CLEAR lf_fieldcat.
    lf_fieldcat-fieldname = 'RPT_LOC'.
    lf_fieldcat-tabname = 'GT_ZGXMIT'.
    lf_fieldcat-ref_tabname = 'RPT_LOC'.
    lf_fieldcat-ref_fieldname = 'ZGXMIT'.
    lf_fieldcat-reptext_ddic  = 'Whatever Heading'.    "<-  Right here
    lh_index = lh_index + 1.
    lf_fieldcat-col_pos = lh_index.
    lf_fieldcat-key = y_x.
    lf_fieldcat-no_sum = y_x.
    APPEND lf_fieldcat TO lt_fieldcat.
    Regards,
    Rich Heilman

  • How to display the fields in ALV Output without using Field catalog?

    How to display the fields in ALV Output without using Field catalog?
    Could you pls tell me the coding?
    Akshitha.

    Hi,
    u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
    data: itab type table of mara.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = itab
    CHANGING
    ct_fieldcat = lt_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    *Pass that field catalog into the fillowing FM
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_grid_title            = 'REPORTING'
                is_layout              = gt_layout
                it_fieldcat             = lt_fieldcat[]
           tables
                t_outtab                = itab.

  • HOW TO READ THE EDITABLE FIELD IN ALV

    CAN ANYONE HELP ME IN READING THE EDITABLE FIELD IN ALV.
    I AM DOING THE FOLLOWING.
    BUT STILL THE EDITABLE FIELD IN NOT READ.
    WHEN 'EXE' OR 'EXEC'.
      LOOP AT I_RB1 INTO L_WA_STRU.
      L_WA_STRU-LIFSK = L_WA_STRU-LIFSK1.
      MODIFY I_RB1 FROM L_WA_STRU.
      CLEAR L_WA_STRU.
      ENDLOOP.
    I_RB1 IS MY TABLE WHICH I PASSED IN TABLES OF REUSE_ALV_GRID_DISPLAY.LIFSK1 IS MY EDITABLE FIELD.
    AND LIFSK IS THE FIELD WHERE THE DATA SHOULD GET TRANSFERRED WHEN I HIT EXECUTE BUTTON.

    DATA: lt_display LIKE TABLE OF gt_display.
      REFRESH lt_display.
      CLEAR lt_display.
      lt_display[] = gt_display[].
      CLEAR ref_grid.
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
      IF NOT ref_grid IS INITIAL.
        CALL METHOD ref_grid->check_changed_data.
      ENDIF.
      IF lt_display[] NE gt_display[].
        gv_tosave = 'X'.
      ENDIF.
    Check this program. It will help you. 
    awrd points if helpful
    Bhupal

  • Displaying no default zeroes for the numeric field in the table display.

    hi folks,
         I am binding a table in the context which has some numeric fields. I'm  displaying the same table which has some records for editing purpose. But the problem is that the numeric  field column is being displayed with zeros if it doesnot have any value in it. Can u explain how to disable the zeroes by not displaying them by defualt when there is no value for the numeric field.
    regards,
    Ramu

    set the format of the context attribute TEST is the context attribute name
    data: lr_info type ref to if_wd_context_node_info.
    data: ls_prop type WDY_ATTRIBUTE_FORMAT_PROP.
    lr_info = wd_context->get_node_info( ).
    ls_prop = lr_info->GET_ATTRIBUTE_FORMAT_PROPS( name = 'TEST' ).
    LS_PROP-NULL_AS_BLANK = 'X'.
    lr_info->sET_ATTRIBUTE_FORMAT_PROPS( name = 'TEST'
                 FORMAT_PROPERTIES = ls_prop ).
    Abhi

  • Co41 enhancement for add field in ALV output

    I must add a custom filed to ALV output of transaction CO41 and i trying to use all the 25 enhancements provided (that i find in other post CO41- Enhancement ), but i haven't found any way to get the desired results.
    Can any body help me?
    Thanks in advance.

    Hi,
    I had the same requirement to add a custom field to ALV output of transaction CO41.
    1. I first added the custom field to an new append-structure to the structure SFC_POCO.
    2. Then i added this field to the Dynpro-Screen 200 in the function-group COUP (by choosing the table control, pressing F6 and then adding the custom field of SFC_POCO).
    3. At last i added an Enhancement to the function CO_UP_PLANNED_ORDERS_SELECT and filled my custom field with data there.
    Please reward if useful.
    Regards,
    Henry

  • How to pass custom search help(F4 help) for a field in ALV output?

    Hi,
    I want to activate the F4 help in ALV output for a field for which we do not have search help assigned at table ,data element and domain level.
    In field catalog i have enabled it by below line.
    ls_fcat-F4AVAILABL = 'X'.
    but because there are no standard input help available it is giving message as "No input help is available".
    so how to pass our custom search help (g_search) for any field in ALV output.
    I am using object oriented ALV grid display.
    Thanks!!!
    Rajesh Gupta.

    hi,
    check this out:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/acdefb13-0701-0010-f1a2-8eeefa7d3780
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d?quicklink=index&overridelayout=true

  • Output in alv -- sum on the particular field

    Dear Freinds,
                     I have developed a report using a ALV grid . The output i having the fields
    as
    orgunit        orgdesc  count    name    salary      total salary.
    1234          test1                    raja       100          1200
                                         2     rama      200         2400
                                                             300         3600  -> i want count 2 in this line
    1235          test 2             1    rana       500         6000
                                                             500          6000 -> i want count 1 in this line
    Can i give the Count 1  and 2   in the same row where the   Totals --- 500 and 6000
    and 300 and 3600  are being displayed int he above row ?
    the user says he want to have the count in the down along witht he total's lline
    the count is not a now a currency field i tried to sum it is not summing because it is
    NUM data type.
    As per the above data(sample data) we can see that Orgunit(1234) is having two employees  hence the count was two .  For the Orgunit(1235) we have only one employee the count was only one . Nowe my question is can i give the  counts 2 in the first row and the count 1 in the second rown can give along with the total.........line ...
    if so what i can do the change in the field cat.
    When iam using in my field cat  for  getting the output as above
    CLEAR ls_fieldcat.
      ls_fieldcat-col_pos      = 0.
      ls_fieldcat-fieldname    = 'ORGUNIT'.
      ls_fieldcat-seltext_l    =  text-015.  "'Orgunit'.
      ls_fieldcat-key          = 'X'.
      ls_fieldcat-key_sel      = 'X'.
    ls_fieldcat-no_out       = 'X'.
      APPEND ls_fieldcat TO fp_i_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-col_pos      = 1.
      ls_fieldcat-fieldname    = 'ORGTEXT'.
      ls_fieldcat-seltext_l    = text-016.   "'Orgdesc'.
    ls_fieldcat-no_out       = 'X'.
      APPEND ls_fieldcat TO fp_i_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-col_pos      = 2.
      ls_fieldcat-fieldname    = 'COUNT'.     ---This is data type Numc
      ls_fieldcat-seltext_l    = 'H.Count'.
      ls_fieldcat-outputlen    = 4.
      ls_fieldcat-do_sum       = 'X'.   -
    > it is not getting summed up
    ls_fieldcat-datatype    = 'NUMC'.
      APPEND ls_fieldcat TO fp_i_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-col_pos      = 3.
      ls_fieldcat-fieldname    = 'STAFFNAME'.
    ls_fieldcat-no_out      = 'X'.
      ls_fieldcat-seltext_l    = 'Name'.
      APPEND ls_fieldcat TO fp_i_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname   = 'SALARY'.
      ls_fieldcat-seltext_m   = 'Salary'.
      ls_fieldcat-col_pos     = 4.
      ls_fieldcat-outputlen   = 17.
      ls_fieldcat-do_sum      = 'X'.
      ls_fieldcat-datatype    = 'CURR'.
      APPEND ls_fieldcat TO fp_i_fieldcat.
      CLEAR  ls_fieldcat.
      ls_fieldcat-fieldname    = 'TOTAL'.
      ls_fieldcat-seltext_m    = 'Total Salary'.
      ls_fieldcat-col_pos      = 5.
      ls_fieldcat-outputlen    = 17.
      ls_fieldcat-do_sum       = 'X'.
      ls_fieldcat-datatype     = 'CURR'.
      APPEND ls_fieldcat TO fp_i_fieldcat.

    Dear Kiran,
    iam seding the alv output which i got can you please correct my code
    where i can give .........since my basic question was the Count which iam
    getting in the below  is 2 (data type NUM4) how can i do sum on this 2 or subtotal??
    i want  the count 2  to come in the total....line  only ..can you please let me know what is the parameter i have to use ........i couldnt find the
    Aggregation in my tool bar...
    orgunit orgdesc count name salary total salary.
    12345    test             raja 100
    space   space      2 rama 200 
    300  -> i want count 2 in this line
    1235 test 2 1 rana 500 
    500 6000 -> i want count 1 in this line
    Can i give the Count 1 and 2 in the same row where the Totals --- 500 and 6000
    and 300 and 3600 are being displayed int he above row ?
    the user says he want to have the count in the down along witht he total's lline
    the count is not a now a currency field i tried to sum it is not summing because it is
    NUM data type.
    As per the above data(sample data) we can see that Orgunit(1234) is having two employees hence the count was two . For the Orgunit(1235) we have only one employee the count was only one . Nowe my question is can i give the counts 2 in the first row and the count 1 in the second rown can give along with the total.........line ...
    if so what i can do the change in the field cat.
    When iam using in my field cat for getting the output as above
    CLEAR ls_fieldcat.
    ls_fieldcat-col_pos = 0.
    ls_fieldcat-fieldname = 'ORGUNIT'.
    ls_fieldcat-seltext_l = text-015. "'Orgunit'.
    ls_fieldcat-key = 'X'.
    ls_fieldcat-key_sel = 'X'.
    ls_fieldcat-no_out = 'X'.
    APPEND ls_fieldcat TO fp_i_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-col_pos = 1.
    ls_fieldcat-fieldname = 'ORGTEXT'.
    ls_fieldcat-seltext_l = text-016. "'Orgdesc'.
    ls_fieldcat-no_out = 'X'.
    APPEND ls_fieldcat TO fp_i_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-col_pos = 2.
    ls_fieldcat-fieldname = 'COUNT'. ---This is data type Numc
    ls_fieldcat-seltext_l = 'H.Count'.
    ls_fieldcat-outputlen = 4.
    ls_fieldcat-do_sum = 'X'. -
    > it is not getting summed up
    ls_fieldcat-datatype = 'NUMC'.
    APPEND ls_fieldcat TO fp_i_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-col_pos = 3.
    ls_fieldcat-fieldname = 'STAFFNAME'.
    ls_fieldcat-no_out = 'X'.
    ls_fieldcat-seltext_l = 'Name'.
    APPEND ls_fieldcat TO fp_i_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-fieldname = 'SALARY'.
    ls_fieldcat-seltext_m = 'Salary'.
    ls_fieldcat-col_pos = 4.
    ls_fieldcat-outputlen = 17.
    ls_fieldcat-do_sum = 'X'.
    ls_fieldcat-datatype = 'CURR'.
    APPEND ls_fieldcat TO fp_i_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-fieldname = 'TOTAL'.
    ls_fieldcat-seltext_m = 'Total Salary'.
    ls_fieldcat-col_pos = 5.
    ls_fieldcat-outputlen = 17.
    ls_fieldcat-do_sum = 'X'.
    ls_fieldcat-datatype = 'CURR'.
    APPEND ls_fieldcat TO fp_i_fieldcat.

  • Disappears pattern while clicks on the numeric field

    Hi
    I added the pattern to dipaly $ with numeric values . But when i opened the PDF and clicks the field it disappears pattern and it shows the value without $. then once i moved some other place again it working fine .
    Here the Field type is Readonly . But its working fine while testing LC designer and the problem in the PDF which is generated separately from server .
    Please suggest how to aviod the disappear pattern .

    Hi
    I am not usingText Box .
    In My case i am using table with ROW and column . This row will dynamically grow based on the Values from XML.
    Here one of the the column nothing but cell needs to display Numeric values with dollar and comma.
    So i made the
    cell type into Numeric filed
    Pattern num{($zzz,zzz,zz9)}
    and the value type is readonly .
    But here the issue is ,
    When i clicks in the cell the pattern got disapperas . (Only in Adobe Reader )
    E. G  value -1000
    displays - $,1000 but when i clicks in the cell 1000
    Is any change needs to do in Table or Row. Please let me know.
    Question 2 :
    Problem in Dynamic PDF (dispalying the values from XML )
    Here i am having one more doubt . when we made readonly still i am able to click (not able to Edit thats fine )and mouse pointer still blinking there.
    But same PDF if you opened in the acrobat PRo . you cant able to click . why any reason

  • Using LOV with Validation on the Numeric Fields results in Error

    Dear JHeadstart Team,
    During my work with lov I encountered another problem. I defined a lov and attached the lov to a numeric field and check the LOV for validation. Now when I use LOV using the LOV button it works fine but when I enter some numbers and then press tab the LOV was not shown correctly and resulted in the following errors and the worst thing is that you can not navigate to any other pages and all try to navigate to other pages results in errors too. When we put the same LOV on a string field (which is not desirable for us) it worked fine.
    It seems to me like a bug. Am I right? Is ther any solution or workaround for this problem?
    Thanks in advance,
    Navid
    16:31:29 DEBUG (LovItemBean) -Cleared value of item HrTrainingCourseSchedulesTitle
    16:31:29 DEBUG (LovItemBean) -Cleared value binding #{bindings.HrTrainingCourseSchedulesTitle.inputValue} of item HrTrainingCourseSchedulesTitle
    16:31:29 ERROR (ApplyRequestValuesPhase) -java.lang.ClassCastException: java.lang.Long
    javax.faces.el.EvaluationException: java.lang.ClassCastException: java.lang.Long
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
         at oracle.adf.view.faces.component.UIXComponentBase.__broadcast(UIXComponentBase.java:1079)
         at oracle.adf.view.faces.component.UIXEditableValue.broadcast(UIXEditableValue.java:247)
         at oracle.adf.view.faces.component.UIXSelectInput.broadcast(UIXSelectInput.java:215)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:249)
         at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:307)
         at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at com.pooya.controller.jsf.PooyaAuthenticationFilter.doFilter(PooyaAuthenticationFilter.java:256)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassCastException: java.lang.Long
         at oracle.jheadstart.controller.jsf.bean.LovItemBean.validateWithLov(LovItemBean.java:101)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         ... 31 more

    Hi Navid,
    We ran into the same bug and have the next workaround for it:
    We extended the JHeadstart class 'LovItemBean' and we have overridden the method 'validateWithLov(...)' with:
      public void validateWithLov(ValueChangeEvent valueChangeEvent)
        Object newValue = valueChangeEvent.getNewValue();
        if(newValue != null && !(newValue instanceof String))
          newValue = newValue.toString();
          ValueChangeEvent newEvent = new ValueChangeEvent(valueChangeEvent.getComponent(), valueChangeEvent.getOldValue(), newValue);
          newEvent.setPhaseId(valueChangeEvent.getPhaseId());
          super.validateWithLov(newEvent);
        else
          super.validateWithLov(valueChangeEvent);
      }Next step is to use a custom template in your JHeaedstart Application Structure file for 'LOV_ITEM_BEAN'. In this custom template you should use your own class as 'managed-bean-class' instead of the default JHeadstart one.
    Now you can safely generate LOV with validation of number fields.
    Maybe something the JHeadstart can pcik up in the next release of JHeadstart :-)
    Hope this helps.
    Pascal

Maybe you are looking for

  • How can I print multiple pdf files?

    Some of the pdf documents we work with are are architectural plans. One file might contain several pages or it might contain just one. Typically we will print several files at a time, either by opening each or just dragging to the printer. A frustrat

  • Does photoshop 12 work on Windows 8.1 x64 (version 6.3)?

    or will i need photoshop 13?

  • Customer non service

        I called in yesterday to discuss the charging issue with my incredible. The first tech was very concerned and even called HTC to discuss the problem, I spoke directly with the HTC rep and she confirmed that there was a known charging issue with t

  • Syncing I Touch and Using the Home Sharing

    I have 2 questions. Yesterday I tried to sync my iTouch with my computer upstairs, but somehow it gave me a 'USB not connected.' (Of course, it was the first time, after a great while, to sync my itouch after I've download so much stuff to the iTouch

  • Erasing and installing Mac OS 10.5.8

    I have just had to erase my hard drive and reinstall Mac OS 10.5.8. It has been transferring files from my external hard drive and seems to be stuck on "Transferring files to support applications - Less than one minute remaining" for 8 hours (overnig