Call Transaction and fill a select-options field with more than one value?

Hello everybody,
how can I fill a select-options field with more than one value.
Here is the code example:
  CLEAR: GT_BDCDATA, GS_BDCDATA.
  GS_BDCDATA-program = 'RHALEINI'.
  GS_BDCDATA-DYNPRO = '1000'.
  GS_BDCDATA-DYNBEGIN = 'X'.
  APPEND GS_BDCDATA TO GT_BDCDATA.
  CLEAR: GS_BDCDATA.
  GS_BDCDATA-FNAM = 'PCHOTYPE'.
  GS_BDCDATA-FVAL = 'P'.
  APPEND GS_BDCDATA TO GT_BDCDATA.
  CLEAR: GS_BDCDATA.
  LOOP AT gt_hrobjinfty INTO gs_hrobjinfty.
    GS_BDCDATA-FNAM = 'PCHOBJID-LOW'.
    GS_BDCDATA-FVAL = gs_hrobjinfty-objid.
    APPEND GS_BDCDATA TO GT_BDCDATA.
    CLEAR: GS_BDCDATA.
  ENDLOOP.
  CALL TRANSACTION 'PFAL' USING GT_BDCDATA MODE 'A'
                   MESSAGES INTO GT_MESSAGES.
THX.

Hi,
Please refer the code below:
*Code used to populate 'select-options' & execute report
DATA: seltab type table of rsparams,
      seltab_wa like line of seltab.
  seltab_wa-selname = 'PNPPERNR'.
  seltab_wa-sign    = 'I'.
  seltab_wa-option  = 'EQ'.
* load each personnel number accessed from the structure into
* parameters to be used in the report
  loop at pnppernr.
    seltab_wa-low = pnppernr-low.
    append seltab_wa to seltab.
  endloop.
  SUBMIT zreport with selection-table seltab
                                via selection-screen.
Thanks,
Sriram Ponna.

