Field output trancated regardless of the field length assigned

i have assigned 1000 characters to the output field in the output structure. Now in the report output, the field only displays upto 128 characters, it doesnt go beyond that. what could be the cause of this. Even when i put it on debug mode, this field is reading data by concatenating diffrent fields, but the concatenation goes only up to 128 characters, after that it does not concatenate further.

hi,
this is how my code reads:
data: t_descript like tline-tdline occurs 0,
      wa_descript like tline-tdline.
data: begin of itab occurs 0.
        include structure zhap_s_alv_reporting_pms_rej.
data: end of itab.
-------zhap_s_alv_reporting_pms_rej - notes = 1000 char
loop at t_descript into wa_descript.
        if use_flag = 'X'.
          if not wa_descript is initial.
            concatenate itab-notes wa_descript
                                       into itab-notes separated by space.
          endif.
        endif.
        if wa_descript = 'Below are the comments'.
          use_flag = 'X'.
        endif.
      endloop.
t_descript returns 6 lines of (67, 71, 33, 74, 76, 37 characters)
Edited by: Lorato Ludo Kenosi on Mar 14, 2011 12:17 PM
Edited by: Lorato Ludo Kenosi on Mar 14, 2011 12:20 PM

Similar Messages

  • What is the field to be used in the field catalog

    hi
    what is the field to be used in the field catalog of an ALV report to hide the relevant column inthe list

    hi,
    if you want to hide a particular column dont specify it in output list. it wont be displayed then.
    or if you want to display that column when particular radio button is selected then use:
    if radi1 = 'x'.
    Order Number
      wa_fldcat-fieldname     = 'AUFNR'.
      wa_fldcat-col_pos       =  l_pos.
      wa_fldcat-scrtext_s = 'Order'.
      wa_fldcat-scrtext_m = 'Order'.
      wa_fldcat-scrtext_l = 'Order'.
      APPEND wa_fldcat TO it_fldcat.
      CLEAR wa_fldcat.
      l_pos = l_pos + 1.
    endif.

  • Entry in field Funds Center required; check the field control Mg No.FMEF010

    Hi,
    We have a Z tcode for converting planned order to purchase requisition.
    We use Account assignment P - Project and A - Asset.
    We have WBS element and fund center linked to it.
    For the Z tcode while converting Planned order to purchase requisition we are getting below error
    Error: Entry in field Funds Center required; check the field control Msg No.FMEF010
    While creating manually purchase requisition with same GL code and WBS element the fund center gets automatically picked.
    Can anyone pls let me know in which table we can find the link between WBS element and fund center so that we can code the same in our program. In PRPS table we can find the link between WBS and profit center.
    Or is there any user exit that can be used.
    Thanks in advance.
    Regards,
    Radha

    Hello
    If you do a F1 in the value date field it will give you the answer - The value date is used in bank accounts and bank sub-accounts.
    As regards the other query check whether the tax code has been already created.
    Hope it helps.
    Rgds

  • How to put an asterisk in the field label rather than on the field in Infopath

    For a mandatory field in Infopath, we know that the red asterisk shows up always on the control. Is there a way we can make it appear on the label instead. 
    In the figure below, can we have the red asterisk on the label where ? symbol is present ?

    Hi Prajk,
    From your description, my understanding is that you want to put an asterisk in the field label rather than on the field in Infopath.
    By default, the asterisk is on the field, not the field label. If you want to put an asterisk in the field label, per my knowledge, you need to develop the column to do it.
    For developing InfoPath controls, I suggest you create a new thread on Visual Studio Tools for Office forum, more experts will assist you with Office development.
    VSTO:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsto
    Thanks,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Trouble with field output conversion when activating the Adobe Forms

    Hi everybody,
    I'm facing an issue very strange.
    I made an interactive form for a customer which is based on abap dictionnary and send by e-mail to user. This form works fine and is in Production system .
    Now i made an evolution on this form and when i activate the forms in SAP , all the field conversion are lost so when i got the form Date fields appears with 00000000 if they are empty.
    To solved this issue in Development system , i delete the form and recreate it and that's have been sold .
    Now this issue appears in Quality system also after transport it...so i try to do the same way to solve it ...i create one transport order where the forms is deleted and another one to recreate it ..but the issue still alive.
    I search on OSS and don't find any notes for this .
    This issue also appears on aonther forms which is not interactive one ( purchase order printout ) .
    I work on ECC 6.0 with AdobeLifeCycle Designer ES 2
    Does anybody face this issue and solved it ?
    Regards

    Ok i will try to explain more clearly because i think there's a misunderstanding .
    When you define an interface of Adobe forms you can choose between DDIC interface or XML interface. When you chose DDIC interface when you generate the form all necessary SAP CONVERSION EXIT are use when value are given to the XML file .
    For example i got a field type datum define in my interface which is based on DDIC .
    I place this field in the layout and set the edit mask in the layout with 'YYYY/MM/DD' for example.
    Now i execute the forms and give value '00000000' to the field, normally what should appears in the result is : nothing because it's an initial value.
    But in my case the value appears as '00000000' , the edit mask in the form is not taking into account and the conversion of value inside ABAP Stakc is not done.
    When you have a look inside the function module generated by the form, you will fin a routine which name is %WORK and inside it you will see a routine which is %OUTPUT which is call for each field you want to print in the form .
    If my field is correctly output on the form the data type is givent to this routine in order to make it correct and until now everuthnigs looks good for me but my issue is that the data type of field are not given to this routine so it consider each field as simple TEXT and that wrongs.
    juste bellow the code generated for the routine %OUTPUT
    form %output using p_name      type fpfield
                       p_value     type any
                       p_datatype  type datatype_d
                       p_abap_type type c
                       p_reffield  type fpunit
                       p_unit      type any
                       p_edit_mask type convexit.
      case p_abap_type.
        when cl_abap_typedescr=>typekind_struct1 or
             cl_abap_typedescr=>typekind_struct2 or
             cl_abap_typedescr=>typekind_table.
    *     ignore
        when others.
          call function 'FPCOMP_WRITE_DATA_FIELD'
            exporting
              i_field_name   = p_name
              i_value        = p_value
              i_ddic_type    = p_datatype
              i_data_type    = p_abap_type
              i_edit_mask    = p_edit_mask
              i_ref_name     = p_reffield
              i_ref_value    = p_unit
            exceptions
              usage_error    = 1
              system_error   = 2
              internal_error = 3
              others         = 4.
          %fpcomp_error.
      endcase.
    endform.                    "%output
    is it more clear now ?
    Regards

  • Preserving a field's value on changing the field access parameter?

    I have a form that has a number of fields that are set to "protected" and have calculation scripts on them. If the user selects a specific radio button option elsewhere, the form sets the .access parameter to "open" and disables the calculation so that the user can enter whatever they want into those fields. The problem arises when the user imports XML data via Acrobat. The radio button choice is made (since it is bound to an element in the schema), but when the form changes the access parameter of the fields to "open", it fires the calculate event on the fields and we lose the value assigned to those fields from the imported XML.
    Is there any way to preserve the fields value when it changes from "protected" to "open"? Here is an example PDF w/ XSD.
    The more I dig into this the more I think this might be an issue with calculate.override not disabling the calculations on a field, even when it is set to "open" - at least until the user manually edits that field.

    Ok, worked out a solution. It's specific to my application, but maybe someone else will get something out of it. What I did is moved the calculation script from the field I am changing the access parameter of (call it "Field A") to the fields that feed into that field (call them "Field B" and "Field C"). Now, when the user triggers the exit events on B and C, each one fires a script that updates the value of A. For my application, this works only because B and C are hidden from the use if they toggle the radio button allowing them to manually enter A.
    Basically, instead of A pulling values from B and C to calculate it's value, B and C check each other and push values to A.

  • Using chars entered in field in FMS invoked on the field

    Hi
    I have an FMS linked to a field. Basically, works perfect.
    I now want to be able to enter some chars before invoking the FMS (Shift+F2) and using the entered chars to narrow down the results (.. WHERE ... 'chars').
    Can somebody help me on getting this together?
    How can I use the chars in the field in the FMS?
    Thanks
    Franz

    Query:
    SELECT T1.DocNum AS 'PA-Nummer', T1.ItemCode AS 'Artikelnummer', T1.U_SIA_Rev AS 'Revision', T0.ItemName AS 'Artikelbeschreibung', T1.PlannedQty AS 'Planmenge', T1.CmpltQty AS 'Fertigmenge' FROM  [dbo].[OITM] T0 ,  [dbo].[OWOR] T1  WHERE T0.ItemCode = T1.ItemCode  AND  T1.Status <> N'L'
    This query is linked as FMS (Shift+F2) to the field DocNum in the production order. Basically works and I get a list of the open orders only from which i can chose to open.
    I now want to enter part of the ItemCode (AVB for instance) before invoking the FMS with Shift+F2 and the query should be added by something like:
    AND T1.ItemCode = +AVB+
    I just don't know I get the string entered into the query.
    Franz

  • ALV output problem in displaying the field lengths.( LONG_DES1 & LONG DES)

    I have  declared itab of ALV output like below...
    Internal table for ALV report generation***********
    DATA : Begin of pdet_otab_alv occurs 0,
            bukrs LIKE bsid-bukrs, "Company code
            postm(4),              "Posting month (YYMM format)
            xblnr LIKE bsid-xblnr, "Reference document number
            kunnr LIKE bsid-kunnr, "Customer (Supplier Billing Customer)
            name1 LIKE kna1-name1,                              "Name 1
            buzei like bsid-buzei,
            gjahr like bsid-gjahr,
            filkd like bsid-filkd, "Rep Number
            rname like kna1-name1, "Rep Name
            belnr LIKE bsid-belnr, "Document number (invoice number)
            blart LIKE bsid-blart, "Document type
            zfbdt LIKE bsid-zfbdt, "Baseline date
            zterm LIKE knb1-zterm, "Terms
            netdt LIKE bsega-netdt,"Due date
            sgtxt LIKE bsid-sgtxt, "Text
            agerg TYPE t_agerg,    "Age range of invoice
            wrbtr LIKE bsid-wrbtr, "Original invoice amount
            due   LIKE bsid-wrbtr, "Amount outstanding on invoice
           long_des(250) type c,   " Long description
    <b>            long_des  TYPE string,
                long_des1 TYPE string,</b>      
          date_s(10) type c,  " Date
            short_des(20) type c,  " Short Description
            counter type i,
           End of pdet_otab_alv.
    And after filling the internal table fields ( fields 'LONG_DES1' & 'LONG_DES'  from FM READ_TEXT 's longtext, which are  of 265 chars each )
    <b>'LONG_DES1' & 'LONG_DES' are trimmed  in ALV out put  WHY ?</b>
      w_fieldcat-fieldname = 'LONG_DES1'.
      w_fieldcat-tabname   = 'PDEL_OTAB_ALV'.
    w_fieldcat-ref_fieldname = 'SCRTEXT_L'.
    w_fieldcat-ref_tabname   = 'DD03P'.
      w_fieldcat-seltext_l = 'Original Note'.
      w_fieldcat-col_pos   = 17.
      APPEND w_fieldcat TO fieldcat.
      CLEAR w_fieldcat.
      w_fieldcat-fieldname = 'LONG_DES'.
      w_fieldcat-tabname   =  'PDEL_OTAB_ALV'.
    w_fieldcat-ref_fieldname = 'SCRTEXT_L'.
    w_fieldcat-ref_tabname   = 'DD03P'.
      w_fieldcat-seltext_l = 'Latest Note'.
      w_fieldcat-col_pos   = 18.
      APPEND w_fieldcat TO fieldcat.
      CLEAR w_fieldcat.
    <b>next part i.e.,   before passing fieldcat.... I have filled s_layout like below.</b>
    <b>  s_layout-max_linesize = 1000.
      s_layout-colwidth_optimize = 'X'.</b>
    Call the following function to display output in ALV form
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program = 'ZFRSBOI0'
                is_layout          = s_layout
                it_fieldcat        = fieldcat
                it_events          = p_events[]
               it_sort            = p_it_sort[]
                i_save             = 'A'
           TABLES
                t_outtab           = pdet_otab_alv1
           EXCEPTIONS
                program_error      = 1
                OTHERS             = 2.
    If the function call is not successful, raise error message
    and come out from the program
      IF sy-subrc <> 0.
        message e000(00) with
                          'Unable to display report'(e01).
        exit.
      ENDIF.

    some body suggested me....we can display full length of text by below coding ?
    Is that not correct - just asking....
    s_layout-max_linesize = 1000.
    s_layout-colwidth_optimize = 'X'.
    Call the following function to display output in ALV form
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = 'ZFRSBOI0'
    is_layout = s_layout
    it_fieldcat = fieldcat
    it_events = p_events[]
    it_sort = p_it_sort[]
    i_save = 'A'
    TABLES
    t_outtab = pdet_otab_alv1
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    If the function call is not successful, raise error message
    and come out from the program
    IF sy-subrc <> 0.
    message e000(00) with
    'Unable to display report'(e01).
    exit.
    ENDIF.

  • Query a dataset in MS SQL Server Report Builder and get splitted output of one of the fields

    Hi experts,
    I have a dataset in MS SQL Server Report Builder containing some rows like the following:
    FIELD-1
    FIELD-2
    FIELD-3
    1
    efgh
    xjhg[R]ztazutsuz[R]9
    2
    abcd
    1234[R]abcd[R]5678
    What I need is:
    FIELD-1
    FIELD-2
    FIELD-3
    1
    efgh
    xjhg
    1
    efgh
    ztazutsuz
    1
    efgh
    9
    2
    abcd
    1234
    2
    abcd
    abcd
    2
    abcd
    5678
    Can this be done?
    I'll be very happy when one finds a solution.
    Kind regards,
    Peter

    try like this..
    Declare @ta table ([FIELD-1] int, [FIELD-2] nvarchar(100), [FIELD-3] nvarchar(100))
    insert into @ta
    select 1, 'efgh', 'xjhg[R]ztazutsuz[R]9' union all
    select 2, 'abcd', '1234[R]abcd[R]5678'
    select t.[FIELD-1],t.[FIELD-2], a.b.value('.','nvarchar(100)') as [FIELD-3] from @ta t
    Cross apply
    (select cast('<R><C>' + replace(t.[FIELD-3],'[R]','</C><C>')+ '</C></R>' as xml) as XStr ) x
    Cross apply x.xstr.nodes('R/C')a(b)
    Thanks,
    Saurabh 
    http://www.linkedin.com/in/sbhadauria http://www.experts-exchange.com/M_6313078.html

  • Abap Code to Repeat the field (3nos) Values for all the fields

    Hi Friends I have a Requirement to merge the Data for One of my BI - BCS model.
    I have fields in one table(/BIC/AZDBBCP_040) <b>business Num , PRCTR, REGION  and RELOCAT</b>  and Field ZAUD_TYP and Audit Year Zyear also in same table.
    But I want to reapeat this information Highlighted in Bold for all the Zaudtyp and ZYEAR. Please help me with the Code
    <b>Problem as below</b>
            BUSNUM  PRCTR  REGION  RELOCAT   ZAUD_TYP  ZYEAR
              101     22    ALAN      MN           
              101                                                                                GT(ZAUD_TYP)        1999(ZYEAR)
    101                                      BTE         2001
    102          25          CA        SFO          
               102                           LTE         2008
    Please help me with any Code to fix the problem so that the data repeat for PRCTR  REGION  RELOCAT  where Bus Num is same.
    Kindly Get me any ABAB Code . Will really be thankful to you
    Regards
    Soniya Kapoor
    soniya kapoor
    Message was edited by:
            soniya kapoor

    Hi Soniya,
    You can use one of the following:
    IF SOURCE_FIELDS-DATETO =  ' '.
    RESULT = '20990101'.
    ENDIF.
    or
    IF SOURCE_FIELDS-DATETO IS INITIAL.
    RESULT = '20990101'.
    ENDIF.
    or
    IF SOURCE_FIELDS-DATETO = '00000000'.
    " THERE WAS A SPACE IN YOUR CODE.
    RESULT = '20990101'.
    ENDIF.
    Regards,
    Satya

  • Have a form trying to edit.  Has a bunch of check boxes but also text fields.  I can move the fields and make them larger but I can't edit or move the text above the fields.  Like it says "Enter comments Below" and then there is a text field for them to e

    It looks like this:
    A. What can be done to improve performance?
    B.  What can be done by assessor to help performance?
    C. Comments?
    Issue is the text field below these items is not big enough.  When I make it bigger, like in "A" it gets bigger but then overlaps the text in "B" and I can't move the text.  Someone else created this form and I have no idea what A, B and C are but they are not Text Fields.  They are just static text of some sort and I can't do anything with it.

    Hi,
    Try making the subform that contains your fields flowed, this will allow them to not overlap, but you will probably have to add some margins (or some 'spacer' subforms) to get the appearance you had.
    Regards
    Bruce

  • Checking the field is null or not

    Hi Experts,
    I need to map if the field is not null,if the field is null i dont need to pass the value to target. is there any function to check this?
    Kind Regards,
    Kumar
    Message was edited by:
            praveen kumar

    Hi ;
    By null do you mean blank or the node itself is not comming in from sender.
    If its comming in as blank then you can achive this by User defined function
    Source field Trim UDF -- Target Field
    UDF
    if(SourceField.length()>0)
    return SourceField;
    Mudit
    Award points if it helps

  • ALV report using the field catalog

    which is the quickest way to generate an ALV report using the field catalog merge.  without needing to build the field catalog manually .
    is it easier to create a structure and passe it in the field catalog merge .  if yes can i have an example plzzzz

    hI
    Supports the creation of the field catalog for the ALV function modules
    based either on a structure or table defined in the ABAP Data
    Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its
    Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for
    rapid prototyping since the following restrictions apply:
    o Performance is affected since the code of the table definition must
    always be read and interpreted at runtime.
    o Dictionary references are only considered if the keywords LIKE or
    INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields
    are output in the list by default whereas the remaining fields are only
    available in the field selection.
    If the field catalog is passed with values, they are merged with the
    'automatically' found information.
    Below is an example ABAP program which will populate a simple internal table(it_ekpo) with data and
    display it using the basic ALV grid functionality(including column total). The example details the main
    sections of coding required to implement the ALV grid functionality:
                             Data declaration
                             Data retrieval
                             Build fieldcatalog
                             Build layout setup
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    *  fieldcatalog-do_sum      = 'X'.
    *  fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    *  gd_layout-totals_only        = 'X'.
    *  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
    *                                         "click(press f2)
    *  gd_layout-zebra             = 'X'.
    *  gd_layout-group_change_edit = 'X'.
    *  gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
    *            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
    *            i_callback_user_command = 'USER_COMMAND'
    *            i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
    *            it_special_groups       = gd_tabgroup
    *            IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
    *            is_variant              = z_template
           tables
                t_outtab                = it_ekko
           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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL

  • How to display subtotal in ALV, where the field is not a numeric.

    Hi
    We are having a requirement to display the sub total for a field using ALV grid display, where the field is not numeric.
    The field is characte, Status field(consists of values Submit, Approve ,Reject), where the subtotal should be value of count of group by status .
    say status with submit are 10 records, so after all records with submit status are, displyed, we need to display its subtotal as 10.
    Thanks & Advance

    Hi Satya,
    REPORT z_alv_subtotal.*&---------------------------------------------------------------------*
    *& Table declaration
    *&---------------------------------------------------------------------*TABLES: ekko.*&---------------------------------------------------------------------*
    *& Type pool declaration
    TYPE-POOLS: slis. " Type pool for ALV*&---------------------------------------------------------------------*
    *& Selection screen
    SELECT-OPTIONS: s_ebeln FOR ekko-ebeln.*&---------------------------------------------------------------------*
    *& Type declaration
    *&---------------------------------------------------------------------** Type declaration for internal table to store EKPO data
    TYPES: BEGIN OF x_data,
           ebeln  TYPE char30,  " Document no.
           ebelp  TYPE ebelp,   " Item no
           matnr  TYPE matnr,   " Material no
           matnr1 TYPE matnr,   " Material no
           werks  TYPE werks_d, " Plant
           werks1 TYPE werks_d, " Plant
           ntgew  TYPE entge,   " Net weight
           gewe   TYPE egewe,   " Unit of weight                          
           END OF x_data.*&---------------------------------------------------------------------*
    *& Internal table declaration
    DATA:* Internal table to store EKPO data
      i_ekpo TYPE STANDARD TABLE OF x_data INITIAL SIZE 0,
    * Internal table for storing field catalog information
      i_fieldcat TYPE slis_t_fieldcat_alv,
    * Internal table for Top of Page info. in ALV Display
      i_alv_top_of_page TYPE slis_t_listheader,
    * Internal table for ALV Display events
      i_events TYPE slis_t_event,
    * Internal table for storing ALV sort information
      i_sort TYPE  slis_t_sortinfo_alv,
      i_event TYPE slis_t_event.*&---------------------------------------------------------------------*
    *& Work area declaration
    *&---------------------------------------------------------------------*DATA:
      wa_ekko TYPE x_data,
      wa_layout     TYPE slis_layout_alv,
      wa_events         TYPE slis_alv_event,
      wa_sort TYPE slis_sortinfo_alv.*&---------------------------------------------------------------------*
    *& Constant declaration
    *&---------------------------------------------------------------------*CONSTANTS:
       c_header   TYPE char1
                  VALUE 'H',                    "Header in ALV
       c_item     TYPE char1
                  VALUE 'S'.*&---------------------------------------------------------------------*
    *& Start-of-selection event
    *&---------------------------------------------------------------------*START-OF-SELECTION.* Select data from ekpo
      SELECT ebeln " Doc no
             ebelp " Item
             matnr " Material
             matnr " Material
             werks " Plant
             werks " Plant
             ntgew " Quantity
             gewei " Unit
             FROM ekpo
             INTO TABLE i_ekpo
             WHERE ebeln IN s_ebeln
             AND ntgew NE '0.00'.  IF sy-subrc = 0.
        SORT i_ekpo BY ebeln ebelp matnr .
      ENDIF.* To build the Page header
      PERFORM sub_build_header.* To prepare field catalog
      PERFORM sub_field_catalog.* Perform to populate the layout structure
      PERFORM sub_populate_layout.* Perform to populate the sort table.
      PERFORM sub_populate_sort.* Perform to populate ALV event
      PERFORM sub_get_event.END-OF-SELECTION.* Perform to display ALV report
      PERFORM sub_alv_report_display.
    *&      Form  sub_build_header
    *       To build the header
    *       No Parameter
    FORM sub_build_header .* Local data declaration
      DATA: l_system     TYPE char10 ,          "System id
            l_r_line     TYPE slis_listheader,  "Hold list header
            l_date       TYPE char10,           "Date
            l_time       TYPE char10,           "Time
            l_success_records TYPE i,           "No of success records
            l_title(300) TYPE c.                " Title
    * Title  Display
      l_r_line-typ = c_header.               " header
      l_title = 'Test report'(001).
      l_r_line-info = l_title.
      APPEND l_r_line TO i_alv_top_of_page.
      CLEAR l_r_line.* Run date Display
      CLEAR l_date.
      l_r_line-typ  = c_item.                " Item
      WRITE: sy-datum  TO l_date MM/DD/YYYY.
      l_r_line-key = 'Run Date :'(002).
      l_r_line-info = l_date.
      APPEND l_r_line TO i_alv_top_of_page.
      CLEAR: l_r_line,
             l_date.ENDFORM.                    " sub_build_header
    *&      Form  sub_field_catalog
    *       Build Field Catalog
    *       No Parameter
    FORM sub_field_catalog .*  Build Field Catalog
      PERFORM sub_fill_alv_field_catalog USING:     '01' '01' 'EBELN' 'I_EKPO' 'L'
         'Doc No'(003) ' ' ' ' ' ' ' ',     '01' '02' 'EBELP' 'I_EKPO' 'L'
         'Item No'(004) 'X' 'X' ' ' ' ',     '01' '03' 'MATNR' 'I_EKPO' 'L'
         'Material No'(005) 'X' 'X' ' ' ' ',     '01' '03' 'MATNR1' 'I_EKPO' 'L'
         'Material No'(005) ' ' ' ' ' ' ' ',
         '01' '04' 'WERKS' 'I_EKPO' 'L'
         'Plant'(006) 'X' 'X' ' ' ' ',     '01' '04' 'WERKS1' 'I_EKPO' 'L'
         'Plant'(006) ' ' ' ' ' ' ' ',     '01' '05' 'NTGEW' 'I_EKPO' 'R'
         'Net Weight'(007) ' ' ' ' 'GEWE' 'I_EKPO'.ENDFORM.                    " sub_field_catalog*&---------------------------------------------------------------------*
    *&     Form  sub_fill_alv_field_catalog
    *&     For building Field Catalog
    *&     p_rowpos   Row position
    *&     p_colpos   Col position
    *&     p_fldnam   Fldname
    *&     p_tabnam   Tabname
    *&     p_justif   Justification
    *&     p_seltext  Seltext
    *&     p_out      no out
    *&     p_tech     Technical field
    *&     p_qfield   Quantity field
    *&     p_qtab     Quantity table
    FORM sub_fill_alv_field_catalog  USING  p_rowpos    TYPE sycurow
                                            p_colpos    TYPE sycucol
                                            p_fldnam    TYPE fieldname
                                            p_tabnam    TYPE tabname
                                            p_justif    TYPE char1
                                            p_seltext   TYPE dd03p-scrtext_l
                                            p_out       TYPE char1
                                            p_tech      TYPE char1
                                            p_qfield    TYPE slis_fieldname
                                            p_qtab      TYPE slis_tabname.* Local declaration for field catalog
      DATA: wa_lfl_fcat    TYPE  slis_fieldcat_alv.  wa_lfl_fcat-row_pos        =  p_rowpos.     "Row
      wa_lfl_fcat-col_pos        =  p_colpos.     "Column
      wa_lfl_fcat-fieldname      =  p_fldnam.     "Field Name
      wa_lfl_fcat-tabname        =  p_tabnam.     "Internal Table Name
      wa_lfl_fcat-just           =  p_justif.     "Screen Justified
      wa_lfl_fcat-seltext_l      =  p_seltext.    "Field Text
      wa_lfl_fcat-no_out         =  p_out.        "No output
      wa_lfl_fcat-tech           =  p_tech.       "Technical field
      wa_lfl_fcat-qfieldname     =  p_qfield.     "Quantity unit
      wa_lfl_fcat-qtabname       =  p_qtab .      "Quantity table  IF p_fldnam = 'NTGEW'.
        wa_lfl_fcat-do_sum  = 'X'.
      ENDIF.
      APPEND wa_lfl_fcat TO i_fieldcat.
      CLEAR wa_lfl_fcat.
    ENDFORM.                    " sub_fill_alv_field_catalog*&---------------------------------------------------------------------*
    *&      Form  sub_populate_layout
    *       Populate ALV layout
    *       No Parameter
    FORM sub_populate_layout .  CLEAR wa_layout.
      wa_layout-colwidth_optimize = 'X'." Optimization of Col widthENDFORM.                    " sub_populate_layout*&---------------------------------------------------------------------*
    *&      Form  sub_populate_sort
    *       Populate ALV sort table
    *       No Parameter
    FORM sub_populate_sort .* Sort on material
      wa_sort-spos = '01' .
      wa_sort-fieldname = 'MATNR'.
      wa_sort-tabname = 'I_EKPO'.
      wa_sort-up = 'X'.
      wa_sort-subtot = 'X'.
      APPEND wa_sort TO i_sort .
      CLEAR wa_sort.* Sort on plant
      wa_sort-spos = '02'.
      wa_sort-fieldname = 'WERKS'.
      wa_sort-tabname = 'I_EKPO'.
      wa_sort-up = 'X'.
      wa_sort-subtot = 'X'.
      APPEND wa_sort TO i_sort .
      CLEAR wa_sort.
    ENDFORM.                    " sub_populate_sort*&---------------------------------------------------------------------*
    *&      Form  sub_get_event
    *       Get ALV grid event and pass the form name to subtotal_text
    *       event
    *       No Parameter
    FORM sub_get_event .
      CONSTANTS : c_formname_subtotal_text TYPE slis_formname VALUE
    'SUBTOTAL_TEXT'.  DATA: l_s_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 4
        IMPORTING
          et_events       = i_event
        EXCEPTIONS
          list_type_wrong = 0
          OTHERS          = 0.* Subtotal
      READ TABLE i_event  INTO l_s_event
                        WITH KEY name = slis_ev_subtotal_text.
      IF sy-subrc = 0.
        MOVE c_formname_subtotal_text TO l_s_event-form.
        MODIFY i_event FROM l_s_event INDEX sy-tabix.
      ENDIF.ENDFORM.                    " sub_get_event*&---------------------------------------------------------------------*
    *&      Form  sub_alv_report_display
    *       For ALV Report Display
    *       No Parameter
    FORM sub_alv_report_display .
      DATA: l_repid TYPE syrepid .
      l_repid = sy-repid .* This function module for displaying the ALV report
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = l_repid
          i_callback_top_of_page   = 'SUB_ALV_TOP_OF_PAGE'
          is_layout                = wa_layout
          it_fieldcat              = i_fieldcat
          it_sort = i_sort
          it_events                = i_event
          i_default                = 'X'
          i_save                   = 'A'
        TABLES
          t_outtab                 = i_ekpo
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
    *    MESSAGE i000 WITH 'Error in ALV report display'(055).
      ENDIF.ENDFORM.                    " sub_alv_report_display*&---------------------------------------------------------------------*
    *       FORM sub_alv_top_of_page
    *       Call ALV top of page
    *       No parameter
    *---------------------------------------------------------------------*FORM sub_alv_top_of_page.                                   "#EC CALLED* To write header for the ALV
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = i_alv_top_of_page.
    ENDFORM.                    "alv_top_of_page*&---------------------------------------------------------------------*
    *&      Form  subtotal_text
    *       Build subtotal text
    *       P_total  Total
    *       p_subtot_text Subtotal text info
    FORM subtotal_text CHANGING
                   p_total TYPE any
                   p_subtot_text TYPE slis_subtot_text.
    * Material level sub total
      IF p_subtot_text-criteria = 'MATNR'.
        p_subtot_text-display_text_for_subtotal
        = 'Material level total'(009).
      ENDIF.* Plant level sub total
      IF p_subtot_text-criteria = 'WERKS'.
        p_subtot_text-display_text_for_subtotal = 'Plant level total'(010).
      ENDIF.
    ENDFORM.                    "subtotal_text
    Regards,
    Pravin

  • HCM F&P - How to set the field as Required based on drop down values

    Hi Experts,
    I have a requirement to set the Date field as mandatory when a particular value is selected in drop down list. I have already tried with MessageBox though it displays the error message but process moves further i.e. on clicking Check & Send button it throws an error message but still it moves further and i can see only Send button. Ideally it should halt there itself.
    Thanks & Regards,
    Jitesh Talreja

    Thanks for your valuable inputs
    Chintan
    I have already tried this. It only highlight the field with the red border but still allow to move further.
    Mukesh
    Yes, we can definately control this from the backend but that would be the last option i should execute. Ideally, this is something to be controlled in front end itself
    Poornima
    By setting the field attrbiute Required will set the field mandatory as a whole irrespective of drop down values or any other UI element.
    Regards,
    Jitesh Talreja

Maybe you are looking for

  • Disconnecting Internet

    Hi, I play a game called Enemy Territory on PC, but whenever I join a server to play, my whole internet disconnect. I have a BT Home Hub 1.0 and a 1MB internet speed. It also happens when I log on to Xfire, My whole internet disconnects and my home h

  • Ayuda con el adobe photoshop cs por favor

    hola estoy haciendo una gota de agua sobre un fondo de madera pero no encuentro donde esta la opcion de calidad en el adobe photoshop cs

  • Error while pivoting

    Hi Gurus, My students wanted to make layout change in a pivot table, but he got the following error message: Governor limit exceeded in cube generation (Maximum data records exceeded.) >> Error Details Error Codes: QBVC92JYAny idea? Thanks Laszlo

  • Multiple reservations for an item in a DBM order

    Hello, I got an issue with multiple reservations for an item in a service order.When I try to replicate it unable to create multiple reservations. Please help me why and when these multiple reservations are created for an item. Thanks, siva.

  • Dodgy download request on my mac desktop - post lion

    Hi all I'm a bit concerned, I don't ever see rubbish like this on my mac - A POP up with no exit cues I run ClamAx daily as I'm a Internet Marketer so pretty much live on this machine (and a pretty cool pc) all day and do plenty of downloading. Ive g