Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Search help problem in CJ02/CJ20N.

Former Member
0 Kudos

Hi Guys,

I want to place a search help on the field PRPS-USR03. For that I'd went to SE51 and opened the screen 1460 program "SAPLCJWB" and placed the search help in layout of that screen. When I am running it the search help is working, but when I am seeing this screen from transaction CJ02/CJ20N the search help is not working.

Please help me to get out from this problem.

Thanks in advance.

Virendra Kedia

Whinging removed

Edited by: Rob Burbank on May 4, 2011 9:43 AM

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

Don't change the standard when not necessary. Better look at BAdI [WBS_USER_FIELDS_F4|http://help.sap.com/saphelp_crm50/helpdata/en/d6/98bb4222bdc511e10000000a1550b0/content.htm].

Regards,

Raymond

11 REPLIES 11

raymond_giuseppi
Active Contributor
0 Kudos

Don't change the standard when not necessary. Better look at BAdI [WBS_USER_FIELDS_F4|http://help.sap.com/saphelp_crm50/helpdata/en/d6/98bb4222bdc511e10000000a1550b0/content.htm].

Regards,

Raymond

0 Kudos

Hi Raymond,

Thanks for your reply.

Actually I am new to ABAP, can you please provide the AT_F4 method code here.

I'll be thankful to you.

Regards,

Virendra Kedia

0 Kudos

In SE19, try something like

METHOD if_ex_wbs_user_fields_f4~at_f4.

TYPES returntab TYPE TABLE OF ddshretval INITIAL SIZE 0.
DATA : tabname TYPE dfies-tabname,
       fieldname TYPE dfies-fieldname,
       searchhelp TYPE shlpname,
       return_tab TYPE returntab,
       valuestab TYPE ddshretval.

  CASE i_user_field.
    WHEN 'PRPS-USR00'.
      tabname = 'ZTABLE00'.
      fieldname = 'ZFIELD00'.
      searchhelp = 'ZHELP00'.
    WHEN 'PRPS-USR01'.
      tabname = 'ZTABLE01'.
      fieldname = 'ZFIELD0'.
      searchhelp = 'ZHELP01'.
* etc.
  ENDCASE.

  IF NOT tabname IS INITIAL.
    CALL FUNCTION 'F4_FIELD_ON_VALUE_REQUEST'
      EXPORTING
        tabname    = tabname
        fieldname  = fieldname
        searchhelp = searchhelp
      TABLES
        return_tab = return_tab
      EXCEPTIONS
        OTHERS     = 0.
    LOOP AT return_tab INTO valuestab.
      e_value = valuestab-fieldval.
    ENDLOOP.
  ELSE.
    MESSAGE s398(00) WITH 'No search help is available for this field'.
  ENDIF.

ENDMETHOD.                    "IF_EX_WBS_USER_FIELDS_F4~AT_F4

Regards,

Raymond

0 Kudos

Thanks Raymond for your code.

Now the search help is coming on the user field and it is also saying tha 3 entries found, but it is not displaying those 3 values.

Can you tell me what is the problem??

Regards

Virendra Kedia

0 Kudos

Is the name of the field the same as the parameter name of the search help, if no fill also parameter SHLPPARAM of F4_FIELD_ON_VALUE_REQUEST with the parameter name of the search help. Also you can test F4_FIELD_ON_VALUE_REQUEST via SE37.

Regards,

Raymond

0 Kudos

Yes, the name of the field is same as the parameter name of the search help.

I don't know what is the problem.

0 Kudos

Do you get the list displayed when testing F4_FIELD_ON_VALUE_REQUEST via SE37 or the search help via SE11 ?

0 Kudos

Hurray!!

Now Its working fine. I think there was the problem with my search help so I made another search help. Now its working.

Thanks Raymond for your kind help.

You are a LIFE SAVIOUR

Thanks once again.

Regards,

Virendra Kedia

0 Kudos

raymond.giuseppi

Your solution works perfectly for a regular field in CJ20N. I have a similar but different request. I have to add a search help to a field (customer) which is chosen after clicking on the 'mass change' icon in CJ20N. I tried to implement the method AT_F4 in badi WBS_USER_FIELDS_F4 but the program did not reach it. Do you have a solution to this?

Thanks in advance,

Hagit

The table control used for mass maintenance doesnt call the BAdI (sad) It only call standard FM (F4IF_FIELD_VALUE_REQUEST) so I would suggest a ddic solution (attach a search help to structure or data element)

  • CNMASS_PROJECT_DEFINITION or CNMASS_WBS_ELEMEN

(or look for an enhancement point in the dynpro containing the table control of selected fields)

Nevetheless you could consider it a bug (defect) and raise an incident to SAP

0 Kudos

raymond.giuseppi

Thank you for your answer.

I add search help to CNMASS_WBS_ELEMENT and it works