Skip to Content
author's profile photo Former Member
Former Member

Display Variants in ALV

Hi,

I copied an existing Z report program to a new program to conform to the naming standards and deleted the old program. (I could do renaming as well but did it this way)

When copying the program, all object including the selection variants were copied but the ALV display variants were not copied to the target program. Any thoughts on this please?

I tried using a simple program to copy the LTDX (Generic storage of display variants) and LTDXT (Display Variant Texts) entries of the old program to the new program. I checked that all entries in LTDX of the old program now exist for the new program too. When I execute the program, only the global ALV display variants are available for selection i.e all display variants that start with u2018/u2019. The user specific variants are not available although all entries in LTDX and LTDXT for the user display are in the respective tables

Thanks for respondinding.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2010 at 09:46 PM

    Hi,

    You can use program 'RKKBALVC' to copy ALV variants.

    Thanks

    Satyasuresh Donepudi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Satyasuresh. I used a similar program that copies variant entries from tables ltdx and ltdxt for a source program to new entries in the same table for the target program.

      parameters report like ltdx-report obligatory.
      parameters report2 like ltdx-report obligatory.
      
       select * into table lt_ltdx from ltdx
                      where report = report.
        select * into table lt_ltdxt from ltdxt
                      where report = report.
        loop at lt_ltdx.
          lt_ltdx-report = report2.
          modify ltdx from lt_ltdx..
        endloop.
        loop at lt_ltdxt.
          lt_ltdxt-report = report2.
          modify ltdxt from lt_ltdxt..
        endloop.
      

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2016 at 01:44 PM

    PARAMETERS: variant LIKE disvariant-variant. * List Variant AT SELECTION-SCREEN ON VALUE-REQUEST FOR variant. PERFORM alv_list_variant. *&---------------------------------------------------------------------* *& Form ALV_LIST_VARIANT *&---------------------------------------------------------------------* * value help for ALV list variant *----------------------------------------------------------------------* FORM alv_list_variant. is_variant-report = sy-repid. CLEAR ws_exit. CALL FUNCTION 'REUSE_ALV_VARIANT_F4' EXPORTING is_variant = is_variant * I_TABNAME_HEADER = * I_TABNAME_ITEM = * IT_DEFAULT_FIELDCAT = i_save = 'A' IMPORTING * E_EXIT = es_variant = es_variant EXCEPTIONS not_found = 1 program_error = 2 OTHERS = 3. IF sy-subrc = 0 AND ws_exit = space. is_variant-variant = es_variant-variant. ENDIF. variant = es_variant-variant. ENDFORM. " ALV_LIST_VARIANT

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.