Application Development 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: 

search help

Former Member
0 Kudos

hi frnds,

in my prg., i am using a ztable which has 2 fields.. which does not have any search help.. now i should display the 2 fields in the table control.. first of all the field1 should be made as f4 help... depending on the value selected the next field should be retrieved from the database. i am not gettig correctly how to do the same. plz help me in this regard....

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

using

CALL FUNCTION 'DYNP_GET_STEPL'

IMPORTING

POVSTEPL = L_xxx

EXCEPTIONS

STEPL_NOT_FOUND = 1

OTHERS = 2.

using the above fm you can get current line of the table control

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = dyname

dynumb = dynumb

TABLES

dynpfields = dynpfields.

to get the dynamic value from the screen

then use F4IF_FIELD_VALUE_REQUEST to popup the f4 help

cheers,

sasi

20 REPLIES 20

Former Member
0 Kudos

Hi,

STEPS FOR CREATING A SEARCH HELPS

STEP 1: GOTO SE11

STEP 2: SELECT SEARCH HELP AND GIVE A NAME

STEP 3: PRESS CREATE

STEP 4: GIVE SHORT DESCRIPTION

STEP 5: IN SELECTION METHOD SELECT ANY OF THE FOLLOWING

SELECT FOR DATABASE TABLES

SELECT FOR VIEWS

STEP 6: GIVE THE NAME OF THE TABLE OR THE NAME OF THE VIEW

STEP 7: IN THE SELECTION PARAMETER PRESS F4

STEP 8: SELECT THE FIELDS TO WHICH THE SEARCH HELP SHOULD BE ADDED

STEP 9: SAVE AND ACTIVATE.

Hope it helps u.

Thanks&Regards,

Ruthra.R

Former Member
0 Kudos

Hi,

do you mean a standard dynpro table or an alv grid control?

0 Kudos

dynpro tablew

Former Member
0 Kudos

hi,

using

CALL FUNCTION 'DYNP_GET_STEPL'

IMPORTING

POVSTEPL = L_xxx

EXCEPTIONS

STEPL_NOT_FOUND = 1

OTHERS = 2.

using the above fm you can get current line of the table control

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = dyname

dynumb = dynumb

TABLES

dynpfields = dynpfields.

to get the dynamic value from the screen

then use F4IF_FIELD_VALUE_REQUEST to popup the f4 help

cheers,

sasi

0 Kudos

Sasi,

How will he write the POV for this as Dialog at POV event,

Field <Field name> MODULE <module name> and then in

module u can call the Fm that u have give.

The <Fieldname> would be dynamic as F4 can be done on any of the lines of the table control.

So i dont think this will work!!

Thus Using a search help and attaching it to the element of the Database tab is the best apprach in this case as it would not require coding for the POV. and data can be passed easily.

Regards,

Ad.

Please reward if it helps.

0 Kudos

what i had done is i had taken another screen to show the values thru alv grid. i am calling the code in the pai but here i am not getting the desired result...

LOOP AT it_1001." WITH CONTROL tctrl_freqtypes.

  • process on value-request.

FIELD zvs_wr_freqdat-freqtyp MODULE SELECT_DATA. " on request.

ENDLOOP.

0 Kudos

Hi can u be little more discrete in what is ur requirement..

0 Kudos

hi,

try with this

process on value-request.

field gt_resource-platform_type

module onvalue_request_9002.

module onvalue_request_9002 input.

clear gt_return.

refresh gt_return.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'BEBER'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'GT_RESOURCE-PLATFORM_TYPE'

value_org = gc_s

tables

value_tab = gt_platform

return_tab = gt_return

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

call function 'DYNP_GET_STEPL'

importing

povstepl = g_stepl

exceptions

others = 0.

refresh gt_fields.

clear gt_fields.

gt_fields-fieldname = 'GT_RESOURCE-PLATFORM_TYPE'.

gt_fields-stepl = g_stepl.

gt_fields-fieldvalue = gt_return-fieldval.

append gt_fields.

clear gt_fields.

gt_fields-fieldname = 'GT_RESOURCE-DESCRIPTION'.

gt_fields-stepl = g_stepl.

gt_fields-fieldvalue = gt_resource-description.

append gt_fields.

clear gt_fields.

call function 'DYNP_UPDATE_FIELDS'

exporting

dyname = sy-repid

dynumb = sy-dynnr

request = gc_a

tables

dynpfields = gt_fields

exceptions

others = 0.

hope this will work

sasi

0 Kudos

i had done the coding like this... it is not working...

in the pai the process on value-request is not accepting.. can u tell where the error may have been occured.

PROCESS BEFORE OUTPUT.

LOOP AT it_1001 WITH CONTROL tctrl_freqtypes.

endloop.

PROCESS AFTER INPUT.

LOOP AT it_1001.

process on value-request.

FIELD it_1001-freqtyp MODULE freqtyp_data.

ENDLOOP.

