How To... Change the Data Type for a SELECT-OPTIONS at run time.

Hello,
I am trying to restrict the values available for entry into a SELECT-OPTIONS at run time depending on user input.
The logic is as follows. The user has two input fields. A PARAMETER field which has the type RSDIOBJNM and allows them to choose an InfoObject. And the user has a SELECT-OPTIONS field to allow them to select the Characteristic values for that InfoObject.
I would like the following example to be possible:
The user enters 0MATERIAL into the PARAMETER. When the user clicks on the SELECT-OPTIONS control code will derive a list of possible options the user can enter in the SELECT-OPTIONS. In this case only values found in the master data or at least no values greater than 18 characters.
I have looked at the following function module SELECT_OPTIONS_RESTRICT and this do not appear to be helpful as they only restrict on the signs allowed for the values (unless I misunderstand, it is a complex function module!).
The code I have so far is (thus the user enters a InfoObject into p_char1 and the select options so_char1 should only accept active values of that InfoObject):
declaration of variables for user interface
  DATA c_char(32) TYPE c.
declaration of count variable
  DATA i_count TYPE i.
declaration of user interface
  SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
    PARAMETERS: p_ipack TYPE RSLOGDPID.
  SELECTION-SCREEN END OF BLOCK a1.
  SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
    PARAMETERS: p_char1 TYPE RSDIOBJNM.
    SELECT-OPTIONS: so_char1  for c_char NO INTERVALS.
    PARAMETERS: p_char2 TYPE RSDIOBJNM.
    SELECT-OPTIONS: so_char2  for c_char NO INTERVALS.
    PARAMETERS: p_char3 TYPE RSDIOBJNM.
    SELECT-OPTIONS: so_char3  for c_char NO INTERVALS.
  SELECTION-SCREEN END OF BLOCK b1.
Is what I am trying to do possible???
Thanks for any help. Ross.

You really want to restrict possible values of a select-option based on another field, not change the length of type of the select-option field, right?
Here is what you do:  Code a custom F4 value help for the select-option at event AT SELECTION-SCREEN ON VALUE REQUEST FOR..  The first thing you do here is read the value of the parameter field (p_ipack in your example).  You can use function module DYNP_VALUES_READ.  Based on this value, you can propose values for the select-option fields.  Note that the use can still enter whatever s(he) wishes in to the select-option field without pressing F4. In this case, you will have to code some input validations taking into account the value in the p_ipack field.

