Skip to Content
avatar image
Former Member

dynamic values for search help

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Aug 30, 2006 at 12:12 PM

    HI,

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

    Reward points if helpful.

    how-to-validate-parameters-on-selectionscreen

    rEGARDS

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 30, 2006 at 12:18 PM
    Add comment
    10|10000 characters needed characters exceeded

  • Aug 30, 2006 at 12:32 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 30, 2006 at 12:35 PM

    Hello Satish,

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 18, 2006 at 04:47 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded