Application Development 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: 

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

Former Member
0 Kudos

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.?????????

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

11 REPLIES 11

Former Member
0 Kudos

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

0 Kudos

since i am creating screen using se51 so i cant use parameters in the coding....i think ur answer is valid if we create selection screen via coding only...

0 Kudos

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

hiriyappa_myageri
Participant
0 Kudos

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.


raymond_giuseppi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

actually i am talking about these checkboxes.

0 Kudos

You can use these check boxes  when you are using Parameter id.


that helps u to set the screen fields with initial values and also u can get same thing using get.

0 Kudos

ur answer is helpful ,,i would be of more help if you can add on some more elaboration on that.....

0 Kudos

can anybody tell me  how to retrieve the value of those field which do not have a parameter id and niether can we set the parameter id for them in screen layout attributes.?????????

0 Kudos

Hello Anshul,

        You can pass the values to memory id using EXPORT.

          EXPORT field/variable TO MEMORY ID 'xyz'.

And can import later using IMPORT.

          IMPORT field/variable FROM MEMORY ID 'xyz'.

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

Cheers

0 Kudos

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