Funtion Module for user exits for variables used in BEx Queries.

Hi,
This is for BW Query customer exit variable (zvar2) for include ZXRSRU01 and exit :EXIT_SAPLRRS0_001.
Can anyone please suggest the function modules that can be used to do the following.
1)Read value of zvar1 from selection screen whatever
user enters at run time.
2)How to define the zvar2 in the include. zvar2 is the
variable created in BEx to be populated from this
customer exit.
3)How to use case statment where once the value for zvar1
is determined then,
Case zvar1.
when zvar1 = 0 , then zvar2 = 10
when zvar1 = 1 , then zvar2 = 20
3) Assign zvar2 value as computed in the case statement.
Can anyone please help with the code to achieve this.
Any information regarding function modules that can help write user exits for variable reading and input will be greatly helpful.
Thanks
Sarah.

Hi Sarah,
You don't need any FM for your issue.
Please try thie sample code :
DATA: VAR_INPIUT LIKE RRRANGEEXIT.
CASE I_VNAM.
  WHEN 'ZVAR2'.
   CLEAR L_S_RANGE.
   IF I_STEP = 2."PROCESSED AFTER VARIABLE INPUT
*Reading value of ZVAR1
    LOOP AT I_T_VAR_RANGE INTO VAR_INPIUT
      WHERE VNAM = 'ZVAR1'.
      CASE VAR_INPIUT-LOW.
*FILLING ZVAR2
       WHEN 0.
          L_S_RANGE-LOW     = 10.
       WHEN 1.
          L_S_RANGE-LOW     = 20.
      ENDCASE.
      L_S_RANGE-SIGN     = 'I'.
      L_S_RANGE-OPT      = 'EQ'.
      APPEND L_S_RANGE TO E_T_RANGE.
      EXIT.
    ENDLOOP.
  ENDIF.
ENDCASE.
Hope this helps
Joe

