How to default values on screen using FREE_SELECTIONS_INIT

Hi Experts,
I have the following requirement :
We have developed a screen on which there is a button. On click of the button, a dynamic selection screen is generated using the functions FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG.
I want when the selection screen is generated for the first time, the fields on it contains some default values taken from a table.
e.g. If Screen has fields MARA-MATNR, MARA-MTART, MARA-MEINS then MARA-MEINS should be defaulted with a value 'EA'.
I have tried a lot but could not find a solution to it.
Kindly help me out as this is very urgent.
Points are guaranteed..
Thanks in advance.
Regards,
Himanshu

SELCTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK BLOCK_1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_RADLOC RADIOBUTTON GROUP GRP1 USER-COMMAND USER  .
SELECTION-SCREEN BEGIN OF BLOCK SUB1_BLOCK WITH FRAME TITLE TEXT-002 NO INTERVALS.
PARAMETERS : P_LOCNO TYPE /SAPAPO/LOCNO MODIF ID ABC default 'Specify the default value here.
SELECTION-SCREEN END OF BLOCK SUB1_BLOCK.
SELECTION-SCREEN SKIP .
PARAMETERS : P_RADRES RADIOBUTTON GROUP GRP1  DEFAULT 'X'.
SELECTION-SCREEN BEGIN OF BLOCK SUB2_BLOCK WITH FRAME TITLE TEXT-003 NO INTERVALS.
PARAMETERS : P_RESNM TYPE /SAPAPO/RES_HEAD-NAME MODIF ID XYZ.
PARAMETERS : P_NOB   TYPE /SAPAPO/CRES_NOINDIVRES  MODIF ID XYZ.
SELECTION-SCREEN END OF BLOCK SUB2_BLOCK.
SELECTION-SCREEN END OF BLOCK BLOCK_1.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF P_RADLOC = WL_SPACE .
      IF SCREEN-GROUP1 = WL_ABC.
        SCREEN-ACTIVE = 0.
        MODIFY SCREEN.
      ENDIF.
    ELSEIF P_RADRES = WL_SPACE .
      IF SCREEN-GROUP1 = WL_XYZ.
        CLEAR : P_RESNM, P_NOB.
        SCREEN-ACTIVE = 0.
        MODIFY SCREEN.
      ENDIF.
    ELSE.
      SCREEN-ACTIVE = 1.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Similar Messages

  • How can i create splash screen using netbean?

    how can i create splash screen using netbean?

    Welcome to the Sun forums.
    gabbyndu wrote:
    how can i create splash screen..Java 6 offers a splashscreen functionality. See [New Splash-Screen Functionality in Java SE 6|http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/splashscreen/] *(<- link)* for details.
    [Java Web Start|http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp] has offered splash screens to applications since Java 1.2. See [How can I provide my own splash screen?|http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq.html#206] in the JWS FAQ for more details.
    .. using netbean?We don't support Netbeans here. Ask that on a [Netbeans forum|http://forums.netbeans.org/].

  • How to assign values to JTable using mysql database

    how to assign value to JTable using mysql...

    Search the forum. You use the values of the "ResultSet" to create a "DefaultTableModel" which you then add to the "JTable".
    I'll let you pick the search keywords to use, which I've suggested above. You can also throw in my userid if you want to specifically look for my solution.

  • How  to set default value for Zfeild using statusprofile

    hi experts,
    I need to set a default value for a zfeild using status profile.Although we can default the values,using getter and setter methods,but in my requirement,the feild will be defaulted when the page is locked,also in display mode,which will require me to write code to unlock then set the value and then write a commit,as there wont be any user action performed.
    I have created a zstatus profile and have set the required status to inital,but no luck
    please suggest if this canbe achived through status profile.
    Regards
    Anu.

    Hi,
    You can check in the getter if the Page is locked and then display the value to want to display. Note that this will be just Displaying the default value for the Zfield and it will not set the default value into  the Zfield in DB, because when the document is locked ( means locked for editing - mostly when system status is completed ) , setters are not called and so you can display the value but cant set it. This is fine if the value you want to display in Z field is just for user's informations and its not required to save this default value.
    The best approach would be to set the value in the Zfield before the page is locking. For example, If you wat to set the zfield value when status is set to "Completed" , then you can configure an action that is 1) triggered during saving of the document with 2) start condition "When status is completed"  ( both 1 and 2 you can mention in action defination ), then Implement this action badi in which you can set the Zfield to default value.
    This will ensure that default value is always set whenever the page is getting locked for editing ( i assumed that page lock means status completed ).
    Thanks & Regards
    Suchita

  • How to default value in collection after intial collection field entered

    Hi there,
    Am working on gettting to know collections but not really had much to do with them so far.
    I have a multi row data entry screen that works great using a collection. Now the boss has decided that the new records require a default value that the users can overwrite if required.
    The value i need to default is the second field in the collection but i only want to populate the value after the first field in the collection has been entered.
    Could anyone talk me through how i do this please or point me to any relevant documents.
    Cheers
    Lisa

    Hi Lisa,
    If you want to default value only after user enters data in another row column, you ll have to write a javascript code that executes after the column is entered
    If you have jQuery(already included in apex 4.0) it would make the task of accessing that other column easy.
    Otherwise its much more harder work to get I can think of setting the ID's using the pitem_id_* while rendering the editable fields(set it for both the columns..say as COL1_ROWNUM , COL2_ROWNUM ) using APEX_ITEM. Then add an onblur event(using the html attributes parameter of APEX_ITEM api) call a JS function with the rownumber(to identify the row). You can then write the logic for default value inside the function and set the corresponding column with the value.
    If you can update about your version and/or if you use any JS libraries, it would be easier to help you any further.

  • Set default value to field using Personalization

    Hi all,
    I want to set the default value for 'Comments' field in Termination screen (OAF) in Manager Self Service responsibility. I used OAF Personalization to set the Initial Value, but it didnt work. I tried logging off but in vain.
    I tested creating a new field with default value and it works fine.
    How I ensure that default value given in Personalization, is overidden by Controller or not? Does it require Controller extension?
    Thanks
    Kishore Ryali

    Kishore,
    May be in ProcessRequest the value will be refilled by the standard program.
    De compile the Controller and check in ProcessRequest, the "Comments" value getting changed.
    If yes, You have to extend the controller and get the handle of the item and set the value.
    Thanks.
    With Regards,
    Kali.
    OSSI.

  • How to default value on bet01 based on ansal

    Dear Freinds
                i would like to know how to default the value for bet01 based on the
    calculated on ansal
    i want is
    q0008-bet01 = p0008-ansal /100.
    Can i default the value using the user exit ZXPADU01 or ZXPADU02. . As my ueser exit is not triggering  without me entering to bet01 .
    how can i do defaulting the value on bet01 ,
    regards
    shanti

    Dear  Chritisn
                 in my code i have done same thing what you have said as follows
    i have written the coding in ZXPADU02 as below
    data : wa_p0008 like p0008,
            i0008 like p0008,
           l_v_ANSAL type ANSAL_15,
           l_v_amount type PAD_AMT7S.
    CASE innnn-infty.
    when '0008'.
    MOVE-CORRESPONDING  innnn to wa_p0008.
    if wa_p0008-lga01 = 'MFPY'.
    l_v_ansal =  wa_p0008-ansal.
    l_v_amount = l_v_ansal / 100.
    if l_v_amount ne wa_p0008-bet01.
    move l_v_amount to wa_p0008-bet01.
    MOVE-CORRESPONDING wa_p0008  to innnn.------ at this point
    endif.
    when others.
    endcase.
    I have used move corresponding because i am getting the error as the strucutr eof INNNN to that WA_P0008 is different (unicode compatability error) ...
    now i can see the data in wa_p0008 and when i have move into innnn ..... i can see all the data in debuggin except  the bet01 value as below
    in wa_p0008 the data in debugin is as follows
    PERNR     N     8      00000004
    INFTY     C     4      0008
    SUBTY     C     4      0
    OBJPS     C     2                                                                               
    SPRPS     C     1                                                                               
    ENDDA     D     8      99991231
    BEGDA     D     8      20070716
    SEQNR     N     3      000
    AEDTM     D     8      00000000
    UNAME     C     12                                                                               
    HISTO     C     1                                                                               
    ITXEX     C     1                                                                               
    REFEX     C     1                                                                               
    ORDEX     C     1                                                                               
    ITBLD     C     2
    PREAS     C     2                                                                               
    FLAG1     C     1                                                                               
    FLAG2     C     1                                                                               
    FLAG3     C     1                                                                               
    FLAG4     C     1                                                                               
    RESE1     C     2                                                                               
    RESE2     C     2                                                                               
    GRPVL     C     4                                                                               
    TRFAR     C     2      01
    TRFGB     C     2      01
    TRFGR     C     8      E1
    TRFST     C     2      08
    STVOR     D     8      00000000
    ORZST     C     2                                                                               
    PARTN     C     2                                                                                WAERS     C     5      HKD
    VGLTA     C     2                                                                               
    VGLGB     C     2                                                                               
    VGLGR     C     8                                                                               
    VGLST     C     2                                                                               
    VGLSV     D     8      00000000
    BSGRD     P     3      100.00
    DIVGV     P     3      165.00
    ANSAL     P     8           1000.00  -
    value  entered on the screen
    FALGK     C     10                                                                               
    FALGR     C     6                                                                               
    LGA01     C     4      MFPY
    BET01     P     7              10.00  ---after calculation the value(1000/10)
    ANZ01     P     4          0.00
    EIN01     C     3                                                                               
    innn structure in debuggin  as follows:
    PERNR     N     8      00000004
    INFTY     C     4      0008
    SUBTY     C     4      0
    OBJPS     C     2                                                                               
    SPRPS     C     1                                                                               
    ENDDA     D     8      99991231
    BEGDA     D     8      20070716
    SEQNR     N     3      000
    AEDTM     D     8      00000000
    UNAME     C     12                                                                               
    HISTO     C     1                                                                               
    ITXEX     C     1                                                                               
    REFEX     C     1                                                                               
    ORDEX     C     1
    PREAS     C     2                                                                               
    FLAG1     C     1                                                                               
    FLAG2     C     1                                                                               
    FLAG3     C     1                                                                               
    FLAG4     C     1                                                                               
    RESE1     C     2                                                                               
    RESE2     C     2                                                                               
    GRPVL     C     4                                                                               
    DATA1     C     250     0101E1      0800000000    HKD                00000000#&#5644;&#3152;###&#3072;                MFPY######        ######        ######        ######
    DATA2     C     250
    we can see in the debuggin for the DATA1 it is having the MFPY value  but i dont find the value for bet01 ..........
    and iam not getting the value on the screen in PA30 for the bet01.
    please let me know what i have to do , and let me know where i went  wrong.
    regards
    shanti

  • How set default value in field of new infotype

    Hi experts!!
    We have created a new infotype 9002. This infotype has two mandatories fields, one with the amount and another with the currency.
    The currency always will be 'EUR', for this reason we would like to assign the default value for this field and the user only should fill the amount field.
    How we should assing the default value to the field we have created in a new infotype 9002?
    Kind regards,
    Julian

    Hawk,
    Another option here will be to enhance infotype 9002 screen 2000 PBO logic. Add a PBO module with the following logic:
    Begda hat sich vielleicht geändert.
            PERFORM re500c(sapfp50m) USING psyst-land p9002-begda. "K35729
            IF p9002-waers IS INITIAL.                          "QNUK110803
            IF t500c-waers IS INITIAL.                        "QNOK034099
              MOVE t001-waers TO p0015-waers.                 "QNOK034099
            ELSE.                                             "QNOK034099
              MOVE t500c-waers TO p9002-waers.                  "QNOK129756
            ENDIF.                                            "QNOK034099
            ENDIF.
    This is standard code extracted from infotype 0015 PBO logic. It default currency according to your country.

  • Setting Default values for field using custom.pll

    Hi All,
    I have an rquirement to set the default values on Meterial Tranasction screen for some condition
    I tried it in both ways via Form Personalization and using custom.pll
    i m using the following code in custom.pll
    form_name      varchar2(30):= name_in('system.current_form');
    block_name varchar2(30):= name_in('system.cursor_block');
    trx_type           varchar2(30);
    subinv                varchar2(30);
    begin
    if form_name='WIPTXMAT' and block_name ='MTL_TRX_LINE' then
    if event_name ='WHEN-VALIDATE-RECORD' then
         trx_type:=name_in('WIPTXMAT.TRANSACTION_TYPE');
    if trx_type ='WIP Return' THEN
         copy(10,'MTL_TRX_LINE.TRANSACTION_QUANTITY');
              copy(10,'MTL_TRX_LINE.NUMBER_OF_LOTS_ENTERED');
              sinv:=trim(name_in('MTL_TRX_LINE.SUBINVENTORY_CODE'));
              if sinv is null then
                   copy(subinv,'MTL_TRX_LINE.SUBINVENTORY_CODE');
                   copy(fr_locator,'MTL_TRX_LINE.LOCATOR');
                   FND_MESSAGE.SET_STRING(sinv);
                   FND_MESSAGE.SHOW;
              end if;
         end if;
    end if;
    end if;
    end event;
    Problem is that default values are getting set but not for all rows . if there are 4 records then values are set for only first 2 rows and if there are 2 rows then defaults are set for 1st row only.
    Same behaviour happens when i do it via form personalization
    i couldn't understand the behaviour of WHILE-VALIDATE-RECORD event..
    Please provide some suggestion on it. its really urgent.
    Thanks in Advance
    Renu

    Works Now...

  • How to default values in LOV

    Hi,
    I have created a page in which I have two different LOVs. My requirement is to default some value in the First LOV i.e. "ALL"
    and the second LOV which is dependent on the first LOV will gets populated with the values based on the first one on the page load itself.
    Both the LOVs have "autoSubmit" and "partialTriggers"realtion between them.
    The problem I am facing is that I am able to set some default value to the first LOV with value as "ALL" by using "setSubmiitedValue" on LOV from backing bean on the page load but the second LOV popup (dependent LOV) is coming blank on page load.
    But if i select same value "ALL" form the first LOV popup after page load then second LOV popup gets populated with values based on first LOV
    Please provide some urgent help that how to default any LOV with some value and based on that second LOV gets populated on the page load itself.
    Thanks in Advance
    Kanika Dhamija

    Hi,
    Can you please explain a bit more the ' ... is to default some value.. ' part?
    When exactly do you want to set a default Value?
    Depending on your case, there is always the declarative way to consider through BC
    some approaches on different cases:
    How to set a default value in an ADF table when adding a new row
    http://www.youtube.com/watch?v=9WQ0SDVVWtE
    http://adfcodebits.blogspot.co.uk/2010/04/bit-13-overriding-create-to-set-default.html
    cascading LOVs
    http://andrejusb.blogspot.co.uk/2012/11/cascading-lovs-in-jdeveloper-111230.html
    hope this helps
    Regards,
    Dimitrios.

  • SP Online - Managed Metadata column Default Value for folders (using CSOM)

    Hello,
    I am working on setting default values (metadata columns)  for different folders on my document library. As so far, I've found solution about how to set default values on whole library and many solutions which works for folders, but not for sharepoint
    online (using metadataDefaults object).
    The only working solution for folders in SPO I've found is editing file library/Forms/client_LocationBasedDefaults and add some data here.
    My question is: is there any easier method to set default values for each folder in document library without manually editing this file? 

    I second that, I have a client looking to do the same thing but I don't see a way to automate this.

  • Creating a filter and Sending default value to it using designer on SAP BW

    Hi All,
    Data Source: SAP BW
    BI Layer: BO 3.1
    Here goes my question:
    We have a cube which contains HR related data. I want to query data in such a way that it gets me data for the current month and year. The time dimension contains a hierarchy called Calendar Year/Month which has values u201CFEB 2009u201D, u201CMAR 2009u201D and so on. I want to create a WebI Report which should take Current month as MAR (since current month is March) and Current Year as 2009 and pass u201CMAR 2009u201D to the query without useru2019s intervention so basically itu2019s a default value. Similarly, when the month and year changes, this value should reflect the new values (i.e. APR 2009 when April 2009 arrives).The final outcome should be a dashboard displaying information using WebI Report.
    Kindly guide me step by step if there is a possible way to achieve it on SAP BW (OLAP datasource) using BO Universe designer/WebI and by using MDX wherever necessary.
    Otherwise, is there a possibility of creating Filter in Universe which takes something like Month(Current Date) and Year(Current Date), append them and pass it as a parameter to BW cube;  If yes, how?
    Kindly guide

    Couple of things, first you need to make sure you assign navigation for the buttons, which is why the remote control on the DVD Player did not work, yet you can mouse over in the computer [Assign Navigation|http://dvdstepbystep.com/buttons07.php] and [a thread|http://discussions.apple.com/thread.jspa?messageID=9134310&#9134310]
    As to overlays, buttons will not appear (the highlights) until the loop point of the menu, but if ellements are in the background (video) then they will appear. If you do not want those items (in the background) to appear to the loop point you need to fade it in or otherwise do whatever effect you want in the background video. [Motion Example|http://dvdstepbystep.com/motion.php]

  • BDC - avoiding default values in screens

    Hi all,
    I am writing a BDC for transaction me31k. There are nearly 14 fields in the first screen. I am passing values to only 5 of them in my BDC program. The problem I am facing is that the remaining fields get some default values which I am not passing.
    I am not populating space for these fields in my BDC program to avoid the default values. Is this the right way of doing this ? please let me know if there is any other way.
    Thanks,
    MGS.

    if the transaction is a change tcode then the values already existing will be there, if you don't want them the only way is to blank them out in your program. Or else if you are creating and the default values are not set from the functional perspective then check your program once. Or else it should work find with the fields you are populating as long as the other fields are not mandatory.
    Run the SHDB and pass only the values you want to and leave the rest. you will know how it behaves and code accordingly.
    Hope it helps.

  • Default values for Screen Fileds

    Hi All
    By default, if a user doesnt give a value for a particular field, it will have the Default Value of the particular type.But i want it to retain a Null Value in such case. Is it possible.
    I have a numeric field in my screen. I need ot trigger a error message if the user doesnt enter any value..
    And to accept if ihe enters 0.
    BUt even if the user doesnt give any value, the screen field gets 0.
    Is there any way to do this

    You might want to check out using the "on request" on some modules in the screen flow to determine if the user has keyed something in... from [Conditional Module Calls|http://help.sap.com/saphelp_46c/helpdata/EN/9f/dbabbd35c111d1829f0000e829fbfe/content.htm] :
    ON REQUEST
    The module <mod> is only called if the user has entered something in the field. This includes cases when the user overwrites an existing value with the same value, or explicitly enters the initial value.
    Jonathan

  • Dislpay Default value on screen

    Hello Experts,
    I am doing Module Programminmg, There i have some issue, I want to display default cale on screen, when user enter tcode, I have written code like this in PBO :
    PROCESS BEFORE OUTPUT.
    module set_value.
    MODULE STATUS_0100.
    MODULE SET_VALUE OUTPUT.
    RM60X-ENTLU = 'D'.
    RM60X-DATVE = sy-datum.
    ENDMODULE.                 " SET_VALUE  OUTPUT
    but it is not showing these value on screen, Please guide me how i can display these values on screen.
    Waiting for a positive response....

    Hi,
    check if the screen fields in screen painter has the same names or not??
    if not create a internal table in top include or directly put the fields from database into the screen fields.
    it will solve your problem.
    Regards,
    Rajesh Kumar

Maybe you are looking for

  • Problem with CC Receiver with AS2 Adapter Seeburger

    Hi, I try to test the AS2 Adapter with Receiver channel y one server and Sender channel in second server, but in the Receiver channel, I have the error : "MP: Exception caught with cause com.sap.engine.services.jndi.persistent.exceptions.NameNotFound

  • "Sharing" Updates Between Multiple Macs?

    So I have three Macs in the house now, one iMac, and two Macbooks. So When there is a big update, I currently have to download the same update three times. Is there a way to download the package once on one computer and distribute it to the others ac

  • Image Orientation Reset Accessing External HDD Images

    I'm using Lightroom 2.1 on Windows XP. Ever since the later LR 1.x versions, I've been running into this problem. I initially edit my images on my internal HDD, then I move them to my external once I'm done with them. The problem occurs when I go to

  • How open an application with labview

    I need to open an application to use a camera and store data before using tis data in labview but i don't now how to call an app in a VI

  • Irssi in tmux, making use of nicklist.

    Hello everyone, I'm trying to figure out how I could accomplish the following task. I'm running E17 as a WM and am starting it by typing $ startx after loging in. This calls my ".xinitrc" file that looks like this: .xinitrc: #!/bin/sh # ~/.xinitrc #