04-22-2010 9:18 AM
Hi
I m facing a problem .. the scenario is i have to limit search help on Screen 100 field . but the following line is not working
AT SELECTION-SCREEN ON help-REQUEST FOR wa-soffice.
kindly help me out
Regards
Ammad
04-22-2010 10:44 AM
Hi,
As per ur requirement u should fetch the relavant data which u want in F4 in the below event
INITIALIZATION.
*Get data for F4 help - RFC
SELECT rfcdest
INTO TABLE t_rfc FROM rfcdes
WHERE rfcdest LIKE '%CRM%' AND
rfctype = 'T'.
Now use this event to display the same
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_rfc.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'RFCDEST'
dynpprog = sy-repid
dynpnr = '1000'
dynprofield = 'P_RFC'
value_org = 'S'
TABLES
value_tab = t_rfc
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Hope this helps.
Regds
Seema
04-22-2010 9:23 AM
Hi,
You have to write Your code on POH(Process on Help-Request) event of Screen 100.
How to write Code see the following link,
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbad0435c111d1829f0000e829fbfe/content.htm
Hope This Resolves your issue.
Regards,
Raghava Channooru.
04-22-2010 10:03 AM
I think i wasn't communicated properly .. i want to limit F4 Search help on Screen 100 Field . as we do on parameter through FM 'F4IF_INT_TABLE_VALUE_REQUEST'
Regards
Ammad
04-22-2010 10:29 AM
I think i wasn't communicated properly .. i want to limit F4 Search help on Screen 100 Field . as we do on parameter through FM 'F4IF_INT_TABLE_VALUE_REQUEST'
Regards
Ammad
04-22-2010 10:30 AM
04-22-2010 10:44 AM
Hi,
As per ur requirement u should fetch the relavant data which u want in F4 in the below event
INITIALIZATION.
*Get data for F4 help - RFC
SELECT rfcdest
INTO TABLE t_rfc FROM rfcdes
WHERE rfcdest LIKE '%CRM%' AND
rfctype = 'T'.
Now use this event to display the same
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_rfc.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'RFCDEST'
dynpprog = sy-repid
dynpnr = '1000'
dynprofield = 'P_RFC'
value_org = 'S'
TABLES
value_tab = t_rfc
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Hope this helps.
Regds
Seema
04-22-2010 11:29 AM
Seema its fine with parameter but its not working on Screen field... as we place text field on the screen
04-22-2010 11:32 AM
Do you mean ur using Module Pool? Can you please explain the requirement?
04-22-2010 11:57 AM
I have called a screen 100 in my program .... i have fields of sales office and sales group on the screen.
Sales office field name is wa-soffice
Sales group field name is wa-sgroup
what is happening all the entries of both fields in search help are appearing.
what i want is if i select sales group then only sales office of that group should be displayed in sales office search help.
the method we used for parameteres is not working here ....
Regards
04-22-2010 12:02 PM
Basically you want to populate the F4 values based on some other field. If yes, this has been answered in the forum many times. A simple search from your end would have saved your time & effort.
Try searching in SDN & get back if you have any specific problem.
BR,
Suhas
04-22-2010 12:40 PM
Hi again,
Ok got it... Now create a search help with 2 fields sales office and sales group ok dont forget to tick all the 4 check boxes for both the fields i.e. imp and exp and than assign this search help to any one of the fields. This will work for sure let me knw if u face any issues.
Regds
04-22-2010 12:47 PM
Hi Ammad,
Create an elementary search help for sales group and assign it to that field.
select data for sales office according to sales group using SELECT query (for this create MODULE in POV event).
Then assign that selected fields in Sales office field using POV event (process on value request).
Regards,
Ankur.
04-22-2010 12:57 PM
I retrieved the field but i m unable to select the value .... code is as followssss kindly help me
TYPES: BEGIN OF values,
VKBUR TYPE H_TVKBZ-VKBUR,
BEZEI TYPE H_TVKBZ-BEZEI,
END OF values.
data: values_tab TYPE TABLE OF values,
dynpro_values TYPE TABLE OF dynpread,
field_value LIKE LINE OF dynpro_values.
CLEAR: field_value, dynpro_values.
field_value-fieldname = 'WA-VKORG'.
APPEND field_value TO dynpro_values.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = dynpro_values.
READ TABLE dynpro_values with KEY fieldname = 'WA-VKORG' INTO field_value.
if field_value-FIELDVALUE is NOT INITIAL.
SELECT VKBUR INTO CORRESPONDING FIELDS OF TABLE values_tab FROM TVKBZ
WHERE vkorg = wa-vkorg
AND vtweg = wa-vtweg
AND spart = wa-spart.
endif.
DELETE values_tab WHERE WA-SOFFICE IS INITIAL OR submi = ''.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WA-SOFFICE'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'WA-SOFFICE'
value_org = 'S'
TABLES
value_tab = values_tab.
field_tab = values_tab.
04-22-2010 1:12 PM
I think you are making mistake right here
READ TABLE dynpro_values WITH KEY fieldname = 'WA-VKORG' INTO field_value.
IF field_value-fieldvalue IS NOT INITIAL.
SELECT vkbur INTO CORRESPONDING FIELDS OF TABLE values_tab FROM tvkbz
WHERE vkorg = wa-vkorg "you should what you read, so FIELD_VALUE-FIELDVALUE not WA-VKORG, as it is empty
AND vtweg = wa-vtweg
AND spart = wa-spart.
ENDIF.
Try it out.
Regards
Marcin
04-22-2010 1:21 PM
hi
i did try this but didn't work .. i m understanding the problem but unable to solve it .. problem is i m unable to write back the selected values to wa-soffice.
Regards
Ammad
04-22-2010 1:32 PM
Hi,
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WA-SOFFICE'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'WA-SOFFICE'
value_org = 'S'
TABLES
value_tab = values_tab.
*field_tab = values_tab " I think this is not right one
return_tab = values_tab. " Try this
Hope this resolves your issue
Regards,
Raghava Channooru
04-22-2010 1:54 PM
Assuming you made the corrections as mentioned by Marcin & values are populated successfully in VALUES_TAB. You should try making these changes to the function call & check :
DATA: IT_RET LIKE DDSHRETVAL OCCURS 0 WITH header line. "-->Add the Return Table
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'VKBUR' "--> This should be the field of VALUES_TAB which should be returned to RETURN_TAB
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'WA-SOFFICE'
value_org = 'S'
TABLES
value_tab = values_tab.
RETURN_TAB = it_ret. "You have to use RETURN_TAB to get the value back to the screen field
BR,
Suhas
04-22-2010 2:30 PM
Hi
I perform all the suggestions but i m fail to assign selected value to wa-soffice
regards
Ammad
04-22-2010 5:06 PM
Hi,
What is the problem you are exactly facing ?
Is it while using fm 'F4IF_INT_TABLE_VALUE_REQUEST'
or
to retrieve the values that are to be passed to 'F4IF_INT_TABLE_VALUE_REQUEST'.
04-23-2010 6:30 AM
* Screen flow logic........
PROCESS BEFORE OUTPUT.
*MODULE PBO_MODULE.
PROCESS AFTER INPUT.
*MODULE PAI_MODULE.
PROCESS ON VALUE-REQUEST. "F4
FIELD EKPO-EBELP MODULE help_ekpo.
* populate screen field from within PROCESS ON VALUE-REQUEST(F4) call
*&------------------------------------------------------------------*
*& Module help_responsibility INPUT
*&------------------------------------------------------------------*
* text
*-------------------------------------------------------------------*
MODULE help_ekpo INPUT.
**Transport values to table dynpro/screen table control
DATA: l_stepl LIKE sy-stepl,
l_indx LIKE sy-stepl.
DATA: dynpfields LIKE dynpread OCCURS 5 WITH HEADER LINE.
* Adjust for scroling within table control
CALL FUNCTION 'DYNP_GET_STEPL'
IMPORTING
povstepl = l_stepl
EXCEPTIONS
stepl_not_found = 0
OTHERS = 0.
l_indx = tc_ekpotable-top_line + l_stepl - 1.
"tc_ekpotable should already have been declared
REFRESH dynpfields.
CLEAR dynpfields.
dynpfields-fieldname = 'EKPO-EBELN'.
dynpfields-fieldvalue = '00010' "wa_ekpo-ebeln.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
dynpfields-fieldname = 'EKPO-EBELP'.
dynpfields-fieldvalue = '00020' "wa_ekpo-ebelp.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'SAPLZZ_EKKO' "Program name
dynumb = '0100' "Screen number
TABLES
dynpfields = dynpfields
EXCEPTIONS
OTHERS = 0.
ENDMODULE. " help_ekpo INPUT