2009 May 13 1:35 PM
g_rep = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = sy-repid
i_save = c_u
IMPORTING
e_exit = g_exit
es_variant = g_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc EQ 0.
IF g_exit IS INITIAL.
g_rep-variant = g_variant-variant.
p_layout = g_variant-variant.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
is it necessary to use g_rep =sy-repid?
if yes then why
thanks in advance
ENDIF.
2009 May 13 1:41 PM
Hi,
We need to pass the program name to the FM 'REUSE_ALV_VARIANT_F4' as the variants are stored program wise. Also in ur code u have passed in the exporting parameter ' is_variant = sy-repid' where is should be
g_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = g_variant
i_save = c_u
IMPORTING
e_exit = g_exit
es_variant = g_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
Regards,
Nikhil
g_rep = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = sy-repid
i_save = c_u
IMPORTING
e_exit = g_exit
es_variant = g_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc EQ 0.
IF g_exit IS INITIAL.
g_rep-variant = g_variant-variant.
p_layout = g_variant-variant.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
is it necessary to use g_rep =sy-repid?
if yes then why
thanks in advance
ENDIF.
2009 May 13 1:41 PM
Hi,
We need to pass the program name to the FM 'REUSE_ALV_VARIANT_F4' as the variants are stored program wise. Also in ur code u have passed in the exporting parameter ' is_variant = sy-repid' where is should be
g_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = g_variant
i_save = c_u
IMPORTING
e_exit = g_exit
es_variant = g_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
Regards,
Nikhil
2009 May 13 1:46 PM
Hi,
While calling the Function Module, in parameter IS_VARIANT you have to pass different fields of Variant and not SY-REPID.
if you seee the structure of parameter IS_VARIANT, there is one field REPORT where you have to pass SY-REPID.
Something like this: g_var-report = sy-repid.
SY-REPID is the Current Report/Program Name, which is calling this function Module.
2009 May 19 11:12 AM
Thanks a lot both Nikhil and ANURITA!
Your help is really appreciable.
Prem
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |