By-passing user exit

Hi, all
I am using a user exit for valuation of Material in Valuated Sales Order Stock.
so this user exit is triggered when a sales order is created by using bapi
BAPI_SALESORDER_CREATEFROMDAT2.
so we dont want this user exit to be processed by this bapi.
so can any one tell me what condition i can use in the userexit to by pass the exit if its the above bapi.

Hi,
there are quite time-concuming functions to get the currenmt call stack hierarchy enabling you to see if it is called by the BAPI - but I think this is too much. Just check field sy-tcode. If it starts with V (VA01/VA02/VF04...) then exit userexit, otherwis process. I don't know whre you call the BAPI, probably not transaction V....
Regards,
Clemens
Ist it possible you asked this question twice? That really hurts!
Regards,
Clemens
Transfered answer from other post.
Message was edited by:
        Rich Heilman

Similar Messages

  • Give me information on User-Exits.

    Hi,
      I have received an object on User-exits. I have no knowledge of user-exits. Could anyone please tell me Where can i get information on user-exits.
    Thanks in advance for your esteemed help, if you have any files please send it to my YAHOO id.
    Regards,
    Goutham.
    [email protected]

    You can type a transaction code and this program show you all passed user exits
    REPORT z_find_userexit NO STANDARD PAGE HEADING.
    *&  Enter the transaction code that you want to search through in order
    *&  to find which Standard SAP User Exits exists.
    *& Tables
    TABLES : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
    START-OF-SELECTION.
    Validate Transaction Code
      SELECT SINGLE * FROM tstc
        WHERE tcode EQ p_tcode.
    Find Repository Objects for transaction code
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
           WHERE pgmid    = 'R3TR'
             AND object   = 'PROG'
             AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
             WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
              WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
              WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
              WHERE pgmid    = 'R3TR'
                AND object   = 'FUGR'
                AND obj_name = enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
    Find SAP Modifactions
        SELECT * FROM tadir
          INTO TABLE jtab
          WHERE pgmid    = 'R3TR'
            AND object   = 'SMOD'
            AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
          WHERE sprsl EQ sy-langu
            AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(95) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          WRITE:/(95) sy-uline.
          LOOP AT jtab.
            SELECT SINGLE * FROM modsapt
            WHERE sprsl = sy-langu AND
            name = jtab-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
            WRITE:/1 sy-vline,
            2 jtab-obj_name HOTSPOT ON,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          ENDLOOP.
          WRITE:/(95) sy-uline.
          DESCRIBE TABLE jtab.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No of Exits:' , sy-tfill.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'No User Exit exists'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(95) 'Transaction Code Does Not Exist'.
      ENDIF.
    Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
      GET CURSOR FIELD field1.
      CHECK field1(4) EQ 'JTAB'.
      SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
      CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

  • Passing data from user exit to workflow.

    HI,
    Please consider the below scenario.
    In the user exit 'MV50AFZ1' I have created an include in the form 'USEREXIT_SAVE_DOCUMENT_PREPARE.'.
    In this include based on some certain conditions a workflow is triggered.
    I am using the function module 'SWE_EVENT_CREATE' to trigger the workflow.
    Now the requirement is to pass some data from this user exit ('USEREXIT_SAVE_DOCUMENT_PREPARE') into the workflow.
    Could someone please explain me how to pass this data from the user exit into the workflow ?
    Thanks in advance.
    With regards
    Abhishek

    Hello everybody,
    Thanks a lot for your responses.
    I am using the fuction module 'SAP_WAPI_CREATE_EVENT' to trigger the workflow, I am also able to pass the delivery number through the paramater 'OBJECT_KEY' of the function module in to the workflow container.
    But I am unable to pass the line item number and the material number into the workflow.
    I am following the below process:
    I have defined a stucture ZST_DELIVERY containing the POSNR and MATNR in the data dictionnary.
    I have pouplated the internal table of this structure inside my user exit.
    Then I m passing the values of the above internal table into another internal table - 'Container''which is of structure type 'SWR_CONT'.
    And I am passing the internal table 'Container' into the paramater 'INPUT_CONTAINER' of the function module 'SAP_WAPI_CREATE_EVENT'.
    And in the workflow I have created a container 'ST_DELIVERY' which is of the structure ZST_DELIVERY and I have made it 'import', 'export.'
    And in my business object ZLIKP in the custom event CheckPrice I have defined a paramater 'ST_DELIVERY' of the structure  ZST_DELIVERY and I have made it multiline.
    And in I have binded my workflow container 'ST_DELIVERY' and the ZLIKP paramater with the same name.
    Please do let me know if the above steps that I have followed is correct.
    Please do let me know if any further information is required.
    Thanks in advance,
    ~Regards
    Abhishek

  • User Exit/BADI to pass external number range in CRM 2007

    Hi,
    In CRM 2007, Is there any User Exit or BADI to pass number range object externally ?
    Like USEREXIT_NUMBER_RANGE routine in MV45AFZZ include ( ECC ).
    Business requirement : separate number series is need to be maintained for each service location.
    Kindly help if you know the solution.
    Thanks
    Bhanu

    Hello Bhanu,
    You need to follow following steps to do so:
    Create an external number range in SNRO.
    Assign this number range to your transaction type in transaction processing configuration part.
    Create an implementation for BADI CRM_ORDERADM_H_BADI or ORDER_SAVE. Now depending upon your condition you can assign the number to the Object id here in the work area.
    I hope this helps.
    Thanks
    Vishal

  • Bex Query: make data pass through user exit calculation at navigation time

    Hi all!
    I have a new requirement and I don't know how to solve it...
    Now, when I execute a web model containing a query, the system "reads" a date and calculate the query based on that date in a user exit defined in CMOD, for example, filtering data with an interval between january and the date read.
    Besides, I have in the web model a dropdown item where user can choose other months. The dropdown item only shows single values but now if I choose a month, the query only shows data for that month.
    I need the system filters the query with the new interval. For example, between january and the new month the user has just chosen.
    Does anyone know a way to make a query pass through the user exit calculation after executing the query for the first time? Any other ideas? I need the query to "reexecute" and filter the data (create a new interval) based on the value a user chose.
    (sorry about any inconvenience, because I posted the problem in another sdn specific forum but as I received no answer I've decide to explain it in here...)
    Thank you! Points will be assigned.

    Any ideas please?

  • How to pass data from smartform to user exits in appl form print workbench

    Dear All,
    I am using print workbench + smartforms to develop a form.
    But facing problem with passing data from the smartform back to
    the user exits includes in the application form of the print workbench.
    For eg:- Supppose the case , passing the total number of pages 'sfsy-formapages'  to the application form .
    I tried with the export interface of the smartform, still it doesn't works!
    Any suggestions/solutions
    Thanks
    santhv

    Hi Prashanti,
    Thank you very much...
    Using EXPORT/IMPORT , I am able to pass the data.
    But I would like to know whether it is  the final solution.
    As there is export interface is available for smartform....
    why it is not possible to get back the data in Application form.
    Please confirm, so that I can close the post.
    Anyway thank you once again....
    Regards,
    santhv

  • PO User Exit which pass PR Number

    Dear All
    Is there any PO user exit which can pass the PR number while creating a PO by adopting a PR number.
    Requirement is to check PR amount before saving the newly created PO. If possible also specify the PR field in user exit.
    Thanks

    Hi,
    Try  User Exit MM06E005,Implemente EXIT_SAPMM06E_012
    PR number is passed in field TEKPO-BANFN.
    Regards
    Pole

  • How to pass in GR qty in user exit (EXIT_SAPLEINR_003)

    Hi,
    How to pass in GR qty MIGO transaction (ERFMG field) into user exit EXIT_SAPLEINR_003?
    thanks..
    Lina

    Hi Mayank,
    Thanks for your response, but I don't think it corresponds to my problem.
    I my case, I use a user exit variable to filter some data. It seems BPS offers the possibility to the user to select several values amongts the pre-selected values presented by the user exit variable, but it doesn't work. We can use a popup in which we enters the required values, but in final, only the first value is taken into account.
    I don't know if it is due to a BPS bug or if it is not a good solution in regard to BPS philosophy. In this case, the concerned caracteristic isn't in the header but in lead columns.
    I must present a solution to my client next monday, so I have not enough time to open an OSS message.
    An alternate solution should be interesting too.
    My need is to present to a user a selection of values amongst all values from an infoobject (the user exit variable seemed to be a good solution) and the user must have the possibility to select some values amongst these as filter.
    Regards

  • Passing Multiple Single values in User Exits

    Hello All,
    I have a requirement where in, a user could enter either a single value, multiple single values or a combination of a range and single values.
    This set of values need to be passed on to a variable with in a user exit. I have been able to get either one single value to pass or one single range. I am unable to pass on multiple single values or a combo of a range and single value from the user entry.
    I would appreciate if anyone could help me with the structure of the code to pass multiple single values or combo.
    I was wondering if I would need to pass the values into an internal table first and then pass it to the user exit variable. However, as I am not a strong ABAP resource, I am struggling.
    Any and all help is deeply appreciated.
    Warm regards
    Sunil

    Hello Marc,
    There are two requirements which I was trying to address.
    1. IN few queries, the users enter either a range of profit centers or multiple single values in the pop-up window. I need to pass those values from that variable to an variable of type USer Exit to derive partner profit center values with in the query.
    For this I have been able to pass values for either a single value or a single range. I am unable to pass on values for multiple single values or a combo of a range and single values.
    2. I am trying to create a query for the top 5 customers to be used in the Corporate Performance Monitor. However, when I am trying to use the variable of type "replacement path", the system does not allow me to release it for OLE DB for OLAP.
    To obviate this problem, I was hoping to create a variable of typeUSer Exit" and then pass the values from the variable of type "replacement path" to this variable.
    Is it a workable solution? I was hoping that the method to pass the values in both the above scenarios might be similar.
    Please guide me.
    Warm regards
    Sunil

  • How to pass parameter in Validation User Exit

    Hi All,
    We need to create a Validation to match USER ID with PERSON RESPONSIBLE (that is maintained in Funds Center master record). This is required to ensure that only person responsible can release budget.
    How can I pass "Funds Center" as a parameter to the User Exit so that I can run database query to find person responsibel of that Funds Center.
    Regards,
    Hanif

    Hi Alex,
    I belive i could not explain the problem properly... let me write it again.
    1. I maintained Validation using  FMVABD.
    2. In PREREQUISITE I checked budget release operation using BPJA_VALID-VORGA = 'KBFR'
    3. In CONDITION I used a user exit U100.
    4. Made a copy of RGGBR000 as ZRGGBR000 and assigned it using GCX2.
    5. Added following ABAP Code in FORM U100.
    <CODE>
    b_result = B_FALSE.
    SELECT SINGLE * FROM FMFCTR WHERE BOSSID = SY-UNAME AND FICTR = '??????'.
    IF SY-SUBRC = 0.
      b_result = B_TRUE.
    ENDIF.
    </CODE>
    '??????' In the second condition of WHERE CLUASE I want to mention Fund Center for which Budget is being released.
    Another point is while maintaining validation using FMVABD, under TABLE FIELDS tab, one can find BPJA_VALID-FISTL (means Funds Center) but but I can not use in my ABAP Code.... it gives error message "BPJA_VALID" is unknown.
    My appolgies for lengthy explanation... but hope it will help understanding the issue.
    Regards,
    Hanif

  • Passing a parameter through user exit

    Hi all,
    I am adding a screen to the user exit ZXHIV01 and want the user to fill the organizational detail area on this screen.
    However, I cannot get the value of the organizational code (OBJID) from the previous screen (1000 create).
    I have tried GET/SET parameters but it did not work.
    Should I do something different while editing a user exit?
    Thanks in advance,
    Dilek Ersö

    Hi Dilek,
    try using field-symbols.....it will work....
    If the hint is useful… Say thanks by reward….
    Regards,
    Prabhu Rajesh

  • ERS user exit, pass Delivery note(LFSNR) in MIGO to Reference(XBLNR)in MIRO

    Hi Experts,
    I need to assign Delivery Note(LFSNR) in MIGO, to field Reference(XBLNR) in MIRO. that means "Reference " field must contain the delivery note information instead of Invoice doc number.
    how can i use component MRMH0001.where can i use?
    i am new to user exits.
    please help me. i need logic and steps.
    Thanks in advance
    Reward points will be given.
    Srinu

    hi
    Overview
    R/3 provides three "customization spots" that allow you to enhance FI/CO features without modifying the standard code. Although often collectively referred to as "user exits," two of the three have different names. SAP Enhancements are used to expand the standard functionality within SAP. Enhancements use function modules and are called from the standard SAP code. Each module in the system has a set of delivered enhancements that help companies expand the standard functionality where they need it. Enhancements were new in release 3.0.
    The Open FI Interfaces or Business Transaction Events are also used to expand the standard functionality within SAP. These events are defined in the IMG. Business Transaction Events were new in release 4.0. They are not available for all modules and are not called on all integrated transactions into FI as of release 4.5B. This will change with each release and should be retested.
    The older User Exits in FI/CO are "Z" programs that are defined in table T80D for client-dependent user exits, and in table T80I for client-independent user exits. These are also used to expand the standard functionality within the FI/CO modules. These User Exits have been available since the early releases of SAP. All of these FI/CO User Exits are listed in this document in the Configuring User Exits (Older). The list is included because these User Exits are not a part of the Enhancements or Business Transaction Events and do not have an Info System for searching.
    Benefits
    • Standard SAP functionality can be enhanced without modification to the standard code.
    • Upgrades do not erase the functionality and it does not have to be re-transported or re-entered into the system. The enhancements should be thoroughly tested when upgrading to ensure the system will still work as implemented.
    Configuring SAP Enhancements
    Basic Steps in Configuring an Enhancement
    • Find the appropriate Enhancement.
    • Enter the ABAP code in the "Z" program within the function module.
    • Create a project.
    • Add the Enhancement to the project.
    • Activate the project.
    Example Business Scenario for Enhancements
    Company A has a requirement to validate all customer master records created with a U.S. address. The U.S. entity reports on the industry field on the customer master. This is only a U.S. requirement and should not be required for the other countries, so the field status would not work. To accomplish this requirement, Company A will need to set up an Enhancement for the customer master transaction. The necessary steps are detailed below with screenprints. This example was configured in a 4.6C system.
    to find the suitable exit for ur requirements check the following program
    Hi
    Find the available exits with the following program:::
    *& Report  ZFINDUSEREXIT
    report  zfinduserexit.
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
    tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
    select single * from tadir where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir where pname = tstc-pgmna.
    select single * from enlfdir where funcname =
    tfdir-funcname.
    select single * from tadir where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name eq enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    select * from tadir into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    and devclass = v_devclass.
    select single * from tstct where sprsl eq sy-langu and
    tcode eq p_tcode.
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    write the code in the right form and check by keeping a break point
    HI
    To search for a badi, go to se 24 display <b>class cl_exithandler.</b>
    double click on method get_instance, get a break point on case statement.
    execute and start the required transaction in new session.
    look for variable <b>exit_name.</b> It would show the available badi's.
    also check the following links
    User Exit
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.planetsap.com/userexit_main_page.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    <b>Please do reward if useful</b>
    Regards
    Dinesh

  • User-exit for pass user value to item of po during creating me23n

    does anyone know user-exit for change data field of item level of PO when creating ME23N?
    I tried EXIT_SAPMM06E_012, but did not save with my value.

    Check include
    LV69AFZZ
    Check this BADI
    ME_PROCESS_PO
    ME_PROCESS_PO_CUST
    Thanks
    Arghadip

  • How to pass values between user-exits?

    Hi,
    I have to use two user-exits for changing tolerance limit of POs. In one, I have to check for the condition and in another, I have to change tolerance limit.
    How to do it?
    Thanks in advance.
    Regards,
    Arun Mohan

    Hi Arun,
    Use EXPORT and IMPORT.
    Means EXPORT value from on exit and IMPORT the value from another exit.
    In One Exit :
    EXPORT (OBJ_TAB) TO MEMORY ID 'ABCD'.
    In Second Exit :
    IMPORT (OBJ_TAB) FROM MEMORY ID 'ABCD'.
    Lanka

  • How to implement F4IF_INT_TABLE_VALUE_REQUEST in search help User Exit?

    Hi,
    I need to enhanse search help and add F4 functionality to display list of company codes when cursor is in PBUKR field. I put F4IF_INT_TABLE_VALUE_REQUEST
    into the user exit but nothing works.
    I get error that PROCESS is not defined. If I remove that line there is no error but nothing works.
    Can someone tell me what is wrong in the code below.
    Thank you.
    FUNCTION z_hr_shlp_wbs_element.
    ""Local interface:
    *"  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
      TABLES: prps.
      DATA: it_prps LIKE prps OCCURS 0 WITH HEADER LINE.
      DATA: status_tab LIKE jstat OCCURS 0 WITH HEADER LINE.
      DATA: l_posid LIKE prps-posid.
      DATA: l_subrc LIKE sy-subrc.
      DATA: l_pbukr LIKE prps-pbukr,   " Added by vr
            value TYPE DDSHIFACE-VALUE.
    EXIT immediately, if you do not want to handle this step
      IF callcontrol-step <> 'SELONE' AND
         callcontrol-step <> 'SELECT' AND
                                           " AND SO ON
         callcontrol-step <> 'DISP'.
        EXIT.
      ENDIF.
    ------------------------------------------------------ added by vr
    PROCESS ON VALUE-REQUEST.
    FIELD PRPS-PBUKR MODULE PBUKR.
      DATA: BEGIN OF VALUE_TAB OCCURS 0,
      LPBUKR LIKE PRPS-PBUKR,
      LPOSID LIKE PRPS-POSID,
      END OF VALUE_TAB.
    DATA: BEGIN OF RETURN_TAB OCCURS 0.
    INCLUDE STRUCTURE DDSHRETVAL.
    DATA END OF RETURN_TAB.
    SELECT PBUKR POSID FROM PRPS UP TO 20 ROWS
    INTO TABLE VALUE_TAB WHERE SLWID = 'QLT UDF'.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'PBUKR'
    WINDOW_TITLE = 'Statusselektion'
    VALUE_ORG = 'S' "hierdurch kann die Struktur genommen werden
    TABLES
    VALUE_TAB = VALUE_TAB
    RETURN_TAB = RETURN_TAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3.
    end of additions
    STEP SELONE  (Select one of the elementary searchhelps)
    This step is only called for collective searchhelps. It may be used
    to reduce the amount of elementary searchhelps given in SHLP_TAB.
    The compound searchhelp is given in SHLP.
    If you do not change CALLCONTROL-STEP, the next step is the
    dialog, to select one of the elementary searchhelps.
    If you want to skip this dialog, you have to return the selected
    elementary searchhelp in SHLP and to change CALLCONTROL-STEP to
    either to 'PRESEL' or to 'SELECT'.
      IF callcontrol-step = 'SELONE'.
      PERFORM SELONE .........
        EXIT.
      ENDIF.
    STEP PRESEL  (Enter selection conditions)
    This step allows you, to influence the selection conditions either
    before they are displayed or in order to skip the dialog completely.
    If you want to skip the dialog, you should change CALLCONTROL-STEP
    to 'SELECT'.
    Normaly only SHLP-SELOPT should be changed in this step.
      IF callcontrol-step = 'PRESEL'.
      PERFORM PRESEL ..........
        EXIT.
      ENDIF.
    STEP SELECT    (Select values)
    This step may be used to overtake the data selection completely.
    To skip the standard seletion, you should return 'DISP' as following
    step in CALLCONTROL-STEP.
    Normally RECORD_TAB should be filled after this step.
    Standard function module F4UT_RESULTS_MAP may be very helpfull in this
    step.
      IF callcontrol-step = 'SELECT'.
    Maximum records are set to 0 because the counter for Max records keeps
    running, even if you filter out certain records. This is a similar
    problem as described in OSS Note 148525.
    Feb 3, 2004 LS: devk907353
                    (maxrecords = 0 defaults to maxrecords 500)
                    As of release 4.7, it appears that maxrecords is
                    being considered on the read of the view, rather
                    than prior to presenting the selection list.
                    When only 500 records are passed into this exit,
                    the subsequent evaluation yields very few records
                    in the selection list.  By setting maxrecords to
                    8000, the entire contents of the view are passed
                    to this user exit, and therefor the search help
                    yields a reasonable selection list to the user
                    (as was the case in release 4.6b).
      callcontrol-maxrecords = 0.        " devk907353
        callcontrol-maxrecords = 8000.     " devk907353
      PERFORM STEP_SELECT TABLES RECORD_TAB SHLP_TAB
                          CHANGING SHLP CALLCONTROL RC.
      IF RC = 0.
        CALLCONTROL-STEP = 'DISP'.
      ELSE.
        CALLCONTROL-STEP = 'EXIT'.
      ENDIF.
        EXIT. "Don't process STEP DISP additionally in this call.
      ENDIF.
    Added by vr, Nov. 2007 ---------------------------
      CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'
      EXPORTING
        PARAMETER               = 'PBUKR' " Reference to search help parameter
      IMPORTING
        VALUE                   = value
      TABLES
        SHLP_TAB                = shlp_tab
        RECORD_TAB              = record_tab
      CHANGING
        SHLP                    = shlp
        CALLCONTROL             = callcontrol.
      l_pbukr = value.
    End of additions by vr ---------------------------
    STEP DISP     (Display values)
    This step is called, before the selected data is displayed.
    You can e.g. modify or reduce the data in RECORD_TAB
    according to the users authority.
    If you want to get the standard display dialog afterwards, you
    should not change CALLCONTROL-STEP.
    If you want to overtake the dialog on you own, you must return
    the following values in CALLCONTROL-STEP:
    - "RETURN" if one line was selected. The selected line must be
      the only record left in RECORD_TAB. The corresponding fields of
      this line are entered into the screen.
    - "EXIT" if the values request should be aborted
    - "PRESEL" if you want to return to the selection dialog
    Standard function modules F4UT_PARAMETER_VALUE_GET and
    F4UT_PARAMETER_RESULTS_PUT may be very helpfull in this step.
      IF callcontrol-step = 'DISP'.
    DEVK909420 Begin
      SELECT * FROM prps INTO TABLE it_prps
         WHERE belkz = 'X'.
    Changed by vr, Nov. 2007
      IF l_pbukr <> ''.
        SELECT * FROM prps INTO TABLE it_prps
           WHERE belkz =  'X'
             AND fkstl <> ''
             AND pbukr = l_pbukr.
        ELSE.
        SELECT * FROM prps INTO TABLE it_prps
           WHERE belkz =  'X'
             AND fkstl <> ''.
        ENDIF.
    End of changes
    DEVK909420 End
        SORT it_prps BY posid.
        LOOP AT record_tab.
          l_posid = record_tab+96(24).
          READ TABLE it_prps WITH KEY posid = l_posid.
          IF sy-subrc = 0.
            CALL FUNCTION 'STATUS_READ'
                 EXPORTING
                      objnr       = it_prps-objnr
                      only_active = 'X'
                 TABLES
                      status      = status_tab.
    DEVK909329 Begin
            read table status_tab with key inact = ''
                                           stat  = 'E0001'.
            if sy-subrc is initial.
              read table status_tab with key inact = ''         "DEVK909345
                                             stat  = 'I0002'.   "DEVK909345
            endif.
    DEVK909329 End
          ENDIF.
          IF sy-subrc NE 0.
            DELETE record_tab.
          ELSE.
           IF record_tab+114(1) EQ '.' AND
              record_tab+115(1) EQ '9'.
             DELETE record_tab.
           ELSE.
    DEVK909420 Begin
            IF record_tab+102(1) EQ '9'.
              DELETE record_tab.
            ELSEIF record_tab+104(1) EQ '9'.
              DELETE record_tab.
            ENDIF.
    DEVK909420 End
           ENDIF.
          ENDIF.
        ENDLOOP.
        EXIT.
      ENDIF.
    ENDFUNCTION.

    Hi Vitaly,
    Process on Value Request and search help exit is entirely two idea to display the f4 values.please remove the PROCESS ON VALUE REQUEST from the function module.write the required select statements after   CHECK callcontrol-step EQ 'SELECT' . and pass the value to the function module
    CALL FUNCTION 'F4UT_RESULTS_MAP'
          TABLES
            shlp_tab          = shlp_tab
            record_tab        = record_tab
            source_tab        = l_record
          CHANGING
            shlp              = shlp
            callcontrol       = callcontrol
          EXCEPTIONS
            illegal_structure = 1
            OTHERS            = 2.
        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 AND l_record IS INITIAL ).
          MESSAGE 'No values found' TYPE 'S'.
        ENDIF.
        callcontrol-step = 'DISP'.
    Find the documentaion for this function module for further help
    message edited by
    shibu

