on 12-10-2013 6:09 AM
Hi All,
I have used FM F4IF_FIELD_VALUE_REQUEST for select option search help. However when i click on the f4 help it gives mi a list as below
Cmpany code| Name
1000 | SAP
2000 | SAP2
so when i select any one from this, the value displays on selction option as '1000'. But i need to display value as 'SAP'. so i want the name instead of value.
How can i do that ??
read the return table values u will get plant description
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Its problem with the return parameter. Check the code below.
TYPES: BEGIN OF ly_t001,
bukrs TYPE bukrs,
name TYPE t001w-name1,
END OF ly_t001.
DATA: lt_t001 TYPE TABLE OF ly_t001.
SELECT bukrs name1 INTO TABLE lt_t001 FROM t001.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'NAME' " structure field
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'WA-NAME' " module pool screen field
value_org = 'S'
display = 'F'
TABLES
value_tab = lt_t001
return_tab = lt_display.
This should work.
Thanks ,
Janardhana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Kindly find the below tcode.
Before that i have created one Ztable 'Zt001' and assign zsearch help zt001 to the same.
Then follow below code.
TYPES: BEGIN OF t_t001,
bukrs type bukrs,
butxt TYPE butxt,
END OF t_t001.
DATA: lt_t001 TYPE STANDARD TABLE OF t_t001,
lt_return LIKE ddshretval OCCURS 0 WITH HEADER LINE .
PARAMETERS: p_butxt TYPE zt001-butxt .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_butxt.
SELECT bukrs butxt FROM zt001 INTO TABLE lt_t001 UP TO 1 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'BUTXT'
value_org = 'S'
TABLES
value_tab = lt_t001
* field_tab = lt_return
return_tab = lt_return.
p_butxt = lt_return-fieldval.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andy,
I too had a similar requirement.
I used this FM: F4IF_INT_TABLE_VALUE_REQUEST.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = '<return_parameter_name' "In ur case it should be 'Name'
value_org = 'S'
TABLES
value_tab = <internal_table> "pass ur internal table having value & name
return_tab = gt_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
READ TABLE gt_return INTO gwa_return INDEX 1.
IF sy-subrc = 0.
parameter_field = gwa_return-fieldval.
ENDIF.
Note: gt_return and gwa_return should be of type ddshretval.
Try it, it will work.
Regards,
Shiva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not technic guy, but you have used the FM "VALUE" so it will retrieve only VALUE .. Isn't it.. ?
F4IF_FIELD_VALUE_REQUEST = VALUE
Do you have anything or any FM similar to pulling for CONSTANTS...
Or else should write ABAP code to overwrite the VALUE and Constants...
Hope this helps..
Rewards points if this was helpful.
Thanks & Regards
Rahaman.
Hi,
After reading the selected value from the FM, read the corresponding Name in the Select Option(For display purpose alone).
Then again the "At Selection Screen" event, read the value using the Name and change the value back to '1000'. So that it ll hold the value for the following processing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Please try this code ,
DATA: SH TYPE SHLP_DESCR_T.
DATA: INTERFACE LIKE DDSHIFACE OCCURS 0 WITH HEADER LINE.
DATA: LT_F4 LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE.
DATA: V_BUKRS TYPE BUKRS,
V_DESC TYPE CHAR250.
DATA: T_RETURN LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE.
DATA: V_SUBRC TYPE SYSUBRC.
SELECT-OPTIONS P_BUKRS FOR ZWRK_AP520_BUKRS-COCODE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PLNTY-LOW.
SH-SHLPNAME = 'ZBUKRS'. " Search Help Name
SH-SHLPTYPE = 'SH'.
CALL FUNCTION 'DD_SHLP_GET_DIALOG_INFO'
CHANGING
SHLP = SH.
INTERFACE-SHLPFIELD = 'COCODE'. " Field1 of which value to be returned
INTERFACE-VALFIELD = 'V_BUKRS'.
APPEND INTERFACE.
INTERFACE-SHLPFIELD = 'DESCRIPTION'. " Field2 of which value to be returned
INTERFACE-VALFIELD = 'V_DESCRIPTION'.
APPEND INTERFACE.
SH-INTERFACE[] = INTERFACE[].
CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
EXPORTING
SHLP = SH
DISPONLY = ' '
IMPORTING
RC = V_SUBRC
TABLES
RETURN_VALUES = T_RETURN. " Contains the value of 2 fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make use of FM's DYNPRO_READ_VALUE & DYNPRO_UPDATE_VALUE for reading the value choosen using fm F4IF_INT**** from the screen.
catch company code using DYNPRO_READ_VALUE and then determine the name based on this value. Then use DYNPRO_UPDATE_VALUE to update final calue to the screenfield.
Sometimes simply moving the determined name to the screen field variable also works..which is based on module pool screen flow.
Check if it helps..
Regards
Ansumesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Andy,
The search help you are using in FM F4IF_FIELD_VALUE_REQUEST must be exporting company code. Easier option to copy the Search Help to Z Search Help and Export Name instead of company code.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pass the SHLPPARAM as BUTXT or company code name field it will return the name value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.