Similar Messages

  • Fill BEx Variable with more than one value via Custom Exit

    Dear SDN comunity,
    I want to fill a BEx Variable via a custom exit. My problem is, I don't know how to fill this variable with more than one value.
    I try to give you some background info based on an exaple:
    <u><b>Variable-Details</b></u>
    <b>Type of Variable:</b> Characteristic Value
    <b>Variable Name:</b> ZCCD
    <b>Description:</b> Company Code Selection
    <b>Processing by:</b> Custom Exit
    <b>Characteristic:</b> Company Code
    <b>Variable Represents:</b> Multiple Single Values
    <u><b>This is the used ABAP code:</b></u>
    WHEN 'ZCCD'.
    CLEAR l_s_range.
    l_s_range-low = '2002;2004'.
    l_s_range-sign = 'I'.
    l_s_range-sign = 'EQ'.
    APPEND l_s_range TO e_t_range.
    <u><b>The system returns this message:</b></u>
    Value "2002;2004" is too long for variable ZCCD
    appreciate your help!
    //michael

    Eugene, Marcus
    it works now, thx a lot!
    Please find attached the final code:
    CLEAR l_s_range.
    l_s_range-low = '2002'.
    l_s_range-sign = 'I'.
    l_s_range-<b>opt</b> = 'EQ'.
    APPEND l_s_range TO e_t_range.
    CLEAR l_s_range.
    l_s_range-low = '2004'.
    l_s_range-sign = 'I'.
    l_s_range-<b>opt</b> = 'EQ'.
    APPEND l_s_range TO e_t_range.
    (Delta to Marcus's code is bold)

  • Dynamic select list with more than one value?

    I am creating a simple CRUD component for our company's Joomla site. This component allows our users to create discount bundles for our cart according to shopper group and products.  I've been using Dreamweaver to author the administrator forms and have run into a bit of a problem.  All of my forms work properly, but I need to be able to collect two values from each chosen multi-select listing. 
    Right now, when a user chooses an item under 'products', the site pushes back product_id, one of the variables I need.  I would also like product_parent_id to return with each result as well.  I need to be able to insert product_parent_id after the user has chosen their desired products.  product_parent_id is located in the same table as product_id.
    In the end, I need those two values to be pushed to another table, essentially creating a new entry for each product in the bundle.  Referenced by ID and parent ID.
    Pasted below is the administrator form code.  Any suggestions would be wonderful.
    Thanks!
    <?php require_once('Connections/SQLTest.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_related_products (product_id, related_product_id) VALUES (%s, %s)",
                           GetSQLValueString($_POST['products'], "int"),
                           GetSQLValueString($_POST['products'], "int"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_relations (discount_type, discount, shopper_group_id) VALUES (%s, %s, %s)",
                           GetSQLValueString($_POST['amount_off_total'], "text"),
                           GetSQLValueString($_POST['dollar_amount'], "int"),
                           GetSQLValueString($_POST['shoper_group'], "int"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_relations_messages (discount_message) VALUES (%s)",
                           GetSQLValueString($_POST['discount_message'], "text"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    $maxRows_Products = 10;
    $pageNum_Products = 0;
    if (isset($_GET['pageNum_Products'])) {
      $pageNum_Products = $_GET['pageNum_Products'];
    $startRow_Products = $pageNum_Products * $maxRows_Products;
    mysql_select_db($database_SQLTest, $SQLTest);
    $query_Products = "SELECT * FROM jos_vm_product";
    $query_limit_Products = sprintf("%s LIMIT %d, %d", $query_Products, $startRow_Products, $maxRows_Products);
    $Products = mysql_query($query_limit_Products, $SQLTest) or die(mysql_error());
    $row_Products = mysql_fetch_assoc($Products);
    if (isset($_GET['totalRows_Products'])) {
      $totalRows_Products = $_GET['totalRows_Products'];
    } else {
      $all_Products = mysql_query($query_Products);
      $totalRows_Products = mysql_num_rows($all_Products);
    $totalPages_Products = ceil($totalRows_Products/$maxRows_Products)-1;
    mysql_select_db($database_SQLTest, $SQLTest);
    $query_shopper_group = "SELECT * FROM jos_vm_shopper_group";
    $shopper_group = mysql_query($query_shopper_group, $SQLTest) or die(mysql_error());
    $row_shopper_group = mysql_fetch_assoc($shopper_group);
    $totalRows_shopper_group = mysql_num_rows($shopper_group);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
      <p>
        <label for="products"></label>
      Choose the product(s) you would like to add to your new discount bundle.</p>
      <p>
        <select name="products" size="1" multiple="MULTIPLE" id="products">
          <option value=""></option>
          <?php
    do { 
    ?>
          <option value="<?php echo $row_Products['product_id']?>"><?php echo $row_Products['product_name']?></option>
          <?php
    } while ($row_Products = mysql_fetch_assoc($Products));
      $rows = mysql_num_rows($Products);
      if($rows > 0) {
          mysql_data_seek($Products, 0);
      $row_Products = mysql_fetch_assoc($Products);
    ?>
        </select>
      </p>
    <p>
      <input type="hidden" name="hiddenField" id="hiddenField" />
      </p>
      <p>Choose the subscriber group that you would like this discount to apply to.</p>
      <p>
        <select name="shoper_group">
          <?php
    do { 
    ?>
          <option value="<?php echo $row_shopper_group['shopper_group_id']?>"><?php echo $row_shopper_group['shopper_group_name']?></option>
          <?php
    } while ($row_shopper_group = mysql_fetch_assoc($shopper_group));
      $rows = mysql_num_rows($shopper_group);
      if($rows > 0) {
          mysql_data_seek($shopper_group, 0);
      $row_shopper_group = mysql_fetch_assoc($shopper_group);
    ?>
        </select>
      </p>
      <p>Please enter the dollar amount that you would like to adjust.
        <label for="dollar_amount"><br />
        </label>
        <input type="text" name="dollar_amount" id="dollar_amount" />
      </p>
      <p>
        <input name="amount_off_total" type="hidden" id="amount_off_total" value="amount_off_total" />
      </p>
      <p>Enter any message you would like the shopper to view during shopping and checkout when this discount is applied.</p>
      <p>
        <label for="discount_message"></label>
        <textarea name="discount_message" id="discount_message" cols="45" rows="5"></textarea>
      </p>
      <p>
        <input type="hidden" name="MM_insert" value="form1" />
      </p>
      <p>
        <input type="submit" name="submit" id="submit" value="Submit" />
      </p>
    </form>
    <br />
    </body>
    </html>
    <?php
    mysql_free_result($Products);
    mysql_free_result($shopper_group);
    ?>

    Thanks guys for you reply , [Cor Ligthert] I post this in Visual basic section, I appreciate your solution [dbasnett],
    Thanks for that idea of attribute <Flags> [Blackwood] ,
    Dictionary will not work in IF Statement as I want it , also ParamArray tbl() , thanks guys.
    Here is the code
    Module myModule
    <Flags()>
    Enum Table As Integer
    Table1 = 2
    Table2 = 4
    Table3 = 8
    Table4 = 16
    Table5 = 32
    End Enum
    Public Sub MySub(ByVal Table As Table)
    If (Table And Table.Table1) = Table.Table1 Then
    MsgBox((Table And Table.Table1))
    End If
    If (Table And Table.Table2) = Table.Table2 Then
    MsgBox((Table And Table.Table2))
    End If
    If (Table And Table.Table3) = Table.Table3 Then
    MsgBox((Table And Table.Table3))
    End If
    If (Table And Table.Table4) = Table.Table4 Then
    MsgBox((Table And Table.Table4))
    End If
    If (Table And Table.Table5) = Table.Table5 Then
    MsgBox((Table And Table.Table5))
    End If
    End Sub
    End Module
    Class Myclass
    Private sub CallTables()
    MySub(Table.Table1 Or Table.Table2)
    MySub(Table.Table2 Or Table.Table3 Or Table.Table4)
    MySub(Table.Table1 Or Table.Table4 Or Table.Table5)
    MySub(Table.Table1 Or Table.Table2 Or Table.Table4 Or Table.Table5)
    MySub(Table.Table1 Or Table.Table2 Or Table.Table3 Or Table.Table4 Or Table.Table5)
    end sub
    end Class

  • How to implement a static field with more then one value?

    Hello! I'm a novice at swing programming. Please help me to implement a static list like this:
    Field_1: Value;
    Field_2: Value_1;
                  Value_2;
                  Value_3;
    Field_3: Value;
    Field_4: Value;
    Values for each field can be added dynamicly. I used for field and value a JLabel component. I have no idea how to move down the bottom string (Field_3) when add a value to Field_2 :(
    How is better to implement this list? thanks for all responses!

    Maybe you should be using a [url http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html]Combo Box.

  • Select more than one value at a time from an LOV?

    Is it possible to configure an LOV-based text field so more than one value at a time can be chosen from the drop-down LOV list? This is a user requirement for specifying multiple values in an SQL WHERE clause.

    Rather several select fields because single returned value is a functional limitation of <select>.

  • Initializu00EDng select options field with default values and with NO INTERVALS

    Dear All,
    I have used WDR_SELECT_OPTIONS technology within WD Abap.
    I also have added the fields which have to be taken into consideration.
    lt_range_table =
    wd_this->m_handler->create_range_table(
    i_typename = 'PLANT' ).
    wd_this->m_handler->add_selection_field(
    i_id = 'PLANT'
    it_result = lt_range_table
    i_read_only = read_only ).
    Can I assign two values to this field 'PLANT' whereby the user may take only these values.
    I mean kind of pre initializíng of this select options field with default values.
    Due to this handling it should be prevented that the user can give other values
    except this values.
    Additonally it should be fine whether it is possible to disable the second input field
    of this select options field like NO INTERVALS .
    Regard
    sas
    Regard
    sas

    wd_this->m_handler->add_selection_field(
    i_id = 'PLANT'
    it_result = lt_range_table
    I_NO_INTERVALS = 'X'
    i_read_only = read_only ).
    Pls check 'WDR_TEST_SELECT_OPTIONS' web dynpro component

  • How to read an internal table with more than  one (2 or 3) key field(s).

    how to read an internal table with more than  one (2 or 3) key field(s). in ecc 6.0 version

    hi ,
    check this..
    report.
    tables: marc,mard.
    data: begin of itab occurs 0,
          matnr like marc-matnr,
          werks like marc-werks,
          pstat like marc-pstat,
          end of itab.
    data: begin of itab1 occurs 0,
          matnr like mard-matnr,
          werks like mard-werks,
          lgort like mard-lgort,
          end of itab1.
    parameters:p_matnr like marc-matnr.
    select matnr
           werks
           pstat
           from marc
           into table itab
           where matnr = p_matnr.
    sort itab by matnr werks.
    select matnr
           werks
           lgort
           from mard
           into table itab1
           for all entries in itab
           where matnr = itab-matnr
           and werks = itab-werks.
    sort itab1 by matnr werks.
    loop at itab.
    read table itab1 with key matnr = itab-matnr
                              werks = itab-werks.
    endloop.
    regards,
    venkat.

  • Can we give more than one value for an Authorization field in Auth-Check.

    Hi all,
    Can we give more than one value for an Authorization field in Auth-Check.
    Ex: AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD <Value 1> <Value 2> <Value 3>.
    IF SY-SUBRC 0.
    MESSAGE E...
    ENDIF.
    If yes, please help me with exact syntax.
    Think it will be like
    ID 'CUSTTYPE' FIELD: <Value 1>, <Value 2>, <Value 3>.

    Hi,
    yes we can give more than one field.
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object> 
       ID <authority field 1> FIELD <field value 1>. 
       ID <authority field 2> FIELD <field value 2>. 
       ID <authority-field n> FIELD <field value n>. 
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    please reward points, if it is useful.
    satish.

  • Select more than one value in a query

    Hi,
    since V7.0 we have a problem in the selection screen to select more than one value in a easy way.
    How can I select e.g. 20 BuisinessPartner with one selection?
    To create a variant isn't possible, because every user needs different values.
    Thanks

    Hi,
    Go for "Selection Options " instead of Multiple single values ..
    With this option u can get single values, multiple single values & ranges also..
    Can u please explain clearly regarding that function of whole excel sheet into a variable??
    Regards,
    Vijay
    Edited by: vijaya kumar on May 22, 2009 6:15 PM

  • How to Create Field Catalogs (More than one Source Table)

    Hi Data Archiving Experts,
    Could you please help me how to create the Field Catalogs (More than one Source Table). If any one is having example that will help.
    My scenario:
    Currently we are archiving on CRM Data archiving project. We are facing one issue on creating field catalog with more than one source table.
    Ex: ST -- BP1
                  BP2
                  BP3
    ST info store in one table and BP1 -- BP 3 info sotre in another table. with current field catalog we are getting ST -- BP1. Our requirment is we need to show the ST  -- BP3 How we can achive this.
    Regards,
    Srini

    Hi,
    I don't think its possible to create fieldcatalog for different tables,
    but if you want to do so create a dummy table which has all the fields which you want in fieldcatalog.
    populate the data from different table to that dummy table
    then create fieldcatalog for that table and pass it in the function module...
    Regards,
    Siddarth

  • BDC: To Include more than one value in one field.

    Hi All,
    I want to include more than one value in a particular filed, while its running in back ground.
    The requirement is like this
      perform bdc_field       using 'PNPABKRS-LOW'
                                     '01'.
    01 is a filed on employee payroll type : management staff.
    02 - Filed staff
    03 - work men
    How can i include 02 and 03 also for the perform.
    it has to check whether the employee  can belongs to any of the above three.
    Thanks in Advance,
    Points Rewarded for Help full answer.

    Hi, Ramesh,
    You can not use all the 3 fields at the same time, instead you can pass on one variable in that perform.
    eg.
    take all your staff value in one internal table and use the following code
    loop at i_tab into wa_tab.
    data : l_variable type string.
    perform bdc_field using 'PNPABKRS-LOW'  wa_tab-staff.
    endloop.
    in first run of loop it will take value '01', in second '02' and so on.
    regards,
    vikas
    plz reward if helpful.

  • Is it possible to use more than one value in SUPPRESSCHARACTER option

    Hi,
    Is it possible to Suppress more than one value uisng SUPPRESSCHARACTER option in transformation file?
    if yes, any syntax?
    I have 'Z' and '1000' that i wish to suppress from the values being loaded. Any thoughts ?
    Thanks.

    HI,
    i don't really know if it's possible to suppress more than one character, but you can do load your data in two steps in the first step skip all the information that has the Z character in your conversion file and skip all 1000 values, then repeat the process but this time skip the 1000 values and then suppress the Z value...
    hope this helps,

  • Calling AVDocClose with more than one PDF open crashes Acrobat

    That pretty much sums it up. If I have a single PDF open and I call AVDocClose everything works great. If I have more than one PDF open it crashes Acrobat and takes down all of the open documents. Any ideas as to what might be happening and how to get around it? I'm seeing it in both Acrobat 8 and Acrobat 9.

    Okay, that sounds ike it could be something to look at. I'm certainly not an expert in using the SDK so maybe you can help me identify the potential issue. This is the code I'm using with some comments to help you understand what I'm doing. I just added the ASFileSysReleasePath references after reading your post but apparently I'm still missing something. The issue occurs in the code path where I'm working with local documents.
    ACCB1 void ACCB2 MyPluginCommand_Save(void *clientData)
    initializeVariables();
    if(myAVDoc==NULL)
    // if no doc is loaded, display a message.
    AVAlertNote("There is no PDF document loaded in Acrobat.");
    else
    //Here are a couple of functions that are just used to set up some file paths for both windows and acrobat
    string docName = getDocName();
    string path = buildAcroPath(docName);
    ASPathName upPath = ASFileSysCreatePathFromCString(NULL,path.c_str());
    //call doc exists to see if we have a local doc or one that is in control of my DMS - doesn't use any Acrobat SDK functions
    bool ndExists = ndDocExists(filename);
    if(!ndExists) //if the file is not from the DMS
    //save this file to a temporary location - this is what actually gets sent to the DMS
    PDDocSave(pdDoc, PDSaveFull | PDSaveCopy | PDSaveCollectGarbage , upPath, ASGetDefaultFileSys(), NULL, NULL);
    //send the document to the DMS and get the status of the operation back - doesn't use any Acrobat SDK functions
    int ndStatus = ndImport(path);
    checkNDStatus(ndStatus);
    else
    //This is a document from the DMS. Just do a regular file save
    PDDocSave(pdDoc, PDSaveFull | PDSaveCollectGarbage , pathName, ASGetDefaultFileSys(), NULL, NULL);
    ASFileSysReleasePath(ASGetDefaultFileSys(), upPath);
    ASFileSysReleasePath(ASGetDefaultFileSys(), pathName);
    AVDocClose(myAVDoc, false);
    return;

  • By subscribing to Creative Cloud(Photoshop and Lightroom), does it come with more than one license, and is it possible to install it on both Windows and Apple(if it comes with two licenses)? Thank you.

    By subscribing to Creative Cloud(Photoshop and Lightroom), does it come with more than one license, and if it does, is it possible to install on both Windows and Apple's OX? Thanks.

    A Cloud subscription provides for installing working installations on two machines.  You can have mixed operating systems (both Windows and Apple's OX).

  • HT1040 Is there a way to place an order with more than one item at a time? For example I am going to make a few books and have them all shipped to me.  Do I have to order and pay shipping for each one individually?

    Is there a way to place an order with more than one item at a time?  for example I am making a few books and having them all shipped to me.  Do I have to order each one separately and pay shipping each time?

    You have to order each book separately, if the books are different. Only multiple copies of the same book can be ordered in the same order, see here
    Regards
    Léonie

Maybe you are looking for