How to create a parameter id on screen element

How to create a parameter id on screen element
reply urgent

Hi Madan,
Check this info.
Parametere Id is the one which holds the memory for the particular field. when we need to pass the the field from one screen to another use the parameter Id.
The SAP Memory is a user-specific memory area of the application server, which is accessed by all main sessions of a user session at once. ABAP programs have access to SPA/GPA parameters stored in the SAP Memory (also called SET/GET parameters).
Eg. Of  how to use Set parameter
you can give value of variable (dobj) to parameter ID 'pid'. This will store value in SAP memory
SET PARAMETER ID pid FIELD dobj.
When you want to use that value stored in SAP memory
you can use GET parameter.
GET PARAMETER ID pid FIELD dobj.
To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETER statements.
To fill one, use:
SET PARAMETER ID <pid> FIELD <f>.
This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.
To read an SPA/GPA parameter, use:
GET PARAMETER ID <pid> FIELD <f>.
This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4, otherwise to 0.
To fill the initial screen of a program using SPA/GPA parameters, you normally only need the SET PARAMETER statement.
The relevant fields must each be linked to an SPA/GPA parameter.
On a selection screen, you link fields to parameters using the MEMORY ID addition in the PARAMETERS or SELECT-OPTIONS statement. If you specify an SPA/GPA parameter ID when you declare a parameter or selection option, the corresponding input field is linked to that input field.
Check this link.
http://help.sap.com/saphelp_47x200/helpdata/en/f5/6a853c61c5140ee10000000a11405a/frameset.htm
Hope this resolves your query.
Reward all the helpful answers.
Regards

Similar Messages

  • How to create a parameter to allow multiple selection

    Hi,
    I am developing report in Oracle EBusiness suite. I use concurrent program to develop the report. My question is how to create a parameter to allow multiple selection for such kind of report?
    thanks
    Lei

    I dont think, we have multiple selection in the parameters of Concurrent Program :).

  • How to create a parameter id for a user

    Can anyone tell me how to create a Parameter id. I want to set some parameters for a user for that need to have parameter id.
    Please tell me the steps to create the Parameter id.
    Kiran

    Hi Kiran,
    U can do this using the TCODE SU3.
    1. Goto SU3.
    2. Goto the parameters Tab.
    3. Provide the Parameter ID and Parameter Value.
    4. Save.
    Its done!!!..
    Cheers,
    Krithiga.
    ***Pls reward points if this is useful.

  • How to give error message for the screen element text field when wrong i/p

    How to give error message for the screen element text field when wrong i/p
    when wrong input given
    eg. 
    I have a text box with SBOOK-CARRID
    so when user give wrong entry in text box i.e LG
    then I should give some error stating that the the input is invalid or not available ,
    now it showing the error of standard messages,
    i want manual message to be displayed when error comes.
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla

    Hi all,
    Thank you for your valuable reply,
    but the thing is that its a screen field,
    i.e text box not a selection screen
    i created in screen layout
    with name sbook-carrid
    now i want to get error message display if wrong i/p is given
    thank you.
    Regards,
    Jagrut bharatkumar Shukla,

  • How to create a report with selection screen that can run in background

    Sorry to ask these basic questions but I am knew to ABAP Programming.
    To keep it simply, I am attempting to create a report that has a simple parameter driven selections screen with one field.  That field takes in a folder path from the user.  The user executes the report.  The report creates a simply BDC that goes into SE16, gathers data from a table, and exports the results to a text file using the folder path provided.  I created a variant for the folder path field in the selection screen hoping to use it while executing the report in the background.  The report is not exporting the file as it did when run in the foreground for some reason.
    I am wondering what event is triggered when a report is executed in the background.  In the foreground (or when I execute the program via SE38->Execute->With Variant) the user needs to execute the program by hitting the execute button once the variant has populated the folder path field.  It works then, so I am trying to get the same to work in the background.  I am thinking I didn't put the program together correctly to accommodate the running in the background.  How can you create a report that can accept user input via variant into a selection screen and then run in the background?
    Please, any information would be greatly appreciated.
    Thanks you all for reading this!!!

    Ok, finally I understand what you're doing. Initially you lost me with the SE16 reference...
    Not sure what you're trying to achieve overall, but apart from the fact that you cannot export/download a file to a user's PC via background job (unless you have a mapped network share on the server or something like an FTP server on the user's PC, but both are pretty hypothetical scenarios and unlikely to occur).
    Also, the BDC approach to get data via SE16 is pretty awkward. Note that SE16 is guarded by some authorization checks and often users won't have access in production (which might not matter if you intend to always run your program in background via dedicated batch user). However, I have no clue why you wouldn't want to use [open SQL|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_READING.htm] to read the data. You could then save it on the application server or if you really have to get it to the user you can consider e-mailing the file (extracts should be compressed before sending). For the latter you'll find plenty of references here, basically it's the [business communication services|http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/1c5d3aebba4c38e10000000a114084/frameset.htm] that you'd need to look at.

  • HOW TO CREATE 2 PARAMETER IN SINGLE LINE.

    Please do NOT POST IN ALL CAPITALS
    HI,
    HOW TO CREATE TWO PARAMETERS IN A SINGLE LINE AND THE INPUT HAS TO BE DISPLAYED IT IN A POP UP BOX. THIS IS MY TRAINING TASK HELP ME TO SOLVE IT.
    REGARDS,
    SREERAM
    Edited by: Matt on Mar 19, 2009 1:26 PM

    hi,
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(10) text-001.
    PARAMETERS:
    p_carrid TYPE spfli-carrid.
    SELECTION-SCREEN COMMENT 30(10) text-002.
    Parameter p_connid TYPE spfli-connid.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    Radio buttons in a single line.
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(10) text-001.
    PARAMETERS p_rad RADIOBUTTON GROUP grp.
    SELECTION-SCREEN COMMENT 30(10) text-002.
    Parameter p_rad1 RADIOBUTTON GROUP grp.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1
    Thanks
    Sharath

  • How to create a Parameter with LOV

    Hello All,
    I am having the follwoing custom query.
    SELECT concatenated_segments, (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR)) MOVEMENT
    FROM gl_balances a, gl_code_combinations_kfv b
    where period_name='Apr-08'
    and a.code_combination_id = b.code_combination_id
    and set_of_books_id=1010
    and currency_code='USD'
    gROUP BY concatenated_Segments
    HAVING (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR))<>0.
    Instead of hard coding the values I have created the custom folder
    with the follwoing query.
    SELECT concatenated_segments, (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR)) MOVEMENT
    FROM gl_balances a, gl_code_combinations_kfv b
    where a.code_combination_id = b.code_combination_id
    gROUP BY concatenated_Segments
    HAVING (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR))<>0.
    Now I have to create three input parameters period_name,set_of_books_id,currency_code.
    The parameter set_of_books_id should have list of values so that the user will select one from it at run time. But when I tried to create the parameter
    I am unable to create list of values for this parameter. (i.e in Parameter dialog box the For Item filed doest not have any field like set_of_books_id as it is custom query)
    So how Can I add LOV for this parameter.
    Kind Regards,
    PRaveen.

    Hi,
    You custom folder needs to contain a statement like :
    SELECT concatenated_segments, period_name,set_of_books_id,currency_code, (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR)) MOVEMENT
    FROM gl_balances a, gl_code_combinations_kfv b
    where a.code_combination_id = b.code_combination_id
    gROUP BY concatenated_Segments, period_name,set_of_books_id,currency_code
    HAVING (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR))<>0.
    The you will have the period_name,set_of_books_id,currency_code items in the folder and can create parameters using these columns.
    To define the LOV you will need to create separate folders that return the list of values required e.g.
    SELECT set_of_books_id, name
    FROM GL_SETS_OF_BOOKS
    Use this folder to define an item class and then include the set_of_books_id from the first folder into the item class.
    Rod West

  • Module-pool: how to create different blocks at same screen

    hi experts,
    can i create different blocks at same selection-screen in module-pool? if yes,how?and can i use 'loop at screen' in dat case?
    thanks.

    you can do that...
    you have create subscreen areas in the screen painter and call the selection screen on those areas..
    Just see the stpes..and follow the sample code..
    REPORT  ztest_mod.
    DATA: kunnr TYPE kunnr.
    "if you want to create blocks same like selection screen the
    "you have to create them as subscreen,
    "place them in subscreen area.
    * Custom Selection Screen a
    SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN.
    SELECT-OPTIONS: s_kunnr FOR  kunnr.
    SELECTION-SCREEN END OF SCREEN 0200.
    START-OF-SELECTION.
      "in this screen i have a button with function code 'SEARCH'
      " and a subscreen area with name sub
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS'.
    ENDMODULE.                    "status_0100 OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE user_command_0100 INPUT.
    "for reading the selection screen fields
      DATA:
          i_dyn_fields LIKE TABLE
                         OF dynpread
                       WITH HEADER LINE.
      MOVE:
        'S_KUNNR-LOW' TO i_dyn_fields-fieldname.
      APPEND i_dyn_fields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = '0200'
        TABLES
          dynpfields           = i_dyn_fields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc eq 0.
       read table i_dyn_fields index 1.
        s_kunnr-low = i_dynp_fields-VALUE
        s_kunnr-sign = 'I'.
        s_kunnr-option = 'EQ'.
        append s_kunnr.
      ENDIF.
      DATA: it_kunnr TYPE TABLE OF kna1.
      CASE sy-ucomm.
        WHEN 'SEARCH'.
          SELECT * FROM kna1
          INTO TABLE it_kunnr
          WHERE kunnr IN s_kunnr.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                    "user_command_0100 INPUT
    Flow Logic
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      CALL SUBSCREEN sub INCLUDING sy-repid '0200'.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
    Regards
    Vijay Babu Dudla

  • How to: Create a custom search result screen?

    Hello,
    Is it possible to create a custom search result screen?
    I need it because the users must be able to directly e-mail
    the items or a selection of the items returned by the search.
    For this modification of the standard result page isn't sufficient.
    Thanks,
    Steven.

    Steven, please see:
    http://technet.oracle.com/products/iportal/files/pdk/plsql/doc/sdk23pkg.htm

  • How do I check authority for a screen element

    Hello friends,
    I've been assigned to work on the following problem:
    In an ABAP  program, in fact PAI of a screen, I must add the authority check for a screen element (which is based on a Z table element).
    That is to say, some users must be allowed to edit the screen element, while the others are only allowed to display.
    I was told to look at the AUTHORITY-CHECK statement. It talks about ID and FIELD and other stuff. I find this statement very cryptic and I have no idea what these things are and how to use them. So the questions are:
    1) Can I use it to restrict the ability of changing contents of a screen element?
    2) If yes how do I do it? That is to say, what ID, FIELD, value, etc. do I use?
    3) If not, how else can I do this?
    Your help is greatly appreciated.

    Hi Goharjou,
    Answers to your questions:
    1) Can I use it to restrict the ability of changing contents of a screen element?
    Yes you can use AUTHORITY-CHECK to restrict the ability of changing contents of a screen element.
    2) If yes how do I do it? That is to say, what ID, FIELD, value, etc. do I use?
    Let me explain you with an example. Assuming your screen field is ZTABLE-COLOR and will have values such as 'GREEN', 'BLUE', 'RED', etc.
    Depending on the authorization of the current user, you can restrict the access such as 'CREATE', 'CHANGE' and 'DISPLAY'. Let us talk about creating an authorization object later. First let us assume that there is an authorization object you have created named 'ZAUTH_COLOR' with two fields 'COLOR' and 'ACTVT'. The field 'ACTVT' is a standard SAP feature for checking the above authorization. The possible values are '01' (Create), '02' (Change) and '03' (Display). The field COLOR is your field we spoke earlier.
    In the PAI event, you will check authorization through the following statement (for example you want to check whether current user has got change authorization for the color entered):
    AUTHORITY-CHECK OBJECT 'ZAUTH_COLOR'
      ID 'COLOR' ztabe-color                                     "This will be color entered by user
      ID 'ACTVT' '02'.                                                 "Change authorization
    IF sy-subrc NE 0.
    *& Here do whatever you want like setting a flag and
    *& later in the PBO event, disable some functions / screen-elements
    *& Or raise an error message straight away
    *& or raise an information message and remove whatever color
    *& user has entered for which authorization is not there 
    ENDIF.
    Now let us talk about how the authorization object will be created and how system knows that the current user has such-and-such authorization for the color in subject:
    Through SU21 tcode, you will create the authorization object ZAUTH_COLOR with two fields
       (1) COLOR
       (2) ACTVT
    Maintain possible activities checking all of them '01', '02', '03'.
    Provide the above information to your BASIS administrator. Your Basis admin will assign this authorization object to the user through roles and assign appropriate values for the user profile. e.g. user1 will have authorization for only ACTVT='03' (Display), user2 will have ACTVT=* (all activities), etc. As a developer, you dont have to worry about this. All that you need to do is create the auth-object, communicate to the administrator and change your program to incorporate AUTHORITY-CHECK statement.
    3) If not, how else can I do this?
    Not applicable
    Hope the above helps you and solves your problem.
    Regards
    Suresh Radhakrishnan

  • How to create an Invoice in delivery screen?

    Hi everybody.
    I am trying to create an invoice in the delivery screen, but i am getting an error "-5002 Invalid total[OINV.DocTotal]". Can anyone tell me how to solve this ?
    here is my code
    Dim sNewObjCode As String
            Dim i As Integer
            ' Get last added document number (the order that was added)
            oCompany.GetNewObjectCode(sNewObjCode)
            ' this loop adds the different items to the invoice object
            i = 0
            Do
                oInvoice.Lines.BaseEntry = sNewObjCode
                oInvoice.Lines.BaseLine = i
                oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
                oInvoice.Lines.TaxCode = TableLines.Rows(i).Item(4)
                i += 1
                If i <> TableLines.Rows.Count Then
                    oInvoice.Lines.Add()
                End If
            Loop Until i = TableLines.Rows.Count
            ' Try to add the invoice object to the database
            lRetCode = oInvoice.Add()
            If lRetCode <> 0 Then ' If the addition failed
                oCompany.GetLastError(lErrCode, sErrMsg)
                MsgBox(lErrCode & " " & sErrMsg) ' Display error message
            Else
                cmdInvoice.Enabled = True
                MsgBox("inv Added to DataBase", MsgBoxStyle.Information, "Order Added")
            End If
    Thanks
    Mina

    Mina,
    You have to fill the mandatory fields of the invoice
    oInvoice.CardCode = oDelivery.CardCode
    oInvoice.DocTotal = oDelivery.DocTotal
    oInvoice.HandWritten = tNO
    oInvoice.DocDate = oDelivery.DocDate
    Regards,
    Edwin van Kwikkelberghe

  • How to create a variant for a screen (not a selection screen)

    Hi
    I foud a function module RS_CREATE_VARIANT.
    Is this the correct fm for creating screen variant, if yes then pls provide me some help about how to pass values to this fm.
    if not then pls help me to find out new one.
    thnks
    satisfactory answer will be definitely rewarded.
    S@meer

    passing values to RS_CREATE_VARIANT.
    data : LS_VARIANTDESC TYPE VARID.
      DATA : LT_VARIANTTEXT TYPE TABLE OF VARIT ,
             WA_VARIANTTEXT TYPE VARIT.
      DATA : TT_REPORTPARAM TYPE TABLE OF  RSPARAMS,
             WA_REPORTPARAM TYPE RSPARAMS.
    CLEAR LS_VARIANTDESC.
              LS_VARIANTDESC-MANDT   = SY-MANDT.                " gr 46A
              LS_VARIANTDESC-REPORT  = 'ZXXXXX'.
              LS_VARIANTDESC-VARIANT = 'VARIANT'.
              LS_VARIANTDESC-EDAT    = SY-DATUM.
              LS_VARIANTDESC-ETIME   = SY-UZEIT.
              REFRESH LT_VARIANTTEXT.
              CLEAR WA_VARIANTTEXT.
              WA_VARIANTTEXT-MANDT    = SY-MANDT.               " gr 46A
              WA_VARIANTTEXT-LANGU    = SY-LANGU.
              WA_VARIANTTEXT-REPORT   = 'ZXXXXXX'.
              WA_VARIANTTEXT-VARIANT  = 'VARIANT'.
              APPEND WA_VARIANTTEXT TO LT_VARIANTTEXT.
           CALL FUNCTION 'RS_CREATE_VARIANT'
                  EXPORTING
                    CURR_REPORT               = 'ZXXXXX'
                    CURR_VARIANT              = 'VARIANT'
                    VARI_DESC                 = LS_VARIANTDESC
                  TABLES
                    VARI_CONTENTS             = TT_REPORTPARAM
                    VARI_TEXT                 = LT_VARIANTTEXT
                  EXCEPTIONS
                    ILLEGAL_REPORT_OR_VARIANT = 1
                    ILLEGAL_VARIANTNAME       = 2
                    NOT_AUTHORIZED            = 3
                    NOT_EXECUTED              = 4
                    REPORT_NOT_EXISTENT       = 5
                    REPORT_NOT_SUPPLIED       = 6
                    VARIANT_EXISTS            = 7
                    VARIANT_LOCKED            = 8
                    OTHERS                    = 9.
                IF SY-SUBRC EQ 7.
    If variant with same name already exists, change variant
                  CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'
                    EXPORTING
                      CURR_REPORT               = 'ZXXXXX'
                      CURR_VARIANT              = 'VARIANT'
                      VARI_DESC                 = LS_VARIANTDESC
                    TABLES
                      VARI_CONTENTS             = TT_REPORTPARAM
                    EXCEPTIONS
                      ILLEGAL_REPORT_OR_VARIANT = 1
                      ILLEGAL_VARIANTNAME       = 2
                      NOT_AUTHORIZED            = 3
                      NOT_EXECUTED              = 4
                      REPORT_NOT_EXISTENT       = 5
                      REPORT_NOT_SUPPLIED       = 6
                      VARIANT_DOESNT_EXIST      = 7
                      VARIANT_LOCKED            = 8
                      SELECTIONS_NO_MATCH       = 9
                      OTHERS                    = 10.
                ELSEIF SY-SUBRC NE 0.
                MESSAGE WITH 'Cannot create/change variant for'
                SY-UNAME.
                ENDIF.

  • How to create Drop Down box in screen painter..??

    Can anybody give me sample code or detailed description about creating Drop-Down Box in a screen...??
    I have created the drop down box in screen..
    But how to make data to be visible in Dropdown box, when i click the drop icon in that box...???
    Regards
    Pavan Sanganal

    Here are couple of DEMO programs for the same functionality
    DEMO_DROPDOWN_LIST_BOX       
    DEMO_DYNPRO_DROPDOWN_LISTBOX 
    You execution sequence will be PBO - Process before output, then the screen is displayed and the PAI Process after input.
    Regards,
    Ravi
    Note : Please mark all the helpful answers

  • How to create video by recording the screen

    i am new to JMF ( Java Media Framework ) i was searching for many places.. couldn't find any best tutorial to understand classes of JMF
    Anyways my requirement is
    a) Capture Screen ( full screen / selectable part of screen / a specific window in all the opened applications )
    b) Capture Audio
    c) Club above 2 to create a movie file which has both video and audio
    d) should be able to update the video captured, may be like adding some text in between by marking etc.. info kind of popups on specific time span of the movie
    e) Able to edut video / audio
    f) Video and audio should be in sync
    Note: I saw some examples say use datasource and livestream of jmf examples, but unable to run them and also how to make screen as the data source instead of any video file etc..
    etc..
    any help regarding this would be very great...
    thanks in advance
    srinivas p.

    Not 100% sure what you mean, but you can make highlight overlays with shapes
    http://dvdstepbystep.com/newmap.php
    You can also add items to the background (movie) which you can show/hide (sort of)
    http://dvdstepbystep.com/rollover.php
    Where the shape would be in the background movie itself

  • How to create general message in sap screen for all users

    Hi Forum
    I am using ECC6 version and i want to keep a message for all the users for assistance (like who is the administrator,contact number,mail id, etc)
    Can anyone show me how to do this and also i want to know what is sm02 is used for?
    Regards
    Friend

    You can do this by creating a message at the logon screen
    Read SAP Note 205487
    SM02 is used to send system messages like prior a system downtime or a scheduled maintainance, etc.
    regards
    Juan

