Variants for module pool screena

Hi,
I tried creating a variant for module pool screen by using the FM : RS_CREATE_VARIANT.
For this i created a dummy report which has the same parameters as the fields in the screen.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
        EXPORTING
          report                      = gc_dummy_rep
          variant                     = 'variant5'
        MOVE_OR_WRITE               = 'W'
        NO_IMPORT                   = ' '
        EXECUTE_DIRECT              = ' '
      IMPORTING
        SP                          =
        tables
        L_PARAMS                    =
        L_PARAMS_NONV               =
        L_SELOP                     =
        L_SELOP_NONV                =
          valutab                     = lt_params
        OBJECTS                     =
        FREE_SELECTIONS_DESC        =
        FREE_SELECTIONS_VALUE       =
      EXCEPTIONS
        VARIANT_NON_EXISTENT        = 1
        VARIANT_OBSOLETE            = 2
        OTHERS                      = 3
      IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
but when i try to retrieve the values stored in the variant using FM : RS_VARIANT_CONTENTS.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
        EXPORTING
          report                      = gc_dummy_rep
          variant                     = 'variant5'
        MOVE_OR_WRITE               = 'W'
        NO_IMPORT                   = ' '
        EXECUTE_DIRECT              = ' '
      IMPORTING
        SP                          =
        tables
        L_PARAMS                    =
        L_PARAMS_NONV               =
        L_SELOP                     =
        L_SELOP_NONV                =
          valutab                     = lt_params
        OBJECTS                     =
        FREE_SELECTIONS_DESC        =
        FREE_SELECTIONS_VALUE       =
      EXCEPTIONS
        VARIANT_NON_EXISTENT        = 1
        VARIANT_OBSOLETE            = 2
        OTHERS                      = 3
      IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
I get an error message : variant5 not found.
is there anything that i miss here?
or is the way i use to create variant for module pool screen not right?
Regards,
Kamini

Hi,
To avail save variant option in module pool screen,
1. You need to create a data base table similar to INDX table with the fields RELID, VARI_NAME
PROG_NAME
UNAME
SRTF2, MEMORYID, CLUSTR,  CLUSID. And the remaining fields can be anything.
2. Enable the Save button in the Function keys part of GUI Status. And Add a push button for Get variant.
3. When Save button clicked call a screen with a single field for variant (let us say g_var). After g_var entered, in the PAI of the initial screen export all the screen values to the created database index using the statement .
                     EXPORT: g_characteristics_tab TO DATABASE zav0257(ch) ID g_var,
                                   s_auart TO DATABASE zav0257(au) ID g_var.
                     So that the values will be exported to database.
                     Then update the fields(VARI_NAME,PROG_NAME,UNAME) of  the database table using modify from work area. 
                     So that you will have the history of variance existence.
4. Next time , when the user clicks on Get Variant option, call another screen to enter the variant name. Then import the values for that variant from the memory id in the database table.
It worked for me.

