Skip to Content

ABAP value help (F4 help / search help) in report for own datatype

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,
            demo_id TYPE zdemo_id.

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    Aug 23, 2013 at 07:21 AM

    HI Monika,

    In the search help definition tab, give your custom table name(ZCREATEQUOTDEMO) as selection method. In the table for parameters, give the field name for which you need search help (DEMO_ID). Check both IMP & EXP checkbox. Now save and activate.

    Now when you designing your selection screen, code like this:

    PARAMETER demo_id TYPE zdemo_id MATCHCODE OBJECT ZDEMO_ID (This should be your search help name)

    Now when you execute your selection screen, you will get F4 help option for that field.

    Hope this helps.

    Regards,

    Anubhab

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 23, 2013 at 06:31 AM

    Hi Monika,

    Create a Search help and Implement in our program.

    Creating Search help
    Go to SE11 -> click search help radio button ->enter a name for search help->create.

    Give a description and add your table name in selection method. (i.e. ZCREATEQUOTDEMO)
    In search help parameter add the field  you need . (i.e. DEMO_ID )
    Save ,check and activate.

    Implementing Search help

    Go to  report program.
    Add search help to the parameter.

    PARAMETERS: <parameter name> TYPE <type> MATCHCODE OBJECT <search help name>.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2013 at 09:11 PM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 23, 2013 at 03:05 AM

    hi monika,

    i think u should have a clear idea about how to create a search help. plz go to se11 .

    select radio button searchhelp . click on to elementary search help.

    on the selection text give the name of the table from where u want to pop the values.

    on the search help parameter if u click the f4 help that will list u all the fileds of the table u typed in the selection text. u can choose the necessary fields that u would like to the diaplay when u press ur f4 help.

    once u r done, save and activate it.

    u can add this search help to a screen field in your module pool program as well to your field in the report program.

    Screen field in module program : go to screen layout, add the search help u created to the search help column.

    Report field : Field name mathcode object search help name.

    With regrads

    Suneesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 23, 2013 at 03:18 AM

    This message was moderated.


    step1.png (16.3 kB)
    step2.png (10.1 kB)
    step6.png (38.7 kB)
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 23, 2013 at 05:36 AM

    Hi Monika,

    You can also use an FM F4IF_INT_TABLE_VALUE_REQUEST to provide F4 help to the demo field in your report. To know how to use this FM, you can do a where-used search on this FM. I'm sure your colleagues would have used it so you can refer to any program and do it or you can browse this forum for this FM.

    Or you can select data from the table that would have values for Demo field. Then pass it to this FM. Then read the result table (this contains the entry that the user selects on the F4 help) and pass the value from the result table to the selection-screen field.

    Hope this helps.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 23, 2013 at 03:09 PM

    Thanks to everyone who suggested "MATCHCODE OBJECT ZDEMO_ID", that works very well!

    How come it works with e.g. "TYPE bu_partner" without specifying the search help with "MATCHCODE OBJECT"?

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Monica,

      If you check the data-element for 'BU_PARTNER' in SE11, in the 'Further Characteristics' tab you can find a search help attached to it 'BUPA', which is a collective search help ( combination of multiple elementary search helps ). If you double click on that, it will take you to the details for that search help. In the 'Included search helps' tab you can find the list of elementary search helps included in it. That is the reason we get F4 help for this data element automatically.

      Regards,

      Anubhab