cancel
Showing results for 
Search instead for 
Did you mean: 

search help in table maintenance generator

Former Member
0 Kudos

Dear sap experts

I have a requirement that is in table maintenance generator created two fields when selecting f4 help value to field1 automatically field2 value will be displayed along with field1 value how can we do it please help

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member718313
Discoverer
0 Kudos

Hi,

   The required development can been done using TMG Events. Follow the following steps to achieve the same, here I'm using example of Company Code and description to explain :

1. Create a table (ztest_tmg) with fields as, MANDT, BUKRS and BUTXT

2. Generate TMG and then go to Environment >Modifications>Events

3. Here you can use event no "5". Create a subroutine " create_entry" and write between

FORM create_entry.

  IF ztest_tmg-bukrs IS NOT INITIAL.

    SELECT SINGLE butxt
      FROM t001
      INTO ztest_tmg-butxt
      WHERE bukrs = ztest_tmg-bukrs.

  ENDIF.

ENDFORM.                    "create_entry

4. Finally, When you enter company code in TMG and press "ENTER" , the description will be displayed automatically, based on the logic written in the event.

Regards

George Joseph

P561888
Active Contributor
0 Kudos

Dear Varshith,

Do you want this in ABAP or Webdynpro?

BR,

Bharani.

Former Member
0 Kudos

abap

former_member197475
Active Contributor
0 Kudos

Hi Varshith,

Please follow the below steps.

1. Go to your table. Assume that you have X, Y and Z fields.

2. Now you want actual values in field Y. So just create a search help for it with the table and field that you need.

3. Similarly create another relevant search help for your field - Y.

4. Go to Utilities->TMG->FN.Gr.Text->Main Program and now go to the include.

5. Just write a select query like

SELECT SINGLE bezei

      FROM tvv2t

      INTO ztcheck-bezei

      WHERE kvgr2 EQ ztcheck-kvgr2

      AND SPRAS eq 'EN'.

This will automatically give you the values based on the selection of your field.

Try it out and let me know further, in-case you have any concerns.

BR,

RAM.

harsha_jalakam
Active Contributor
0 Kudos

Hi Varshith,

Are you looking to populate the populate two fields at the same time when user selects an F4 help value in WebDynpro screen, using OVS component. Then in the OVS method phase if_wd_ovs=>co_phase_3 can be used  populate  fields at  the same time.

ovs_callback_object->context_element->set_attribute(

name  = ‘ATTRIBUTE1’

value = <ls_selection>-VAUE1 ).

ovs_callback_object->context_element->set_attribute(

name  = ‘ATTRIBUTE1

value = <ls_selection>-VAUE1 ).

Below document can be useful for creating OVS search help in WebDynpro.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70cee684-ccbb-2c10-3c94-91e806e5f...

Regards,

Harsha