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

dynamic values for search help

Former Member
0 Likes
3,023

hi friends,

how to create dynamic search help. my requirment is as follows...i have 2 parameters, p_beskz for procurement type and p_plnty for task list type.. if my procurement type is 'E', then task list types Q and N alone should come when i press f4 for p_plnty..if the procurement type is 'F', then only task list type Q should come..how to do this? have tried, but s not working..pl do help..thanks all

5 REPLIES 5
Read only

Former Member
0 Likes
724

HI,

Pls check the belowsaid url in which i`d addressed about the usage of dynamic search help :

Reward points if helpful.

rEGARDS

Read only

Former Member
Read only

Former Member
0 Likes
724

Hi,

check this sample code..

REPORT  ZTEST_F4HELP                              .

*---Report with selection screen and to display the list of
* possible entries for field 'B' as per the value in field 'A'.


parameters: p_vbeln type vbak-vbeln,
            p_posnr type vbap-posnr.

at selection-screen on value-request for p_posnr.


  data: begin of help_item occurs 0,
          posnr type vbap-posnr,
          matnr type vbap-matnr,
          arktx type vbap-arktx,
        end of help_item.

  data: dynfields type table of dynpread with header line.


  dynfields-fieldname = 'P_VBELN'.
  append dynfields.

  call function 'DYNP_VALUES_READ'
       exporting
            dyname               = sy-cprog
            dynumb               = sy-dynnr
            translate_to_upper   = 'X'
       tables
            dynpfields           = dynfields
       exceptions
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            invalid_parameter    = 7
            undefind_error       = 8
            double_conversion    = 9
            stepl_not_found      = 10
            others               = 11.


  read table dynfields with key fieldname = 'P_VBELN'.

  p_vbeln = dynfields-fieldvalue.


  call function 'CONVERSION_EXIT_ALPHA_INPUT'
       exporting
            input  = p_vbeln
       importing
            output = p_vbeln.

  select posnr matnr arktx into table help_item
                 from vbap
                      where vbeln = p_vbeln.



  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'POSNR'
            dynprofield = 'P_POSNR'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = help_item.

Regards

vijay

Read only

Former Member
0 Likes
724

Hello Satish,

Us exits in the search help to build the necessary logic.

Read only

Former Member
0 Likes
724

I am trying to add search help for fields PRPS-USR00, USR01, USR02 and USR03. It seems that there is a BADI but it only works on CJ20N. We want it also to work on CJI3. At this point, the easiest and fastest way to do this is by changing structure PRPS2_INC. I would add a search help to PRPS-USR00,.. etc on the Entry/Help Check tab in SE11. This does require me to register the object.

Are there any risks in doing this?