MODULE freqtyp_data INPUT.

SELECT freqtyp FROM zvfreqtyp INTO TABLE it_1001.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'freqtyp'

dynpprog = w_progname

dynpnr = w_scr_num

dynprofield = 'zvfreqtyp-freqtyp'

value_org = 'S'

TABLES

value_tab = freq

return_tab = return_values

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.

ELSE .

zvfreqtyp-freqtyp = return_values-fieldval.

SELECT SINGLE freqdesc into it_1001-freqdesc

from zvfreqtypt where freqtyp = zvfreqtyp-freqtyp.

ENDIF.

ENDIF.

ENDMODULE. " freqtyp_data INPUT

0 Kudos

hi,

process on value request should be outside it's a separate event

PROCESS AFTER INPUT

LOOP AT it_1001.

ENDLOOP.

process on value-request.

FIELD it_1001-freqtyp MODULE freqtyp_data.

cheers,

sasi

0 Kudos

do i need to create the search help in se11. i am not getting the values into the table control. it gives me a message 'no values found'..

help hlp me in this regard.

0 Kudos

hi,

before you call the function module F4IF_INT_TABLE_VALUE_REQUEST

you should fill the valuetab (this is one of the parameter in the function module )

for ext you get have matnr from the screen, then

you retrive

select * from ekpo into table itab_value where matnr = 'xxx'

then assign the itab_value to the valuetab in the function module.

cheers,

sasi

0 Kudos

i had done in the same way still i am not getting the values...

i am attaching the code....

PROCESS BEFORE OUTPUT.

LOOP AT it_1001 WITH CONTROL tctrl_freqtypes

cursor tctrl_freqtypes-current_line.

endloop.

PROCESS AFTER INPUT.

LOOP AT it_1001.

ENDLOOP.

process on value-request.

FIELD it_1001-freqtyp MODULE freqtyp_data.

MODULE freqtyp_data INPUT.

SELECT freqtyp FROM zvfreqtyp INTO table it_1001.

  • endselect.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'freqtyp'

dynpprog = w_progname

dynpnr = w_scr_num

dynprofield = 'it_1001-freqtyp'

value_org = 'S'

TABLES

value_tab = freq

return_tab = return_values

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.

ELSE .

zvfreqtyp-freqtyp = return_values-fieldval.

SELECT SINGLE freqdesc into it_1001-freqdesc

from zvfreqtypt where freqtyp = zvfreqtyp-freqtyp.

ENDIF.

ENDIF.

ENDMODULE. " freqtyp_data INPUT

0 Kudos

hi,

check with value tab

value_tab = it_1001.

hope this will work

cheers,

sasi

0 Kudos

sample code

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'BEBER'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'GT_RESOURCE-PLATFORM_TYPE'

value_org = gc_s

tables

value_tab = gt_platform

return_tab = gt_return

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

cheers,

sasi

0 Kudos

hi , thnks for ur suggestions, it is working now, the list of values is been displayed but when i am selecting the particular record it is not getting the value in the internal table. could u help

0 Kudos

hi,

you want to populate the help in the field2 as per in the field1 values...both of them in the table control

field1 & field2

could u find any values in the field1. else try with this

in the module

call function 'DYNP_GET_STEPL' (current line ofthe table)

importing

povstepl = g_stepl

exceptions

others = 0.

then use FM

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = DYNAME

DYNUMB = DYNUMB

TABLES

DYNPFIELDS = DYNPFIELDS.

normally we can get the field values at PAI event, if want to get the values in POV we go for the above function module

then use FM

F4IF_INT_TABLE_VALUE_REQUEST and fill one more paramenter stepl in the function module

STEPL = g_stepl

cheers,

sasi

Former Member
0 Kudos

Hi Ateeq,

This is the Search Help Process(F4) for a Particular Field.

Go to SE11.

Select Search Help Radio button : Any name with Z or Y.

Create.

Short Description : Any.

Selection Method : Table Name.

Dialog Type : Display Values immediately.

Search Help Parameter : Field Name (for which field ur doing in the table).

Exp : Tick it.

Lpos : 1 Just giving the position.

SAVE CHECK ACTIVATE.

Next Assign the Search Help to the table or field.

SE11.

Your Table Name : Change.

Search Help Button above the fields.

Search Help name : Your search help name.

Copy.

SAVE CHECK ACTIVATE.

Now go and check to the field by F4.

Thats it.

hope this helps you.

reward points for helpfull answers.

regards,

venu.

Former Member
0 Kudos

Process on value request should be outside loop .

Try this on screen

<b>PROCESS AFTER INPUT.

process on value-request.

FIELD it_1001-freqtyp MODULE freqtyp_data.</b>( just remove the loop, it shd work ).

Cheers

0 Kudos

I had given the label name freqtype and freqdesc in the table control. now, when i am activating it is giving a error like 'freqtype not assigned to a loop..endloop must appear in pbo and pai'.

whr could be the error have occured