09-26-2005 1:50 PM
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....
09-26-2005 2:02 PM
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
09-26-2005 1:54 PM
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
09-26-2005 1:56 PM
09-26-2005 1:57 PM
09-26-2005 2:02 PM
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
09-26-2005 2:20 PM
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.
09-26-2005 2:25 PM
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.
09-26-2005 2:31 PM
09-26-2005 2:32 PM
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
09-27-2005 5:33 AM
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
09-27-2005 5:51 AM
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
09-27-2005 6:58 AM
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.
09-27-2005 7:15 AM
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
09-27-2005 7:55 AM
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
09-27-2005 8:01 AM
hi,
check with value tab
value_tab = it_1001.
hope this will work
cheers,
sasi
09-27-2005 8:03 AM
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
09-27-2005 10:33 AM
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
09-27-2005 11:17 AM
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
09-26-2005 2:19 PM
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.
09-27-2005 5:38 AM
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
09-27-2005 5:51 AM
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