I have problems getting the value help to work for parameters in report that have a datatype that I defined. I should say this is the first value help I try to create and the instructions on help.sap.com are not entirely clear to me.
What I mean / want to achieve:
In a report I have some parameters:
Header 1 |
---|
PARAMETERS: bp TYPE bu_partner, |
When I place the cursor in the bp field, there is the F4 / value help button for selecting a business partner (a complex value help / search help). The same works for many other pre-defined datatypes e.g. COMT_PRODUCT_ID (another complex search help) or COMT_CATEGORY_ID (an elementary search help).
In the demo_id field there is no value help button. I want there to be a value help button to select entries from table ZCREATEQUOTDEMO.
The table ZCREATEQUOTDEMO has a key column DEMO_ID of type ZDEMO_ID and some other columns for business partner, date, product and some conditions.
What I tried: (as I said I don't really know what I'm doing)
I created a domain ZDEMO_ID and associated the data type ZDEMO_ID with it.
In the domain ZDEMO_ID on the value range tab I put ZCREATEQUOTDEMO as the Value Table.
(Not sure what effect that had, if any.)
Am I even correct assuming I need a domain? Well, it can't really harm.
I created an elementary search help ZDEMO_ID (from se11).
Here I am mostly guessing what to put in.
In the Selection method field I put ZCREATEQUOTDEMO.
I set the Dialog type to D Display values immediately and left the Hot key blank.
I left the Search help exit field empty. If possible, I would like not to have to code an exit for this. According to help.sap.com they don't seem to be necessary unless one wants something fancy / non-standard?
In the table at the bottom I put the Search help parameter DEMO_ID and marked it as both IMP and EXP and I put LPos and SPos as 1 and 1.
I also put one of the other columns there, PRODUCT, made it neither IMP nor EXP and set LPos and SPos as 2 and 2 (not entirely sure what that does).
In the table ZCREATEQUOTDEMO I went to the Entry help/check tab, clicked in the line for DEMO_ID and clicked the Search Help button. I accepted the proposal, which was just Search help parameter DEMO_ID, Table Name ZCREATEQUOTDEMO and Field name DEMO_ID.
Outcome:
It seems to have worked a little bit. When I use transaction sm30 to maintain the generated view ZCREATEQUOTDEMO and I click New Entry, there is a value help button in the Demo ID field, and when I click it shows the Demo ID and the Product Id for all entries in the ZCREATEQUOTDEMO table. (Of course this is not very useful, as I need to enter a new ID manually, otherwise it would clash.)
But in the report, where I need it, there is still no value help button!
Other attempt:
I changed the data type ZDEMO_ID. On the Further Characteristics screen I entered Search Help Name ZDEMO_ID and selected Parameters DEMO_ID (which was the only one available).
=> No changes. (Maybe this cannot have an effect anyway when there is a domain attached to a data type?)
Can someone point me to an example of an elementary search help without an exit? Or tell me what is wrong with my steps?