Search help in dialog program

Hi all,
Fora search help in dialog program.
I HAVE TO GET SEARCH FOR A FIELD ZID ON APARTICULAR SCREEN BASED ON DATA, MODIFIED BY AND A PLANT..
I HAVE A RECORD IN ONE MY ZTABLE.
I HAVE TO GET THAT BY SEVERAL SEARCH PARAMETERS SAY BY DATE , MODIFIED BY,PLANT ETC.
each user has been assigned a plant , so in search he has to get records belonging to that plant.
so i cannot include plant in my search help, because user may type in other plant.
so i tried two ways
1) i created a search help in se11 including the plant field again the problem arises if the user types a different plant.
so i want to know whether we can apassa value to plant field in search help(i.e the plant assigned to the user),
i have this kind of thing in some standard t -code i.e especially for searching material , the plant field in search help was filled by one plant.
this should be one of the solution
2)I tried to write a code in pov of program code.
this is how my code looks.
DATA : BEGIN OF ITAB OCCURS 0.
     INCLUDE  STRUCTURE ZXXX.
DATA : END OF ITAB.
ITAB HAS FIELDS ID, DATE , MODIFIEDBY , PLANT.
USER_PLANT = 'ABC'.
SELECT * FROM ZXXX INTO TABLE ITAB WHERE PLANT = USER_PLANT.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
  EXPORTING
  DDIC_STRUCTURE         = ' '
    RETFIELD               = 'ZID'
  PVALKEY                = ' '
  DYNPPROG               = ' '
  DYNPNR                 = ' '
  DYNPROFIELD            = ' '
  STEPL                  = 0
    WINDOW_TITLE           = 'TEST'
  VALUE                  = ' '
    VALUE_ORG              = 'S'
  MULTIPLE_CHOICE        = ' '
  DISPLAY                = ' '
  CALLBACK_PROGRAM       = ' '
  CALLBACK_FORM          = ' '
  TABLES
    VALUE_TAB              = ITAB
  FIELD_TAB              =
    RETURN_TAB             = IT_RETURN4
  DYNPFLD_MAPPING        =
EXCEPTIONS
  PARAMETER_ERROR        = 1
  NO_VALUES_FOUND        = 2
  OTHERS                 = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if sy-subrc = 0.
          clear itab.
          read table it_return4 index 1.
            ZXXX-ZID = it_return4-fieldval.
endif.
THIS WORKS FINE , BUT HE CANNOT SEARCH BASED ON DATE AND MODIFIEDBY
ALL i want is is get a pop up window and should be able to search based on data and modifiedby for a predifined plant.
I hope iam clear.
Thanks

Hi,
Create a FM with the following code..The interface is defined in the code..
In the Function module top include add the following code.
<b>TYPE-POOLS: shlp, vrm.</b>
IN this code I am deleting the records that are not of the currency USD...
Do the same thing for your requirement...
FUNCTION Y_SEARCH_HELP_EXIT.
""Local interface:
*"  TABLES
*"      SHLP_TAB TYPE  SHLP_DESCR_TAB_T
*"      RECORD_TAB STRUCTURE  SEAHLPRES
*"  CHANGING
*"     REFERENCE(SHLP) TYPE  SHLP_DESCR_T
*"     REFERENCE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
where z_test is my z table..
DATA: ITAB LIKE Z_TEST OCCURS 0 WITH HEADER LINE.
ITAB[] = RECORD_TAB[].
IF NOT RECORD_TAB[] IS INITIAL.
  DELETE ITAB WHERE WAERS <> 'USD'.
  RECORD_TAB[] = ITAB[].
ENDIF.
ENDFUNCTION.
Thanks,
Naren

