Skip to Content
author's profile photo Former Member
Former Member

Problem with Popup in Selecion Screen

Hi experts,

I have created one selection screen there I am maintaining two fields

One is Sales org and second one is Distribution channel.

In Sales org field if I press F4 button pop up window will come with all Sales org and Distribution channel information.

The problem is whenever I select Distribution channel in pop up window corresponding Sales org and Distribution channel should display in selection screen. Please tell me that how we can do it.

Thanks and regards,

Pavan.

Edited by: Alvaro Tejada Galindo on Apr 8, 2008 6:05 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 08, 2008 at 12:13 PM

    Hi,

    When ever u give search help(created in se11) in the table creation u will get the f4 help.

    This is one of the ways of providing the f4 help.

    So for ur problem u just check whether in the search help in the corresponding table u r using

    is checked with both import and export.

    In the search help creation in se11 one must be careful with the importing and exporting checkboxes

    so that the effet will be reflected where it is being used.

    <REMOVED BY MODERATOR>

    Jagadish.

    Edited by: Alvaro Tejada Galindo on Apr 8, 2008 6:06 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 08, 2008 at 12:18 PM

    hi...

    plz use dis logic if u r calling the F4 help using the func module, or else u can use de logic which our frnd has replied before me.

    in the FM u will be using an int. table . after the FM has been exected, u will get the corresponding distribution channel for ur sales org dat u have selected.

    wat u have 2 do is ...using the int table ,fetch the distribution channel value n assign it 2 ur distribution channel field in ur selection screen.assign it 2 ur 'low' field....

    <REMOVED BY MODERATOR>

    regards

    winnie

    Edited by: Alvaro Tejada Galindo on Apr 8, 2008 6:06 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 08, 2008 at 12:19 PM

    hi,

    if you have a search help

    check the import and export checkboxes on both the parameters

    and then you have your required effect

    regards

    prasanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 08, 2008 at 12:31 PM

    Hi,

    You Have to create a search help in SE11with these fields and attch these serch help with your select-options using Match code Object staement.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 08, 2008 at 12:42 PM

    hi,

    means u want only those distribution channel which matches to enterd sales org?

    if it is so then u can do like this

    TYPES : BEGIN OF ty_kna1,

    kunnr TYPE kna1-kunnr, "CUstomer Code

    name1 TYPE kna1-name1, "Customer Code

    END OF ty_kna1.

    DATA : dyfields LIKE dynpread OCCURS 1 WITH HEADER LINE ,

    i_kna1 TYPE TABLE OF ty_kna1 WITH HEADER LINE.

    DATA : wa_value_tab TYPE ty_kna1.

    DATA : value_tab LIKE wa_value_tab OCCURS 0 WITH HEADER LINE.

    DATA : field_tab LIKE dfies OCCURS 0 WITH HEADER LINE.

    DATA : return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.

    SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-002.

    PARAMETERS:bukrs LIKE rbkp-bukrs OBLIGATORY.

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS : rad_but1 RADIOBUTTON GROUP one DEFAULT 'X' USER-COMMAND ucom.

    SELECTION-SCREEN COMMENT 3(26) text-003.

    SELECT-OPTIONS : kunnr FOR kna1-kunnr.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN:END OF BLOCK blk1.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR kunnr-low.

    CHECK NOT bukrs IS INITIAL .

    SELECT kna1kunnr kna1name1

    INTO TABLE i_kna1

    FROM kna1 INNER JOIN vbrk

    ON kna1kunnr = vbrkkunag

    WHERE vbrk~bukrs = bukrs. "dyfields-fieldvalue.

    SORT i_kna1 BY kunnr.

    DELETE ADJACENT DUPLICATES FROM i_kna1.

    CLEAR : value_tab,field_tab,return_tab.

    REFRESH : value_tab,field_tab,return_tab.

    field_tab-fieldname = 'KUNNR'.

    field_tab-tabname = 'KNA1'.

    APPEND field_tab.

    field_tab-fieldname = 'NAME1'.

    field_tab-tabname = 'KNA1'.

    APPEND field_tab.

    field_tab-fieldname = 'KUNNR'.

    LOOP AT i_kna1 .

    value_tab-kunnr = i_kna1-kunnr.

    APPEND value_tab.

    CLEAR value_tab.

    value_tab-name1 = i_kna1-name1.

    APPEND value_tab.

    ENDLOOP.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = field_tab-fieldname

    TABLES

    value_tab = value_tab

    field_tab = field_tab

    return_tab = return_tab

    EXCEPTIONS

    parameter_error = 1

    no_values_found = 2

    OTHERS = 3.

    IF sy-subrc = 0.

    kunnr-low = return_tab-fieldval.

    ENDIF.

    <REMOVED BY MODERATOR>

    Edited by: Dhwani shah on Apr 8, 2008 2:43 PM

    Edited by: Alvaro Tejada Galindo on Apr 8, 2008 6:06 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 08, 2008 at 12:48 PM

    Hi,

    Once check this code.

    I think it is helpful for you.

    selection-screen: begin of block b1.

    parameters: vbeln LIKE vbak-vbeln,

    p_ernam LIKE vbak-ernam.

    selection-screen: end of block b1.

    types: begin of ty_vbak,

    vbeln LIKE vbak-vbeln,

    p_ernam LIKE vbak-ernam,

    end of ty_vbak.

    data: i_vbak type table of ty_vbak,

    w_vbak type ty_vbak.

    data: i_dyn type table of DYNPREAD,

    w_dyn like line of i_dyn.

    at selection-screen on value-request for P_ernam.

    w_dyn-fieldname = 'VBELN'.

    APPEND W_DYN TO I_DYN.

    CALL FUNCTION 'DYNP_VALUES_READ'

    EXPORTING

    DYNAME = SY-REPID

    DYNUMB = SY-DYNNR

    TRANSLATE_TO_UPPER = 'X'

    • REQUEST = ' '

    • PERFORM_CONVERSION_EXITS = ' '

    • PERFORM_INPUT_CONVERSION = ' '

    • DETERMINE_LOOP_INDEX = ' '

    TABLES

    DYNPFIELDS = I_DYN

    • 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 I_DYN INDEX 1 INTO W_DYN.

    data: v_DOCU(10) type c.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

    EXPORTING

    INPUT = W_DYN-FIELDVALUE

    IMPORTING

    OUTPUT = v_DOCU

    .

    SELECT VBELN ERNAM FROM VBAK INTO TABLE I_VBAK WHERE VBELN EQ V_DOCU.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = ' '

    RETFIELD = 'ERNAM'

    • PVALKEY = ' '

    DYNPPROG = SY-REPID

    DYNPNR = SY-DYNNR

    DYNPROFIELD = 'P_ERNAM'

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

    VALUE_ORG = 'S'

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

    TABLES

    VALUE_TAB = I_VBAK

    • 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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 08, 2008 at 01:02 PM

    Hi Pavan kumar kulkarni, The following sample program is suitable for ur requirement. You have to use function module DYNP_VALUES_UPDATE to update automatically. Execute and check the program once.

    REPORT zvenkat_head MESSAGE-ID zmsg .
    *&---------------------------------------------------------------------*
    " Declaration part
    *&---------------------------------------------------------------------*
    TYPES:
       BEGIN OF t_t001w,
         werks       TYPE t001w-werks,
         name1       TYPE t001w-name1,
       END OF t_t001w,
       t_return_tab  TYPE ddshretval.
    DATA:
        w_t001w      TYPE t_t001w,
        w_return_tab TYPE t_return_tab.
    DATA:
        i_t001w      TYPE STANDARD TABLE OF t_t001w,
        i_return_tab TYPE STANDARD TABLE OF t_return_tab.
    *&---------------------------------------------------------------------*
    "SELECTION-SCREEN
    *&---------------------------------------------------------------------*
    
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS :p_werks TYPE t001w-werks,
                p_name1 TYPE t001w-name1.
    SELECTION-SCREEN END OF BLOCK b1.
    
    *&---------------------------------------------------------------------*
    " AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks
    *&---------------------------------------------------------------------*
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
      PERFORM f4_help_for_palant.
    
    *&---------------------------------------------------------------------*
    *&      Form  f4_help_for_palant
    *&---------------------------------------------------------------------*
    FORM f4_help_for_palant.
    
      DATA:
          w_dynpfields TYPE dynpread,
          i_dynpfields LIKE STANDARD TABLE OF dynpread.
    
      IF i_t001w[] IS INITIAL.
        SELECT werks name1
        FROM t001w
        INTO TABLE i_t001w.
      ENDIF.
    
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
    *   DDIC_STRUCTURE         = ' '
        retfield               = 'WERKS'
    *   PVALKEY                = ' '
        dynpprog               = sy-repid
        dynpnr                 = sy-dynnr
        dynprofield            = 'P_WERKS'
    *   STEPL                  = 0
    *   WINDOW_TITLE           =
    *   VALUE                  = ' '
       value_org              = 'S'
    *   MULTIPLE_CHOICE        = ' '
    *   DISPLAY                = ' '
    *   CALLBACK_PROGRAM       = ' '
    *   CALLBACK_FORM          = ' '
    *   MARK_TAB               =
    * IMPORTING
    *   USER_RESET             =
        TABLES
          value_tab              = i_t001w
    *   FIELD_TAB              =
        return_tab             = i_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.
      READ TABLE i_return_tab INTO w_return_tab INDEX 1.
      p_werks = w_return_tab-fieldval.
      READ TABLE i_t001w INTO w_t001w WITH KEY werks = p_werks.
      IF sy-subrc = 0.
    
        w_dynpfields-fieldname    = 'P_NAME1'.
        w_dynpfields-fieldvalue   = w_t001w-name1.
        APPEND w_dynpfields TO i_dynpfields.
        CLEAR w_dynpfields.
    
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = sy-repid
            dynumb               = sy-dynnr
          TABLES
            dynpfields           = i_dynpfields
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc = 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    
    
      ENDIF.
    
    
    ENDFORM.                    " f4_help_for_palant
    I hope that it solves ur problem. Regards, Venkat.O

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.