on 11-02-2009 10:04 AM
Hi Experts,
I have created a characteristic 'Department' and when I assign the table 'T527O' in the Value tab it gives an error " Check table T527O has too many key fields".
In the error it says that "Check tables with more than one key field are not supported. However,
if you enter a function module for checking values, you can refer to any check table in your own coding."
I am able to see one radio button called "Function Module" when I click on Other Value Check on Value tab, but do not know how to use that.
Could anyone please guide me in this.
My requirement is:
1. create a characteristic called department.
2. link it to a class,
3. while creating a document in CV01N the f4 help should be available in department field.
Thanks & Regards
Rajiv Roshan
A function module is where you get an ABAP programmer to create a customer download linked to a table. He saves it as a function module and you add it there. When the person presses F4 it calls the function module and gives the user the drop down.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Rajiv,
You must create & assign Function modules as mentioned in the documentation:
http://help.sap.com/saphelp_erp60_sp/helpdata/en/ec/62a9bb416a11d1896d0000e8322d00/content.htm
Regards
Surjit
FUNCTION Z_PRCTR_CHECK_F4.
*"----
""Local Interface:
*" IMPORTING
*" VALUE(CHARACT_NO) LIKE CABN-ATINN
*" VALUE(CHARACT) LIKE CABN-ATNAM
*" VALUE(DISPLAY) LIKE RMCLF-KREUZ DEFAULT SPACE
*" VALUE(ADDITIONAL_VALUES) LIKE CABN-ATSON DEFAULT SPACE
*" VALUE(MULTIPLE_VALUES) LIKE RCTMV-ATLIS DEFAULT SPACE
*" VALUE(LANGUAGE) LIKE SY-LANGU DEFAULT SY-LANGU
*" VALUE(DISPLAY_WITH_LANGUAGE) LIKE RMCLF-KREUZ DEFAULT SPACE
*" TABLES
*" VALUES STRUCTURE RCTVALUES
*" EXCEPTIONS
*" CANCELLED_BY_USER
*"----
*This function is used in a characteristic to provide an F4 search using a common search help.
*Fill the first three constants as instructed and as needed for the specific characteristic.
*Note that a function without the '_F4' is created for the check and entered in the characteristic.
*Read the help documentation on the characteristic function field for full explanation.
data definition ------------------------------------------------------
CONSTANTS: c_SHLPNAME TYPE SHLPNAME VALUE 'ENTER SEARCH HELP NAME HERE ALL CAPS',
c_shlpfield TYPE DDSHLPSFLD VALUE 'ENTER INPUT FIELD NAME HERE ALL CAPS',
c_conv_routine TYPE RS38L_FNAM VALUE 'ENTER FUNCTION MODULE NAME OF CONVERSION ROUTINE IF NEEDED, OR CLEAR THIS VALUE',
del(1) TYPE c VALUE 'D',
ins(1) TYPE c VALUE 'I'.
DATA: indx TYPE i,
interface_wa like ddshiface,
rc TYPE sy-subrc,
anln1 TYPE anln1,
return_tab TYPE TABLE OF DDSHRETVAL,
shlp TYPE SHLP_DESCR.
FIELD-SYMBOLS: <int> TYPE ddshiface,
<ret> TYPE DDSHRETVAL.
Get search help data container.
CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
EXPORTING
SHLPNAME = c_SHLPNAME "Enter the Search help name here
SHLPTYPE = 'SH'
IMPORTING
SHLP = shlp.
Mark the relevant field to be returned.
LOOP AT shlp-interface ASSIGNING <int>
WHERE shlpfield = c_shlpfield. "Enter the field to be exported.
<int>-valfield = 'X'.
ENDLOOP.
Call the search help dialogue.
CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
EXPORTING
SHLP = shlp
MAXRECORDS = 500
MULTISEL = multiple_values
IMPORTING
RC = rc
TABLES
RETURN_VALUES = return_tab.
Remove any old selected values
LOOP AT values.
indx = sy-tabix.
READ TABLE return_tab WITH KEY fieldval(30) = values-value ASSIGNING <ret>.
IF sy-subrc <> 0.
values-status = del.
MODIFY values INDEX indx.
ENDIF.
ENDLOOP.
Add the new values.
LOOP AT return_tab ASSIGNING <ret>.
IF c_conv_routine IS NOT INITIAL.
CALL FUNCTION c_conv_routine
EXPORTING
input = <ret>-fieldval(30)
IMPORTING
OUTPUT = values-value
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
ELSE.
values-value = <ret>-fieldval(30).
ENDIF.
values-status = ins.
APPEND values.
ENDLOOP.
ENDFUNCTION.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karl,
Need your help. Have a requirement where I have to modify the F4 results in CG02. I have created the *_F4 FM and it is returning values. But instead of coming as a pop up window like a normal F4 the values are appearing in a single row in separate columns. Do you have any idea what is it that I am missing in my code?
Thanks,
Anumeha
Thanks for the answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First create a function module according to the F1 documentation with import and export parameters as suggested for example: Z_EXAMPLE_CHAR.
Create a Second function module according to the F1 documentation with import and export parameters as suggested for example: Z_EXAMPLE_CHAR_F4.
Inside your CT04 Other values select function module and place Z_EXAMPLE_CHAR inside field. This will automatically call the F4 module when F4 is pressed. Note that the names must be exactly the same for both FM's except for the F4 at end. The parameters that are export with your value are Value and Values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.