Implement F4 Value-Request Functionality in Dialog Programming

Hi. Apologies in advance if this is the wrong forum.
I'm on R/3 4.6c.
What is the best way to implement this:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR xxxx-low.
in a dialog program?
I have my selection screen defined in my TOP include, but since dialog programs don't support report events I am not sure what to do.
Thank you for any assistance you could provide.
Best Regards,
Brett

make a new include like
include progname_screen_1001. at the top of your program.
goto include.
write the code below in your include.
SELECTION-SCREEN BEGIN OF SCREEN 1001.
write here your selection options and parameters.
also but here the code you want:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR xxxx-low.
SELECTION-SCREEN END OF SCREEN 1001.
call the screen from anywhere:
call screen 1001.
if you want the selection-screen as subscreen than write
SELECTION-SCREEN BEGIN OF SCREEN 1001 as subscreen .
write here your selection options and parameters.
also but here the code you want:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR xxxx-low.
SELECTION-SCREEN END OF SCREEN 1001.
when calling it
write it to PBO of your screen in which you but an subscreen area named subsel.
CALL SUBSCREEN SUBSEL INCLUDING 'PROGRAMNAME' '1001'.

Similar Messages

  • Problem with spool request generation in Dialog program

    Hi,
        To give the spool and print functionality in dialog program i have used the function module code like below -
    call function 'GET_PRINT_PARAMETERS'
          exporting
               mode                   = ' '
               in_parameters          = ls_pri_params
          importing
               out_parameters         = ls_pri_params
               valid                  = lv_valid
          exceptions
               archive_info_not_found = 1
               invalid_print_params   = 2
               invalid_archive_params = 3
               others                 = 4.
       IF lv_valid <> space AND sy-subrc = 0.
             SUBMIT (sy-repid)
                    USER SY-UNAME TO SAP-SPOOL
                    SPOOL   PARAMETERS ls_pri_params
                    WITHOUT SPOOL DYNPRO.
    But the problem is, if it is list then we can easily get the print function, since i am using the above code in the dialog program screen 9000, program is giving dump like....
    Incorrect program type with SUBMIT.                                                                               
    What happened?                                                                               
    The current ABAP/4 program "SAPMYXXXXXX" had to be terminated because              
    one of the statements could not be executed.                                                                               
    This is probably due to an error in the ABAP/4 program.                              
    You attempted to start a program not intended for this purpose.                      
    I know that i should not use submit statement for dialog program, but what is the solution for this.
    Thanks in advance..

    Did you check the F1 help of SUBMIT. if not give a try.Submit cannot be used on Module pool programs. it is used for Report(executable ) programs.

  • Set Default Values in Listbox with Dialog Programming

    Hi all,
    I am stuck with a problem i.e  I am working with Dialog Programming Screen
    where i have to set default values in some n numbers of Listbox which i have created on Screen.
    This default value is needed to be fetched from database table.
    I am using single table. Hence no confusion that i have to first fetch data from 1st listbox then corresponding data is fetched into second & so on ..NO NO This is not required.
    Simple one screen which will update a table in database, where  some fields on the screen needs to be default set as per tables domain default values set while table creation.
    Please help me out in this.
    Thanks & Regards,
    Sandhya.

    Please search SDN, before you post a new forum from next time... any ways just follow the below code..
    u need to use the FM 'VRM_SET_VALUES' to implement list box in module pool. Check the below code. u have to write this code in PBO..
    if c = 0.
    select land1 landx from t005t into table wi_country.
    sort wi_country by land1.
    delete adjacent duplicates from wi_country comparing all fields.
    loop at wi_country.
    wa_ctry-key = wi_country-land1.
    wa_ctry-text = wi_country-landx .
    append wa_ctry to wi_ctry.
    endloop.
    call function 'VRM_SET_VALUES'
    exporting
    id = 'ZCUST_MASTER1-COUNTRY'
    values = wi_ctry
    exceptions
    id_illegal_name = 1
    others = 2
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    c = 1.
    endif.
    Hope this helps u,
    Regards,
    Rajesh

  • Field value not updated in Dialog Programming

    Hi experts
              My problem is when i change the field value in dialog programming, the text value is not updated, its showing the same value what exist in database.
       I have done coding as follows, what i need to change in coding, Pls give me the suggestion.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1200.
    PROCESS AFTER INPUT.
    CHAIN .
        FIELD :  zrecpt-zrno.
        MODULE vali_zrno ON CHAIN-INPUT.
      ENDCHAIN.
    module header_data10.
    MODULE STATUS_1200 OUTPUT.
        SET PF-STATUS 'ZRECT'.
        SET TITLEBAR 'ZRECT'.
    ENDMODULE.              
    MODULE vali_zrno INPUT.
    if zrecpt-zrno  is not initial.
        select single * from zrecpt
                        where zrno = zrecpt-zrno.
    endif.
    ENDMODULE.
    MODULE header_data10 INPUT.
    CLEAR : it_zrecpt.
      REFRESH : it_zrecpt.
      MOVE-CORRESPONDING zrecpt TO it_zrecpt.
      APPEND it_zrecpt.
    ENDMODULE.
    Thanks in advance.
    Regards
    Rajaram

    Hello...
    IN PAI,,
    You were not updating into any database..
    you were just appending to an internal table...
    now either move the internal table values to the database ...
    or you can simply move from the values entered...[text boxes ]
    pls chk.....

  • How to Use At line-Selection Functionality in dialog programming  or mpp .

    hi
    i had created customized Transaction ,
    in that  notification field is there , their when they  place notification number ,after that when they double click on that, it have to go to iw23 .(so that they will get confirm that notification  number is write  )
    i have tried to use AT LINE-SELECTION event it showing error ,
    where i have to write and which event i have to use ?
    may i know how can i resolve this ?
    Thanks a lot
    Edited by: raghu111 on Dec 3, 2011 6:14 AM

    hi  sharin.
    Thanks for ur reply
    i followed ur  steps 
    WHEN 'PICK'.
      DATA : dc_scrfield  TYPE zmotor-qmnum.
      GET CURSOR FIELD dc_scrfield.
      CHECK NOT dc_scrfield IS INITIAL.
      IF dc_scrfield = zmotor-qmnum.
        IF NOT zmotor-qmnum IS INITIAL .
          set PARAMETER ID 'IQM' FIELD zmotor-qmnum.
          call TRANSACTION 'IW23'.
        ENDIF. .
        ENDIF.
    its not working
    but i already tried like this .
    WHEN 'PICK'.
    if field name =tablename-fieldname
    set PARAMETER ID 'IQM' FIELD zmotor-qmnum
      call transaction 'IW23'
    endif
    i written in pai event ." i have dought here also whether i have to write here r not
    HERE ITS  WORKING BUT PROBLEM IS  FOR ANOTHER FIELDS ALSO ITS RESPONDING . how to stop the responding .
    as per my knowledge in condition only prob but i tried i didnt solve
    please send me one example or tell me how to solve
    for better understanding only i pasted coding
    thanks a lot
    Edited by: raghu111 on Dec 5, 2011 12:21 PM

  • Value-Request/Drop-Down like ABAP - F4

    Hello all,
    I want to implement some transactions within WAS Java. Many of my input-fields should only allow input of certain values. Of course I can define these input values within Java Dictionary. But for almost all of them there exists a customizing table within an SAP R/3 ABAP System. Is there now way to link these customizing tables for a value request function (in the Java Application) to the Java Dictionary fields?
    Thanks for Help!
    Wolfgang Ritter

    Hi Wolfgang,
    I suggest you take a look at the OVS (Object Value Selector) example/tutorial available for web dynpro...you can do similar things with it that you can do in F4...combine OVS with the BAPI: BAPI_HELPVALUES_GET and you should be able to get very similar behavior.
    Cheers,
    Jeff

  • F4 Value Request FM Using Fieldnames

    Is there any for F4 value request function module using Field name as input? For example BUKRS

    Hi,
    Field A - BELNR
    Field B - BUKRS (get f4 help based on field A)
    Use:
    PARAMETERS : p_belnr TYPE belnr,
                 p_bukrs TYPE bukrs.
    DATA : BEGIN OF itab OCCURS 0,
             bukrs TYPE bukrs,
           END OF itab.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.
      PERFORM f4_bukrs_help USING p_bukrs.
    *&      Form  f4_bukrs_help
    *       text
    *      -->P_BUKRS text
    FORM f4_bukrs_help USING p_bukrs.
      DATA : itab TYPE STANDARD TABLE OF it WITH HEADER LINE,
             tb_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE,
             v_belnr TYPE belnr.
      CLEAR:   tb_dynpfields.
      REFRESH: tb_dynpfields.
      MOVE 'P_BELNR' TO tb_dynpfields-fieldname.
      APPEND tb_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                               = 'Z_F4' "program name
          dynumb                               = '1000' "screen number
        TABLES
          dynpfields                           = tb_dynpfields
        EXCEPTIONS
          INVALID_ABAPWORKAREA                 = 1
          INVALID_DYNPROFIELD                  = 2
          INVALID_DYNPRONAME                   = 3
          INVALID_DYNPRONUMMER                 = 4
          INVALID_REQUEST                      = 5
          NO_FIELDDESCRIPTION                  = 6
          INVALID_PARAMETER                    = 7
          UNDEFIND_ERROR                       = 8
          DOUBLE_CONVERSION                    = 9
          STEPL_NOT_FOUND                      = 10
          OTHERS                               = 11.
      IF sy-subrc <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE tb_dynpfields INDEX 1.
      IF sy-subrc EQ 0.
        v_belnr = tb_dynpfields-fieldvalue.
      ENDIF.
      SELECT bukrs from <db_table> INTO TABLE itab WHERE belnr = v_belnr.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield               = 'BURKS' "internal table field
          dynpprog               = 'Z_F4' "program name
          dynpnr                 = '1000' "screen number
          dynprofield            = 'P_BUKRS' "screen field name
          value_org              = 'S'
        TABLES
          value_tab              = itab "internal table
        EXCEPTIONS
          PARAMETER_ERROR        = 1
          NO_VALUES_FOUND        = 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.
    ENDFORM.                    " f4_bukrs_help
    Hope this helps you.
    Regards,
    Tarun

  • List bos in dialog programming through  process on value-request

    Dear all,
                  i am using FM to get list box but not getting list of values , i am getting blank screen , on which getting header stmt
    Restrict value range (1)    3 entries found.
    TYPES : BEGIN OF F4_VALUES,
          TYPE(5) TYPE C,
          END OF F4_VALUES.
    DATA: F4_VALUE TYPE TABLE OF F4_VALUES WITH HEADER LINE.
    DATA:  PROGNAME LIKE SY-REPID,
           DYNNUM LIKE SY-DYNNR.
    PROCESS ON VALUE-REQUEST.
    FIELD WA_DATA-TYPE MODULE EXP_TYPE.
    MODULE exp_type INPUT.
    CLEAR F4_VALUE.
    REFRESH F4_VALUE.
    F4_VALUE-TYPE = 'Shift'.
    APPEND F4_VALUE.
    F4_VALUE-TYPE = 'Flat'.
    APPEND F4_VALUE.
    F4_VALUE-TYPE = 'Day'.
    APPEND F4_VALUE.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
        RETFIELD               = 'TYPE'
       DYNPPROG               = PROGNAME
       DYNPNR                 = DYNNUM
       DYNPROFIELD            = 'WA_DATA-TYPE'
       VALUE_ORG              = 'S'
       MULTIPLE_CHOICE        = ' '
      TABLES
        VALUE_TAB              = F4_VALUE
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 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.
    Thanks in advance.
    Vijay dwivedi

    hii vijay,
    1. There are two important things :
    a)PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
    b) Fm VRM_SET_VALUES
    2. just copy paste
    3.
    REPORT abc.
    TYPE-POOLS : vrm.
    DATA : v TYPE vrm_values.
    DATA : vw LIKE LINE OF v.
    PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
    vw-key = '1'.
    vw-text = 'Jan'.
    APPEND vw TO v.
    vw-key = '2'.
    vw-text = 'Feb'.
    APPEND vw TO v.
    vw-key = '3'.
    vw-text = 'Mar'.
    APPEND vw TO v.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'A'
    values = v
    EXCEPTIONS
    id_illegal_name = 1
    OTHERS = 2.
    Check the link -
    How to fill the values in List Box?
    List Box
    rgrds,
    Shweta
    Edited by: Shweta Joon on Aug 24, 2009 1:19 PM

  • Dialog Programming : Input value

    Hi Experts,
    I have programmed a Dialog programe.
    In my input Screen i have a field called 'New Project'. ( PROJ-PSPID)
    The user must not be able to enter value directly into this field but must always be able to select it from the F4 HElp.
    I'm using the Function module  'CN_SUCHE_FREIE_NUMMER'  as F4 help for the field 'NEW_PROJECT' ( to obtain the next available project number.), in the event Process on value request.
    But I should not allow the user to enter any value directly, instead he must always select from the F4 Help.
    I have seen many post, but the answer is provided when they r using the Function module 'F4IF_FIELD_VALUE_REQUEST'.
    But my F4 help Func module is different , it is 'CN_SUCHE_FREIE_NUMMER'.
    Thanks in Advance,
    Vidya

    Hi All,
    Thanks for the replies.
    The function maodule 'CN_SUCHE_FREIE_NUMMER' needs the user to press the 'Find' button , hence i need to provide it to the user, such that he does the action, if you can jst plz check out the FM 'CN_SUCHE_FREIE_NUMMER', it would be of great help .
    Also,
    I cannot predict the next project number available (as it is dynamic ,determined from the number range), hence i cannot provide the list nor drop down
    The requirement is to get the next project number available during creation of the project(CJ20n)( Custom program is been done : BDC program ) .
    Wish to get your inputs,
    Vidya

  • I want parameters with f4 help for program names in value request

    I want parameters with f4 help for program names in value request
    points will be awarded if  useful

    lv_name1 TYPE name1,        "Vendor Name
    CALL FUNCTION 'POPUP_TO_SEARCH_VALUE'
        EXPORTING
          textline1   = 'Vendor Name'(f09)
          titel       = 'Enter'(f17)
          valuelength = 35
        IMPORTING
          value       = lv_name1.
    try this out ..

  • Any Functions can I use Search Help on VALUE-REQUEST in PAI.

    Hi~!!  Experts.
    I want to know some functions or methods of Search Help.
    I have made a ZHxxxx Search Help in SE11.
    And I applied a screen field by using screen painter.
    But I want to fill up the other fields, using selected value.
    So I made a Module under th  PROCESS On VALUE-REQUEST.
    unfortunately, I can't use no more The Search  that I made.
    I want to using the Search Help(ZHxxxx), and I want to fill up the other fields by using that's values.
    I guess some F4 functions can use Search Help. Right?
    Anyone know how to deal it.  Please answer me,.     The program Type is Module Pool program.

    Hi Insik,
    Proceed as below :-
    First of all declare the module below in the flow logic of your screen then create it in your main program.
    You declare the module in the PROCESS ON VALUE-REQUEST.
    PROCESS ON VALUE-REQUEST.
    FIELD TXT_DOCNO MODULE VALUE_BELNR.
    You also need to create an internal table where you wil store results of the select query fired below in the module.
    Here you will get a F4 help on the filed Document Number(TXT_DOCNO) based on the field Company code (TXT_CODCO)
    MODULE VALUE_BELNR INPUT.
    progname = sy-repid.
    dynnum = sy-dynnr.
    CLEAR: field_value, dynpro_values.
    field_value-fieldname = 'TXT_CODCO'.
    APPEND field_value TO dynpro_values.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname = 'BKPF'
    fieldname = 'BUKRS'
    dynpprog = progname
    dynpnr = dynnum
    dynprofield = 'TXT_CODCO'.
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    dyname = progname
    dynumb = dynnum
    translate_to_upper = 'X'
    TABLES
    dynpfields = dynpro_values.
    READ TABLE dynpro_values INDEX 1 INTO field_value.
    SELECT BUKRS BELNR
    FROM BKPF
    INTO CORRESPONDING FIELDS OF TABLE it_doc1
    WHERE BUKRS = field_value-fieldvalue.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'BELNR'
    dynpprog = progname
    dynpnr = dynnum
    dynprofield = 'TXT_BELNR'
    value_org = 'S'
    TABLES
    value_tab = it_doc1.
    ENDMODULE. " VALUE_BELNR INPUT
    Regards
    Abhii

  • How to call a dialog program with return value in another dialog program

    Dear All,
    How can I call a dialog program with return value from another dialog program?
    Regards,
    Alok.

    Hi Alok,
    You can you SET/GET parameters to do this.
    This is some information about this.
    To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. 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 PARAMETERstatements.
    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 ID pid can be up to 20 characters long. If there was already a value stored under pid, this statement overwrites it. If you double-click pid in the ABAP Editor, parameters that do not exist can be created as a Repository object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID pid FIELD f.
    This statement places the value stored under the pid ID into the variable f. If the system does not find any value for pid in the SAP memory, sy-subrc is set to 4. Otherwise, it sets the value to 0.
    Thanks,
    SriRatna

  • How to pass the value between two screen in dialog programming.

    hi everybody,
    In case of dialog programming I have two screens 200 & 300.I want to get the value of textfield in screen 200 in scrren 300 in a label or in textfield.
    Thanks
    byee

    Aashish,
      Welcome to SDN!!!!
      SAP does automatic data transfer when u have the variable defined in the Program and same variable(name) being used in any number of screens in the same program.
    U donot want to worry abt Data Transfers!!!
    If this does not solve ur requirement, let us know.
    Thanks
    Kam

  • How to set default values in dialog programming

    hi gurus
    can anyone suggest me
    how to set default values in dialog programming
    thanks&regards
    kals.

    it's a bit dirty but I usually just place it in the PBO with a flag for control. It's simple and not too costly i think.
    MODULE preRender OUTPUT.
      DATA first_time TYPE flag VALUE 'X'.
      IF first_time EQ 'X'.
    *   put your initialization code here
        CLEAR first_time.
      ENDIF.
    ENDMODULE.
    -MiR

  • Process on value request in Dialog screen based on value of screen field

    Hello Gurus,
    I have a check box on a dialog screen. If the checkbox is checked, based on that I want the other field on the same dialog screen to follow logic for F4 dropdown.
    Now I know if I want to write this, I have to write this in Process on value-request. But how do I get the value of the check box checked or not on the same screen in Process on value-request.
    If it had been a simple selection screen I would have defined the check box as
    Parameter: v_checkbox as checkbox user-command uc1.
    But how do I handle above situation in dialog screen case ?
    Please help.
    Regards,
    Jainam.
    Edited by: Jainam Shah on Sep 29, 2009 6:19 PM

    Hi Shah,
    You have the addition for MODULE statement as ON INPUT.
    Eg :  FIELD <screen field> MODULE <module> ON INPUT.
    You can give the check box field name in the above statement.
    If you want to find as soon as the check box is checked, you can find it here.
    Or else, in the addition ON REQUEST
      you can see for the check box field value whether it is checked or not.
    Thanks,
    Prasad

Maybe you are looking for

  • Solaris 10 x86 daylight savings time patch failes

    Hello! I'm having trouble getting my solaris box to recognize the new timezone change. I've installed patches 122033-04 and 121208-03 as you can see here: $ showrev -p | fgrep 122033 Patch: 122033-04 Obsoletes:  Requires:  Incompatibles:  Packages: S

  • How to get MM:SS format in to seconds?

    I need to get MM:SS-format in to secs? How?

  • What is the "Other" Storage Category

    I am trying to clean up the contents of my iPhone 4, and I have 3GB of "Other" material (the yellow bar in my iTunes summary). What type of data makes up the "Other" category, and how can I clean this up? Thanks!

  • What is hub deployment?

    In the description of the functionality limitations for SRM as Add On for ECC 6.0 SAP talks about hub deployment. +"The following deployment and migration constraints apply: ·         SRM as an add-on to mySAP ERP 2005 does not support hub deployment

  • Popping/Crackling in Soundtrack Pro

    I recently bought a new Mac Pro (Dual quad 3.0 with 4 GB Memory, tyvm...) and installed STP 1.0.3; I downloaded and installed all available updates. Problem: when I am using the program, working on a project, both the samples i am previewing as well