Maybe you are looking for

  • Report Column "attributes"

    I'm sure I am missing something basic here, but no amount of searching has yielded a result: I have a SQL Query report for a product with length, width, height column data - two queries. 1. some products don't use these fields (ie they are null), whe

  • Help! Can't get to restore on a new drive

    I used Time Machine to make a complete backup of my MacBook on an external hard drive and everything went very smoothly. I only had about 32GB of used space when I did the backup. I then removed the 120GB hard drive and installed a 320GB drive as the

  • DB Link - OPEN_LINKS

    What does open_links parameter mean ? Say if the value is 4 and remote databases are A,B and C 1. Does it mean you can have only 4 concurrent sqls accessing a remote database (remote database A) 2. Does it mean you can have as many SQL's accessing "A

  • [b]Urgent How to send XML file from forms 6.0 to a url to access database[/

    hi i need to create an XML with some values file from Oracle Forms 6.0 and then send this XML file To a URL to access the database,which in turn will send me XML file with new values.Can any body help me out as i don't have any ideas Regards Sunil

  • Moto X (1st Gen)

    Hi, Now that retail moto x (1st gen) has started receiving 5.1 lollipop. When will the at&t version (xt 1058) receive the update? I hope we don't have to wait like when the at&t version of moto x (2nd gen) was updated 4 months later than other carrie