Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

module pool

Former Member
0 Likes
539

hi ,

I got 2 i/o boxes having 2 search help.For eg Let the 1st field(i/o) be project code and 2nd i/o be project name.I have created the sme search help for the 2 fields as they are from same table.My requirement is When i click on the search help for 1st field ie project code it displays both project code and project name And whn i click on one of the value both i/o fields ie project code and project name should be filled up as shown in the search help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
422

Hi Alex,

you have to use search help exit. In search help exit give one function module name which will have same parameters like "F4IF_SHLP_EXIT_EXAMPLE" and in this you have to map the fields in your Screen and fields in your search help. i have created one small test program just have a look on it.

On my screen Material, plant, MRP type and MRP controller are the fields. when i press F4 on Material it will give all field values on screen.


FUNCTION zja_test.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  TABLES
*"      SHLP_TAB TYPE  SHLP_DESCR_TAB_T
*"      RECORD_TAB STRUCTURE  SEAHLPRES
*"  CHANGING
*"     REFERENCE(SHLP) TYPE  SHLP_DESCR_T
*"     REFERENCE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
*"----------------------------------------------------------------------
  DATA: interface LIKE LINE OF shlp-interface.

  CHECK callcontrol-step = 'PRESEL1'.

  READ TABLE shlp-interface  INTO interface
                     WITH KEY shlpfield = 'WERKS'..
  IF sy-subrc <> 0.
    interface-shlpfield = 'WERKS'.--Field on your Search Help
    interface-valfield = 'PLANT'.-----Field on your Screen
    APPEND interface TO shlp-interface.
  ENDIF.

  READ TABLE shlp-interface  INTO interface
                     WITH KEY shlpfield = 'DISMM'..
  IF sy-subrc <> 0.
    interface-shlpfield = 'DISMM'.
    interface-valfield = 'DISMM'.
    APPEND interface TO shlp-interface.
  ENDIF.

  READ TABLE shlp-interface  INTO interface
                     WITH KEY shlpfield = 'DISPO'..
  IF sy-subrc <> 0.
    interface-shlpfield = 'DISPO'.
    interface-valfield = 'DISPO'.
    APPEND interface TO shlp-interface.
  ENDIF.
ENDFUNCTION.

hope it is helpfull,

Mohan.

@Alex: Please reward points if it is helpfull.

2 REPLIES 2
Read only

Former Member
0 Likes
423

Hi Alex,

you have to use search help exit. In search help exit give one function module name which will have same parameters like "F4IF_SHLP_EXIT_EXAMPLE" and in this you have to map the fields in your Screen and fields in your search help. i have created one small test program just have a look on it.

On my screen Material, plant, MRP type and MRP controller are the fields. when i press F4 on Material it will give all field values on screen.


FUNCTION zja_test.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  TABLES
*"      SHLP_TAB TYPE  SHLP_DESCR_TAB_T
*"      RECORD_TAB STRUCTURE  SEAHLPRES
*"  CHANGING
*"     REFERENCE(SHLP) TYPE  SHLP_DESCR_T
*"     REFERENCE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
*"----------------------------------------------------------------------
  DATA: interface LIKE LINE OF shlp-interface.

  CHECK callcontrol-step = 'PRESEL1'.

  READ TABLE shlp-interface  INTO interface
                     WITH KEY shlpfield = 'WERKS'..
  IF sy-subrc <> 0.
    interface-shlpfield = 'WERKS'.--Field on your Search Help
    interface-valfield = 'PLANT'.-----Field on your Screen
    APPEND interface TO shlp-interface.
  ENDIF.

  READ TABLE shlp-interface  INTO interface
                     WITH KEY shlpfield = 'DISMM'..
  IF sy-subrc <> 0.
    interface-shlpfield = 'DISMM'.
    interface-valfield = 'DISMM'.
    APPEND interface TO shlp-interface.
  ENDIF.

  READ TABLE shlp-interface  INTO interface
                     WITH KEY shlpfield = 'DISPO'..
  IF sy-subrc <> 0.
    interface-shlpfield = 'DISPO'.
    interface-valfield = 'DISPO'.
    APPEND interface TO shlp-interface.
  ENDIF.
ENDFUNCTION.

hope it is helpfull,

Mohan.

@Alex: Please reward points if it is helpfull.

Read only

Former Member
0 Likes
422

Hi Alex,

U can use the "Process on value-request" for ur requirement.

Process on value-request

Field <field name of project code/name> Module <module name>

In the Module defn u can use the fm

"DYNP_VALUE_READ" to read the value of either project name or code selected by the user and fetch the corresponding value of project name/code and the value to the screen field.