Maybe you are looking for

  • How to create a single report using 5 difftent reports

    Hi Experts how to create a single report using 5 repors in it. Example I have to create a Survey history report using Reports like Surevy 1                   Surevy 2                   Surevy 3                   Surevy 4                   Surevy 5 Pl

  • After upgrading to iOS 8.2 can't update date (correctly (year stuck on 1970). This may be reason I can't get to app store.

    Hi, After upgrading to 8.2, I can't access the App Store. After troubleshooting and searching the web, I found suggestions to update the Time setting to automatic, then reset the network settings. The problem is, it won't completely set the Time and

  • Some question, please, help

    Hi all.(sorry for my bad inglish) I try install Sol8 to computer where i have Win2000 instaled. I'm free some disk size(i'm use PartitionMagick) and try install Sol8 to this free disk.(i have IBM Deskstar 30Gb hard drive = 57000 cylinders) Instalatio

  • Problem with a JMX API call

    I am running into an issue programming with JMX API to remotely create a WL server. Where can I seek help so somebody from within BEA who has access to this code can suggest what might be going wrong. All I am doing is: ServerMBean serverMBean = (Ser

  • Import ServerBatch not able to connect to server

    I am trying to use import server batch to update some customer master recprds. I am using xml schema  and an xml file with data.  These are succesfully processed through import manager. I tried import server using the same and hit a bug in MDM import