Set and Get parameters using SAP memory.

I have an ALV grid list that I want to transfer to a detail report when the user doubleclicks.  I have set up a parameter transaction associated with the detail report.  My problem is the transfer does not take place.  After the "CALL TRANSACTION" the ALV grid list refreshes with none of the previous select-options being used.  Is there further setup I need to do, or is my coding incorrect?  All of the parameter fields have valid values.  I am new to ABAP, so please be fairly specific with you answer.
ALV Grid code:
form user_command using r_ucomm     like sy-ucomm
                        rs_selfield type slis_selfield.
  case r_ucomm.
    when '&IC1'.
      read table gt_data index rs_selfield-tabindex into gt_data_drilldown.
      set parameter id 'LIF' field gt_data_drilldown-lifnr.
      set parameter id 'BLN' field gt_data_drilldown-belnr.
      set parameter id 'CHK' field gt_data_drilldown-chect.
      set parameter id 'BES' field gt_data_drilldown-ebeln.
      set parameter id 'BSP' field gt_data_drilldown-ebelp.
      set parameter id 'MAT' field gt_data_drilldown-matnr.
      set parameter id 'WRK' field gt_data_drilldown-werks.
      call transaction 'ZRVRAD' and skip first screen.
  endcase.
endform.   
Detail report code:
start-of-selection.
all fields are in DATA stmts.
  get parameter id 'LIF' field lifnr.
  get parameter id 'BLN' field belnr.
  get parameter id 'CHK' field chect.
  get parameter id 'BES' field ebeln.
  get parameter id 'BSP' field ebelp.
  get parameter id 'MAT' field matnr.
  get parameter id 'WRK' field werks.
end-of-selection.
  write:/1 sy-vline,
        lifnr under 'Vendor #',
        35 sy-vline,
        belnr under 'Invoice #',
        50 sy-vline,
        chect under 'Cheque #',
        65 sy-vline,
        belnr under 'PO #'.
  uline.
  uline.
  write:/1 sy-vline,
        chect under 'Item #',
        90 sy-vline,
        matnr under 'Material #',
        105 sy-vline,
        werks under 'Plant'
Thanks in advance for your help - Jim

Thanks for the replies.
Problem was resolved with submit report.  Code is below:
<u>Calling ALV List program:</u>
FORM user_command USING r_ucomm     LIKE sy-ucomm
                        rs_selfield TYPE slis_selfield.
  CASE r_ucomm.
    WHEN '&IC1'.
      READ TABLE gt_data INDEX rs_selfield-tabindex INTO gt_data_drilldown.
      SET PARAMETER ID 'LIF' FIELD gt_data_drilldown-lifnr.
      SET PARAMETER ID 'BLN' FIELD gt_data_drilldown-belnr.
      SET PARAMETER ID 'CHK' FIELD gt_data_drilldown-chect.
      SET PARAMETER ID 'BES' FIELD gt_data_drilldown-ebeln.
      SET PARAMETER ID 'BSP' FIELD gt_data_drilldown-ebelp.
      SET PARAMETER ID 'MAT' FIELD gt_data_drilldown-matnr.
      SET PARAMETER ID 'WRK' FIELD gt_data_drilldown-werks.
      SUBMIT zco_rpt_vra_detail AND RETURN.
      IF sy-subrc <> 0.
      ENDIF.
  ENDCASE.
ENDFORM.                    "user_command
<u>Called program zco_rpt_vra_detail:</u>
START-OF-SELECTION.
  GET PARAMETER ID 'LIF' FIELD lifnr.
  GET PARAMETER ID 'BLN' FIELD belnr.
  GET PARAMETER ID 'CHK' FIELD chect.
  GET PARAMETER ID 'BES' FIELD ebeln.
  GET PARAMETER ID 'BSP' FIELD ebelp.
  GET PARAMETER ID 'MAT' FIELD matnr.
  GET PARAMETER ID 'WRK' FIELD werks.
