Skip to Content
author's profile photo
Former Member

How to set values for Parameters?

Hi,

I have the following Selection Screen;

SELECTION-SCREEN BEGIN OF BLOCK prog WITH FRAME TITLE text-001.

parameters: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',

R2 RADIOBUTTON GROUP RAD1.

parameters zw_laufd like reguh-laufd.

parameters zw_laufi like reguh-laufi.

parameters zw_BELNR like BKPF-BELNR.

SELECTION-SCREEN END OF BLOCK prog.

For Parameter zw_laufd the following Module is written;

MODULE F4_LAUFD_0200.

REFRESH TLAUFK.

TLAUFK-LAUFK = SPACE.

TLAUFK-SIGN = 'I'.

APPEND TLAUFK.

CALL FUNCTION 'F4_ZAHLLAUF'

EXPORTING

F1TYP = 'D'

F2NME = 'zw_laufi'

IMPORTING

LAUFD = zw_laufd

LAUFI = zw_laufi

TABLES

LAUFK = TLAUFK.

ENDMODULE.

The Module Pops up a window for selection for Parameter zw_laufd. When I select a value from the popup zw_laufd gets a value and long with that Parameter zw_laufi gets a value too, but this value does not get refelcted in the screen. How to show this in the Selection screen?

Thanks,

Kishan

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • Best Answer
    author's profile photo
    Former Member
    Oct 06, 2005 at 06:08 AM

    hi, about the DYNPFIELDS of 'DYNP_VALUES_UPDATE', fill it like this:

          
          TMP_DYNPR-FIELDNAME = XXX.
          TMP_DYNPR-FIELDVALUE = XXX.
          APPEND TMP_DYNPR TO IT_DYNPR.
    
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
               EXPORTING
                    DYNAME     = XXXX
                    DYNUMB     = SY-DYNNR
               TABLES
                    DYNPFIELDS = IT_DYNPR.
    

    about the FIELDNAME, you can run your screen, and put cursor on the field, click F1, and open the techinal information, you can find FIELDNAME in there.

    FIELDVALUE is want you want to write.

    by the way, you can also use DYNP_VALUES_READ to read the value on current screen, it also return a internal table in same structure.

    thanks

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 06, 2005 at 05:14 AM

    call this MODULE F4_LAUFD_0200 at POV

    Process on value request

    in flow logic

    process on value-request

    field zw_laufd

    module F4_LAUFD_0200

    cheers,

    sasi

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 06, 2005 at 05:17 AM

    hi,

    i thing you want a help for zw_laufd

    try with this

    at selection-screen output on zw_laufd

    cheers,

    sasi

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 06, 2005 at 05:25 AM

    Hi Kishan,

    Modules are for dialog screens . You have a selection screen here. Try this it will work .

    data tlaufk like ILAUFK occurs 0 with header line.

    SELECTION-SCREEN BEGIN OF BLOCK prog WITH FRAME TITLE text-001.

    parameters: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',

    R2 RADIOBUTTON GROUP RAD1.

    parameters zw_laufd like reguh-laufd.

    parameters zw_laufi like reguh-laufi.

    parameters zw_BELNR like BKPF-BELNR.

    SELECTION-SCREEN END OF BLOCK prog.

    <b>AT selection-screen on value-request for ZW_LAUFI.</b>

    REFRESH TLAUFK.

    TLAUFK-LAUFK = SPACE.

    TLAUFK-SIGN = 'I'.

    APPEND TLAUFK.

    CALL FUNCTION 'F4_ZAHLLAUF'

    EXPORTING

    F1TYP = 'D'

    F2NME = 'zw_laufi'

    IMPORTING

    LAUFD = zw_laufd

    LAUFI = zw_laufi

    TABLES

    LAUFK = TLAUFK.

    Cheers.

    ( Dont forget to reward if answers were helpful )

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 06, 2005 at 05:26 AM

    hi, if you want to update some value on screen in the value request event in module, call this FM:

          
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
               EXPORTING
                    DYNAME     = 
                    DYNUMB     = SY-DYNNR
               TABLES
                    DYNPFIELDS = XXXX.
    

    DYNAME is application name, DYNUMB is the screen no, DYNPFIELDS is the a structure include the field name and value you want to write on screen.

    hope it will be helpful

    thanks

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 06, 2005 at 05:28 AM

    Hi,

    Here is the sample code.

    Actually, we are using the function module for the F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.

    You should append values in f4tab.

    Here is the sample code.

    tables kna1.

    data:

    begin of t_values occurs 2,

    value like kna1-begru,

    end of t_values,

    t_return like ddshretval occurs 0 with header line.

    select-options s_begru for kna1-begru.

    at selection-screen on <b>value-request</b> for s_begru-low.

    t_values = 'PAR*'.

    append t_values.

    t_values = 'UGG'.

    append t_values.

    call function 'F4IF_INT_TABLE_VALUE_REQUEST'

    exporting

    retfield = 'BEGRU'

    value_org = 'S'

    tables

    value_tab = t_values

    return_tab = t_return

    exceptions

    parameter_error = 1

    no_values_found = 2

    others = 3.

    <b>if sy-subrc = 0.

    read table t_return index 1.

    endif.</b>

    Add comment
    10|10000 characters needed characters exceeded