‎2012 Feb 16 10:57 AM
Dear all,
iam using FM vrm_set_vlaues to get F4 help on inputscreen.iam getting the data for this field as text using reaa_text.so iam splitting the text and iam passing that value to string.for this i have written code as
data : lid type vrm_id,
l_val type vrm_values,
val like line of l_val.
val-text = string3.
append val to l_val.
*
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'ZURZZT'
values = l_val
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENdid.
iam getting that number into l_val,but iam unable to get that on input selection screen.
plese suggest me any other possiblities are there.
reg
shiv
‎2012 Feb 16 11:50 AM
Hi,
You can use this code to get F4 help values for a parameter.
parameters: p_ebeln type ekko-ebeln.
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko,
it_return type STANDARD TABLE OF DDSHRETVAL,
wa_return like line of it_return.
**************************************************************
*at selection-screen
at selection-screen on value-request for p_ebeln.
select *
up to 10 rows
from ekko
into CORRESPONDING FIELDS OF TABLE it_ekko.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = 'EKKO'
RETFIELD = 'EBELN'
* PVALKEY = ' '
* DYNPPROG = sy-repid
* DYNPNR = sy-dynnr
* DYNPROFIELD = 'EBELN'
* STEPL = 0
WINDOW_TITLE = 'Ekko Records'
* VALUE = ' '
VALUE_ORG = 'S'
* MULTIPLE_CHOICE = 'X' "allows you select multiple entries from the popup
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET = ld_ret
TABLES
VALUE_TAB = it_ekko
* FIELD_TAB = lt_field
RETURN_TAB = it_return
* DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
READ TABLE it_return into wa_return index 1.
p_ebeln = wa_return-fieldval.
‎2012 Feb 16 1:08 PM
Hello Shiva,
Keep Initialisation event. You will get values on selection screen. Just I passed one value to string3 and check the code.
Its working fine.
type-pools: vrm.
PARAMETERS : zurzzt(9) TYPE c AS LISTBOX VISIBLE LENGTH 9.
data: string3 TYPE string VALUE 'Satya'.
data : lid type vrm_id,
l_val type vrm_values,
val like line of l_val.
INITIALIZATION.
val-key = '1'.
val-text = string3.
append val to l_val.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'ZURZZT'
values = l_val
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENdif.
If any doubts revert back.
I will help you.
Regards,
Supriya.
‎2012 Feb 17 5:50 AM
ima using this FM in PBO module,when iam giving event at selection screen output or process on value request it is showing syntax error that started module has to end with endmodule.it is not accepting any event .
my doubt is iam picking this value from text and iam passing this to input selection screen,for this iam writing logic in PBO only,will iam able to get this string as Search help for that perticular field.
reg
shiv
‎2012 Feb 17 6:10 AM
Hi,
Provide the values to the val-text in the initialization event.
And then call the VRM_Set_values fm at Selection-Screen Output event.
Your purpose will be solved.
Regards
Tarun
‎2012 Feb 17 6:21 AM
For using search help ( F4 help ) for your input field,please follow these Function Module calls
1 .Call F4IF_INT_TABLE_VALUE_REQUEST for fetching the request value from the input.
2. Then use DYNP_VALUES_READ for reading the selected input from the table ( search help table for your input field).
3. Then use DYNP_VALUES_UPDATE for updating your input field with the selected input from search help.
write POV
process on value-request .
field i_keyword module search_help. " i_keyfield is the input field for seach help to be implemanted The above FM calls has to be done in PAI of the screen of search help.
Let me know if you need code help on above FMs.
Ben
‎2012 Feb 17 6:29 AM
Hello Shiv,
I tried in PBO event. Its working fine. See the code below. You can declare data statements in top include also.
module STATUS_0099 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
type-pools: vrm.
data: string3 TYPE string VALUE 'Satya'.
data : lid type vrm_id,
l_val type vrm_values,
val like line of l_val.
val-key = '1'.
val-text = string3.
append val to l_val.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'S'
values = l_val
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENdif.
endmodule. " STATUS_0099 OUTPUT
Try this if any problem revert back.
Regards,
Supriya.
‎2012 Feb 17 6:48 AM
Hi Raj,
Check this code..
data : lid type vrm_id,
l_val type vrm_values,
val like line of l_val.
val-text = string3.
append val to l_val.
*
DATA: IT_RETURN1 TYPE STANDARD TABLE OF ddshretval WITH HEADER LINE.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'ZURZZT'
PVALKEY = ' '
DYNPPROG = sy-repid
DYNPNR = sy-dynnr
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
value = '*'
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = l_val ********** (pass internal table here)
FIELD_TAB =
RETURN_TAB = IT_RETURN1 ******** here u get the selected value
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF SY-SUBRC = 0.
READ TABLE l_val INTO wa_l_val WITH KEY ZURZZT = IT_RETURN1-fieldval.
IF sy-subrc = 0.
zurzzt = wa_l_val-ZURZZT. ********** This stores the selected value into screen field.
ENDIF.
ENDIF.
‎2012 Feb 17 7:36 AM
Hi ,
Kindly check the below point
1. Check ZURZZT is the screen field name if not give the correct screen field name .
2. Enter val-key = '1' and so on incrementing for other value.
3. If u want to trigger any event based on the value assign a FCODE for the field in the screen.
Revert back.
Regards,
Madhukar Shetty