Skip to Content
avatar image
Former Member

using set parameter and get parameter checkboxes in screen painter ????

i am creating a module pool program ,in this on the layout i am creating text boxes for some fields from the dictionary(goto-->secondary window-->dictionary/prog.fields[f6]).to access the value that the user will enter on the selection screen in this textbox i am writing get parameter id............ So for that to function i am selecting the set parameter check box on the screen layout attributes of the textbox.......

i want to ask whether i am doing the wright thing or do i need to do something else.Please tell explain me which checkbox (set parameter or get parameter) should i tick for what purpose.Moreover i would like to know how to retrieve the value of those field which do not have a parameter id and niethe can we set the parameter id for them in screen layout attributes.?????????

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 08, 2013 at 11:03 AM

    Hello Anshul,

    No need to use SET/GET Parameter ID. You can directly pass the values to module pool screen. Example:

    PARAMETERS: p_monat TYPE monat.

    Have screen field as MONTH and pass value directly to month from Selection screen

    Month = P_MONAT.

    Or may be didn't get your requirement.

    SET parameter: When you activate the SET parameter, the field input value is stored in the SAP memory under the associated ID. The appropriate parameter ID should be specified.

    GET parameter: When you activate the GET parameter, the value which was previously set in the SAP memory is output in the field instead of the initial value. You should specify the parameter ID accordingly.

    Cheers 😊

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello Anshul,

      Still not clear with your requirement. I am assuming following 2 scenarios.

      If you are passing values in same program from screen XXX1 to screen XXX2. No need to use SET/GET parameter IDs. Directly pass the values. Assign screen fields/variables as global and values will be available in the program.

      While calling different program/transaction you can use IMPORT/EXPORT. There are multiple options to explore.

      EXPORT field/variable TO MEMORY ID 'xyz'.

      IMPORT field/variable FROM MEMORY ID 'xyz'.

      http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bde358411d1829f0000e829fbfe/content.htm

      Please elaborate your requirement.

      Cheers 😊

  • avatar image
    Former Member
    Oct 08, 2013 at 12:21 PM

    actually i am talking about these checkboxes.


    Capture1.jpg (32.9 kB)
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 09, 2013 at 06:02 AM

    Hello Anshul,

    To keep it simple, let me keep it this way.

    For fields with parameter-id's defined. The value is stored in the memory, which in the sense is active as long as our logon is active until it is explicitly cleared.

    For example: We can find the last program used when we get into transaction SE38.

    SET Parameter-Id is to set a value for the field.

    Get Parameter-Id is to retreive value from the field.

    Another use of Parameter-Id's are they are accessible across sessions.

    To check the parameter-id of a field, go to the data element and you can see the parameter-id defined for the field in tab: Further Characteristic

    Hope it helps you.

    Regards,

    Arindam Sinha

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 08, 2013 at 11:12 AM

    Hi Anshul,

    Set parameter is used to set the screen fields with default values.

    Get Parameter is used to get the Screen Filed values.

    Suppose take XD01 As an Example here

    RF02D-KTOKD = 'YB05'.


    SET PARAMETER ID 'KGD' FIELD RF02D-KTOKD.

    RF02D-KUNNR = ' '. "Here I passed Blank because customer number generation is internal.

    SET PARAMETER ID 'KUN' FIELD RF02D-KUNNR.

    RF02D-BUKRS = '1000'.

    SET PARAMETER ID 'BUK' FIELD RF02D-BUKRS.

    RF02D-VKORG = KNVP-VKORG.

    SET PARAMETER ID 'VKO' FIELD RF02D-VKORG.

    RF02D-VTWEG = KNVP-VTWEG.

    SET PARAMETER ID 'VTW' FIELD RF02D-VTWEG.

    RF02D-SPART = KNVP-SPART.

    SET PARAMETER ID 'SPA' FIELD RF02D-SPART.

    CALL TRANSACTION 'XD01' AND SKIP FIRST SCREEN.


    GET PARAMETER ID 'KUN' FIELD RF02D-KUNNR. "Here i will get the generated customer number using get parameters id.

    so what You have used in ur screen is correct.

    Test the above scenario u will come to know the differences.

    If helpful award the points.

    Regard's,

    Hiriyappa.


    Add comment
    10|10000 characters needed characters exceeded

  • Oct 08, 2013 at 11:29 AM

    To pass a value from selection-screen to module dynpro, you only have to define the field in the global data area (TOP include)

    SPA/GPA parameters are stored in the global user-specific SAP memory. You can get/set their values

    • with explicit GET/SET MEMORY ID statements,
    • or by attaching the memory id to the dynpro field so implicit get/set memory id are executed in PBO and PAI.

    You don't really require those memory id to pass values from selection-screen to a dynpro of the same program. They are more useful for communication between different programs. (and speed up input for users)

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded