on 07-07-2019 6:03 PM
Hi Gurus,
i was using call transformation for XML attachment, with the same call transformation i have a need to add layout variant in selection screen and same to be applied one mail attachment excel as well.
code is like-
CALL TRANSFORMATION ZEDI_FORMAT_XLS_NEW
SOURCE TABLE = GT_OUTTAB[]
RESULT XML XMLSTR.
here i need to layout apply variant as well.
Please suggest
thanks
Surya
Thanks Sandra for your quick help here.
Yes, but my aim here was to understand if we can use layout variant in Call transformation as i never come to such scenario.
many time i am putting that variant in FM
SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S32 { color: #3399FF; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = P_REPID
I_BACKGROUND_ID = P_ID
IS_LAYOUT = P_LAYOUT
IT_FIELDCAT = P_FCAT
IT_SORT = P_SORTCAT
I_DEFAULT = P_DEFAULT
I_SAVE = 'A'
IS_VARIANT = G_VARIANT
TABLES
T_OUTTAB = PT_DISPLAY
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. " ALV_GRID_DISPLAY
like above.
thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you trying to download data to excel without display it in ALV but excel layout need to corresponding to ALV variant used. Within transformation you cant do it, there is no connection between ALV variant and your own transformation, you have to code template for each variant inside the transformation first then call it. Another way to achieve it is use ALV methods which I think you could find a lot of examples over internet.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.