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

Help! Search-hellp with specific condition

Former Member
0 Likes
439

Hello Folks,

Please suggest some inputs on the below mentioned requirement.

requirement:

F4 help to be provided for the field HRP1000-SHORT when HRP1000-OTYPE='O' in the transaction pp01 & ppome.

Values of F4 help are to be populated from another Custom table field1, where field2 in the custom table having value 'x'.

Example:

Table1

Field1 field2

Abc X

Def

Xyz X

The F4 should be populated with Abc, Xyz.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
409

Hi

You can create a search help exit using a function module . copy F.M: F4IF_SHLP_EXIT_EXAMPLE

into ur z function module and edit the code as per ur query.

you will find the comments in F.M code to help you out.

for more details pls visit:

http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm

Thanks

Vishal Kapoor

2 REPLIES 2
Read only

Former Member
0 Likes
410

Hi

You can create a search help exit using a function module . copy F.M: F4IF_SHLP_EXIT_EXAMPLE

into ur z function module and edit the code as per ur query.

you will find the comments in F.M code to help you out.

for more details pls visit:

http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm

Thanks

Vishal Kapoor

Read only

Former Member
0 Likes
409

hi,

let me expalin you with simple example:

if requirement is as follows:

There are 2parameters in selection screen. For e.g. matnr and werks.

If I am giving matnr then respect to that matnr i should get only those plant in F4 help.

Solution:

AT SELECTION-SCREEN ON VALUE-REQUEST FOR werks.

select the werks based on plant in internal.table 
use f.m

F4IF_INT_TABLE_VALUE_REQUEST.
and pass the i.tab here in 

tables
value_t = i.tab

Or

Follow the psudo code below.
Note: it_matnr has only single field MATNR.
**--- Return table to handle selected field in F4 help ---**
data: it_return like ddshretval occurs 0 with header line.
 
parameters: p_matnr type marc-matnr,
                  p_werks type marc-werks.
 
at selection-screen on value-request for p_repnam.
 
  select matnr
         from marc
         into table it_matnr
         where werks eq p_werks.
 
  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
      retfield         = 'OBJ_NAME'
      dynpprog         = sy-cprog
      dynpnr           = sy-dynnr
      value_org        = 'S'
      callback_program = sy-cprog
    tables
      value_tab        = it_matnr
      return_tab       = it_return
    exceptions
      parameter_error  = 1
      no_values_found  = 2.
 
  if sy-subrc eq 0.
    loop at it_return.
      clear p_repnam.
      p_repnam = it_return-fieldval.
    endloop.
 
  endif.

hope it will help you

regards

rahul