END-OF-SELECTION. 
  WRITE:/1 sy-vline, 'Vendor', 20 sy-vline, 'Vendor #', 35 sy-vline, 'Invoice #',50 sy-vline,
        'Cheque #', 65 sy-vline, 'PO #', 80 sy-vline, 'Item #', 90 sy-vline,
        'Material #', 105 sy-vline, 'Plant'.
  ULINE.
  WRITE: 'MyVendor' UNDER 'Vendor', lifnr UNDER 'Vendor #', belnr UNDER 'Invoice #',
        chect UNDER 'Cheque #', ebeln UNDER 'PO #', ebelp UNDER 'Item #', matnr UNDER 'Material #',
        werks UNDER 'Plant'.

Similar Messages

  • Report  using Set parameter & get parameters.

    Hi,
           My requirement is from select query  the list of PO will be display. Now i want when i click on one of the purchase order .
    i want to diaplay PO using CALL TRANSACTION 'ME23N'  with the help of set and get parameters .  or can i do it with interactive report.
    Regards,

    Hi,
    1) Write a Report to show the Output(Use HIDE statment for PO filed while outputing the list).
    2) In the event AT LINE-SELECTION write logic.
    GET CURSOR FIELD field VALUE val.
    SET PARAMETER ID 'BES' FIELD dobj.
    CALL TRANSACTION ME23N.
    Regards,
    J.

  • How to use  SET and GET parameter commands ?

    Explain these two giving an example?As which is used for what?

    Hi Albert,
             SAP allows you to make use of SPA/GPA technique to fill the input fields of a called transaction with data from the calling program.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.
    On a screen, you link fields to parameters in the Screen Painter. When you define the field attributes of an input field, you can enter the name of an SPA/GPA parameter in the Parameter ID field in the screen attributes. The SET parameter and GET parameter checkboxes allow you to specify whether the field should be filled from the corresponding SPA/GPA parameter in the PBO event, and whether the SPA/GPA parameter should be filled with the value from the screen in the PAI event.
    When an input field is linked to an SPA/GPA parameter, it is initialized with the current value of the parameter each time the screen is displayed. This is the reason why fields on screens in the R/3 System often already contain values when you call them more than once.
    When you call programs, you can use SPA/GPA parameters with no additional programming overhead if, for example, you need to fill obligatory fields on the initial screen of the called program. The system simply transfers the values from the parameters into the input fields of the called program.
    However, you can control the contents of the parameters from your program by using the SET PARAMETER statement before the actual program call. This technique is particularly useful if you want to skip the initial screen of the called program and that screen contains obligatory fields.
    If you want to set SPA/GPA parameters before a program call, you need to know which parameters are linked to which fields on the initial screen. A simple way of doing this is to start the program that you want to call, place the cursor on the input fields, and choose F1 followed by Technical info. The Parameter ID field contains the name of the corresponding SPA/GPA parameter. Alternatively, you can look at the screen definition in the Screen Painter.
    The SPA/GPA parameter for the input field Company has the ID CAR. Use this method to find the IDs CON, DAY, and BOK for the other input fields.
    The following executable program is connected to the logical database F1S and calls an update transaction:
    REPORT BOOKINGS NO STANDARD PAGE HEADING.
    TABLES SBOOK.
    START-OF-SELECTION.
      WRITE: 'Select a booking',
      SKIP.
    GET SBOOK.
      WRITE: SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
      HIDE:  SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
    AT LINE-SELECTION.
      SET PARAMETER ID: 'CAR' FIELD SBOOK-CARRID,
                        'CON' FIELD SBOOK-CONNID,
                        'DAY' FIELD SBOOK-FLDATE,
                        'BOK' FIELD SBOOK-BOOKID.
      CALL TRANSACTION 'BOOK'.
    The basic list of the program shows fields from the database table SBOOK according to the user entries on the selection screen. These data are also stored in the HIDE areas of each line.
    Cheers
    Nishanth

  • Who can tell me how to use ni-imaq functions imgSessionSerialWrite and imgSessionSerialRead to set and get my carema attribute?

    Who can tell me how to use ni-imaq functions imgSessionSerialFlash,imgSessionSerialWrite and imgSessionSerialRead to set and get my carema attribute?
    My camera is duncantech ms3100 and the frame grabber is pci-1428.I use ni-imaq2.6.When I use these functions,it tell me error -1074397163(IMG_ERR_BINT:Bad interface) .

    I have the same problem on my IPAD 2. One calender that i cant delete or find any settings for... Its just in the calender app under diffrent calenders.  how do i delete it?

  • Set and get parameter id

    Hi,
    I need to store one variable value and I need to retrieve the same variable value in same program. For this I have written set and get parameter ids in the same program. It is working fine but if I log off the system and if I logon the system it is not working I mean before log off the variable is showing some value if I log on again that variable is showing empty. But I want to capture the field values after log off and log on also. Is there any other option can I use table?
    Please help me I will give points.
    Thanks.

    Hi
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens
    SAP global memory retains field value through out session.
    set parameter id 'MAT' field v_matnr.
    get parameter id 'MAT' field v_matnr.
    They are stored in table <b>TPARA</b>.
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data
    to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    ABAP memory is temporary and values are retained in same LUW.
    export itab to memory id 'TEST'.
    import itab from memory Id 'TEST'.
    Here itab should be declared of same type and length.
    http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm
    ABAP Memmory & SAP Memmory
    http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Regards
    Anji

  • Set and get values with vector

    I have a class that that querys a db and sets a value of the result to a vector array. Is it possible to set and retrieve that vector array using the set and get methods?
    ex:
    my class:
    sql = "Select ...";
    Vector fName = new Vector();
    rs = sqlStatement.executeQuery(sql);
    if (rs != null) {
    while (rs.next()) {
    fName.add(rs.getString("fName") + "");
    rs.close();
    setFName(fName);
    how would I set up the set and get methods???
    thanks

    I am unsure of what you are asking:
    A Vector has set and get methods for it, you use indexes of the array to say what element you want to work with.
    If you are asking how do you know what elements of the Vector contain which data columns, you have to remember how you put them in.
    If you are asking if you can use set to load the Vector: then NO, you have to have elemenets already there to change, use the add method.
    If you are asking how to access the elements of the Vector you use an Enumeration:
    for(java.util.Enumeration e = v.elements(); e.hasMoreElements();){
    s = (java.lang.String) e.nextElement();
    vl.add(s.substring(0, 12));
    If you are asking something else: please elaborate what you want--my brain may not be very functional this morning.

  • Script label: Set and get it?

    Hi
    How can I set and get the script label of a frame in my plugin?
    Thanks for the help.
    Best regards
    Hans

    Hi,<br /><br />the IScript-Interface has a GetTag() and SetTag() method. While GetTag() is fine, you'll get Asserts when using SetTag() - thus I changed that to  processing kSetScriptingTagCmdBoss.<br /><br />Example (script-label on a splineitem, stripped of nil-pointer-checks):<br /><br />InterfacePtr<IScript> script(itemRef, UseDefaultIID());               <br />PMString label = script->GetTag();<br />ScriptList scriptList.push_back(script);<br />InterfacePtr<IScriptManager>scriptMgr(Utils<IScriptUtils>()->QueryScriptManager(kScript TagMgrBoss));<br />InterfacePtr<ICommand> cmd( CmdUtils::CreateCommand(kSetScriptingTagCmdBoss));<br />InterfacePtr<IScriptTagCmdData> scriptTagData(cmd, UseDefaultIID());<br />scriptTagData->SetScriptList(scriptList, scriptMgr->GetRequestContext(), label);<br />cmd->SetItemList(UIDList(itemRef));<br />ErrorCode err = CmdUtils::ProcessCommand(cmd);<br /><br />Regards,<br /><br />Bernt

  • PO for item of service Level short and long text using sap script

    Please let me know how to do the PO for item of service Level short and long text using sap script.
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on May 5, 2009 10:25 AM

    Hi ,
          In the transaction related to PO select the path goto->header texts and then details of the texts like ID,objectname,language,name.Pass all theses details to 'READ_TEXT '   FM. Then you will get text lines described for a perticular Po ,similarly for item also.
    Thanks,
    Suma.

  • Setting and retrieving session using pl/sql

    How to set and retrieve session using pl/sql?Can anyone help me?

    mrs wrote:
    create or replace
    function get_login_details(in_user in VARCHAR2,in_pwd in VARCHAR2,in_cname in VARCHAR2)
    ..snipped..The code should look as follows:
    create or replace function AuthenticateUser( userName varchar2, userPassw varchar2, userGroup varchar2 )
    return integer is
      i integer;
    begin
      --// purpose of the SQL is simply to check if such a row exist -
    --// no data from the row needs to be fetched
      select 1 into i from acl_users_gv
      where user_name = userName
      and password = userPassw
      and entity_group_name = userGroup;
      --// if the SQL succeeded, then the row exists and matches
      --// the authentication details
      return( 0 );
    exception when NO_DATA_FOUND then
      --// SQL failed to find a row - authentication details do
      --// not exist
      return( 1 );
    end;No need to fetch data unnecessarily. No need too check the fetched data when the column values are already checked via the SQL filter condition (predicate).
    No need to return a flag variable as a freely formatted text string containing Successful Login and login failed. That is not a robust design to use a string variable like that. Use boolean for true/false. Or use integer values 0/1.
    This is my function get_login_details.And I need to get this 'o_mesg' in other java file also.Standard PL/SQL call from Java. The SQL string to execute contains an anonymous PL/SQL and needs to use bind variables. E.g.
    begin
      :result := AuthenticateUse( :userName, :userPassw, :userGroup );
    end;
    Can you suggest the right way, how I can get this variable in other pages?That depends on whether there is database session state. If there is, authentication can be done once only via a trusted context, that specifies whether the session is authenticated.
    If this is done from an app server that uses a db session pool and stateless db sessions, the state needs to be kept in the app server.
    Do you understand what stateful versus stateless db sessions are, and what the differences are?

  • Setting and getting values to the viewcontroller from component controller

    Hi,
    I'm having a model node in the controller  and the value node int he view which are binded to the UI elements.
    How to set the values in the model nodes to the value nodes in the view through setter method and get the values from the view using getter???
    Could you help me in, how to call a viewController's value node in componenet controller, and set and get the values to it.
    Thanks & Regards,
    Suresh

    Thanks Murtuza..
    i have one more question regarding checkbox by group.
    I have binded the texxt property of the checkbox by group to a context contribute and its type property is selected from a simple type.
    In the view layout on NWDS its showing the label names which i hav given in the simple type. but when i deploy it and run it in browser its just showing only one check box. its not showing the label names.
    how to get the label names, using simple types. i,m able to get it using code.
    how to get it by simpletype??? 
    thanks, suresh

  • Regarding setter and getter methods

    Hi,
    Can anybody tell me the use of setter and getter methods in webdynpro .
    It is generated when we set the calculate property of value attribute to true .
    Thanks a lot .

    Hi Jain
    <b>setter</b> and <b>getter </b>functions will be created when you set the calculated propertyto true
    Consider the following scenario where in you can get some basic idea
    1) First insert a Child "Image" UI Element
    2) Create a Context in a view in which you are using Image UI Element
    3) Value Node
    Name : Image
    Cardidality : 1..1
    4) create 2 Value Attributes
    4)a ImageAlt (Calculate property - true) //this will create getter and setter methods
    4)b ImageSrc (Calculate property - true) //this will create getter and setter methods
    5)Bind the properties of Image
    alt - Image.ImageAlt
    source - Image.ImageSrc
    6) in getImageSrc()
    retrun "XX.gif"
    7) in getImageAlt()
    return "Image Not Available"
    you can even achieve getter and setter methods by doing the following procedure
    goto <b>implementation</b> tab-> rightclick -> <b>source</b> -> <b>generate Getter and Setter methods...</b>
    Best Regards
    Chaitanya.A

  • Abstract class with set and get methods

    hi
    how to write set and get methods(plain methods) in an abstartc class
    ex: setUsername(String)
    String getUsername()
    and one class is extending this abstract class and same methods existing in that sub class also..... how to write......plz provide some ideas
    am new to programming....
    asap
    thnx in advance

    yes... as i told u.... i am new to coding......
    and my problem is ..... i have 2 classes one is abstract class without abstract methods.. and another class is extending abstract class.....
    in abstract class i have 2 methods...one is setusername(string) and getusername() ..... how to write these two methods.... in abstract class i have private variables username...... when user logins ..... i need to catch the user name and i need to validate with my oracle database and i need to identify the role of that user and based on role of that user i need to direct him to appropriate jsp page.......
    for that now i am writing business process classes..... the above mentioned two classes are from business process.....
    could u help me now
    thnx in advance

  • Accessing Custom Controller from setter and Getter methods

    Hi Gurus
    How can we access the custom controller from setter and getter methods,is there any way to do that.
    Thanks & Regards
    Rajasekhar

    Hi Steve.
    Thanks very much for valuable information,  the main controller class is getting tracked in mo_owner which is declared as  CL_BSP_WD_VIEW_CONTROLLER, and I'm getting the reference through
    mo_owner ?= owner. (since mo_owner = owner is not getting converted of type mo_owner ). After doing this on whatever the contexnode class (say zl_xxxx_xxx_cnxx) the corressponding context node values are getting turned as  <#ERROR IN METADATA.
    I mean when I'm checking the configuration in bsp_wd_cmpwb configuration tab -> Available Fields->Enlarge the contex node->BTSTATUS (say for Example) there the values are showing as <#ERROR IN METADATA , After executing the above procedure
    I cross checked several times before and after redefining the context node method IF_BSP_MODEL~INIT, before redefining this method UI is working fine, after redefintion UI is throwing below error .
    Exception Details
    CX_SY_REF_IS_INITIAL - Dereferencing of the NULL reference
    Method: CL_BSP_MODEL=>IF_BSP_MODEL_BINDING~IS_ATTRIBUTE_VALID
    Source Text Row: 13
    Thanks & Regards
    Rajasekhar

  • Setting multi-value parameters using ReportExecutionService

    Does anyone know how to set multi-value parameters using ReportExecutionService in C#?
    If I have
    rsExec = new ReportExecutionService2005.ReportExecutionService();
    ReportExecutionService2005.ParameterValue[] parameters = new ReportExecutionService2005.ParameterValue[2];
    parameters[0] = new ReportExecutionService2005.ParameterValue();
    parameters[0].Label = "Report_Begin_Date";
    parameters[0].Name = "Report_Begin_Date";
    parameters[0].Value = "4/15/2007";
    parameters[1] = new ReportExecutionService2005.ParameterValue();
    parameters[1].Label = "SalesID";
    parameters[1].Name = "SalesID";
    parameters[1].Value = ???  //Here, this parameter should accept multiple values like 200, 201, 202, etc.
    rsExec.SetExecutionParameters(parameters, "en-us");
    How would I set the SalesID to take multiple values?

    hi
    how to set dynamic parameters values.
    please help me.
    reportexe.
    ParameterValue[] parameters =
    new reportexe.ParameterValue[5];
    if (_parameters.Length > 0)
    parameters[0] =
    new reportexe.ParameterValue();
    parameters[0].Label =
    "mgrid";
    parameters[0].Name =
    "mgrid";
    parameters[0].Value =
    "[DMMGR001MT].[MGR ID].&[10]";
    parameters[1] =
    new reportexe.ParameterValue();
    parameters[1].Label =
    "locid";
    parameters[1].Name =
    "locid";
    parameters[1].Value =
    "[DMDPT001MT].[DPT ID].&[700]";
    //[DMDPT001MT].[DPT ID].&[700] 
    parameters[2] =
    new reportexe.ParameterValue();
    parameters[2].Label =
    "usrid";
    parameters[2].Name =
    "usrid";
    parameters[2].Value =
    "[FILLED BY USER].[USER ID].&[yshah]";
    //[FILLED BY USER].[USER ID].&[yshah] 
    parameters[3] =
    new reportexe.ParameterValue();
    parameters[3].Label =
    "fromdate";
    parameters[3].Name =
    "fromdate";
    parameters[3].Value =
    "[FIRST DOSE DATE].[Date Key].&[20100101]";
    //[FIRST DOSE DATE].[Date Key].&[20100101] 
    parameters[4] =
    new reportexe.ParameterValue();
    parameters[4].Label =
    "todate";
    parameters[4].Name =
    "todate";
    parameters[4].Value =
    "[FIRST DOSE DATE].[Date Key].&[20100131]";
    // [FIRST DOSE DATE].[Date Key].&[20100131]
    this is my code.
    indu

  • How to use SAP Memory analyser in CE7.1 EHP1

    Hi All,
    Please Can you provide proper link to know how to use SAP Memory analyser in CE7.1 EHP1.
    It is urgent .
    Regards
    Mahesh

    Problem solved.

Maybe you are looking for