Application Development and Automation 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: 
Read only

issue on search help

Former Member
0 Likes
1,297

In my module pool screen I have Shipment Number(vttk-tknum) field along with Shipment Item(vttp-tpnum).

Now I have created custom search help for Shipment item (TPNUM). Now the search help for Item should function like: what Shipment no I have selected, it should give the corresponding Item number once I click the search button for item field.

To get that thing I am using FM 'F4IF_INT_TABLE_VALUE_REQUEST' and I am getting desire list.

Now the issue is:

1) If I select Shipment No and then hit enter and click on F4 of Item then I get the desire list.

2) But if I select Shipment No and click on F4 of Item immediately after that then no list appears.

Why this is so?

I have to get that list without hitting enter key.

Please help me on that and let me know if any more details is required on that.

Thanks

Nabanita

1 ACCEPTED SOLUTION
Read only

former_member229729
Active Participant
0 Likes
1,260

Hi,

Below is the sample of FM usage:

DATA: return_tab TYPE TABLE OF ddshretval,
  REFRESH: wt_user.
  SELECT bname uname INTO TABLE wt_user FROM yibtlog.
  SORT wt_user BY bname.
  DELETE ADJACENT DUPLICATES FROM wt_user COMPARING bname.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield               = 'BNAME'                            " Return field of the Table
     dynpprog               = 'SAPMYIBTBUOBJ'         " Program Name
     dynpnr                 = '700 '                                " Screen Number
     dynprofield            = 'TXTUSER'                       " Screen Field
     value_org              = 'S'
    TABLES
      value_tab              = wt_user
      return_tab            = return_tab
* EXCEPTIONS
*   PARAMETER_ERROR        = 1
*   NO_VALUES_FOUND        = 2
*   OTHERS                 = 3
            .
  txtuser = return_tab-fieldval. "  This really returns the selected value from the F4 Help in to the 
                                              screen field

Rgds,

Ramani N

In my module pool screen I have Shipment Number(vttk-tknum) field along with Shipment Item(vttp-tpnum).

Now I have created custom search help for Shipment item (TPNUM). Now the search help for Item should function like: what Shipment no I have selected, it should give the corresponding Item number once I click the search button for item field.

To get that thing I am using FM 'F4IF_INT_TABLE_VALUE_REQUEST' and I am getting desire list.

Now the issue is:

1) If I select Shipment No and then hit enter and click on F4 of Item then I get the desire list.

2) But if I select Shipment No and click on F4 of Item immediately after that then no list appears.

Why this is so?

I have to get that list without hitting enter key.

Please help me on that and let me know if any more details is required on that.

Thanks

Nabanita

8 REPLIES 8
Read only

Former Member
0 Likes
1,260

if you were using a search help in se11 there you have some A V some option where you can attain ur purpose..

Read only

former_member229729
Active Participant
0 Likes
1,261

Hi,

Below is the sample of FM usage:

DATA: return_tab TYPE TABLE OF ddshretval,
  REFRESH: wt_user.
  SELECT bname uname INTO TABLE wt_user FROM yibtlog.
  SORT wt_user BY bname.
  DELETE ADJACENT DUPLICATES FROM wt_user COMPARING bname.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield               = 'BNAME'                            " Return field of the Table
     dynpprog               = 'SAPMYIBTBUOBJ'         " Program Name
     dynpnr                 = '700 '                                " Screen Number
     dynprofield            = 'TXTUSER'                       " Screen Field
     value_org              = 'S'
    TABLES
      value_tab              = wt_user
      return_tab            = return_tab
* EXCEPTIONS
*   PARAMETER_ERROR        = 1
*   NO_VALUES_FOUND        = 2
*   OTHERS                 = 3
            .
  txtuser = return_tab-fieldval. "  This really returns the selected value from the F4 Help in to the 
                                              screen field

Rgds,

Ramani N

Read only

Former Member
0 Likes
1,260

hi,

where are u calling this function, it should be in "Module on value request".

Atul

Read only

Former Member
0 Likes
1,260

yes, I have created the custom search help in se11 only. cud u pls tell me exact settings i need o do for that. I tried so many. it didn't work

Read only

Former Member
0 Likes
1,260

yes, I am calling it inside module on value req only

Read only

Former Member
0 Likes
1,260

Hi,

call function 'DYNP_VALUES_READ'
    exporting
      dyname     = sy-repid
      dynumb     = sy-dynnr
    tables
      dynpfields = li_dynpread.

Use the above FM to read the Shipment number before calling the FM F4IF_INT_TABLE_VALUE_REQUEST for the Shipment Item.

You are getting no records in the second case because the shipment number is not getting populated in the shipmentnumber field. So use the FM 'DYNP_VALUES_READ' to get the value stored in the shipment number variable.

For ref check this link..http://docs.google.com/Doc?id=dfv2hmgs_15dkrx8rfh&hl=en

Read only

Former Member
0 Likes
1,260

Hi,

Give the function code as "ENTER" in field attributes of that particular field in module pool programe screen.

Thanks

anil d

Read only

Former Member
0 Likes
1,260

Hi Anil,

The function code field is not editable for this search help in screen