on 04-12-2006 10:08 PM
Hi,
In CV01N transaction there is an 'additional data' tab in the second screen and for the field form size there is F4 help whose values r not stored in any table. They are the characteristic values and I want to replicate the F4 help in my prg. How do I do this. This additional tab depends on the document type.
Can some one help me on this.
Thanks.
Hi,
I think this might help you,
DATA: gt_char LIKE bapi_char OCCURS 0 ,
gt_val LIKE bapi_char_values OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF values,
val TYPE bapi_char_values-char_value,
des TYPE bapi_char_values-descr_cval,
END OF values.
DATA: gt_value_tab LIKE TABLE OF values.
PARAMETER p_f4 TYPE bapi_char_values-char_value.
INITIALIZATION.
REFRESH: gt_char,gt_val.
CALL FUNCTION 'BAPI_CLASS_GET_CHARACTERISTICS'
EXPORTING
*name of the class whose characteristic values req.
classnum = 'Z_TEST1'
classtype = '032'
TABLES
characteristics = gt_char
char_values = gt_val.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_f4.
REFRESH: gt_value_tab.
*loop & get the req characteristic's values
LOOP AT gt_val WHERE name_char = 'Z_TEST2'.
values-val = gt_val-char_value.
values-des = gt_val-descr_cval.
APPEND values TO gt_value_tab.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'VAL'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_F4'
value_org = 'S'
TABLES
value_tab = gt_value_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If the values from a search help is not stored in any table, possibilities are :
1. values are supplied dynamically using a function module.
2. fixed values are maintained at the domain attached to the data element referred by that screen field.
Kindly check the domain and the program for that corresponding transaction and you can use any of the two methods in your custom program to populate values.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.