2015 Jan 30 7:39 AM
Hello!
I have a custom program requirement where I have to copy the standard function of Others-> Layout (IW28/IW38) into a custom program. Supposedly, it's function is to create/modify/delete the layout of the output as user's requires. Has anybody had this kind of requirement before. I already tried searching the forums but I didnt find anything relevant. Any input would help
Thanks and regards,
Rowie
2015 Jan 30 10:56 AM
hi Rowie,
Try this below code .
*Layout
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-054.
PARAMETERS: P_VAR TYPE SLIS_VARI.
SELECTION-SCREEN END OF BLOCK B3.
****************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VAR.
PERFORM F4_VARIANT CHANGING P_VAR.
*&---------------------------------------------------------------------*
*& Form F4_VARIANT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM F4_VARIANT CHANGING C_VARIANT TYPE SLIS_VARI.
LS_VARIANT-REPORT = SY-REPID.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
IS_VARIANT = LS_VARIANT
I_SAVE = 'A'
IMPORTING
E_EXIT = L_EXIT
ES_VARIANT = LS_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 2.
MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF L_EXIT EQ SPACE.
C_VARIANT = LS_VARIANT-VARIANT.
ENDIF.
ENDIF.
ENDFORM. " F4_VARIANT
Hello!
I have a custom program requirement where I have to copy the standard function of Others-> Layout (IW28/IW38) into a custom program. Supposedly, it's function is to create/modify/delete the layout of the output as user's requires. Has anybody had this kind of requirement before. I already tried searching the forums but I didnt find anything relevant. Any input would help
Thanks and regards,
Rowie
2015 Jan 30 10:56 AM
hi Rowie,
Try this below code .
*Layout
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-054.
PARAMETERS: P_VAR TYPE SLIS_VARI.
SELECTION-SCREEN END OF BLOCK B3.
****************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VAR.
PERFORM F4_VARIANT CHANGING P_VAR.
*&---------------------------------------------------------------------*
*& Form F4_VARIANT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM F4_VARIANT CHANGING C_VARIANT TYPE SLIS_VARI.
LS_VARIANT-REPORT = SY-REPID.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
IS_VARIANT = LS_VARIANT
I_SAVE = 'A'
IMPORTING
E_EXIT = L_EXIT
ES_VARIANT = LS_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 2.
MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF L_EXIT EQ SPACE.
C_VARIANT = LS_VARIANT-VARIANT.
ENDIF.
ENDIF.
ENDFORM. " F4_VARIANT
2015 Feb 02 7:53 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |