on 11-02-2005 1:51 PM
When implementing Thomas Jung's blog for F4 search help, has anyone ran into trouble with an equipment/functional location search help?
I've tried about every object, with no luck. Any advice? Thanks in advance.
What kind of problem are you having? Have you not been able to find a BOR defintion that has the search help you need? I run into this from time to time (or when I need to call a custom search help). That is why in my R/3 system I created a custom BOR object just to hold these search helps. I can then any key field I want to this BOR object (and set its Search Help).
Depending upon the BOR object being access, there might also be a function module call to determine authority to use this search help via the BAPI. The mapping of these calls is done in configuration table BAPIF4T. For the new elements that I added to my custom BOR object I had to add an entry to this table and call a custom Auth Check Function module. Here is an example of the structure that these Auth Check Function modules must have:
function z_e_sd_helpvalues_auth.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(OBJTYPE) LIKE BAPIF4F-OBJTYPE
*" VALUE(METHOD) LIKE BAPIF4F-METHOD
*" VALUE(DTEL) LIKE BAPIF4F-DTEL
*" VALUE(SHLPNAME) LIKE BAPIF4F-SHLPNAME
*" VALUE(TABNAME) LIKE BAPIF4F-TABNAME
*" EXPORTING
*" VALUE(RETURN) LIKE BAPIF4F-RETURN
*"----------------------------------------------------------------------
clear return.
endfunction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had the authorization issue already, but my problem is not being able to find a BOR definition. I'll create an object, and I'm assuming in the method, have import parameters with a field type that has a search help.
Thanks again! I haven't created a BOR object before... it will be interesting.
Actually you don't even have to create a method for the BOR object. In my custom BOR object, I never did. I just created Key Fields (since these can be used as well in the HELP Bapi). Inside the BOR when you define a Key Field, you must give a Data Dictionary reference (including a search help if you wish).
Goto transaction SWO1 and look at one of the SAP delivered BOR objects (Perhaps BUS1001 - Material). Then look at its key field - Material or perhaps one of its attributes. This way you can avoid also having to create a dummy function module for the method itself.
Nope Method is optional. I have some calls where I determine the search help from objtype, objname, and param only. The BAPI works in such a way that if you don't sepecify a method, it looks for a key field that matches your param value instead.
<zkeg:inputHelp id = "chg_id"
value = "//model/CHG_ID"
multiple = "false"
size = "10"
disabled = "<%= model->MY_RETRIEVE_REQ_FLAG %>"
rfcDest = "<%= application->rfcdest %>"
objtype = "ZBSP_HELP"
objname = "BSPHelp"
keyField = "ID"
alignment = "CHAR"
param = "EngChangeID" />
I'm getting the values in the debugger from the BSP when the explicit search help field is filled, but I get an "RFC error: Invalid partial field access: Offset + length too large."
Have you ever come across this? I get the error in:
CALL FUNCTION 'BALW_SHLP_BAPI_FILL'
EXPORTING
LV_TABNAME = LV_TABNAME
LV_HELPFIELDNAME = LV_FIELDNAME
SHLP_METHOD = SHLP_METHOD
TABLES
NEW_HV = LT_NEW_HV
LT_DESCRIP = LT_FIELDDESCR
HELPVALUES = HELPVALUES
VALUES_FOR_FIELD = VALUES_FOR_FIELD
DESCRIPTION_FOR_HELPVALUES = DESCRIPTION_FOR_HELPVALUES.
While it loops through this, it just quits, and ends up back to the BSP with the error message above.
modify helpvalues ***************************************************
get internal name of helpfield
CLEAR LV_HELPVIEW_FLDNAME.
LOOP AT SHLP_METHOD-INTERFACE INTO INTERFACE
WHERE VALTABNAME = LV_TABNAME AND VALFIELD = LV_HELPFIELDNAME.
LV_HELPVIEW_FLDNAME = INTERFACE-SHLPFIELD.
ENDLOOP.
LOOP AT NEW_HV.
CLEAR SHLP_OFFSET.
LOOP AT LT_DESCRIP.
HELPVALUES+SHLP_OFFSET(LT_DESCRIP-LENG) =
NEW_HV+LT_DESCRIP-OFFSET(LT_DESCRIP-LENG).
SHLP_OFFSET = SHLP_OFFSET + LT_DESCRIP-LENG + LC_INSPACE.
IF LT_DESCRIP-FIELDNAME = LV_HELPVIEW_FLDNAME.
VALUES_FOR_FIELD = NEW_HV+LT_DESCRIP-OFFSET(LT_DESCRIP-LENG).
APPEND VALUES_FOR_FIELD.
ENDIF.
ENDLOOP. "lt_descrip
APPEND HELPVALUES.
ENDLOOP. "new_hv
I did some debugging this morning and I do hit this same section, however it pass through it without error. As you loop through NEW_HV it is processing the return values from the Help. Your backend system isn't Unicode by any chance? Although I can't recreate this exact problem in my Unicode system, I have had other problems with the Help BAPIs and their offsets. Some of the APIs return the offset in byte length and others in character length. Of course this would internal to SAP's processing and would have to be fixed by them.
User | Count |
---|---|
76 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
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.