‎2011 Apr 21 5:25 AM
Dear all,
I am using one of the field (type char 1: values ' ' and 'X') from the ztable on selection screen in custom report.
Declared it as Select-option. But in F4, it is populating only ' ' value not 'X' even thouth the values are defined in domain level of the field in DDIC.
Kindly suggest.
Thanks in advance.
Regards,
Ashwini
‎2011 Apr 21 6:53 AM
Hi ,
Where there you mentioned ' ' and X in Single Values in Domain level,
if it was it will working fine
Otherwise if you gave the values in Intervals in Domain level it is not working.
Thanks and Regards,
Prakash K
‎2011 Apr 21 6:32 AM
Hi ,
Where there you tried using Function Module F4IF_INT_TABLE_VALUE_REQUEST.
Thanks and Regards,
Prakash K
‎2011 Apr 21 6:53 AM
Hi ,
Where there you mentioned ' ' and X in Single Values in Domain level,
if it was it will working fine
Otherwise if you gave the values in Intervals in Domain level it is not working.
Thanks and Regards,
Prakash K
‎2011 Apr 22 11:16 AM
Hi Ashwini,
The code below works perfectly fine. Please check:
TABLES: dd03l.
SELECT-OPTIONS: s_char1 for dd03l-keyflag.
Regards,
Shyam
‎2011 Apr 22 11:30 AM
hi,
You can use call function 'F4IF_INT_TABLE_VALUE_REQUEST'
call this under at selection screen.
regards,
pawan.
‎2011 May 12 12:42 PM
Hi Ashwini,
In your field domain,click the 'Value ranges' tab and give your value in 'Single vals' like
X -
>Yes.
(Here space) -
>No.
Now try it in your report like,
TABLES :ZABC.
SELECT-OPTIONS S_CHECK FOR ZABC-FIELD1.
Now you will get the F4 values.
Edited by: Balamurugan.e on May 12, 2011 2:35 PM
‎2011 May 13 12:36 PM
Hi,
Follow the below code ...you will get result
TABLES: usr02.
parameters: p_bname LIKE usr02-bname,
p_class LIKE usr02-class.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bname.
PERFORM f_valuerequest_vbeln.
&----
*& Form f_valuerequest_vbeln
&----
text
----
--> p1 text
<-- p2 text
----
FORM f_valuerequest_vbeln.
DATA: BEGIN OF t_data OCCURS 1,
data(20),
END OF t_data.
DATA: lwa_dfies TYPE dfies.
data h_field_wa LIKe dfies.
data h_field_tab like dfies occurs 0 with header line.
data h_dselc like dselc occurs 0 with header line.
SELECT * FROM usr02.
t_data = usr02-bname. APPEND t_data.
t_data = usr02-class. APPEND t_data.
ENDSELECT.
PERFORM f_fieldinfo_get USING 'USR02'
'BNAME'
CHANGING h_field_wa.
APPEND h_field_wa TO h_field_tab.
PERFORM f_fieldinfo_get USING 'USR02'
'CLASS'
CHANGING h_field_wa.
APPEND h_field_wa TO h_field_tab.
h_dselc-fldname = 'BNAME'.
h_dselc-dyfldname = 'P_BNAME'.
APPEND h_dselc.
h_dselc-fldname = 'CLASS'.
h_dselc-dyfldname = 'P_CLASS'.
APPEND h_dselc.
DATA: ld_repid LIKE sy-repid.
ld_repid = sy-repid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'P_BNAME'
dynpprog = ld_repid
dynpnr = '1000'
dynprofield = 'P_BNAME'
multiple_choice = ''
value_org = 'S'
TABLES
value_tab = t_data
field_tab = h_field_tab
return_tab = return_tab
DYNPFLD_MAPPING = h_dselc
EXCEPTIONS
OTHERS = 0.
ENDFORM. " f_valuerequest_vbeln
&----
*& Form f_fieldinfo_get
&----
text
----
-->P_0079 text
-->P_0080 text
<--P_H_FIELD_WA text
----
FORM f_fieldinfo_get USING fu_tabname
fu_fieldname
CHANGING fwa_field_tab.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
TABNAME = fu_tabname
FIELDNAME = fu_fieldname
LFIELDNAME = fu_fieldname
IMPORTING
DFIES_WA = fwa_field_tab
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 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.
ENDIF.
ENDFORM. " f_fieldinfo_get
May be it will help u.
Good Luck.
Ram.
‎2011 May 18 4:37 PM
Hi
There are many ways to get the F4 values from the domain ( Value Range - Single Value). Here is one more way.
1. SE11 - Once you declare the value range at domain level. Activate it.
2 .SE38 - declare a varaible like data : <variable-name> type <table name>-<table-field>
3. SE38 - Select-options : <selection variable > for <variable-name> . (step 2 above).
Please let me know, if it works. Thanks