2011 Feb 11 3:40 AM
Hi All,
I'm having an annoying problem.
I've created a table for Z_EMPL_CAT "Employee category" (Fields: CLIENT, CATEGORY(CHAR10) and DESCR(CHAR20).
I've created a domain for Z_M_CATEGORY and I've set table Z_EMPL_CAT it's "Value Table".
I've also created a Search Help "Z_H_CATEGORY" and configured it as follows:
- Selection Method: Z_EMPL_CAT
- FIELD CATEGORY - IMPORT(X), EXPORT(X), LP(1), SP(1)....
- FIELD DESCR - IMPORT( ), EXPORT( ), LP(2), SP(2)....
I've also created a data element Z_D_CATEGORY (based on domain Z_M_CATEGORY) and I set search help Z_H_CATEGORY with parameter CATEGORY.
I've created a maintenance view for table Z_EMPL_CAT. As for now - everything is ok - if i press F4, search help popup is displayed showing both; category and description - as below:
-
Category Description
-
TEMP Temporary employee
FULL Full time employee
HALF Half time employee
-
I created another table Z_EMPL_CAT_PARM (Employee category parameters) Fields: (CLIENT, CATEGORY, WORK_DAYS, WORK_HOURS). (This table defines how many work days per week is per category and how many work hours per work day).
When I generated maintenance view and run it through SM 30, upon pressing F4 for CATEGORY field, I get nice popup with both fields again
-
Category Description
-
TEMP Temporary employee
FULL Full time employee
HALF Half time employee
-
Now, PROBLEM starts. I had to create Z_EMPLOYEE table: (Fields CLIENT, EMPL_ID, NAME, AGE, CATEGORY). It's pretty simple but customer asked me to display category description next to CATEGORY field automatically, when someone enters the data. So what I did, is i created a new maintenance view Z_V_EMPLOYEE and joined tables Z_EMPLOYEE with Z_EMP_CAT on CATEGORY field. Now , my maintenance view has following fields (EMPL_ID, NAME, AGE, CATEGORY and DESCR (from table Z_EMPL_CAT - set as read only).
When I generated Maintenance view, I found out that view itself is working perfectly and Description is automatically filled upon CATEGORY field data entry. PROBLEM is with search help for CATEGORY field, now, when I press F4 for it, my search help popup shows only one field - CATEGORY.
-
Category
-
TEMP
FULL
HALF
-
I don't know how to solve this as this Search help is obviously correct as it's working fine if I'm using it with table Z_EMPLPARM. When i use it with MAINTENANCE view Z_V_EMPLOYEE - search help data are incomplete.
Any ideas?
2011 Feb 23 3:49 PM
Hi,
I do not understand why you have created maintenance view for F4. I mean to say, generally, if we have to maintain data in two or more tables based on key fields at one go, we go with maintenance view. I am not sure whether creation of maintenance view will be helpful to you other than F4.
Getting description next to category is your only purpose to create a maintenance view then I suggest you go with your first created search help (Z_H_CATEGORY). In other words, check export parameter for description field i.e. change the following:
- FIELD CATEGORY - IMPORT(X), EXPORT(X), LP(1), SP(1)....
- FIELD DESCR - IMPORT( ), EXPORT(X), LP(2), SP(2)....
Now, you can link description with your screen field.
Hope that helps!
Regards,
Saba
2011 Feb 27 1:26 PM
Dear Saba,
I haven't created Maintenance View for F4 purpose but to have "Employee category" nicely displayed in Maintenance screen when "Employee category" is entered. My problem was that standard F4 popup presented data different way when I called it from Maintenance View For table and Maintenance View for View.
I've solved the problem. Instead of attaching Search Help to data element in Data element definition, I left it blank and I defined search help for table field in table definition screen. This solved the problem
Best regards
2011 Feb 27 1:27 PM
Solved:
- Don't define search help for Data Element - just define it for table field when you create table structure.