Similar Messages

  • How to change the data type in the table ESLL for the field USERF2_NUM ?

    Hello Friends,
    I have a requirement in which one of the change is to convert the data type of the field 'USERF2_NUM' in the table 'ESLL'  from 'QUAN' to 'CHAR'. 
    How do i do it if i have an access to change it..........i think i should also check the impact of the change if done.
    Kindly tell me as my requirement starts with this small change.
    Regards,
    Rajesh Kumar

    Thanks for the reply Sowmya.
    I would like to know 2 things.
    1. Is it ok to change the data type of the field 'USERF2_NUM '  which is in the table ESLL. from quan to char.
    2.  The table ESLL  already has entries. if we change the data type from QUAN to CHAR what is the  effect on the existing entries of the table .
    Kindly reply me back.
    Thanks & Regards,
    Rajesh Kumar

  • How to Change the data type of infoobject from NUMC to CHAR

    Hi Experts,
    I have created an infoobject with data type as NUMC, i used in DSO as a key figure and i have loaded data up to PSA.
    Now i want to change the data type of this Info Object from NUMC to CHAR.
    Can anyone suggest me the solution for this issue.
    Regards,
    Venu Gopal.K

    Hi pavan/binu,
    I have not loaded data into DSO i just added IO in Key fields and i started editing this IO then im facing error like
    1.Master Data Table /BIC/PZCUSTOMER contains data: Characteristic ZCUSTOMER cannot be activated     
    2.SID Table /BIC/SZCUSTOMER contains data: Characteristic ZCUSTOMER cannot be activated
    Im also unable to edit the P & S tables in SE14.
    NOTE:I have data only in PSA and when im trying to load data to DSO Im facing these issues.

  • How to create the Data Type for the receiver end?

    Hello Expertise
    I wanted to Create a Data type for  Receiver end in PI.
    Sender end is ECC.
    Receiver end is SRM
    Here's the Data type for Sender end  as
    Can anyone help to create the Data type for Receiver end i.e SRM.
    Thanks in advance.
    Regards
    karan

    Hi Karan,
    Please don't call Sir, we are just trying to help each other.
    Please go through below scenario's and check your configuration.
    ABAP Client Proxy to ABAP Server Proxy Scenario - Process Integration - SCN Wiki
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0ac1a33-debf-2c10-45bf-fb19f6e15649?overridelayout=true
    http://wiki.scn.sap.com/wiki/display/XI/Step-by-step+FTP+to+ABAP+Proxy
    regards,
    Harish

  • How to change the data type of an item in administrator

    Hi,
    A summary folder was created. One of the item in the summary folder is a sum. That sum item was created in the business area (based on another item). I can't refresh that summary folder because it gives me an oracle error (Ora-12008 and Ora-01401 the value is too large for the column). The column that this item is based on is of data type Number(13). How can I fix this problem without changing the column's data type of the original table? I already tried altering the data type in the EUL table via TOAD.
    Thanks!

    You really don't need to sum the item before hand if you are going to create a summary!

  • How to change the source type for a primary key on a form?

    Hi,
    At the time of creating a form, I had set the source type for the primary key to an existing sequence.
    Now I want to change the source to a trigger.
    Can anyone suggest how to do it?
    Thanks in advance,
    Annie

    Annie:
    Define the trigger and then delete the page process named 'Get PK'
    Varad

  • How to change the Data Foundation for an existing Business Element

    My Issue:
    I have quite a few reports that use the same Business View. The Business View has an under lying Data Foundation that uses a Dynamic Data Connection (DDC). I no longer want to use this DDC because production users are complaining they do not want to have to select a data source each time (multiple times when the report includes sub reports) they run/refresh their reports.
    The Holy Grail:
    I would like to change the Data Foundation that my Business Element layer is built upon and use another data foundation with identical tables, linking, and fields. The new data foundation would be using a production connection. This solves my immediate issue and has a great side benefit of providing a convenient way to promote reports from development to stage/test, to production and would not require production users  to have to select which environment they want their report to run against.
    I am logged in to BVM as administrator:
    When I look at the Business Element layer Property Browser,  I see a Data Foundation Property but is is disabled (such that it can not be changed).
    Is there a way to change the Data Foundation that is used by an existing Business Element layer ?
    I'd appreciate any help that someone can offer on this topic. Even if it is not possible and someone can shed some light on why this would not work or would not be a good idea, I'd be interested in learning

    Technically No the system will not allow you to change as it is involved with many depreciation areas and change is not permitted for control reason.
    You only need to retire the asset, reverse the postings, assign correctly and repost the values.

  • How to change the date path of Web Server to my system time?

    Hi,
    I have downloaded a Countdown SWF file from the Internet. It is working fine with the Computers which have Internet Connection. But not working without Internet connection because of the following line of code in XML file:
    <PHPurl>http://www.flepstudio.org/utilita/CountDown/gettime.php</PHPurl>
    When I opened the webpage using the above code, it shows time in a typical digits:
    Monday, October 18, 2010 9:12:52 PM in my System -shows in Web browser like : time=1287425579
    How to modify the code so that I can use my System time to work with Countdown without Internet Connection.
    The following is the path from where I have downloaded the Countdown file:
    http://www.flepstudio.org/forum/flepstudio-utilities/2960-flash-cs3-countdown.html
    Please help me to run this countdown without internet access.
    Thanks.

    It appears all that php file does is return a time=value variable.  So you need to see where that time variable is implemented in the Flash file and assign it a value using the Date.getTime() method instead of having the PHP file get called into play.  Look in the help documents or Google if you do not know how to use the Date class.

  • How to Change the Font Type for Printing Pocket Address Book?

    I am new to the Mac and was entering in my contact info into the Address Book in hope of creating a Pocket Address Book (PAB). When I attempt to print out the PAB the default font is courier. When I click on "set" and access other font types, sizes, etc., I can't seem to find a way to apply or save the font type that I choose. In short, it stays as courier. I found an archived thread in a forum that suggests to validate the font I want - which I did and it was already validated - and otherwise I cannot seem to change it from courier. Any help on how to get the font I select to be applied instead of courier would be GREATLY appreciated!

    You can also change it using the UIManager:
    UIManager.put("OptionPane.foreground", Color.red);
    UIManager.put("OptionPane.messageForeground", Color.red);
    For a complete list of all properties you can change for each component check out this program:
    http://www.discoverteenergy.com/files/ShowUIDefaults.java

  • How to change the valueswhich are entered in select-options

    Hi ,
    Iam passing Material Numner Vlaues through select-options.
    My requirement is i need to prefix and postfix star to the Material.
    For that i have written logic like below.
    LOOP AT S_MATNR.
    S_MATNR-SIGN = 'I'.
    S_MATNR-OPTION = 'EQ'.
    CONCATINATE  '' S_MATNR-LOW '' INTO S_OBJKY-LOW.
    APPEND S_OBJKY.
    ENDLOOP.
    What my problem is if user enters high low and high values how we can write the logic.

    >
    vinay raj wrote:
    > What my problem is if user enters high low and high values how we can write the logic.
    Hello Vinay,
    I suppose you want to prefix & postfix a '*' to allow for selecting data using patterns.
    Unfortunately you cannot use CP (read: patterns) if the HIGH value is not initial. read SAP documentation on SELECT-OPTIONS.
    BR,
    Suhas

  • How to change Number of test socket in Model option during run-time

    I wanna be able to change the the number of test sockets(in the Model Options menu) during runtime. I have overriden the Prebatch callback and used my own instead. I have a LabView program in my Prebatch where I would select the test script each time before running the batch. I wann be able to also modify the number of test sockets each time before I run the batch again. I tried setting the "Parameters.ModelData.ModelOptions.NumTestSockets" from the Labview program which is in my Prebatch before running each batch, but get into errors. Please help?

    Hello Kumar,
    The Batch process model shipped with TestStand does not handle this scenario, but you can still do this. Attached is a sequence file that utilizes the Batch Model's ProcessCleanup callback to reset the next execution point. It still uses the method of setting the Parameters.ModelOptions.NumTestSockets variable in the PreBatch callback. The change I added was three steps to a different callback (the ProcessCleanup callback):
    Message Popup - prompts Yes or No to continue testing with a new batch size.
    Statement 1 - based on the response to the message popup (via precondition), resets the Batch Model's next step to be executed and the ContinueTesting flag:
    RunState.Root.RunState.StepGroup = "Setup"
    RunState.Root.RunState.NextStepIndex = 0
    RunState.Root.Locals.ModelData.ContinueTesting = True
    Statement 2 - based on the response to the message popup (via precondition), loops to reset each TestSocket's ContinueTesting flag:
    RunState.Root.Locals.ModelData.TestSockets[RunState.LoopIndex].ContinueTesting = True
    These two statement steps force the next step to be executed in the Batch Process Model to be the first step in the "Setup" step group, and reset all necessary flags for the batch itself and the individual TestSockets. I discovered the flags that had to be reset by trial-and-error (that was the time-consuming part).
    You can run continuous batches of the same size you first chose (for as long as you like), but when stop the batch execution this new message popup will prompt (yes/no) whether you want to continue testing with a new batch size. If no, then processing terminates. If yes, then the next two statement steps are run and execution resumes back at the beginning of the Batch Process Model's Setup step group. This forces the ModelOptions callback to be executed again, so your VI (in my example here it's just a Message Popop) can then set NumTestSockets appropriately.
    Thanks for contacting National Instruments!
    David Mc.
    NI Applications Engineering
    Attachments:
    kumar.seq ‏27 KB

  • How to change the data  type of a field in an internal table dynamically ?

    I have an internal table :
    Data: Begin of itab_data occurs 0,
    field1 type i,
    field2 type p decimals 2,
    end of itab_data.
    My requirement is to decide the number of decimals of "field2" dynamically .
    ie. based on the input in selection-screen , the declaration has to change .How can this be done ?
    Hope the question is clear..
    Its urgent. Please help me.
    Thanks in advance .
    Shankar

    I dont think you can change it dynamically...but as per your requirement ...why dont you define the variable with maximum decimal length and depending on the parameter(from your selection-screen) use the WRITE command to populate it with the specified decimals.
    Example
    begin of itab
    field2 type p decimals 5.
    end of itab.
    write itab-field2 to lfield decimals p_dec.
    Message was edited by: Anurag Bankley

  • How to change the date considered for taxing purposes?

    Hello All,
    In the preparation for the new tax rate in Québec, I need to configure the system to consider two dates in order to proporly select the TVQ rate.  The change date as well as the current and the next rate were already set in FTXP.  But when I try to make a payment the rate is taken according to the invoice date.
    The regulation requires it to be the earliest of (Due Date) and (Payment Date).  How can I configure that?
    Thank you in advance,
    Guilherme

    I had a wrong assumption... Invoice date is good for this purpose.

  • How to change the data type property of a feild property at run time.

    i have feild varchar2(15) in database, but if want to insert alphanumric, char, number it at runtime by changing its parameters dynamically (parameter is a).
    i have write this code
    if a= 'C' then
         set_item_property('CAPTION1',DATATYPE,'Char');
    elsif a='N' then
    set_item_property('CAPTION1',DATATYPE,'Number');
    else
    set_item_property('CAPTION1',DATATYPE,'alphanumeric');
    end if;
    no compile time error but its not working at runtime, any one can help me.

    Checking for number is easy:
      Declare
        c varchar2(100) := 'hello';
        n number ;
      Begin
        n := To_Number(c);
      Exception
       When Others Then
       -- cannot convert string to number --
      End;You can do the same to check dates also
    Francois

  • How to change the NAT type for 2 on the ps3

    hey, i have a  airport extreme and I'm playing ps3 and my NET type is 3 and i want to change for Nat type 2 , do you guys know how can i do it. thanks

    VPI / VCI
    Protocol
    PPPoE
    Bridged Ethernet
    User ID
         Example: [email protected]
    Password
    Confirm Password
    Static IP Address
    Primary DNS Server
    IP Gateway
    Secondary DNS Server
    Domain Name
    this is what appears what should I do?

Maybe you are looking for

  • Playing movies in iTunes on Television via S-Video

    OK, I can easily connect my non-HD, non-DVI television to my PowerBook G4 via S-Video. BUT -- is there any way to get iTunes to display video on a SPECIFIC monitor? I saw prefs for "separate window" and "full screen" et al but not any method of havin

  • Mac book pro my speakers not working

    Why my mac bookpro 17" spakers not working? Also left side two USB ports are also not working.What can be the problem, Is there is fuses for these usb ports and for speakrts.

  • What happened with javax.faces.application.Action ??

    Can someone explain me how to perform the Action with new JSF libraries. I really do not understand why the Action class is not available in new JSF libs? <h:command_button value="#{bundle.recalculate}" action="#{carstore.currentModel.updatePricing}"

  • Tree structer

    Hi, I am working on tree structer in flex. How can i expand the tree on clicking on label(not imge triagle ie's default property i kinow),is there any way setting attrubutes..... please advice Thanks in Advanced..

  • -opening position of CS1 "File Info" window-

    I have actions in CS1 to open : "Levels" window so I can individually adjust & save "File info" window so I can individually add text & save  The former window I can move & all following windows will open in new position. The latter I can move but ne