Varyant Değerleri- Get Variant Values of Report


RS_VARIANT_CONTENTS

You can get values of variant by using this function in sap,
valutab table will help you to fill the seltab table which you can use it for submit report .

 You can see the code..

QM03 - Bildirim & QM Notification Call

If you want to call QM03 by sending notification from alv hotspot, you can use it..

QM03 hotspot ile çağırırken parametrelere yazdıgınız halde bildirim numarasını koymadıgı zaman aşağıdaki kodu kullanabilirsiniz..

         WHEN 'QMNUM'.

            FREE MEMORY ID 'QMOB'.
            SET PARAMETER ID 'IQM' FIELD wa_stab-qmnum.
            CALL FUNCTION 'RS_HDSYS_VALUES_VARIANT'
              EXPORTING
                i_tcode          = 'QMOB'
                i_liste          = ' '
                i_f4_call        = ' '
                show_std_variant = 'X'
              TABLES
                e_shdstciu       = l_shdstciu_tab
              EXCEPTIONS
                cancelled        = 1
                no_variants      = 2
                OTHERS           = 3.
            IF sy-subrc <> 0.
              CALL TRANSACTION 'QM03' AND SKIP FIRST SCREEN.
            ELSE.
              READ TABLE l_shdstciu_tab INDEX 1 INTO l_shdstciu.
              CALL FUNCTION 'RS_HDSYS_CALL_TC_VARIANT'
                EXPORTING
                  tcode                    = 'QM03'
                  variant                  = l_shdstciu-tcvariant
                  authority_check          = 'X'
                  variant_check            = ' '
                  call_mode                = 'X'
                  i_flag_skip_first_screen = 'X'
                EXCEPTIONS
                  OTHERS                   = 0.
            ENDIF.

Get Variant Name When Running Report- Varyant Adını Alma

Normalde SY-SLSET alanı ile çalışan programda varyant adını alabiliriz fakat eğer programınızı arka planda iş olarak tanımladıysanız ozaman malesef programda parametre olarak koymak zorundayız..

PARAMETERS: po_varnt TYPE sy-slset NO-DISPLAY.

AT SELECTION-SCREEN OUTPUT.
CHECK sy-batch IS INITIAL.
CLEAR po_varnt.
MOVE sy-slset TO po_varnt .

If the program is run in foreground (sy-batch = space) we can use SY-SLSET to get the variant name. If the program is run in background (sy-batch = 'X') , we can use selection screen parameter po_varnt to get the variant name.