ALV field value issue

Hi,
I am using ALV disaplay FM for displaying data in the form of ALV format. in the O/P one field is not getting data it showing empty column. This field is referrening by new data type it was not there in any database table.
Thanks,

wa_field1-fieldname = 'KEY_1'.
wa_field1-tabname = 'zpu_scapprover_tab_alv'.
wa_field1-outputlen = 10.
wa_field1-seltext_l = 'Key 1'.
APPEND wa_field1 TO it_field1.
CLEAR wa_field1.
wa_field1-fieldname = 'KEY_2'.
wa_field1-tabname = 'zpu_scapprover_tab_alv'.
wa_field1-outputlen = 10.
wa_field1-seltext_l = 'Key 2'.
APPEND wa_field1 TO it_field1.
CLEAR wa_field1.
wa_field1-fieldname = 'status'.
wa_field1-tabname = 'zpu_scapprover_tab_alv'.
wa_field1-outputlen = 30.
wa_field1-seltext_l = 'Status'.
APPEND wa_field1 TO it_field1.
Here is the code and KEY_1, KEY_2 is the data base field but status is not DB table, it referrering new data type. 'zpu_scapprover_tab_alv' is internal table.
tables :zpu_scapprover.
data : begin of zpu_scapprover_tab occurs 0,
       MANDT type MANDT,
       role(4),
       key_1(10),
       key_2(10),
       status(30),     "New field not in DB
       end of zpu_scapprover_tab.
data : zpu_scapprover_tab_alv like standard table of zpu_scapprover_tab with header line.

Similar Messages

  • ALV field display issue

    Hello All,
    I am working with a program that is using the FM REUSE_ALV_GRID_DISPLAY and have an issue with the field display when the layout is changed.  For example, I have a date field that will appear blank when the program is run initially.  However, when the user changes the layout for the grid, the same field will be populated with 00/00/0000.  Is there a way to prevent this display issue from occuring.  Any help would be greatly appreciated.  Thanks.
    John

    Hi Rich,
    There is quite a bit of code, so I narrowed it down to the parts I think are most relevant.  Let me know if you find anything.  Thanks.
    **Create the field catalogue
    FORM field_catalog.
      CLEAR int_fcat.
      REFRESH int_fcat.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                i_program_name         = 'ZRECERTTEST'
                i_internal_tabname     = 'ITAB'
                i_inclname             = 'ZRECERTTEST'
           CHANGING
                ct_fieldcat            = int_fcat[]
           EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
      LOOP AT int_fcat.
    *    IF int_fcat-fieldname EQ 'PRUEFLOS'.
    *      int_fcat-LZERO = 'X'.
    *      int_fcat-NO_ZERO = 'X'.
    *    ENDIF.
        IF int_fcat-fieldname EQ 'MATNR'.
          int_fcat-outputlen = 10.
        ENDIF.
        IF int_fcat-fieldname EQ 'MAKTX'.
          int_fcat-outputlen = 20.
        ENDIF.
        IF int_fcat-fieldname EQ 'ZTANKID'.
          int_fcat-outputlen = 12.
        ENDIF.
        IF int_fcat-fieldname EQ 'RECOMMEND'.
          int_fcat-seltext_l = 'Recommended Re-certification Date'.
          int_fcat-seltext_m = 'Recomm Re-cert. Date'.
          int_fcat-seltext_s = 'Recomm Recert Dt.'.
        ENDIF.
        IF int_fcat-fieldname EQ 'ZCERT_DATE'.
          int_fcat-seltext_l = 'Certification Date'.
          int_fcat-seltext_m = 'Cert. Date'.
          int_fcat-seltext_s = 'Cert. Dt.'.
        ENDIF.
        IF int_fcat-fieldname EQ 'ATFLV'.
          int_fcat-outputlen = 6.
          int_fcat-seltext_l = 'Material Retest Interval'.
          int_fcat-seltext_m = 'Mat Retest Interval'.
          int_fcat-seltext_s = 'Retest Int'.
        ENDIF.
        IF int_fcat-fieldname EQ 'ZRECERTDT'.
          int_fcat-seltext_l = 'Recertification Date'.
          int_fcat-seltext_m = 'Recert. Date'.
          int_fcat-seltext_s = 'Recert Dt.'.
    *      int_fcat-NO_ZERO = 'X'.
        ENDIF.
        IF int_fcat-fieldname EQ 'ZRECERTMT'.
          int_fcat-seltext_l = 'Recertification Interval'.
          int_fcat-seltext_m = 'Recert. Int'.
          int_fcat-seltext_s = 'Recert Int'.
        ENDIF.
        IF int_fcat-fieldname EQ 'ZZPRODH6'.
          int_fcat-reptext_ddic = 'Formula Number'.
          int_fcat-seltext_l = 'Formula Number'.
          int_fcat-seltext_m = 'Formula Number'.
          int_fcat-seltext_s = 'Form. No.'.
        ENDIF.
        IF int_fcat-fieldname EQ 'ATWRT'.
          int_fcat-reptext_ddic = 'Spec Owner'.
          int_fcat-seltext_l = 'Spec Owner'.
          int_fcat-seltext_m = 'Spec Owner'.
          int_fcat-seltext_s = 'Spec Owner'.
        ENDIF.
        IF int_fcat-fieldname EQ 'ZRECERTBY'.
          int_fcat-seltext_l = 'Recert Date Changed By'.
          int_fcat-seltext_m = 'Recert. Dt Changed By'.
          int_fcat-seltext_s = 'Changed By'.
        ENDIF.
        IF int_fcat-fieldname EQ 'ZRECRTCHGD'.
          int_fcat-seltext_l = 'Recert Date Last Changed On'.
          int_fcat-seltext_m = 'Recert. Date Changed'.
          int_fcat-seltext_s = 'Changed On'.
        ENDIF.
    *    IF int_fcat-fieldname EQ 'ZRECERTDT' OR
    *        int_fcat-fieldname EQ 'ZRECERTMT'.
    *      int_fcat-input = 'X'.
    *      int_fcat-edit = 'X'.
    *      int_fcat-edit_mask = ' '.
    *    ENDIF.
        IF int_fcat-fieldname EQ 'BOX'.
          int_fcat-no_out = 'X'.
        ENDIF.
    *      if int_fcat-fieldname eq 'ZRECNO'.
    *        int_fcat-no_zero = 'X'.
    *      endif.
        IF int_fcat-fieldname EQ 'ZCERT_STAT'.
          int_fcat-outputlen = '00012'.
        ENDIF.
        MODIFY int_fcat.
      ENDLOOP.
    ***Create the ALV
      wa_layout-box_fieldname = 'BOX'.
    *  wa_layout-group_change_edit = 'X'.
    *wa_layout-edit = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_buffer_active          = 'X'
                i_callback_program       = v_repid
                i_callback_pf_status_set = 'SET_STATUS'
                i_callback_user_command  = 'USER_COMMAND'
                i_grid_title             = v_title
                is_layout                = wa_layout
                it_fieldcat              = p_int_fcat[]
                i_save                   = 'A'
                is_variant               = v_variant
                it_events                = i_events[]
           TABLES
                t_outtab                 = p_itab
           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.

  • Tool Tip Text for field values in ALV report

    Hi,
    How to get the tool tip text for the field values in ALV report.
    Thanks & Regards,
    Pallavi.

    Hi,
    In fieldcatalog specify the TOOLTIP.
    <b>
    LVC_S_FCAT-TOOLTIP
    </b>
    In this speicfyteh tooltip you want.
    Then append this to the fieldcatalog.
    Hope this solves ur problem.

  • Subtotal in alv report based on the particular field value

    Hi,
    As per my requirement, i need to do subtotal of quntity field based on the material number field value in alv report.
    Ex:  if material number falls 1 to 10 then i need to be calculate and display subtotal qty amount with text " total of the mat1" and if material number falls 11 to 20 then again i need to be claculate and display subtotal qty amount with text "total of the mat2". similarily i need to display the details.
    <removed_by_moderator>
    Regards
    Nagendra

    Hi,
    Ex: if material number falls 1 to 10 then i need to be calculate and display subtotal qty amount with text " total of the mat1" and if material number falls 11 to 20 then again i need to be claculate and display subtotal qty amount with text "total of the mat2". similarily i need to display the details.
    What you can do is in your output table, you will have to create an auxilary field, lets call it as material group (groupid). Now you can do a subtotal on the material group. However the logic to determine what materials belong to which group should be coded. I guess you might be having some logic for that.
    So lets say that material 1 to 10 as G1 ( group 1 ) and material 11 to 20 as G2 ( group 2 )
    The output of the internal table would be
    Groupid  matnr ...
    1  1
    1  2
    1  3.....and so on
    2  11
    2  12
    2  13....upto 20.
    Now in the fieldcatalog assign an 'X' to the 'dosum' parameter to the field Groupid
    In the sort info do the following :
    gs_sort-fieldname = 'GROUPID'.
    gs_sort-spos = 1.
    gs_sort-up = 'X'.
    gs_sort-subtot = 'X'. ***CRUCIAL STATEMENT****
    append gs_sort to gt_sort.
    Now pass all this data to the alv grid function. And you are done.
    regards,
    Advait

  • Access field value in ALV

    Hello experts,
    I have created an simple ALV Grid report, in that I have implemented double click event n I want to create a new ALV grid with new data to be displayed. So I want to access field value ie using SLIS_SELFIELD or anything. Could anyone please guide me how can I access a field value using slis though SLIS_SELFIELD has methods like SEL_TAB_FIELD... I wan to access something like SEL_FIELD_VALUE but its not available in the class.
    Thanks in advance...
    Regards,
    Viral Patel

    Hi Viral,
    SLIS_SELFIELD has an attribute named VALUE which holds the value you selected row & TBAINDEX holds the row number.
    Refer below code snippet :-
    FORM user_command
              USING s_ucomm LIKE sy-ucomm
              s_selfield TYPE slis_selfield.                    "#EC CALLED
      CASE s_ucomm.
        WHEN '&IC1'.
          CLEAR wa_podat2.
          READ TABLE itab_podat2 INTO wa_podat2 INDEX s_selfield-tabindex.
          CHECK sy-subrc = 0.
          IF wa_podat2-ebeln = s_selfield-value.
            SET PARAMETER ID 'BES' FIELD wa_podat2-ebeln.
            IF wa_podat2-ebeln IS NOT INITIAL.
              CALL TRANSACTION c_tcode.
            ENDIF.
    For above event to happen, you have to use parameter I_CALLBACK_USER_COMMAND of  REUSE_ALV_GRID_DISPLAY as below :-
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = l_repid
          i_callback_user_command = 'USER_COMMAND'
          it_fieldcat             = itab_fieldcat
          it_events               = itab_events
        TABLES
          t_outtab                = itab_podat2[].
    Regards
    Abhii
    Edited by: Abhii on Nov 30, 2009 11:25 AM

  • Decimal Value display in ALV Field display

    Hi Expert,
    I need to dispaly one ALV Field "Routine Work Hour" value up to 2 decimal place in ALV output i.e if value is 2.5 then it should display as 2.50.The field which refers to this is ISMNW and the database table is AFRU.Now if this value is maintained in MINUTE unit, then code converts into HOUR unit and correctly outputs to ALV output up to 2 decimal after i changed the field decimal lenght.But for the value which is mainatined in HOUR unit, it correctlty populated into the final internal table upto 2 decimal and this table data while passing into FM " REUSE_GRID_DISPLAY" it only outputs upto 2 deciamal value for the value which is maintained as MINUTE unit in database table AFRU in ALV output, but for other value(Which are maintained in HOUR unit in table AFRU)  it still shows 1 decimal length.But the internal table correctly populates these values up to 2 decimal for all unit of work(MINUTE/HOUR) while passing though this above FM.
    Please advise where i need to look into.
    Thanks

    hi,
    pass these parameters to fieldcatlog.
    e.g.
    Fcat-ref_fieldname = 'ISMNW'.
    fcat-ref_tabname  = 'AFRU'.
    fcat-decimalsout = 2.
    Hope this will help you.
    Regards,
    Vijay

  • Editable ALV- Quantity field value is getting changed while double clicking

    Hi all,
         I have created Editable ALV grid using Class concepts. Quantity field is editable in dat. but after changing value and if im double clicking on that field, value is getting changed. eg: 45 is changing to .045. How can i resolve this problem.
    Could u plz help.

    Hi Anu,
    One question from my side.
    U have displayed the ALV.In that grid u have quantity field.U have changed the value of that field to 45.
    When u press enter the value has been changed to .045.Is this u r problem.
    U can do onething anu.
    Declare one varaible with the local field.
    Pass u r quantity field value into that variable.
    While displaying thriugh SET_TABLE_FIRST_DISPLAY in your internal table pass this variable.
    It will solve u r problem.I think.
    Let me if yu have any problem
    IF u want u can refer to the program BCALV_EDIT* in se38.
    There also u have needful info
    Thanks,

  • Issue with new Custom field value in Material UI (EHP5)

    Hi
    We added new Custom field (country) in material UI for Routing the WF based on country.
    we added this new field in material general data, When user press the "check" button in the header the value disappeared in the UI.
    This field value  required only in MDG CR level, this field value will not be updated in ECC active area.
    Request your inputs to solve this problem.

    resolved myself:
    PROCESS BEFORE OUTPUT.
    *                      Verarbeitung vor der Ausgabe
    *MS17092009 Non eliminare modules standard.
      MODULE set_propriety.
      MODULE INIT_SUB.
      MODULE GET_DATEN_SUB.
    PROCESS AFTER INPUT.
    *                      Verarbeitung nach der Eingabe
    MODULE GET_DATEN_SUB.
    CHAIN.
          FIELD MARA-ZBARCODE.
    ENDCHAIN.
    MODULE SET_DATEN_SUB.
    FIELD MARA-ZBARCODE MODULE BARCODE_0001 ON INPUT.

  • Arrow mark with kunnr field values in alv output.

    Hi ,
    I  need to increase the column field length. I am using Function Module REUSE_ALV_LIST_DISPLAY because alv_grid display fm is not available in 4.0b version. I have used column optimization in layout. The column kunnr is coming with a small arrow though there is no data loss. Is there any way I can remove the arrow mark with kunnr field values.

    Hi,
    You can increase your column lenght in fieldcat by using Fcat-columnwidth = "SIZE OF KUNNR ".
    Set the size of kunnr field in fieldcat and get the appropiate output.
    Regards
    Abdul

  • Issue facing : Deletion of Qualified Look up field value : Using Import Map

    Hi All,
    We are having qualified multi-valued look up field in the main table. Using import map for the main table record update, we are trying to delete the qualified look up field value. But it is not working.
    Please guide on how you have achieved this.
    One approach is to supply NULL value, though I am not sure or have tried this.
    Regards,
    Ganga

    Hi Ganga,
    I assume that you are trying to delete the Qualifier values for the Qualified look up table. The only possibility is to pass the Null values to the already Existing records in the Main table. Please note that if you are passing one Null value only one record will get deleted. So you will have to pass the Null values equivalent to the number of values for the Multi Valued Qualified table.
    Kind Regards,
    Thamizharasi N

  • One field value missing in the spreadsheeet

    Hi All,
    I have created an ALV grid report, which displays proper output. All the headers and their field value are displayed properly in the ALV output.
    But when I select the option to download the output to the spreadsheet format by using the following option, it displays all the headers and their field value, except field value for only one column.
    Save List in file --> Local file --> Spreadsheet.
    Can some body please let me know what could me the problem?
    Regards,
    Reshma

    Hi Reshma,
    I hope the column is not added dynamically. I had faced this problem for dynamic columns.
    Also, you could try and download the internal table data using 'GUI_DOWNLOAD' just to cross check that you face the smae issue.
    Regards,
    Shyam

  • Regarding ALV Field Catalogue

    Hi ,
    Checked in the forum for this issue. => Not a wise plan to hoodwink the Moderators.
    Could not find any.Guide me.
    SAY i have a table  CRICKET with 2 fields
    1) PLAYER
    2) SCORE
    Records are say::
    PLAYER    SCORE
    SACHIN     50
    RAHUL      40
    SEHWAG  100
    In Selection Screen, i have a field PLAYER.
    a)If user enters value SACHIN in field PLAYER..
    output shd be:
    SACHIN
    50
    b)If user enters value SACHIN,RAHUL,SEHWAG in Selection screen,
    output shd be
    SACHIN     RAHUL   SEHWAG
    50             40             100
    Mean to say dynamically creating the fields based on inputs entered by user.
    In ALV field catalog there is option NO_OUT ='X' to hide the fields.
    But not able to get how to compare with values entered by user.
    Edited by: kishan P on Oct 5, 2010 2:38 PM

    Hi manju
    suppose you have a table(itab) in which you have all the data related to player and the score.
    before displaying the data to ALV apply the condition like:
    fetch score from DBTABLE into table itab where player in s_player.
    where s_player is your select option.
    and then pass your ITAB to ALV.
    i hope it will work.
    Thanks
    Lalit Gupta

  • Error in updating ALV field catalog in selection

    Dear all,
    I'm trying to use the standard transaction /SAPAPO/TSKEYFMAIN in order to check the TS values.
    After filling the selection variant, the system shows the following error:
    'Error in updating ALV field catalog in selection'
    Could you please provide me with further details about the error? What could be the possible solution to avoid it?
    Many thanks,
    SM

    Hi Marius,
    thanks for your answer.
    I would like to use the /SAPAPO/TSKEYFMAIN transaction to check massively the values in the time series KFs and not just the consistency of them.
    So do you know any other transaction to do it or do you have an idea about the error of /SAPAPO/TSKEYFMAIN?
    Thanks for your help!
    SM

  • Passing a table-field value in Crystal to a Store Procedure in SQL Server

    I have been checking all over the interenet via searches and although some seem to come close to this, its still not what I want.
    Essentially I need to pass value from Table-Field record (for each record read/selected) via a paramete to a Stored Procedure(SP) in SQL Server 2205/2008.  I do NOT want to be prompted for a value for this parameter each time the report is run, simple pass the value in which will be used along with other select criteria to bring back one value for the report to use in a calcuation per record.
    The value of the parameter is a date, but I understand it would be better to pass it in as a varchar(8) - 'YYYYMMDD' - and then reconvert it inside the SP, as follows:
    In Crystal Reports 2008 SP3, I have a formula defined as,
    trans_date = ToText ({F1ARS_STMT_WS_TRAN.TRANS_DATEI}, 'YYYYMMDD')
    and essential just want to pass this to the SP below ... i.e. trans_date  ---> @strTransDate
    I then link the key fields [EXCH_RATE_TABLE_NAME] and [TRANS_CCY_CODE] to other tables in the Database Expert, and put [EXCH_RATE_AMT] on the report and use it to calculate what I want.
    This works fine when the prompt comes up and I put in a proper date, but I don't what it to prompt, but simple pass the F1ARS_STMT_WS_TRAN.TRANS_DATEI in via the fornula/parameter and let teh SQL do the rest for each record selected..
    CREATE PROCEDURE [dbo].sp_GET_EXCH_RATE_AMT (@strTransDate varchar(8))     --use format 'YYYYMMDD' to represent the date as a string.
         -- Add the parameters for the stored procedure here
         -- @TransDate datetime = now
    AS
           declare @TransDate datetime
         set @TransDate = CONVERT(DATETIME, @strTransDate, 112)
    BEGIN
         -- SET NOCOUNT ON added to prevent extra result sets from
         -- interfering with SELECT statements.
         SET NOCOUNT ON;
        -- Insert statements for procedure here
    SELECT [EXCH_RATE_TABLE_NAME], [TRANS_CCY_CODE], [EXCH_RATE_AMT]
    FROM [F1CCY_EXCH_RATE]
    WHERE [MAJOR_CCY_CODE] = 'BBD'
    AND   [START_DATEI] =
         SELECT MAX([START_DATEI])
         FROM [F1CCY_EXCH_RATE]
         WHERE [MAJOR_CCY_CODE] = 'BBD'
         AND   [START_DATEI] <= @TransDate
    END
    GO
    GRANT EXECUTE ON sp_GET_EXCH_RATE_AMT TO PUBLIC
    GO
    Thanks for any help.  Can't tell the headache this has caused my both literally and figuratively.

    Hello,
    I moved your post to the Report Design forum. Lots of SQL help in here...
    I believe the problem is due to you using a Parameterized Stored Procedure. The first thing CR has to do is connect to your DB source which requires the date parameter before it can run the query to add the date filter, it's the SP that is prompting for the parameter. Therefore the report has not run so it can't get the field value from the report until you fill in the info for the SP. Catch 22 problem.... Which came first, the Chicken or the Parameter....
    The report will work as you have noted but I don't know of anyway to refresh unless parameter is filled in again....
    Jason has a lot of great solutions when it comes to these dilemmas, Possibly using a Command Object may help but I believe you will still run into the same issue....
    Only way I can think of is to not use a parameter in the SP and let CR do the filtering client side. Of course this means all data is coming back to the client PC as you are likely trying to find a work around for.
    Thank you
    Don

  • Field value(s) for object S_SERVICE were not entered

    Hi
    Whenever I try to generate a profile in PFCG I get an error, that is saying;
    ... field value(s) for object S_SERVICE were not entered
    Number of values could be different but message text is always the same.
    The problem is in CRM2007 IDES.
    It is regardless if I try to generate for existing role (like SAP_CRM_UIU_MKT_PROFESSIONAL) or for own role
    Does anybody know how to solve such issue ?
    regards
    Rafal

    Dear Rafal,
    kindly check documentation of customizing node
      SAP Customizing Implementation Guide
        Customer Relationship Management
          UI Framework
           Business Roles
             Define Authorization Role
    "Make sure that the authorization object S_SERVICE is set to inactive.
    An active authorization object S_SERVICE could interrupt the profile
    generation."
    You have to deactivate the S_SERVICE authorization object in PFCG to
    solve the error.
    Hope this helps,
    Gerhard

