‎2010 Jan 19 6:13 AM
Hello gurus,
i have a small requirement on f4 help. i,e in a report i have a parameter called
status where it shows F4 help and shows data as :
status : 1 approved
2 rejected
3 pending
so in the report iam getting the status feilds as
1
2
3
instead of this i want the text to be displayed pls help
‎2010 Jan 19 6:18 AM
HI,
you can get the Text from DD07T table
first go to DD07L table and get the data and get txt from above table
" This is useful only if these Values are maintained in Domain Level
of use Function Module *J_3G_GET_DOMAENE_TEXT*Cheerz
Ram
‎2010 Jan 19 6:18 AM
HI,
you can get the Text from DD07T table
first go to DD07L table and get the data and get txt from above table
" This is useful only if these Values are maintained in Domain Level
of use Function Module *J_3G_GET_DOMAENE_TEXT*Cheerz
Ram
‎2010 Jan 19 6:22 AM
Thank Q somuch for ur reply,
but iam very new to ABAP and iam not able to proceed with the suggestion u have given,
that table DD07L how to get the data from there?
Bhavana
‎2010 Jan 19 6:36 AM
Take the domain name for the field which you are getting those f4 values and
use it in DD07L or DD07T table and execute.
You will get those fixed values or fixed texts.
‎2010 Jan 19 7:06 AM
Hi gautam,
yes i have gone through the tables and i have seen the text there . but now what is the query which i need to write so that tht text cab be displayed
bhavana
‎2010 Jan 19 7:40 AM
Hi Bhavana,
let's say, that your code looks like this right now:
PARAMETERS: p_status TYPE rsmonext-status. You have to do it like this:
DATA: gt_return TYPE STANDARD TABLE OF ddshretval.
FIELD-SYMBOLS: <gs_return> TYPE ddshretval.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (20) FOR FIELD p_status.
PARAMETERS: p_status TYPE rsmonext-status.
SELECTION-SCREEN COMMENT (50) stat_txt.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_status."To get text after F4
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'RSMONEXT'
fieldname = 'STATUS'
dynprofield = 'P_STATUS'
TABLES
return_tab = gt_return
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
OTHERS = 5.
IF sy-subrc <> 0.
CLEAR stat_txt.
ELSE.
READ TABLE gt_return ASSIGNING <gs_return> INDEX 1.
IF sy-subrc EQ 0.
p_status = <gs_return>-fieldval.
PERFORM get_domain_text USING 'RSSTATUS' p_status CHANGING stat_txt.
ELSE.
CLEAR stat_txt.
ENDIF.
ENDIF.
PERFORM set_value_on_sel_screen USING 'STAT_TXT' stat_txt.
AT SELECTION-SCREEN OUTPUT. "To get text on enter after direct input of text (without F4)
PERFORM get_domain_text USING 'RSSTATUS' p_status CHANGING stat_txt.
PERFORM set_value_on_sel_screen USING 'STAT_TXT' stat_txt.
FORM get_domain_text USING uv_domain TYPE dd01l-domname
uv_domain_value TYPE any
CHANGING cv_domain_text TYPE any.
DATA: lt_dd07v TYPE STANDARD TABLE OF dd07v.
FIELD-SYMBOLS: <ls_dd07v> TYPE dd07v.
CLEAR cv_domain_text.
CALL FUNCTION 'DD_DD07V_GET'
EXPORTING
domain_name = uv_domain
withtext = 'X'
TABLES
dd07v_tab = lt_dd07v
EXCEPTIONS
access_failure = 1
OTHERS = 2.
IF sy-subrc <> 0.
CLEAR cv_domain_text.
ENDIF.
READ TABLE lt_dd07v ASSIGNING <ls_dd07v> WITH KEY domvalue_l = uv_domain_value.
IF sy-subrc EQ 0.
cv_domain_text = <ls_dd07v>-ddtext.
ENDIF.
ENDFORM.
‎2010 Jan 19 7:41 AM
FORM set_value_on_sel_screen USING value(uv_fieldname) TYPE any
value(uv_value) TYPE any.
DATA: lt_dynpread TYPE STANDARD TABLE OF dynpread,
lv_repid TYPE sy-repid,
lv_dynnr TYPE sy-dynnr.
FIELD-SYMBOLS: <ls_dynpread> TYPE dynpread.
lv_repid = sy-repid.
lv_dynnr = sy-dynnr.
APPEND INITIAL LINE TO lt_dynpread ASSIGNING <ls_dynpread>.
<ls_dynpread>-fieldname = uv_fieldname.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = lv_repid
dynumb = lv_dynnr
translate_to_upper = 'X'
request = 'X'
TABLES
dynpfields = lt_dynpread
.
LOOP AT lt_dynpread ASSIGNING <ls_dynpread> WHERE fieldname EQ uv_fieldname.
<ls_dynpread>-fieldvalue = uv_value.
ENDLOOP.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = lv_repid
dynumb = lv_dynnr
TABLES
dynpfields = lt_dynpread
ENDFORM.In this example, I suppose, that You are using a field with domain values assigned. If your field is assigned to a text table, it would look of course different.
Hope it helps.
Regards,
Adrian
‎2010 Jan 19 7:52 AM
you already have those values in your internal table, so use those
values in DD07T table and get that texts and use in your output.
Something like this.
select single Ddtext into C_txt from dd07t
where Domname = 'VRKSTAT'
and DDLanguage = sy-LANGU
and AS4LOCAL = 'A'
and DOMVALUE_L = itab-status.
‎2010 Jan 19 8:57 AM
Thank q gautham
now i got the data in c_txt but in my ztable the status is of numc and legth 2 so how can i proceed.
actually iam wrking with simple ALV report
and in that alv report output
i get all the fields which are in ztable in that status coloumns are getting displayed as
1
2
3
so there i want to send this text... so pls help me out
bhavana
‎2010 Jan 19 9:04 AM
Add one more field in your final table like that text field in alv report and
use the data from dd07t to that field and display it.
‎2010 Jan 19 6:34 AM
Hi
For this use FM VRM_SET_VALUES is used to fill the value table and is passed to the parameter created with TYPE LISTBOX in the selection screen event AT SELECTION-SCREEN.
PROGRAM zlist
TYPE-POOLS : VRM.
DATA: param TYPE vrm_id,
values TYPE vrm_values,
value LIKE LINE OF values.
PARAMETERS: p_name(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
param = 'P_NAME'.
value-key = '1'.
value-text = 'Rejected'.
APPEND value TO values.
value-key = '2'.
value-text = 'Pending'.
APPEND value TO values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING id = param
values = values.
Thanks
Subha
‎2010 Jan 19 6:44 AM
Hello Bhavana ,
You can do it in this way,
While displaying you just have to the digit value to its text value for this Just add a extra text field to you internal table which you are passing to the list output and programatically i just pass the proper values into the newly added text field
eg.
if you have 1 in your report field just pass hard coded text as 'Accepted' to its corrosponding newly added text field
and while desplaying just show the newly added text field ...
Hope this solves your problem
‎2010 Jan 19 6:50 AM
Hi,
is it a Z-field that you have created in the table?
if yes then go to the table and double click on the data element of the field and then double click on the domain name, there you will be able to find a TAB called 'Value Range' see if the text is specified against the fixed values or not,
if not please maintain the text here and then save and activate the domain and the database table and then test the F4 field in you report.
Hope it helps you,
Regards,
Abhijit G Borkar