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

SEARCH HELP issue

Former Member
0 Likes
1,284

hI all,

I am creating search help for a field in my dialog programming.

can anyone explain what

IMP ,EXP, SDIS IN THE PARAMTER FIELD.

I know what is lpos and spos

Thanks

hI all,

I am creating search help for a field in my dialog programming.

can anyone explain what

IMP ,EXP, SDIS IN THE PARAMTER FIELD.

I know what is lpos and spos

Thanks

4 REPLIES 4
Read only

Former Member
0 Likes
780

IMP-Importing

EXP-Exporting

Read only

amit_khare
Active Contributor
0 Likes
780

Hi,

IMP - Import parameter

EXP - Export parameter

SDId - If this flag is set, the search help parameter appears in the selection popup window for restricting values as a pure display field.

Regards,

Amit

Read only

Former Member
0 Likes
780

For creating the search help for a field in dialog programming u have to follow the below steps:

In the POV, define the field which needs the F4.

PROCESS ON VALUE-REQUEST.

FIELD addr1_data-region MODULE region_pov.

Write the code inside the module.

Use the FM <b>'F4IF_INT_TABLE_VALUE_REQUEST'</b>, if u have the values inside the internal table.

&----


*& Module region_pov INPUT

&----


  • text

----


MODULE region_pov INPUT.

DATA: lt_dynpfields_country LIKE dynpread OCCURS 0 WITH HEADER LINE,

lws_addr_data LIKE addr1_data-country.

CLEAR: lws_addr_data, lt_dynpfields_country.

REFRESH: lt_dynpfields_country.

lt_dynpfields_country-fieldname = 'ADDR1_DATA-COUNTRY'.

APPEND lt_dynpfields_country.

CLEAR lt_dynpfields_country.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-repid

dynumb = sy-dynnr

translate_to_upper = c_x

TABLES

dynpfields = lt_dynpfields_country

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 EQ 0.

READ TABLE lt_dynpfields INDEX 1.

ENDIF.

lws_addr_data = lt_dynpfields_country-fieldvalue.

PERFORM region_data USING lws_addr_data

CHANGING addr1_data-region. "F4-Eingabehilfe

ENDMODULE. " region_pov INPUT

&----


*& Form region_data

&----


  • Region F4

----


FORM region_data USING p_country

CHANGING p_region.

DATA: f4_display TYPE t_bool.

DATA: lv_country LIKE adrc-country.

DATA: lt_advalreg TYPE TABLE OF advalreg.

DATA: wa_advalreg TYPE advalreg.

DATA: lt_returnvalue TYPE TABLE OF ddshretval.

DATA: wa_returnvalue TYPE ddshretval.

DATA: lt_t005u TYPE TABLE OF t005u.

DATA: wa_t005u TYPE t005u.

lv_country = p_country.

  • Get country if p_country empty

IF lv_country IS INITIAL.

GET PARAMETER ID 'LND' FIELD lv_country.

IF lv_country IS INITIAL.

lv_country = 'GB'.

ENDIF.

ENDIF.

  • fill the value table.

SELECT * FROM t005u INTO TABLE lt_t005u

WHERE spras = sy-langu AND

land1 = lv_country.

LOOP AT lt_t005u INTO wa_t005u.

CLEAR wa_advalreg.

wa_advalreg-region = wa_t005u-bland.

wa_advalreg-reg_txt = wa_t005u-bezei.

APPEND wa_advalreg TO lt_advalreg.

ENDLOOP.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'REGION'

value_org = 'S'

display = f4_display

TABLES

value_tab = lt_advalreg

return_tab = lt_returnvalue.

IF sy-subrc = 0.

READ TABLE lt_returnvalue INDEX 1 INTO wa_returnvalue.

p_region = wa_returnvalue-fieldval. "*562i

READ TABLE lt_advalreg INTO wa_advalreg WITH KEY region = p_region.

IF sy-subrc = 0.

t005u-bezei = wa_advalreg-reg_txt.

ENDIF.

ELSE.

MESSAGE i885 WITH 'F4IF_INT_TABLE_VALUE_REQUEST'. "*562u

ENDIF.

ENDFORM. " region_data

<b>IMP:</b>

Flag for IMPORT parameter of the search help

Flag if the parameter is an import parameter.Context information from the processed input template (screen) can be copied to the help process with an import parameter. Where an import parameter gets its values from is defined when the search help is attached to the corresponding field of the input template.

<b>EXP:</b>

Flag for EXPORT parameter of the search help

Flag if the parameter is an export parameter. Values can be returned from the hit list to the input template (screen) with an export parameter. The fields of the input template in which the contents of the export parameter are returned are defined by the search help attachment.

<b>LPOS</b>

Position in the hit list of an elementary search help

Position of the parameter in the hit list.

If the parameter should not appear in the hit list, leave this field

empty. No position number may occur more than once in this column, but

gaps are allowed. They do not affect the design of the hit list.

Example: An elementary search help contains parameters PAR1, PAR2, PAR3

and PAR4. Field LPos is defined as follows:

Parameter LPos

PAR1 3

PAR2 0 or ' '

PAR3 1

PAR4 7

Parameters PAR3, PAR1 und PAR4 appear in this order in the hit list.

Note: In an elementary search help, at least one parameter should appear

in the hit list. The only exception to this rule is the elementary

search help, in which the display of the hit list is entirely copied

from a search help exit.

<b>SPOS</b>

Position in dialog box of an elementary search help

Position of the search help parameter in the dialog box for limiting the

hit list.

If the parameter should not appear in this dialog box, leave this field

empty. If no such dialog box appears while making possible entries as

defined by this elementary search help, leave this field empty for all

parameters.

No position number may occur twice in this column, but gaps are allowed.

They do not affect how the selection screen looks.

Example: An elementary search help contains parameters PAR1, PAR2, PAR3

and PAR4. Field SPos is defined as folllows:

Parameter SPos

PAR1 3

PAR2 0 or ' '

PAR3 1

Parameters PAR3, PAR1 and PAR4 then appear in this order in the dialog

box for restricting values.

<b>SDIS:</b>

Display field in dialog box of an elementary search help

If this flag is set, the search help parameter appears in the selection

popup window for restricting values as a pure display field.

The contents of the parameter inform the user about the restriction, but

he cannot change it. This is advisable for example when the parameter is

an import parameter or if it has a default value.

Regards,

Prakash.

Read only

Former Member
0 Likes
780

Hi,

imp is the importing parameter which is passed from the screen.

exp is the exporting parameter which is send back to the template.

Sdis - it will disable the fields in the dialog box used to set default values.

Regards

Syed