Default values in module pool

Hi all,
I am developing one module pool program.There are 2 screens in this object.In the first screen there are four fields.One of the field is order type.In this order type field i one to set FD as default value,so that when this screen comes up then FD will be in order type field.How I can do that?
Waiting for your response.
Thanks in advance.
Raj

Hi,
Try it:
parameters: p_ordertype type ordertype default 'FD'.
Regards,
Chris Gu

Similar Messages

  • Getting default values in module pool screen

    Hi frenz,
    I have a requirement like in module pool i am supposed to bring 4 fields from ddic,in which the first two fields should have a default value i.e when the pbo is processed itself the input values should be displayed in first two fields.....can some one help me out to solve the issue.
    thanks
    prem
    Edited by: prem kumar on Jun 19, 2008 1:30 PM

    suppose u are using field1 field2 on screen...
    then in PBO create a module
    module def_val.
    inside it write.
    field1 =  '100'.
    field2 = '101'.
    here 100 and 101 are the default values that u r going to assign....
    that will solve ur issue..
    rewrd points if the ans is helpful...

  • Default values in module pool screen issue

    Hello,
    I have 6 input fields in one of my module pool tab-strip. I can able to populate default values in 4 fields, but 2 fields are not showing default value on the screen. I am passing these default value for all 6 fields in PBO module of that screen. My question is, why only these 2 fields are not showing default values on the screen?
    Thanks,
    Shree

    Edgar,
    Thanks for the reply, I checked again, the screen fields and variables name is exactly same.
    Here is the sample code:
    MODULE status_2050 OUTPUT.
      gv_id_no_2050 = '200'.
      gv_matnr_2050 = '232020191'.
      gv_ebeln_2050 = '20019100'.
      gv_qty_2050 = 3.
      gv_bukrs_2050 = 'JP01'.
      gv_comments_2050 = 'my comments here'.
    ENDMODULE.

  • How to pass the field value from module pool program to smartform using submit?

    // AT pai of module pool pgm i entered the following: here gv_orderid is my value to be available at smart form(driver pgm) & zmusic_store_smf is the driver program of my smartform.
    gv_orderid= wa-itemid./
    SUBMIT ZMUSIC_STORE_SMF VIA SELECTION-SCREEN
                                  WITH p_order = gv_orderid
                                  AND RETURN.
    //AT driver pgm(zmusic_store_smf):
    START-OF-SELECTION.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = 'ZMUSIC_SMARTFORM1'
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
       IMPORTING
         fm_name                  = lv_form
       EXCEPTIONS
         no_form                  = 1
         no_function_module       = 2
         OTHERS                   = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    CALL FUNCTION lv_form
       EXPORTING
    *      iv_orderid = is_purchase_item-zorder_id.
    iv_orderid = gv_orderid.
    // here i'm trying to call my smartform('ZMUSIC_SMARTFORM1')  from this driver pgm but unable to access the value of gv_orderid please help me out with this.

    Declare the gv_orderid in modulepool program.
    And Declare the parameter as import parameter in smartform.
    CALL FUNCTION  lv_form
       EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
         i_input                    =  gv_orderid
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5

  • How to validate the field values in module pool program?

    Hi Guys
         I am working with module pool programming.
         Here I want to validate the fields like below.
         with out filling all the fields if I click SAVE option it has to show a message that all fields has to be filled.  This can be done by checking all the fields individually.
         I think it can be done through <b>LOOP AT SCREEN ......ENDLOOP</b>. sequence.
         If it is possible, can anyone help me?

    You need to write the Module in between the CHAIN and ENDCHAIN statment in SE51
    If you send a warning or error message from a module <mod> that you called using a FIELD statement as follows:
    CHAIN.
    FIELD: <f1>, <f 2>,...
    MODULE <mod1>.
    FIELD: <g1>, <g 2>,...
    MODULE <mod2>.
    ENDCHAIN.
    all of the fields on the screen that belong to the processing chain (all of the fields listed in the field statements) are made ready for input again. Other fields are not ready for input. Whenever the MODULE statement appears within a processing chain, even if there is only one FIELD attached to it, all of the fields in the chain (not only the affected field) are made ready for input again, allowing the user to enter new values. If the fields in the processing chain are only checked once, the PAI processing continues directly after the FIELD statement, and the preceding modules are not called again.
    Look at the DEMO program DEMO_DYNPRO_FIELD_CHAIN.
    ashish

  • List box values in module pool

    Hi All,
    Plz help me out in this regard..
    I have designed a screen with 20 list boxes around and i am getting values for list boxes also.the main problem is coming when after selecting values....
    that is after selecting values if i press enter on the screen the values are over written by space..
    The default value for list boxes are space.
    how to over come this problem...Plz help me out
    Regards,
    Sudha

    PAI
    MODULE user_command_1000 INPUT.
    CASE sy-ucomm.
    WHEN 'SAVER'.
             IF zrule_date_from  > zrule_date_to.
                MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(001)
                                    'Than RUN_VALIDITY_FROM_DATE'(002).
                EXIT.
             ENDIF.
             IF zrule_date_to  < sy-datum.
                MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(003)
                                    'Than System Date.'(004).
                EXIT.
             ENDIF.
             wa_rule-zrule_date_from  = zrule_date_from.
             wa_rule-zrule_date_to    = zrule_date_to.
             wa_rule-zrule_name       = zrule_name.
             wa_rule-zrule_id         = zrule_id.
             wa_rule-zrule_pref       = zrule_pref.
    ONCATENATE 'Where'  rule_for1a  operator1a  values1a
                 andor1  rule_for2a  operator2a  values2a
                 andor2  rule_for3a  operator3a  values3a
                 andor3  rule_for4a  operator4a  values4a
                 andor4  rule_for5a  operator5a  values5a
                 andor5  rule_for6a  operator6a  values6a
                 andor6  rule_for7a  operator7a  values7a
                 andor7  rule_for8a  operator8a  values8a
                          INTO wa_rule-zrule_clause SEPARATED BY space.
    In this code andor6(7,8,etc) has (and or)
    and operator8a(7a,6a etc) has (+,- <,>) and when i do enter these two get cleared. why does this happen?
    MY PBO code is
    MODULE status_1000 OUTPUT.
      SET PF-STATUS 'RULE'.
      SET TITLEBAR  '1000'.
    ENDMODULE.                 " STATUS_1000  OUTPUT
    *&      Module  fill_lists  OUTPUT
    For Filling List Boxes
    MODULE fill_lists OUTPUT.
    **********1
        name       = 'ANDOR1'.
        value-key  = 1.
        value-text = 'AND'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        value-key  = 2.
        value-text = 'OR'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        PERFORM LIST_BOX.
        CLEAR LIST.
    **************2
        name       = 'ANDOR2'.
        value-key  = 1.
        value-text = 'AND'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        value-key  = 2.
        value-text = 'OR'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        PERFORM LIST_BOX.
        CLEAR LIST.
    ************3
        name       = 'ANDOR3'.
        value-key  = 1.
        value-text = 'AND'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        value-key  = 2.
        value-text = 'OR'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        PERFORM LIST_BOX.
        CLEAR LIST.
    etc.

  • Populating Values In Module Pool Dynamically

    Hi All The ABAPers,
    I have a requirement in Module Pool to populate the values in the field dynamically from the ZTable which I have created having two fields MAIN_CAUSE and SUB_CAUSE. For a MAIN_CAUSE say A there may be N SUB_CAUSE.
    Now when the user selects MAIN_CAUSE A with F4 help then dynamically it should populate only those N values in F4 help for SUB_CAUSE which belong to the selected MAIN_CAUSE A.Rest values it should not populate.
    This should happen without pressing ENTER or anything else.
    Kindly guide me in this matter.Hope I have clarified my requirement.
    Thanks in advacnce,
    Regards,
    Bharti Jain
    Moderator Message: spec-dumping is not allowed. Do your own work.
    Edited by: kishan P on Oct 12, 2010 4:18 PM

    //Now when the user selects MAIN_CAUSE A with F4 help then dynamically it should populate only those N values in F4 help for SUB_CAUSE which belong to the selected MAIN_CAUSE A
    use FM's
    DYNP_VALUES_READ
    DYNP_VALUES_UPDATE to acheive the same
    User can select the value from f4 of main_cause and the related field can be pushed into subc_Cause!..

  • Posnr values in module pool

    Hello Experts,
    I have a module pool where in a table control I have fields like posnr  matnr material description and quantity.
    In this posnr field I want  values like 10 20 upto 200.which has a increment in 10.
    I have added this logic but this posnr values are not getting displayed once I press enter.
    How can I display all these values from 10 to 200 even after pressing enter.
    Thanks and Regrds,
    Nikhil.

    Hi,
    Please check if ur logic is getting triggered when enter is pressed.
    Then if so, at the end of internal table updation, update the number of table control lines as follows:
    DESCRIBE TABLE t_internal_table LINES TC_TABL_CTRL-LINES.
    Regards,
    Sasi.

  • How to pass variable value into module pool scren from a report program

    Hi,
    I have created a report program with selection screen parameters. when the inputs are filled and executed it generates the purchase evaluation sequence number. i have created a screen and passed that number to display on it with print option and back option buttons as required. but variable alone is not getting passed from the program to module pool screen. buttons are working fine. value alone is not coming. can anyone please help me.
    regards,
    sudha.

    Hi ,
    you need to declare that variable param at Global.
    sample code...
    report xyz....
    data: g_no type ekko-ebeln.
    start-of-selection...
    g_no = '12345'.
    call screen 0100.

  • How to capture the selected values from module pool dialog list box !

    Hi experts,
    Can anyone help me out in capturing the values from the list box.
    i am able to set the values in the list box.But i am not able to capture the selected value from the list box. Always the list box name is getting as "space"
    I also tried in using the FM "VRM_GET_VALUES" but it is retireving all the values. Is there is any flag for filttering out the selected value.
    Your inputs are appreciated.
    Thanks,
    Vijay.

    Along with the PBO and PAI event, add a POV event in the flow logic of the screen
    DEMO_DROPDOWN_LIST_BOX -is a good demo example.
    PROCESS ON VALUE-REQUEST.
    FIELD structure_name-field_name MODULE create_dropdown_box.
    In the report :
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDMODULE.
    In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
      ENDCASE.
    ENDMODULE.
    sdyb_conn-carrid will contain your selected field

  • How to create a Drop down with values in Module Pool for a screen field.

    Hi all,
    I have created a Screen on which one field is created Say Bank Name. I would like to give some spcific value for this fileld where user can select only seeing in drop down cann't enter.
    Can anyone tell how can we do it ?

    Hi,
    The selected value key will be stored in the parameter.
    eg: Refer below code. Here if i select Vinod then po_name will be 1. After this read i_values WITH this key and get the actual value.
    PARAMETERS: po_name(30) TYPE c VISIBLE LENGTH 20 AS LISTBOX.
    TYPE-POOLS: VRM.
    DATA: i_values TYPE vrm_values,
          wa_values LIKE LINE OF i_values.
    AT SELECTION-SCREEN OUTPUT.
      wa_values-key = '1'.
      wa_values-text = 'Vinod'.
      APPEND wa_values TO  i_values.
      wa_values-key = '2'.
      wa_values-text = 'Kumar'.
      APPEND wa_values  TO i_values.
      wa_values-key = '3'.
      wa_values-text = 'Reddy'.
      APPEND wa_values  TO i_values.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id              = 'PO_NAME'
                values          = i_values
           EXCEPTIONS
                id_illegal_name = 1
                OTHERS          = 2.
    START-OF-SELECTION.
    READ TABLE i_values INTO wa_values WITH KEY key = po_name.
    MOVE wa_values-text TO w_name. " This will be ur actual value.
    Thanks,
    Vinod.
    Edited by: Vinod Reddy Vemuru on Jul 8, 2008 4:16 PM

  • How to get the perious values in Module pool by pressing the space or back

    Hi All,
    I want to see the already entered values in the screen when ever pressing the backspace or space bar buttons..
    For example in TCODE SE38 in program when i press the backspace or space bar , it is showing the perious opend programs, the same senario i want to implement . Could you please provide me with some example for this..
    Thanks in advance
    Regards,
    Bharani

    HI Rob,
    Thanks for the reply...
    history is turned on but for one field is coming and not for the other field in the same screen....
    Regards,
    Bharani

  • Fetching sub-screen check box value in module pool

    Hi,
    i hav a req in which i craeted a sub-screen in a standard sap screen QA11 using screen -exit.
    This sub-screen has two check box's for 2 approvals.I hav craeted as screen with this 2 check box and made that as a sub-screen to main screen.
    I hav few validations to be performed on these 2 check-boxes.
    1.Enabling and disabling of resp check-box based on some condition.This is happening as i hav written some logic in PBO of the screen.
    2.Validations hav to be performed on the check-box like if user clicks a check-box that value has to be captured and stored in a Z custom table.My main issue comes here.i hav written some code in PAI,but when i put a break-point,that code is not at all getting triggered.
    Kindly,let me know how can i get the check-box value from the sub-screen which is craeted in the standard screen of QA11 using screen-exit.
    Thanks in advance

    Hi,
    May be your code is written in PAI of some other screen.
    check SY-DYNNR and also use this where you are checking chekbox value.
    make sure your code is written in PAI of same subscreen
    Thanks
    Raghav M.

  • How to reset values in module pool?

    Hi ,
    I have a requirement to refresh all the values from the screen on pressing the reset button.
    I have one main screen which have the reset button and four subscreens, and each subscreen has different set
    of fields.i am clearing the values in each subscreen. But the values are not getting cleared,
    When I debugged i saw the values are getting cleared but it is not getting assigned in the screen.
    Kindly help.

    Hi Nidhi,
    When the user tries to reset use the statement.
    Leave to transaction <Your transaction code>.

  • Call module  pool program from report

    Hi,
    Iam calling module pool program from a report, while passing values to module pool program, one of the field doesn't have parameter id, how to pass value to it. and also please let me know how to call module pool program.
    Appreciate your help.
    Thanks in advance
    jog

    Hi Jog,
    Module pool program can be run in background. Most of the BDC's are written on module pool programs and they run in the background.
    Also regarrding copying the standard program, if you require to make the changes for every user then instead of copying the program make modification in standard program as copied program are much harder to maintain during support pack implementation or upgrade that modification to standard program.
    Reward points if useful.
    Regards,
    Atish