Maybe you are looking for

  • Satellite A505-S6973 - No sound of my laptop speakers

    I own an A505-S6973 and today i lost volume on my speakers. When i jack in my headphones i get sound but without the headphones plugged in, I get no sound of my laptop speakers. I checked device manager for software problems but everything is cleared

  • When I sync my iPhone to itunes it shows over 7GB of "other" files.

    My phone has been showing a "full" status and when I synced it I saw that no matter how many songs and apps I deleted, the "other" category kept growing. My brother told me about a trick to swipe the "music" section in the "about/ usage" setting and

  • Not all chinese characters display correctly with non-embedded text

    Hi all,   I've updated to the last beta 2 of Flash Player 10.1 (10,1,51,66) and compiled this simple Flex application to illustrate the fact that not all chinese characters can be displayed correctly with non-embedded text (device font). <?xml versio

  • PTG and Jakarta Tomcat 3.2

    Hello! Has anyone tried to get PTG up and running with Jakarta Tomcat 3.2? I am thinking of giving this a try and would appreciate input from everybody who has experience with the combination. Thanks! Stephan.

  • Batch Sequence (Signatures)

    Hello, I'm currently working with batch signatures.  I've found documentation that outlines how to do this with javascript: http://www.adobe.com/devnet/acrobat/pdfs/batch_sequences.pdf. However, my results are not quite right.  My script is creating