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

"Layout report"

Hi all.

Have you know for design tool layout report ?

help me!

Thank you very much!

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 Jan 29, 2008 at 08:54 AM

    HI,

    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.

    PARAMETERS P_LAYOUT TYPE DISVARIANT-VARIANT.

    SELECTION-SCREEN END OF BLOCK B3.

    INITIALIZATION.

    *--Initialize

    Initialize to default layout if one exist.

    WA_VARIANT-REPORT = SY-REPID.

    WA_VARIANT-USERNAME = SY-UNAME.

    CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'

    EXPORTING

    I_SAVE = C_ALL

    CHANGING

    CS_VARIANT = WA_VARIANT

    EXCEPTIONS

    WRONG_INPUT = 1

    NOT_FOUND = 2

    PROGRAM_ERROR = 3

    OTHERS = 4.

    IF SY-SUBRC = 0.

    P_LAYOUT = WA_VARIANT-VARIANT.

    ENDIF.

    On value request for varaint

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LAYOUT.

    DATA: TL_DYNPFIELDS TYPE TABLE OF DYNPREAD,

    WL_EXIT TYPE C,

    WAL_VARIANT LIKE WA_VARIANT,

    WAL_DYNPFIELDS TYPE DYNPREAD.

    Get values from the selection screen to determine layout set

    WAL_DYNPFIELDS-FIELDNAME = 'P_LAYOUT'.

    APPEND WAL_DYNPFIELDS TO TL_DYNPFIELDS.

    CALL FUNCTION 'DYNP_VALUES_READ'

    EXPORTING

    DYNAME = SY-CPROG

    DYNUMB = '1000'

    TRANSLATE_TO_UPPER = C_CHECK

    TABLES

    DYNPFIELDS = TL_DYNPFIELDS.

    Get the variant (we have only 1 entry)

    READ TABLE TL_DYNPFIELDS INTO WAL_DYNPFIELDS INDEX 1.

    IF SY-SUBRC EQ 0.

    WA_VARIANT-VARIANT = WAL_DYNPFIELDS-FIELDVALUE.

    ENDIF.

    WA_VARIANT-REPORT = SY-REPID.

    WA_VARIANT-USERNAME = SY-UNAME.

    Invoke function to provide drop down entries

    CALL FUNCTION 'REUSE_ALV_VARIANT_F4'

    EXPORTING

    IS_VARIANT = WA_VARIANT

    I_SAVE = C_ALL

    IMPORTING

    E_EXIT = WL_EXIT

    ES_VARIANT = WAL_VARIANT

    EXCEPTIONS

    NOT_FOUND = 1

    PROGRAM_ERROR = 2

    OTHERS = 3.

    IF SY-SUBRC IS INITIAL.

    IF WL_EXIT IS INITIAL.

    P_LAYOUT = WAL_VARIANT-VARIANT.

    WA_VARIANT = WAL_VARIANT.

    ENDIF.

    ELSE.

    MESSAGE I208(00) WITH 'No layouts found'(022).

    ENDIF.

    FREE: TL_DYNPFIELDS.

    http://sap.ittoolbox.com/code/archives.asp?a=s&d=3619

    http://www.sap-img.com/abap/use-simple-alv-functions-to-make-reporting-easy.htm

    Reward Points if found helpfull..

    Cheers,

    Chandra Sekhar.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 09:06 AM
    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.