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

Former Member
0 Kudos

Hi!

I've created a search help..

It's using a view for data selection, which is a join of ANLA and ANLZ tables. The search help is based on ANLZ-KFZKZ field.

I've put this field on a dynpro and it is using my search help to help users pick assets using this field. However, this field could contain the same value more times. So when user got the search help list, he could see 3 times of "AAA111", and this belongs to different asset numbers.

http://kepfeltoltes.hu/view/071122/SE11_search_help_entries_www.kepfeltoltes.hu_.jpg

So with picking one of these KFZKZ fields, I would like to store from the search help the chosen KFZKZ and the corresponding BUKRS, ANLN1, ANLN2, ADATU, BDATU fields also.

If I set them to export in the search field, might be fine, but where do they put their values? How can I retrieve them?

Thank you in advance

Tamá

4 REPLIES 4

Clemenss
Active Contributor
0 Kudos

Hi Tamás,

as I remember it depends on the definition and linking of the search help which is explained her better than I can:

Value transport for search helps

Regards,

Clemens

Former Member
0 Kudos

Hi!

I've tried a lot of things, however it is still not working. It gives back only 1 field, after choosing an entry from the search help hitlist. I've set all parameters to exporting, using the same view name on the dynpro, but it is still not working.

Any other suggestions?

Thank you in advance

Tamá

0 Kudos

Hi Tamás,

it may be a result of the screen processing and field transport logic. In standard SAP programs, specific screen fields may be read before starting the F4 help. I.e. transaction FB01, in subscreen 100(SAPMF05A) processing is as follows.


process on value-request.
  field rf05a-newko module f4_newko.
*.. and then the module
MODULE F4_NEWKO.

*------- Inhalt des Dynprofeldes RF05A-NEWBS besorgen ------------------
  PERFORM DYNP_VALUES_READ USING 'RF05A-NEWBS' F4RC.
  CHECK F4RC = 0.
  READ TABLE F4HLP INDEX 1.
  IF F4HLP-FIELDVALUE = SPACE.
    MESSAGE S581.
    EXIT.
  ENDIF.
  SELECT SINGLE * FROM TBSL WHERE BSCHL = F4HLP-FIELDVALUE(2).
  IF SY-SUBRC <> 0.
    MESSAGE S034 WITH F4HLP-FIELDVALUE(2).
    EXIT.
  ENDIF.

*------- Matchcode-Objekt setzen ---------------------------------------
  MCOBJEKT = SPACE.
  CASE TBSL-KOART.
    WHEN CHAR_A.
      MCOBJEKT = 'AANL'.
    WHEN CHAR_D.
      MCOBJEKT = 'DEBI'.
    WHEN CHAR_K.
      MCOBJEKT = 'KRED'.
    WHEN CHAR_S.
      MCOBJEKT = 'SAKO'.
    WHEN OTHERS.
      IF TBSL-BSCHL NE '00'.
        MESSAGE S204 WITH TBSL-KOART TBSL-BSCHL.
      ENDIF.
      EXIT.
  ENDCASE.

*------------------- Relevanten Buchungskreis bestimmen ----------------
  PERFORM BUKRS_FROM_DYNP.
  CLEAR SELSTR.
  PERFORM DYNP_VALUES_READ USING 'RF05A-NEWKO' F4RC.
  CHECK F4RC = 0.
  READ TABLE F4HLP INDEX 1.

*------------------ Kurznotation eingegeben ? --------------------------
  IF F4HLP-FIELDVALUE(1) = '='.
    SELSTR = F4HLP-FIELDVALUE.
    TRANSLATE SELSTR TO UPPER CASE.                      "#EC TRANSLANG
  ENDIF.

*----------------------- Hilfedialog aufrufen --------------------------
  PERFORM HLP_F4 USING MCOBJEKT 'RF05A-NEWKO'.
ENDMODULE.

As you see, requesting F4 for field rf05a-newko will first read field RF05A-NEWBS from screen because only the screen field values for the actual field are transported for processing.

After processing the search help using FUNCTION 'F4IF_FIELD_VALUE_REQUEST' the FORM DYNP_VALUES_UPDATE will put the result back to field RF05A-NEWKO using FUNCTION 'DYNP_VALUES_UPDATE'.

This is a bit complex but as SAP herself uses this way it may be an option for you.

Regards,

Clemens

Former Member
0 Kudos

Had to rewrite the whole thing in ABAP, the standard search help did not work, but thanx for the help anyways.