Similar Messages

  • How can one save variants for module pool screens.

    hai all,
         i have done a module pool screen for taking information from user..later i leave to list processor and give a report to the user.
      i am testing the program with many input parameters.i don't want to enter the values each time i execute the program.can i not save a variant like i save for normal abap editor programs?
    any other solution ?

    Hii..
    Variants can be created in Selection Screen only...
    For ur Scenario:
    To leave to the list use the Statements
    <b>LEAVE TO LIST-PROCESSING And return .</b>
    then the Data will be automatically retained.
    <b>Reward if Helpful</b>

  • 'Save As Variant' for Module Pool Program - FM to be called?

    I have a dialog program, i want to activate the 'Save As variant' when i click on save on the selection screen of the transaction i created for the dialog program. What funtionality should be called or written for the PF-STATUS to implement the functionality.

    hi Dagny,
      You can't have variants for module pool. It is possible only for selection screen.
    You have following alternatives :-
    1. Create a report with same selection screen as you have now in module pool.
    And then make a call screen to your intial module pool.
    In this way you can all the advantage of variants as well as module pool.
    OR
    2. Create a transaction variant using transaction SHDO.
    Hope it is helpful.
    and do search the form , it is already answered before.
    regards
    venkat

  • Varient for module pool screen

    can we create varient for module pool screen.

    <b>namaste anil anna.</b>
    how is pune .
    how is erwada joil.
    salman khan vunnada leda
    Try out on the filled screen:
    System - User defaults - Keep data
    If you re-run it:
    System - User defaults - Restore data
    or try this link
    http://help.sap.com/saphelp_nw04/helpdata/en/7d/f63a0a015111d396480000e82de14a/content.htm
    regards
    nagaraju madipadiga
    hcl technologies
    09958011191

  • Reg : Variant saving for Module Pool Programming

    Hey Friends,
       Plz help me in how to create variant for Module Pool Programming as in normal reports.Thanx in advance.

    Hi,
    You can create variants for Module pool program using the transaction SHD0. You can create Screen variants for your screens using this Tcode.
    Go to SHD0 -> Give the Transaction code(ZTRAN) for which you want to create a variant -> name of some variant (ZVAR) -> create -> takes you to your transaction -> Give the values that you want to be displayed as variants -> Click on Save -> Opens a pop up to confirm the screen entries -> Check the check boxes of those fields that you have entered the data with (the column with check boxes that says W.Content) -> Exit and Save -> Save the variant -> You can see a screen variant created (ZVAR_0100)
    Now Goto -> Create variant transaction -> Give your transaction variant name (ZVAR) -> Select Transaction with variant -> Takes you to SE93 transaction -> Give the transaction variant name  -> save. Run with the created transaction.
    Edited by: Nitwick on Jul 27, 2009 4:49 PM

  • Is it possible to save a variant in Module Pool program

    Hi,
    We have got a requirement to save a Variant for the user selections in Module Pool Program. Is it possible to save a variant in a Module Pool Program?
    Please let me know how to do that if it is possible.
    Thanks in Advance.

    hi Dagny,
      You can't have variants for module pool. It is possible only for selection screen.
    You have following alternatives :-
    1. Create a report with same selection screen as you have now in module pool.
    And then make a call screen to your intial module pool.
    In this way you can all the advantage of variants as well as module pool.
    OR
    2. Create a transaction variant using transaction SHDO.
    Hope it is helpful.
    and do search the form , it is already answered before.
    regards
    venkat

  • Display Continuous Fluctuations in Input Data in Module Pool Screen

    Dear All,
    We are working on a Weighbridge Interface scenario, where the weighbridge is sending data to a digitizer, which is connected to the COM port of a PC. The objective is to read the data from the digitizer, and display in a Module pool screen. However, there is one more requirement: the weight may fluctuate until it stabilizes, and the fluctuations have to be displayed on screen. For example, the tare weight of a vehicle may be 12.4 TON, but when the vehicle is standing on the weighbridge, the weight may vary from 10.4 to 12.4 TON. The idea is to capture the stable weight, so that any discrepancies can be avoided. In the current IT system implementation, the fluctuations in the weight are displayed. But using ABAP, can these fluctuations be captured? For example, we may design a screen containing a field for capturing the weight, and the weight displayed there automatically refreshes as soon as there is a change in the digitizer reading. Is this possible to achieve? If so, how?
    Awaiting answers.
    Thanks and Regards,
    Sid

    Hi Sid,
    just a suggestion for the refreshing of an ABAP screen: you can use class CL_GUI_TIMER, but it only handles whole seconds, i.e. 1 second, 2 seconds and so on, but not 0.5 seconds...
    An example of an ABAP listing could be the following:
    *& Report  ZZAVV001
    REPORT  zzavv001 NO STANDARD PAGE HEADING.
    CONSTANTS: c_yes(1) TYPE c VALUE 'X'.
    DATA: BEGIN OF t_bseg OCCURS 0.
            INCLUDE STRUCTURE bseg.
    DATA: END OF t_bseg.
    data: d_num_bkpf type i,
          d_num_bseg type i.
    PARAMETERS: interval TYPE i DEFAULT 5.  "meaning 5 seconds
    *       CLASS lcl_receiver DEFINITION
    CLASS lcl_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
          handle_finished FOR EVENT finished OF cl_gui_timer.
    ENDCLASS.                    "lcl_receiver DEFINITION
    * Global data
    DATA:
      test       TYPE i,
      receiver   TYPE REF TO lcl_receiver,
      timer      TYPE REF TO cl_gui_timer.
    START-OF-SELECTION.
      CREATE OBJECT timer.
      CREATE OBJECT receiver.
      SET HANDLER receiver->handle_finished FOR timer.
      timer->interval = interval.
      CALL METHOD timer->run.
      PERFORM load_data.   "or whatever you have to do to read the weight
      PERFORM show_list.   "or whatever you have to do to print the weight you've read
    *       CLASS lcl_receiver IMPLEMENTATION
    CLASS lcl_receiver IMPLEMENTATION.
      METHOD handle_finished.
        PERFORM carga_datos.
        PERFORM muestra_listado.
        CALL METHOD timer->run.
      ENDMETHOD.                    "handle_finished
    ENDCLASS.                    "lcl_receiver IMPLEMENTATION
    *&      Form  load_data
    *       text
    FORM load_data.
      clear: d_num_bkpf,
             d_num_bseg.
      select single count( * )
        into d_num_bkpf
        from bkpf.
      select single count( * )
        into d_num_bseg
        from bseg.
    ENDFORM.                    "load_data
    *&      Form  show_list
    *       text
    FORM show_list.
      get time.
      skip to line 1.
      position 1.
      write: / 'Date / Time:', sy-datum, sy-uzeit.
      write: / 'Number of BKPF records:', d_num_bkpf.
      write: / 'Number of BSEG records:', d_num_bseg.
    ENDFORM.                    " show_list
    Okay, it's just a tiny code snippet, but I hope it may help you by designing auto-refreshing screens.
    Kind regards,
    Alvaro

  • Icon display in Module pool screen not visible to some users

    Hi,
    I have added an icon in one of the module pool screen with dynamic quick info.  The page is rendered fine and the info is also displayed well for most users except some.  I can't figure out why the icon is not being displayed for some users.
    Do someone has any solution for this?
    Thanks,
    Sumith

    As I recall, the icons are actually stored in a file on each PC so some users may have a corrupted or out-of-date file with the icons.  You can look for posting on "how to add an icon" to see a discussion on this topic.
    I found some useful info at:
    Create and Add Icons to table ICON?
    Message was edited by: Charles Folwell

  • How to get the Grand Total in Module pool Screen

    Hi Frds.
         How to get the Grand Total in Module pool Screen
    Example i have 10 different materials
    for each matarial has different moving . But in my case matarials is doesnt matter here
    10 material Moving Average price to do Frand total and display in one column...
    Please Help me out Frds.
    Regards,
    Kabil

    Hi
    You need to calculate the total in a module of PAI (or PBO) event:
    PROCESS PAI.
       LOOP.....
       ENDLOOP.
      MODULE CALCULATE_TOTAL.
      MODULE CALCULATE_TOTAL.
        GRAND_TOTAL = 0.
         LOOP AT ITAB,
            GRAND_TOTAL = GRAND_TOTAL + ITAB-PWB.
        ENDLOOP.
    ENDMODULE.
    In this way the grand total will be calculated as soon as the user presses enter or another command.
    You can't insert the calculation in the loop of table control, because this loop runs the visible lines only, so it's better to calculate the total out of those loop,

  • How to retain leading zeros in module pool screen

    Hi experts,
    I have a ztable field of type NUMC4 being displayed on a module pool screen, the value in the field is '0001', but on the screen it displays value as '1' (without leading zeros), When I save the record, Even in the databse it stores as '1'.
    But I have checked in debugging the field always contains '0001' in the program execution and I have also used 'CONVERSION_EXIT_ALPHA_INPUT' in the PBO but no use.
    Pls suggest.
    Thanks,
    Deepak

    Check the screen attributes for the field. There is an option to show leading zeroes.
    edit.
    And how did you see it was stored a 1 and not 0001? Using SE16N? Mind you: with SE16N conversion-exits are executed automatically thus showing 0001 as 1.
    To make sure: double click on the record in SE16N and look if it's still 1 and not 0001.

  • How to give ** bydefault in password in module pool screen .

    Hi experts
    how to give  *******  by default in password in module pool screen .
    Thanks

    Hi ,
        Double click on the field u will get a pop up window
        i.e. attribute window for that field.
        in that window you have a tab called Program at the bottom.
       in program tab you have many checkboxes.
      check the check box with name *Entry.
      and activate.
    what ever you enter now will be in password formate
    Regards
    Ajay

  • Call module pool screen from ABAP Webdynpro

    Hi All
    I designed one screen in normal classical dynpro in SE80 for module pool program. I want to call that screen layout design in webdynpro view layout.
    So please help me how can i call that module pool screen from my ABAP webdynpro 

    Hi
    Thank you for your great replay. But Mr Ramakrishnappa and Mr Katrice as your reference i go through that but when i insert the program name and screen number program is end with a run time error saying
    dynamic type conflict when assigning reference.
    Please refer the below snap shot

  • Displaying MIR4 attachment list TIF image in module pool screen

    Hi All,
    I have a screen with a custom container and I tried to call a TIF image from MIR4 which is in attachment list(which is stored in archived link).
    I need a function module to display this image in my Module pool screen using the container.
    I tried using below code
    * Create controls
         CREATE OBJECT container_1
           EXPORTING
             container_name = 'CONTAINER'.
    *    create object container_2
    *      exporting container_name = 'PICTURE_CONTROL_2'.
         CREATE OBJECT PICTURE_CONTROL_1
           EXPORTING
             parent = container_1.
    *    CREATE OBJECT PICTURE_CONTROL_2 exporting parent = container_2.
    CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL
           EXPORTING
    *    URL    = 'SAPR3://984BE16932C81EE3B2AA1E3B0D12C6FF'
    *      URL    = 'file://E:\Personal\New_Passport4.jpg'
    *       URL    = 'SAPR3://984BE16932C81EE3B2BDF8E44B035648.TIF'
    *URL    = 'SAPR3://SAPR3CMS/get/100/Z1/984BE16932C81EE3B2BDF8E44B035648//.TIF'.
         URL    = 'SAPR3://WebRepository/0020698212/DEMOWORD97SAPLOGO?Version=00000'
         IMPORTING
              RESULT = lv_result.
    CALL METHOD PICTURE_CONTROL_1->set_display_mode
         EXPORTING
           display_mode = PICTURE_CONTROL_1->display_mode_fit_center.
    But I am able to display this URL    = 'SAPR3://WebRepository/0020698212/DEMOWORD97SAPLOGO?Version=00000' and not able to display my archive link image which is in TIF.
    note: Display image of Arc.link Doc.type ZBUSI_TIF (doc.class TIF)
    Please help me on this.
    Thanks
    Geetha Charan

    Hi sai,
    Please refer th procedure.
    For the select-options you might have defined a selection screen.
    Next you can fetch the entire data that you wanted to display in a module pool into an internal table.
    you can call the screen you defined for o/p upon the selection.
    Then, You define a screen XXXX  and a table control in the scree, and in the PAI module of the screen
    you write a chain end chain processing in which you can display the contents of your internal table.
    OR
    if you want the selection also to be in the module pool,  then for displaying the O/P you can definr a sub-screen of the initial screen and you can call that sub-screen on selcting, which can be done with a function code.
    Hope this helps

  • Problem in creating a Select-option im a module pool screen

    I've been searching how to do a select option in a module pool screen, I've found this neat tutorial http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html
    but I'm having trouble to replicate it...
    I've created this conde in my TOP include
    SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
       SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
        SELECT-OPTIONS: s_matnr FOR mara-matnr.
      SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF SCREEN 201.
    and this is my screen flow code
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE pbo_200.
    PROCESS AFTER INPUT.
      MODULE pai.
      MODULE user_command_0200.
    in the screen 200 I have a subscreen area named subs
    but when I do this:
    MODULE pbo_200 OUTPUT.
      CALL subscreen subs including sy-repid '0201'.
    ENDMODULE.                 " pbo_200  OUTPUT
    it doesn't "compile"
    it gives me this error:
    ""." or "ID ... FIELD ..." expected after "SUBSCREEN"."
    what am I missing? it seems its not recognising the "CALL SUBSCREEN" command...

    you can't use CALL SUBSCREEN... in any ABAP section. It is reserved to dynpro flow logic. Just add it after PROCESS BEFORE OUTPUT (and also after PROCESS AFTER INPUT).

  • Expand/collapse button functionality on module pool screen

    Hi ,
    I want to design a module pool screen with a expand/collapse button on it.
    The desired functionality associated with this button would be something similiar to that available in ME21N screen. When the expand button is clicked it should open up a section of screen that allows the user to enter some parameter. Based on this parameter some selections from DB can be perfomed and then displayed below it.
    Any pointers on how to achieve this? Any kind of help would be appreciated.
    Regards-
    Harmeet Singh.

    example for three pushbutton with expand collapse .
    First of all define your push button as output field with icon tick in the pushbutton characteristick,
    then define this pushbutton in top_include
    include <icon>.
    data : push_a1 like icons-l4,
             push_a2 like icons-l4,
             push_a3 like icons-l4.
    data : a1 ,
             a2,
             a3.
    in pai of the screen
    suppose i had assign function code a1 ,a2 , a3 for repective pushbutton
    module user_command_9002 input.
      okcd = ok_code.
      clear ok_code.
      case okcd.
        when 'A1'.
          if a1 is initial.
            a1 = 'X'.
          else.
            clear a1.
          endif.
        when 'A2'.
          if a2 is initial.
            a2 = 'X'.
          else.
            clear a2.
          endif.
        when 'A3'.
          if a3 is initial.
            a3 = 'X'.
          else.
            clear a3.
          endif.
      endcase.
    endmodule.                 " USER_COMMAND_9002  INPUT
    define three seprate screen -group for three pushbutton say a1 a2 a3
    during pbo you can directly assign name of icon .
    if a1 is initial.
        push_a1 = icon_collapse.
      else.
        push_a1 = icon_expand.
      endif.
      if a2 is initial.
        push_a2 = icon_collapse.
      else.
        push_a2 = icon_expand.
      endif.
      if a3 is initial.
        push_a3 = icon_collapse.
      else.
        push_a3 = icon_expand.
      endif.
    loop at screen.
        if screen-group1 = 'A1'.
          if a1 = 'X'.
            screen-invisible = 1.
            screen-input = 0.
            modify screen.
          else.
            screen-active = 1.
            screen-invisible = 0.
            screen-input = 1.
          endif.
        elseif screen-group1 = 'A2'.
          if a2 = 'X'.
            screen-invisible = 1.
            screen-input = 0.
            modify screen.
          else.
            screen-active = 1.
            screen-invisible = 0.
            screen-input = 1.
          endif.
        elseif screen-group1 = 'A3'.
          if a3 = 'X'.
            screen-invisible = 1.
            screen-input = 0.
            modify screen.
          else.
            screen-active = 1.
            screen-invisible = 0.
            screen-input = 1.
          endif.
        endif.
      endloop.
    regards,
    Alpesh
    Edited by: Alpesh on May 28, 2009 10:28 AM

