Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Copy IW28 Others-> Layout function into custom program

rowieforms
Participant
0 Likes
710

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

1 ACCEPTED SOLUTION
Read only

Former Member
619

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

2 REPLIES 2
Read only

Former Member
620

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

Read only

0 Likes
619

hi manoj kedem ,


Thank you! This is just what i needed


thanks and regards,

Rowie