Similar Messages

  • Creating customized search helps in Dialog Programming

    Hello people I have a little predicament here. I need to create search help restricting the results.
    Like lets say I want to create a search help that select material numbers and name for a specific material group. Then use that as a seach help.
    Right now Im playing around with function module <b>HELP_VALUES_GET_WITH_TABLE</b> but it seems to open right when you access call screen.
    Also Since this is dialog programming I am using screen painter. And I need to assign the search help in an I/O Field.
    Well that's all for now take care guys. Take care to you all.

    Hi Chad,
    Is your problem been resolved .
    If not , just try this code
    Copy paste as it is and it will work .
    TYPES: BEGIN OF values,
             carrid TYPE spfli-carrid,
             connid TYPE spfli-connid,
           END OF values.
    DATA: carrier(3) TYPE c,
          connection(4) TYPE c.
    DATA: progname TYPE sy-repid,
          dynnum   TYPE sy-dynnr,
          dynpro_values TYPE TABLE OF dynpread,
          field_value LIKE LINE OF dynpro_values,
          values_tab TYPE TABLE OF values.
    CALL SCREEN 100.
    MODULE init OUTPUT.
      progname = sy-repid.
      dynnum   = sy-dynnr.
      CLEAR: field_value, dynpro_values.
      field_value-fieldname = 'CARRIER'.
      APPEND field_value TO dynpro_values.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE value_carrier INPUT.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
           EXPORTING
                tabname     = 'DEMOF4HELP'
                fieldname   = 'CARRIER1'
                dynpprog    = progname
                dynpnr      = dynnum
                dynprofield = 'CARRIER'.
    ENDMODULE.
    MODULE value_connection INPUT.
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                dyname             = progname
                dynumb             = dynnum
                translate_to_upper = 'X'
           TABLES
                dynpfields         = dynpro_values.
      READ TABLE dynpro_values INDEX 1 INTO field_value.
      SELECT  carrid connid
        FROM  spfli
        INTO  CORRESPONDING FIELDS OF TABLE values_tab
        WHERE carrid = field_value-fieldvalue.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield    = 'CONNID'
                dynpprog    = progname
                dynpnr      = dynnum
                dynprofield = 'CONNECTION'
                value_org   = 'S'
           TABLES
                value_tab   = values_tab.
    ENDMODULE.
    <b>For Screen 100 logic:
    Copy:</b>
    PROCESS BEFORE OUTPUT.
      MODULE INIT.
    PROCESS AFTER INPUT.
      MODULE CANCEL AT EXIT-COMMAND.
    PROCESS ON VALUE-REQUEST.
      FIELD CARRIER MODULE VALUE_CARRIER.
      FIELD CONNECTION MODULE VALUE_CONNECTION.
    <b>Do design the layout also.</b>
    I hope this will help you.
    If this satisfy  you then please close the thread by rewarding appropriate points to the helpful answers.
    Cheers
    Sunny
    Message was edited by: Sunny

  • CheckBox in search help restriction dialog.

    Hi Experts,
    I have created one search help with dialog value restrictions. Search help contains 6 fields.
    Out of which three fields has length one character(Data Element XFELD).
    As soon as user press on F4 on particular field, it will display pop-up window with restrictions and displayed 6 fields.
    I would like to show that fields(with Data Element as XFELD) as Check Box in search help restrictions pop-up window.
    Pls help... How can we do this.
    Thanks
    Vinod

    Hi,
    Kindly check the standard search help "F4TESTCHECKBOX".  Copy it and change the dialog type to 'Display with restrictions' . On execution,  you will notice that -
    i) On the restriction screen the checkbox is displayed as textbox .
    ii)  In list display , checkbox is displayed correctly .
    Follow Raymond's suggestion,
    You could define your own selection-screen, and display it in a search-help exit : if step = 'PRESEL', display your screen, modify selected values in table shlp-interface  and force next step as 'SELECT' to bypass standard selection-screen.
    Regards,
    DPM

  • How to use the created search helps in the program?

    Hi Everyone,
    I know how to create Search help elementary / collective search help through SE 11. I have a question, how can I make use of the created search help in the program.
    How to use the Search help in the programs, which is created through SE11
    Subbu.

    Hi,
    In case if you want to use in parameters statement, then we can use the suffix MATCHCODE OBJECT syntax.
    Eg.
    report abc.
    parameters : a(10) type c matchcode object ZBELNR.
    Hope this helps.
    regards,
    amit m.

  • Assign Search help in report program

    Dear All,
    I facing problem to assign search help in report program.
    I crated one elementary search help in which three fields i include
    -carrid
    -carrier name
    -booking  
    all three fields having import and export parameter in search help.
    while executing this search help in se11 it gives proper output.
    but while assigning this search help in report program it only fetch one carried.
    my report is also having three parameter
    -carrid
    -carrier name
    -booking
    i assign search help like
    PARAMETER :  p_carrid TYPE scarr-carrid
                               MATCHCODE OBJECT z01_carrid,
    with all three field but it fetch only carrid ...

    Hi Chintan,
    For such types of requirements you can use this Function Module:
    F4IF_INT_TABLE_VALUE_REQUEST.
    Use this functiom modue under AT SELECTION-SCREEN ON HELP-REQUEST FOR P_CARRID.
    With this function module, you can fill your remainng parameters : P_carriername and booking also.
    Sample Code:
         DATA : TMP_RETURN_TAB  LIKE TABLE OF DDSHRETVAL,                                TMP_RETURN      LIKE DDSHRETVAL,                    
                    TMP_FIELD       TYPE  DFIES-FIELDNAME.               
    CASE AKIND.                                        
       WHEN '1'.                                        
         TMP_FIELD = 'AENNR'.                                        
       WHEN '2'.                                        
         TMP_FIELD = 'VBELN'.                                        
       WHEN '3'.                                        
         TMP_FIELD = 'ZZTEHAI'.                                        
      ENDCASE.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'                                                                 
       EXPORTING                                                                                     
         RETFIELD               = TMP_FIELD                                                                      
         WINDOW_TITLE           = ATITEL                                                                      
         VALUE_ORG              = 'S'                                                                                
       TABLES                                                                                          
         VALUE_TAB              = ATABLES                                                                           
         RETURN_TAB             = TMP_RETURN_TAB                                                                      
       EXCEPTIONS                                                                                
         PARAMETER_ERROR        = 1                                                                           
         NO_VALUES_FOUND        = 2                                                                           
         OTHERS                 = 3.                                                                                
      IF SY-SUBRC =  0.                                                                                
        READ TABLE TMP_RETURN_TAB INDEX 1 INTO TMP_RETUN.                                                            
        AVALUE = TMP_RETURN-FIELDVAL.                                                                      
      ENDIF.                                                  
    Jus analyze this code, you can get ur requirement done.
    Regards
    Sandeep Reddy

  • Need help in dialog programming

    Hello gurus,
    I have started my career in ABAP and many questions are bothering me.Would need support from all of u there...
    I am studying Dialog programming but not able to get the exact flow of how it actually works.I am following a book titled Advanced ABAP by Gareth B ruyn and Lyfareff.
    Still it is not getin clear...can someone help me with that...Step by step procedure to do dialog programming...I am learning on version 4.7...
    Also, If we have a field name how can we find out in which tables that same field is present..i.e.how can we search for the different tables for the same field...
    Thanks in Advance..
    Cheers:Jim

    Hi Jimmy,
    DIALOG Programming
    You can also check the transaction ABAPDOCU which gives you lot of sample programs.
    Also you can see the below examples...
    Go to se38 and give demodynpro and press F4.
    YOu will get a list of demo module pool programs.
    One more T-Code is ABAPDOCU.
    YOu can find more examples there.
    See the prgrams:
    DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
    DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
    Check the below link:
    http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    http://www.geocities.com/ZSAPcHAT
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
    http://www.allsaplinks.com/dialog_programming.html
    http://sap.mis.cmich.edu/sap-abap/abap09/
    Other useful links:
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    Other links:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2d40358411d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/10/e7dbde82ba11d295a40000e8353423/content.htm
    For Screens
    http://help.sap.com/saphelp_47x200/helpdata/en/e4/2adbef449911d1949c0000e8353423/content.htm
    Screen elements
    http://help.sap.com/saphelp_47x200/helpdata/en/47/e07f5f2b9911d2954f0000e8353423/content.htm
    Processing Screens
    http://help.sap.com/saphelp_47x200/helpdata/en/47/e07f682b9911d2954f0000e8353423/content.htm
    Complex Screen elements
    http://help.sap.com/saphelp_47x200/helpdata/en/fd/02da2a61d811d295750000e8353423/content.htm
    Also
    From Menu Environment->Examples->ABAP examples
    or Using the Tcode ABAPDOCU you can learn Module pool programs.
    Reward if useful.
    Thanks
    Aneesh.

  • Search help in dialog modules

    Hello gurus
    I struck with a problem while designing the search help .  The problem is described as below
    Three Screen field in my screen namely
    Itab1-vkorg Itab1-kunnr Itab1-vbeln
    My Screen flow logic :
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_0100.
    PROCESS ON VALUE-REQUEST.
      FIELD ITAB1-VBELN MODULE SALESINVOICE_HELP.
    My main Program :SALESINVOICE_HELP
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = ITAB1-KUNNR
        IMPORTING
          OUTPUT = ITAB1-KUNNR.
      SELECT VBRKVBELN VBRKFKDAT
            INTO CORRESPONDING FIELDS OF TABLE INVOICE_SRCHLP
            FROM VBRK INNER JOIN VBRP ON VBRKVBELN EQ VBRPVBELN
            WHERE VBRK~FKART EQ 'ZF2' AND
                  VBRK~VKORG EQ ITAB1-VKORG AND
                  VBRK~KUNAG EQ ITAB1-KUNNR AND
                  VBRK~FKSTO NE 'X'.
      SORT INVOICE_SRCHLP BY FKDAT VBELN.
      DELETE ADJACENT DUPLICATES FROM INVOICE_SRCHLP.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
       DDIC_STRUCTURE         = ' '
           RETFIELD             = 'VBELN'
         VALUE_ORG              = 'S'
        MULTIPLE_CHOICE        = ' '
        DISPLAY                = ' '
        CALLBACK_PROGRAM       = ' '
        CALLBACK_FORM          = ' '
        MARK_TAB               =
      IMPORTING
        USER_RESET             =
        TABLES
          VALUE_TAB              = INVOICE_SRCHLP
        FIELD_TAB              =
           RETURN_TAB             = ITAB_RETURN.
        DYNPFLD_MAPPING        =
      EXCEPTIONS
        PARAMETER_ERROR        = 1
        NO_VALUES_FOUND        = 2
        OTHERS                 = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      ITAB1-VBELN = ITAB_RETURN-FIELDVAL.
    My problem is unable to retieve the screen fields contents. so kindly provide the solution.

    Hi U have to append the field names u want to read.
    Put this code before calling FM.
    REFRESH dynpro_values[]. CLEAR dynpro_values.
    dynpro_values-fieldname = Give ur screen field name u want to read.
    APPEND dynp_fields.
    Like this u have to append all the screen fields for which u want to read the data.
    The finally Call FM.
    After calling the FM read the table dynpro_values with key as field name. dynpro_values-FIELDVALUE contains the field content.
    Check below sample code for your reference.
    PARAMETERS: p_file   LIKE rlgrap-filename MEMORY ID upl.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      DATA: dynp_fields LIKE dynpread OCCURS 0 WITH HEADER LINE.
      REFRESH dynp_fields. CLEAR dynp_fields.
      dynp_fields-fieldname = 'P_FILE'.
      APPEND dynp_fields.
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                dyname               = sy-cprog
                dynumb               = sy-dynnr
           TABLES
                dynpfields           = dynp_fields
           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
                OTHERS               = 9.
    Thanks,
    Vinod.
    Edited by: Vinod Reddy Vemuru on Jul 25, 2008 3:15 PM

  • How to add the search help in Screen programming "F4" help

    i add the input field
    se51 --> layout and now want to add the search help with these field,
    please help me... in this way.

    Looks like u r a novice in Mp programming.
    Please look at some demo programs in SAP which can teach u the basics of Module Pool programming . Use Demo* in se38 and search first in sap and then in some other sites.
    The above thing can be done in Process on value request .
    Br, vijay.

  • Hi everybody,need help in Dialog Programming

    Hi everybody,
              I am trying to learn Dialog programming , i am having materials to read, which includes syntax, i want a guidance to start the programming practically . Could anyone help me go through this, step by step. I know the T-code for dialog programming is SE80, what should be the next step to do some simple programs to start with, it would be great if someone help me with a small programming example.
    Thanks,
    Ranjani.

    Hello,
    Checkout this site <b>http://linuxgazette.net/101/sunil.html</b>.Hope it works.
    1) <a href="http://www.stata.com/support/faqs/lang/db-intro/db2.html">http://www.stata.com/support/faqs/lang/db-intro/db2.html</a>
    2) <a href="http://www.stata.com/support/faqs/lang/db-intro/db3.html">http://www.stata.com/support/faqs/lang/db-intro/db3.html</a>
    All the best......

  • Problem with respect to Search Help AND Dialog Progg

    Dear All,
                      I have a screen 0100, wherein Input-output field 'Veh_num' is created.
      Also there are another Input-output fields ( S_Date and S_time).
    Now end-user just displays records in screen when puts Veh_num(Vehicle number) in the field and clicks DISPLAY.
    Now problem arises when two Veh_NUM(Vehicle numbers) are present on same date but different on different time.
    i created a SEARCH HELP for the input-out field VEH_NUM(vehecle number).............where both records are displayed. But when user select any record of the two, always only a particular record is displayed on the screen.
    I Think the problem lies when User selects a row from the search help,  Only VEH_NUM gets transferred to the screen. I think If along with the Vehicle number, If S_time is also transferred then the problem will get solved.
    Search Help has 1 input(Veh_num).......and 3 Output fields( Veh_num, S_Date and S_time.).
    Pls suggest.
    Thanks in advance

    hi dsilva,
    Is ur Requirement is, that u need to select vehicle number and values corresponding to that
    number i,e Date and Time should get displayed on the screen?.
    Use Dictionary Fields if U Have, to define ur input/output fields
            OR.
    follow the below steps.
    1) First Check the serach help which u have created works as per ur requirement.
    2) The screen which u have designed has an input field(Vehicle Number).U may Have taken the
    field from Progarm or any other variable to define it.Don't do that.
    3) First Create a structure from SE11 and Define fields Vehicle Number and Date and Time.
    4) Assign Search help to the field Vehicle Number in the Structure.
    5) Use this Struture in your screen desigining.
    6) Then it automatically picks up the values and dislplays on the screen for a corresponding vehicle number.

  • How to do program for search help

    Hi,
    Please tell me how to do the program for search help in Dialog programming.
    Thanks,
    Sriram.

    Step 1:
    Create a function module (ZZ_TEST_FUNCTION).
    Step 2:
    --> Create a search help(ZSEARCH)
    --> Enter the above function Module(ZZ_TEST_FUNCTION) in search help exit field.
    STEP 3:
    Attach the search help with any field of table.
    Function module Sample Code:
    FUNCTION ZZ_TEST_FUNCTION.               
    ""Local interface:                    
    *"       IMPORTING                 
    *"             VALUE(MCONAME) DEFAULT SPACE *"             VALUE(SELSTR) DEFAULT SPACE
    *"       TABLES                      
    *"              SHLP_TAB TYPE  SHLP_DESCR_TAB_T
    *"              RECORD_TAB STRUCTURE  SEAHLPRES
    *"       CHANGING                   
    *"             VALUE(SHLP) TYPE  SHLP_DESCR_T *"             VALUE(CALLCONTROL) LIKE  DDSHF4CTRL 
    *"                             STRUCTURE  DDSHF4CTRL
    CALL SCREEN 100.
    Return from application back to SAP                   
      CASE save_ok_0100.                                    
        WHEN 'RSTR'.                                        
          callcontrol-step = 'SELONE2'.                     
        WHEN 'CANCEL' OR 'BACK' OR 'EXIT'.                  
          callcontrol-step = 'EXIT'.                        
        WHEN 'SEL'.                                         
            READ TABLE itab.                 
            record_tab = itab-filed1.           
            APPEND record_tab.                              
            callcontrol-step     = 'RETURN'.                
           EXIT.                                           
          ENDIF.                                            
      ENDCASE.                                              
    ENDFUNCTION.

  • How to assign a search help

    Hi
      How to assign a search help for the particular field
    in any screen.
    By
    Prashanth

    Hi,
    **How to assign a search help for the particular field
    in any screen.
    -  insert the event PROCESS ON-VALUE-REQUEST in the program and add a field statement for the field that should trigger the F4 help. In the mdoule called from <b>PROCESS ON-VALUE-REQUEST</b>, call function module
    F4IF_FIELD_VALUE_REQUEST.
    <b>Samples code:</b>
    PROCESS ON VALUE-REQUEST.
    FIELD it_zsd00003-prctr MODULE f4_help_for_pctr.
    MODULE f4_help_for_pctr INPUT.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname = 'ZSD00003'
    fieldname = 'PRCTR'
    SEARCHHELP = ' '
    SHLPPARAM = ' '
    dynpprog = 'ZSD00002_BRUGERKONV_LISTE'
    dynpnr = '0100'
    dynprofield = 'IT_ZSD00003-PRCTR'
    STEPL = 0
    value = '50*'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    SUPPRESS_RECORDLIST = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    TABLES
    RETURN_TAB =
    EXCEPTIONS
    FIELD_NOT_FOUND = 1
    NO_HELP_FOR_FIELD = 2
    INCONSISTENT_HELP = 3
    NO_VALUES_FOUND = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    There is <b>on more example with code</b> , just copy and paste the code and design the screen and you will be able to find ur search help.
    Find the code:
    Re: Creating customized search helps in Dialog Programming
    Hope this will help you.
    Cheers
    Sunny
    Rewrd points, if found helpful

  • Problem to generate same VA01 search help screen in BDC Program

    Hi All,
              I have got one issue.
              The issue is that i need to generate the search (F4) help screen of VA01 search for articles in the program,.
              I tried to record using BDC, but the screen generated is different.
              Can anyone please guide me how to generate that same search help screen in Program using BDC or any other tool.

    Hi
    Just check the field in the VA01 for which you are using BDC , you may get the standard search help for that .
    It wuld be great if you elaborate your requierment .
    Regards
    Rahul

  • How to implement search help instead of match code objects table in program

    Hi,
    We are now in upgrade process of code remediation ( From 4.6c to EC6.0).
    We have created search helps instead of matchcode object table. This match code object table M_VMVLC has been deleted
    in EC6.0.  And search help VMVLC is available.
    In the program, they have used <M_VMVLC > -<fieldname> i.e. <tablename> - <fieldname> in declaring parameters,
    in the 'into' clause of select statement, in the 'from' clause of select statement, in the 'write' statement.
    I want to know how to replace this matchcode object table with the search help in the program.
    Thanks,
    Abirami.

    Hi,
    Check the link
    http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21ee2b446011d189700000e8322d00/content.htm
    Regards,
    Amit

  • SAP GUI for JAVA - Search Help ALV display

    I need to be able to display search helps in the ALV grid format or the ' Dialog Modal ' option as seen on the <b>Settings for all F4 helps</b> tab under the personalize option for search helps.
    Currently when I am using a Macintosh machine the system ignores the system setting and my personal settings and displays all search results in an ABAP List format. Unfortunately the ABAP list format does not work correctly when used to input a field on another ABAP list report.
    This behaviour can be found on the Mozilla Firefox browser when SAP GUI for HTML and the SAP GUI for JAVA.
    Your help will be greatly appreciated.

    Hi Rolf-Martin,
    Thank you for your detailed explanation on how the ALV grid control is implemented for the SAP GUI for Java.  This has been pretty insightful.  The good news is that I finally figured out a solution to my problem.  You see I inherited an old custom program where an ABAP list is used as an interactive data capture screen with input fields.  Well a couple of fields had search helps. The program has worked fine with the regular SAP GUI until a MAC OS user tried to use it with the SAP GUI for Java.  Whenever they selected a line from the search help it would bring back the entire onto their input screen.
    A sample of the code:
    form search_help.
        CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
           EXPORTING
                TABNAME     = 'EKPO'
                FIELDNAME   = 'MATNR'
                SEARCHHELP                = 'ZMAT1_A'
                SHLPPARAM                 = 'MATNR'
           TABLES
                RETURN_TAB       = RET_TABLE.
    IF NOT RET_TABLE-FIELDVAL IS INITIAL.
       LINXX-XMATNR = RET_TABLE-FIELDVAL.
       MODIFY CURRENT LINE FIELD VALUE XMATNR FROM LINXX-XMATNR. " ****
    ENDIF.
    SET CURSOR 9 SY-CUROW.   " ********
    endform.
    The problem was being caused by the fact that the search help ABAP list was overriding the sy-XXXX values for the current line contents, index, pageno, cursor row for the calling ABAP list. So when a user selected a row from the search help this would now become the current context and be transferred back to the calling program. 
    The fix was pretty simple; all I had to do was save the current line context and the context prior to calling the search help.  After the search help was run I would then replace the current line with the saved one in my local variable.  I hope this makes sense. We now have a couple of happy MAC OS users.
    Once again I thank you for your patience and support in  this matter.
    Have a great day,
    Edwin.

Maybe you are looking for