Maybe you are looking for

  • How to create a custom Contacts list in SharePoint 2010 from accounts already in AD

    Hi folks, Newbie to SharePoint but not to being an Administrator.  Problem is that in my new functions I no longer am an Admin. I have been asked to post contact lists (Excel) on the SharePoint site.  (fairly easy to do) But I though....we already ha

  • Set up Payment Methods Per Company code for Transaction

    Hi All, Can any expert please suggest whether do we need to enter only paying company codes while defining the payment methods per company code or enter all company codes. Ex: We have 10 company codes for which there are 3 paying company codes. After

  • How do I change Text Colour in a Spreadsheet?  The Help menu doesn't help.

    Simple question whcih i cannot find the simple answer to:  How do I change Text Colour in a Spreadsheet?  The Help menu doesn't help.

  • Blu-Ray authoring workflow

    Hi all, I am just starting to work with Blu-ray. I created my first disk both BR-RE and a BR-R disks. I have been using Premiere Pro cs5 with latest updates for a while now. I have been taking HD content and exporting a dvd mp2 file with the followin

  • Saving a rotated pdf in that position?

    i have a photo album i have scanned ,the phot os are too old to be removed from the page,so ive scanne d them and they come as pdf .i want to rotate them to sen d to a family member overseas.....problem is every time i rotate and save them....the fil