Maybe you are looking for

  • Problem with getting a D2K report in XML format

    Hi all, Could any body give a solution for this problem. I have a matrix report like following: Q_Statement_Of_Net_Assets ----> main query | G_Cross ----> Cross product | CS_VALUE | CS_NET_ASSET | CF_COSTI | | --------------------------------- | | |

  • Adding a MouseListener to a JFrame

    I want my JFrame to be notified when a cell in a JTable is double clicked (so I can do some processing and then close the frame). I thought I could add a MouseListener to the JFrame. However, the JTable processes, then consumes, the mouse event so th

  • Multiple Hard Drives for Video Editing with Premiere Elements 8?

    I'm using Premiere Elements 8 for video editing. These are the specs I'm using: The camcorder I used to shoot the footage is a Sony Handycam with  model number HDR-SR12. It's a digital HD video camera recorder that  shoots in NTSC 1920x1080i HD  reco

  • Cisco mobile does not running in the background ont my ipad

    Hi I have a Cisco Callmanager 7.1.5, an ASA5510, an Iphone and an Ipad I have configure the VPN on my iphone and my ipad and I can make a VPN connection to the ASA through the WIFI I have configure the  Cisco Mobile 8.1.2.3245 on my iphone and my ipa

  • SAP Treasury - Product Type 01 A Investments

    Hi, I got following error. How to resolve this? Product type 01A not available in company code