Similar Messages

  • Need Help for User Exit for Pricing

    Dear ABAPers
    I created a user exit for pricing where I am comparing a condition type (manually entered(ZD01)) to another condition type(YD01). If the entered value is more than the other condition type than pricing should not be updated.
    RATE = 0.
    IF KOMP-ZZVBTYP = 'C'.
    IF KOMP-PRSFD = 'X' OR
       KOMP-PRSFD = 'A'.
      IF KOMV-KSCHL = 'ZD01'.
            LOOP AT XKOMV WHERE  KSCHL EQ 'YD01'.
                  KOMP-KZWI2 = ( XKOMV-KBETR / 10 ).
            ENDLOOP.
            RATE = KOMV-KBETR / 10.
        IF ( RATE <> 0 ) AND ( RATE < KOMP-KZWI2 ).
            MESSAGE W991. "Maximum Allowed Discount Has Exceeded !!!!
            CLEAR KOMV-KBETR.
            CLEAR KOMV-KWERT.
            MODIFY SCREEN.
        ENDIF.
      ENDIF.
    ENDIF.
    ENDIF.
    It is giving me the message but it is also updating the pricing. I want not to be updated. So in place of modify screen i need to reset pricing procedure.
    I need a function module or a abap key word which can reset the pricing procedure.
    Thanks in Advance.
    regards,
    MAM

    as per i can understand you are coding in user-exits ,.. so if you are giving that
    message 'Maximum Allowed Discount Has Exceeded !!!!' type 'E'.
    i think it will work. I think there is no way to stop the processing without type e.
    regards
    shiba dutta

  • Any function modules or user exit for confirmation mail

    Hi,
        I am in SAP system , there is data distribution happening with SAP and non SAP system through middleware XI system.
    pls help me suppose there is an error happens how SAP can send
    an email to nonsap system or suppose data updated it should be
    an confirmation email. pls help me regarding this

    Hi,
    i have alredy implement EXIT_SAPMM06E_013 but the program do not stop there.Do i miss something?I activete the project and saw that  EXIT_SAPMM06E_007 EXIT_SAPMM06E_013 and EXIT_SAPMM06E_016 are implemented and active.

  • PPCO0007 User Exit for  Changing Header Fields During Order  (CO40)

    .. Hi !!!!
      I need your help or suggestions,
      I need to change the standar order  before to save, i found the user exit PPCO0007,
      i assign the new value for the order, but when finish the fuction, EXIT_SAPLCOZV_001, the new values are
      lost, and finally the system set the standard order.
        Someona know how can change the order and the the batch.
         Thanks
    Noemí Huerta

    Hi Noemi
    You can use the enchancement PPCO0007 (exit when the production order is saved).
    Use the function module EXIT_SAPLCOZV_001 (User Exit for Checking or Changing Header Fields During Order Save) to update the field priority starting the information in the material-customer info record.

  • User Exit for TCode CJ20N to populate Project system user fields

    Hi team,
    need one support from your side..
    I am looking for User Exit for TCode CJ20N to populate Project system user fields on SAVE.
    I have found
    Enhancement        CNEX0001
    Short text         PS: User field
    which is exactly suiting my req...as it has USER Fields (USR08/USR09 )in export paramters..
    BUT it is not triggering on SAVE,,
    Any hint or is any other user exit/badi which have USER Fields in export paramters.
    Warm Regards
    Krishan

    Hi Krishnan,
    If you want a custom tab that contains User defined fields at Project level then you have to use CNEX0006 user exit. Before this you must declare your fields using the CI include CI_PROJ in the PROJ table.
    If you want a custom tab that contains User defined fields at WBS level then you have to use CNEX0007 user exit. Before this you must declare your fields using the CI include CI_PRPS in the PROJ table.
    In the PBO function module exit of these exits you must use the following statements as the first statement.
    MOVE-CORRESPONDING sap_proj_imp TO proj.
    MOVE-CORRESPONDING sap_prps_imp TO prps.
    In the PAI function module exit of these exits you must use the following statement as the last statement.
    MOVE-CORRESPONDING proj TO cnci_proj_exp.
    MOVE-CORRESPONDING prps TO cnci_prps_exp.
    The remaining programming as in the case any Screen Exit.
    Regards,
    Abijith

  • User Exit for MIGO Save

    Hi Gurus,
    I am looking for user exit for MIGO transaction.  User exit should be given after saving the material document & I need this document number for carrying out some updations.
    regards,

    Hi
    You need to use the BAdi MB_DOCUMENT_BADI.
    This BAdi has two methods
    MB_DOCUMENT_BEFORE_UPDATE
    MB_DOCUMENT_UPDATE
    The method MB_DOCUMENT_BEFORE_UPDATE is called up before the FI document is created. This means that it is called up even if the program is terminated by an error during the subsequent processing. The update of data in separate tables should always be contained in function modules that are called up with the addition 'in update task'. This ensures that all the data is updated consistently.
    The method MB_DOCUMENT_UPDATE is not carried out until update. This means that all updates are carried out immediately in their own tables and do not have to be contained in 'update task' in function modules. For performance reasons, you should not re-read the tables or carry out any time-consuming routines at this point.
    You should always call up MB_DOCUMENT_BEFORE_UPDATE before MB_DOCUMENT_UPDATE, particularly if time is a critical factor when posting the material documents. The method MB_DOCUMENT_UPDATE is processed after the FI document numbers are called. As a result, no other FI documents can be posted until this document is completely updated.
    hope this helps...
    Thanks & Regards
    Kishore

  • User Exit for Transaction V/76

    Hello Gurus,
    I'm looking for user exit for transaction V/76, Basically I just need to add an additional checking for the value entered in the product hierarchy using a check table (custom table) functionality. However I can't see any user exit that can be used since this is a view maintenance table/transaction. Can anyone of you experts can confirm that there is user exit for this transaction? If YES, I will continue my searching if there is NO then thanks for the confirmation. Thank you very much in advance!
    Best regards -

    Hi Rous,
    Please paste this code and check:
    report zuserexit no standard page heading.          
    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).     
       call transaction 'SMOD' and skip first   screen.
    Hope this helps you, reply for queries.
    Regards,
    Kumar.

  • Code for user-exits

    hey guys i want the code for user-exits for  inclusion of Excise Chapter ID mandatory in PO .....
    regards,
    Naveen

    which user exit u are using ?
    check the BADI for the same .
    SE15->Enhancements->BADI--->definations -
    >search on Package = ME.
    and see BADI definition called Process _cust.
    Regards
    Peram

  • User Exit For Discount

    Dear Guru's,
    I have urgent requriment for user exit for discount.
    my requirment is sales employee can give 1 to 10% discount and sales manager can give 10 to 20% discount and GM can give 20 to 30% discount.
    Please it is urgent requirement give me the user exit or solution.
    points will be provided. Email adresses are [email protected] and [email protected]
    Waiting for yours reply
    Regards
    Maqsood

    If you are looking for MIGO check Or else let me know which  T code exit you want?
    Transaction Code - MIGO                     Goods Movement
    Exit Name           Description
    MBCF0002            Customer function exit: Segment text in material doc. item
    MBCF0005            Material document item for goods receipt/issue slip
    MBCF0006            Customer function for WBS element
    MBCF0007            Customer function exit: Updating a reservation
    MBCF0009            Filling the storage location field
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.
    No of Exits:          8
    Rewards if useful...................
    Minal

  • User exit for sale order material serial number change

    I am looking for User exit for changing the serial number for the saleorder material va01.

    Hey,
      Check the include program : MV45AFZZ. it will trigger at the of saving the sale order.
    IF SY-TCODE EQ 'VA02' OR SY-TCODE EQ 'VA01'.
    Endif.
    Note : Write your coding inside the IF clause to avoid affecting the other transaction codes.
    Regards,
    Saravanan M

  • User exit for rerapp t-code

    Hello,
    i m looking for user exit for rerapp t-code but i couldnt find anything about that from internet. it s about e coming invoice. the invoice is being committed from rerapp t-code; then the view is being matched with invoice and clicked documents button.  i m looking for a user exit when user click 'documents' button,
    Thanks a lot,
    Ayşegül

    Hi,
    Follow this steps, you will get the exact BADI.
    1.     Go to the TCode SE24 and enter CL_EXITHANDLER as object type.
    2.     In 'Display' mode, go to 'Methods' tab.
    3.     Double click the method 'Get Instance' to display it source code.
    4.     Set a breakpoint on 'CALL METHOD cl_exithandler => get_class_name_by_interface'.
    5.     Then run your transaction.
    6.     The screen will stop at this method.
    7.     Check the value of parameter 'EXIT_NAME'. It will show you the BADI for that transaction.
    Regards
    Chaitanya

  • User exit for ML81N

    Hi all,
    I am looking for user exits for T code ML81N, where in I want to validate 2 fileds i.e. net value inclusive of tax ESSR-NETWR and
    PRsp. Intern ESSR-SBNAMAG.
    I have tried all the exists available in SMOD for the develoment class.
    can any one tell me how to solve this.
    Best Regards
    Sree

    Hi,
    Try to check any BADI's Available.
    to find the user exits & Badi's for the T-code..
    go to table TSTC>enter T-code and execute> get the Program for the t-code..
    and go to-se38-->get the package attached to the t-code..
    next go to t-code Se15>expand the enhacement tab>enter package under userexit and
                                                         execute you will get the list of exits
                                                         available...
                                                      -->enter package under Badi's tab and
                                                         execute you will get the list of Badi's
                                                         available... 
    All the User exits are stored in Table MODSAP..
    Prabhudas

  • User Exit for Z Programmes

    hii
    is there any user exit by which i can store some entries in my Z table, wheneever any Z or Y prograamme is executed.
    abhishek suppal

    If you are looking for User Exits for Z programs there will not be any unless the programmer has done the coding that way and usually its not done.
    The whole idea behind the exits is that you should not modify the standard code, so the exits are provided.
    Why can't you modify the Z Program yourself?
    Bottom line, there will not be any user exits.
    Regards,
    Ravi

  • CS07 - Functional Module ? User Exit ?

    Hi ,
    Is anybody can give me some instruction ?
    We would like trigger another program which we developed by ourself when use T-Code:CS07 to assign BOM to Plant .
    Is any functional module or user exit we can use ?
    Thanks !

    Hi Denny,
    The following are the User Exits available for CS07 transaction,
    PCSD0001            Applications development R/3 BOMS
    PCSD0002            BOMs: Customer fields in item
    PCSD0003            BOMs: Customer fields in header
    PCSD0004            BOM comparison
    PCSD0005            BOMs: component check for material items
    PCSD0006            Mass changes user exit
    PCSD0007            Check changes in STKO
    PCSD0008            WBS BOM: Customer-specific explosion for creating
    PCSD0009            Order/WBS BOM, determine URL page
    PCSD0010            Order/WBS BOM, determine explosion date
    PCSD0011            Knowledge-based order BOM, parallel update
    PCSD0012            Customer - Mat. number/mat. number during material exchange
    PCSD0013            Customer-specific processing of an explosion for BOM browser
    Please select the appropriate exit which meets ur requirement.
    Reward Points if useful.
    Thanks & regards
    Mahesh

  • User Exit to be used in Substitution

    Hello,
    We have recently got an requirement from one of the clients as they want to copy the material description to the GL text field (against Doc Type WA & WE) . I am able to find that this can be achieved by way of creating substitution, but I wander which user exit to be used for this purpose.
    Its been my experience that when ever a question of user exit arise I go blank as which user exit to be used, where will I get all this information with clear update motioning the purpose or use of each SAP delivered user exit.
    I have tried goggling it out but I was not able to find much use full  stuff. Please share your expertise.
    Thanks a ton in advance,
    Regards,
    Shilpa

    Hi Shilpa,
    there is no hard code rule to use the specific user exit for substitutions, attached screen shots will help you to resolve the issue.
    Step 1: Go to the t.code: OKC9, specify the controlling area and event 0001.
    Step 2 :  Create the substitution and select the step (attachment 1)
    Step 3: below mentioned screen shot specify the any existing user exit (naming conversion starts with U) by F4 option and double click on the particular exit
    Step 4: you can see the Report ZGGBS800, here you can create the user exit next free number starts with U naming conversion, once it's created the replace the existing user exit in the substitution rule.
    Hope this will help you to understand the user exit process in substitution rule.
    Note: Only substitution rules there is no hand code rule for user exit, for other transactions we need to check the SAP delivered exits.
    Make sure that substitution rule must be activated once exit created
    Thanks & Regards
    Srinu

Maybe you are looking for

  • CFL For the edit text using screen painter

    Dear All, I had created CFL for the Edit box to display CardCode if i press tab button the list for the specified object type is obtained but the selected value is not binded with the edit box,i have attached the code here, Private Sub SBO_Applicatio

  • Problem with chart

    Hello this query select null link, TO_CHAR (DATE_DEMANDE, 'Month') label, count(decode(p.organisation, 'ETR', d.ID,null)) "ETR", count(decode(p.organisation, 'FOR', d.ID,null)) "FOR", count(decode(p.organisation, 'ISI', d.ID,null)) "ISI", count(decod

  • Errors running acrobat pro xi

    I was getting the security prompt each time I tried to run acrobat pro xi so I uninstalled and reinstalled.  Now when it launches, I have to pick english from the window since Italian is picked.  However, after I pick english, it still tries to make

  • Web Service to Validate login information against LDAP

    Hi Fourms, I'm creating a web service that will validate login information against Active Directory Server. I'm starting with just validating the user, given a user name and password. Right now all I have is the host name, the port number, username a

  • How do I fax to pc 4500 series?

    How do I fax to my pc?