User exit code -  help required

Hi Experts,
I need to write a user exit for the field Posting level in the query. The logic is ,when posting level is either 10 or 20 for an ITEM then Key figure "Period value GC" should be divided by two and the result shouls be stored in the same Key figure.
Technical names of the fields are as follows:
Posting Level - 0cs_plevel . We have created a user exit variable ZBSUSER.
Item - 0ITEM
Period Value GC - 0cs_per_gc.
Please let me know  the code to be written in CMOD to achieve the above result.
Thanks,
Kavitha Jagannath

Hi,
I need to write a user exit for the field Posting level in the query. The logic is ,when posting level is either 10 or 20 for an ITEM then Key figure "Period value GC" should be divided by two and the result shouls be stored in the same Key figure.
You can do it in report it self you don't need EXIT CODE.
Steps:
1. Create a RKF and restrict (Include)ITEM = 10 and 20 &  drag and dropn Period value GC   " RKF -1
2. Create another RKF and EXCLUDE ITEM = 10 and 20 &  drag and dropn Period value GC.  " RKF -2
3. In Columns display both and create Formula-1 and divide RKF-1 with 2.
4. Create a Formula and add Formula-1 and RKF -2  
5. Hide unwanted calculations
Your problem is resloved.
Thanks
Reddy
Edited by: Surendra Reddy on Dec 14, 2009 2:25 PM

Similar Messages

  • What are the different methods to find the user-exit for any requirement?

    Hi Everybody,
    What are the different methods to follow to find the user-exit for any requirement?
    Thanks & Regards,
    Nagaraju Maddi

    The following program search all the user exits involved with a T-code:
    Selection Text: P_TCODE: Transaction Code to Search
    Text Symbols: 001 - Enter the Transaction Code that you want to search through for a User Exit
    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® Modifications
        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.

  • How to find the exact user exit for our requirement?

    Dear Mr. keerthi,
    can you please explain me how to find the exact user exit for our requirement?

    Hi sandip
    There is more than one method in which you can check for user-exits.The following method is used very often.
    <b>How to find the exact user-exit for your requirement.</b>
    1.     You can check the user exists using transaction SE85.
    2.     Repository Information System -> Enhancements -> Customer exits
    3.     You can search the user-exits by package name.
    4.     Double click on each exit name to check the function module exits.
    <b>The procedure to find the package name.</b>
    Execute transaction SE93 
    Enter the tcode of the transaction for which you want to check the user exit.
    Example: if you want to find the user-exit for purchase orders while changing, enter ME22n  and press display.
    You will get to see the package name
    But you need to confirm that the user exit will get triggered at the appropriate event.
    ( example: you might want some validations to be done ON SAVE of a purchase order)
    <b>Checking if the user-exit is getting triggered or not.</b>
    1.     Open the user exit function module (that you have got in step 4) in Tcode SE37.
    2.     Click on where used button. In the pop up that immediately appears choose only programs .
    3.     You will get a list of programs. Double click on the program name.
    4.     You will get the list of location where this function module user exit is used.
    5.     Place session break points at each of these location ( at each CALL FUNCTION statement)
    6.     Now go to your transaction ( say change purchase order tcode:Me22n) and check if the user exit is getting triggered on appropriate event.
    regards,
    Prasad

  • BW User Exit - Code in function of the query name

    Hi,
    I would like to create an user exit code which execute a algorithm different in function of the query executed. do you know in which variable is store the technical name of the query.
    CASE query
        WHEN 'Z_ZAPO_001'.
           V1 = 1
        WHEN 'Z_ZAPO_002'.
          V1 = 2    WHEN '10' OR '11' OR '12'.
    ENDCASE.

    Yaroslav,
    I_S_RKB1D-COMPID will never be filled for authorization user-exits (I_STEP = 0). Don't ask my why, I once raised this question to OSS and they replied it was never foreseen to work with authorization user-exits. God knows why, it's very unlogical and it wouldn't cost them a lot of work to get it working...
    I could solve this problem by applying a little trick. In our queries we included a user-exit keydate variable. This will push the user-exit first in I_STEP = 1 mode where I_S_RKB1D-COMPID is filled. Then save the query name by exporting it to the ABAP-memory. Afterwards, the user exit with code for I_STEP = 0 will be processed and then you can import the query name from the ABAP memory.
    I agree it sounds a little bit tricky but there is no better option I'm affraid.

  • User exit code does not execute

    I'm having a problem with User exit code that does not execute yet seems to be set up correctly.
    The User exit is implemented as FM "EXIT_SAPLIPW1_001" in function group XQSM.
    I've tried everything I know of with the CMOD and SMOD transactions, and I suspect some sort of transport error.
    The only clue I can find in comparing the development system (which works) with the test system (which does not work) is that running "Extended Check" in SE80 on function group XQSM fails with the following error:
    "The namespace of program SAPLXQSM has the setting "C" and cannot be tested."
    Has anyone any idea what could have happened?

    Let us try to retrace the steps.
    1. You created a Z project in CMOD and assigned the enhancement IQSM0001 and the component EXIT_SAPLIPW1_001 and activated the same. This is there in the transport.
    2. You double clicked on the include in the user exit and created it. You activated the code and included it in the same transport.
    If you did the above steps, then your user exit should be active in your test system.
    Can you please go to SE10, and list out the objects in your transport? You should see entries in there like below(not necessarily a complete list)
    R3TR CMOD <your project name>
    R3TR PROG ZXQSMU01
    See if you created any of the objects as local objects.
    Srinivas

  • EDI - IDoc - User Exit - Code - Problem - Help - Wanted

    Hi EDI Experts,
    I have extended ORDERS05 IDOC twice.
    ZVKSEG1 is the the segment under extended idoc ZVKORDRS05. This is for one partner.
    Z1DATESH01 is the segment under extended idoc Z1ORDER05. This is for another partner.
    I have completed the configuration thing in WE82 for both the extensions.
    Now the requirement is, whenever a PO is created for the first partner - 100290, the IDoc generated should contain the extra segment ZVKSEG1 and whenever PO is created for the second partner - 10099,the Idoc generated should contain the extrasegment Z1DATESH01.
    Using WE20, i have added the extended IDoc type in both the partner profiles under ORDERS message type.
    Now i've written the user exit for this using EXIT_SAPLEINM_002.
    tables: edidc.
    data: z_edidd like edidd occurs 0 with header line.
    data: y1dath01 like z1datesh01.
    data: yvkseg1 like zvkseg1.
    if edidc-rcvprn = '10099'.
    z_edidd[] = int_edidd[].
    loop at z_edidd.
    if z_edidd-segnam  = 'E1EDK01'.
    read table z_edidd  with key segnam  = 'Z1DATESH01'.
    if sy-subrc <> 0.
    y1dath01-DELDATE = sy-datum.
    clear z_edidd.
    z_Edidd-sdata = y1dath01.
    z_Edidd-segnam = 'Z1DATESH01'.
    append z_edidd.
    endif.
    endif.
    endloop.
    int_edidd[] = z_edidd[].
    elseif edidc-rcvprn = '100290'.
    z_edidd[] = int_edidd[].
    loop at z_edidd.
    if z_edidd-segnam  = 'E1EDK01'.
    read table z_edidd  with key segnam  = 'ZVKSEG1'.
    if sy-subrc <> 0.
    yvkseg1-name1 = 'ZVK Chemicals'.
    clear z_edidd.
    z_Edidd-sdata = yvkseg1.
    z_Edidd-segnam = 'ZVKSEG1'.
    append z_edidd.
    endif.
    endif.
    endloop.
    int_edidd[] = z_edidd[].
    endif.
    Could you please go through the code and tell me where did i go wrong. The extra segments are not being created for both the partners.
    I created PO using ME21n once for each vendor.
    Please help me out guys.
    Thanks,
    Matt

    I myself fixed this problem. I made use of XLFA1-LIFNR to manipulate the partner numbers.
    Thanks

  • User exit code required for manadatory variable

    we have vendor in rows  and sales in columns, the requirement is there is a mandatory  variable for retrieving the sales between months, that is if
    customer gives calmonth january as <b>from</b> and march as<b> to</b> the sales should be from Jan to March, if the customer only gives <b>from</b> month and nothing for<b> to</b> month, only <b>from</b> month should be calculated, if the customer gives only<b> to</b> month and no <b>from</b> month, the <b>to</b> month should be calculated. Remember the variable is mandatory.

    Hi,
    Let s say
    var1 is from varaible
    var2 is to variable
    var3 is user exit variable
    USe the code like this:
    DATA:
    l_s_range TYPE rsr_s_rangesid,
    l_s_var TYPE rrs0_s_var_range.
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    DATA: LOC_VAR_RANGE2 LIKE RRRANGEEXIT.
    WHEN 'VAR3'.
        IF I_STEP = 2.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
            WHERE VNAM = 'VAR1'.
          LOOP AT I_T_VAR_RANGE2 INTO LOC_VAR_RANGE
            WHERE VNAM = 'VAR2'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(8).
            L_S_RANGE-HIGH = LOC_VAR_RANGE2-LOW(8).
    IF LOC_VAR_RANGE2(8) = '00000000'.
            L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW(8).
    ENDIF.
    IF LOC_VAR_RANGE(8) = '00000000'.
            L_S_RANGE-LOW = LOC_VAR_RANGE2-LOW(8).
    ENDIF.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT  = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
          EXIT.
          ENDLOOP.
          EXIT.
          ENDLOOP.
        ENDIF.
    With rgds,
    Anil Kumar Sharma .P

  • Hi user exit code required

    hi all,
          i have one requirement i.e when ever we give tcode xd06 or xd02 if customerno is there it wont accept the same customer again if customer is not there it has to insert the customer into the table. i require code for this requirement i need to write this in include called ZXF04U01and function module name is EXIT_SAPMF02D_001.
    Write below custom code inside the user exit to capture CRSID information in reverse mapping input table ZW2CTREV_MAP to trigger reverse mapping.
    Declare a work area WA_ZW2CTREVMAP of type ZW2CTREV_MAP.
    Assign values from I_KNA1 to work area WA_ZW2CTREVMAP.
    MODIFY TABLE ZW2CTREV_MAP FROM WA_ZW2CTREVMAP.
    above i have shown procedure for code.  send me the actual code what i have to write in include to check customer and insert customer pls reply as early as possible.
    regards
    sagar

    Hi,
    Let s say
    var1 is from varaible
    var2 is to variable
    var3 is user exit variable
    USe the code like this:
    DATA:
    l_s_range TYPE rsr_s_rangesid,
    l_s_var TYPE rrs0_s_var_range.
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    DATA: LOC_VAR_RANGE2 LIKE RRRANGEEXIT.
    WHEN 'VAR3'.
        IF I_STEP = 2.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
            WHERE VNAM = 'VAR1'.
          LOOP AT I_T_VAR_RANGE2 INTO LOC_VAR_RANGE
            WHERE VNAM = 'VAR2'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(8).
            L_S_RANGE-HIGH = LOC_VAR_RANGE2-LOW(8).
    IF LOC_VAR_RANGE2(8) = '00000000'.
            L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW(8).
    ENDIF.
    IF LOC_VAR_RANGE(8) = '00000000'.
            L_S_RANGE-LOW = LOC_VAR_RANGE2-LOW(8).
    ENDIF.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT  = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
          EXIT.
          ENDLOOP.
          EXIT.
          ENDLOOP.
        ENDIF.
    With rgds,
    Anil Kumar Sharma .P

  • 0FI_AR_4 Extractor Enhancement without user exit code Question

    Hi
    I have a requirement to enhance 0FI_AR_4 Extractor with below Fields from BSID:
    Field     DataElement
    PRCTR       PRCTR
    VPOS2       NUM06
    VBUND       RASSC
    As per SAP Note: 410799, I am assuming I don't need to write any ABAP code to populate these fields.
    In the extract structure DTFIAR_3 of extractor 0FI_AR_4 Double clicked on the Include CI_BSID.
    It prompted "Structure CI_BSID not available. Create the structure?"
    After entering Access key it created new Structure "CI_BSID".
    I have entered the Component and Component Type values as below:
    Component   Component Type
    YYPRCTR     PRCTR
    YYVPOS2     NUM06
    YYVBUND     RASSC
    1. Please let me know Component and Component Type values and the steps I followed are correct or not?
    2. And I hope I don't need to write the code in the User exit to populate these fields?
    Thanks
    Sree

    Hi,
    For any FI datasource enhancement there are two scenarios :-
    1. All the fields of the customer enhancement in the customer include are available in the read structure BSID
    Then no additional action is required. The fields of the customer enhancement are filled automatically by the datasource from the assigned read structure via "move-corresponding".
    2. Fields of the customer enhancement in the customer include are not contained in the read structure BSID
    In this case you have to program a function module to fill the field of the customer enhancement. To do this, there is a Business Transaction Event available (open FI interface for process 00005021). Create any function module you like and use function module SAMPLE_PROCESS_00005021 as a template for the interface (input parameter, changing parameter).
    Hope this helps.
    Reg,
    Rahul

  • Hierarchy BW User Exit code EXIT_SAPLRSAP_004 ZXRSAU04

    Hi All,
    We are loading Hierarchy data in BW using User Exit by taking data from master dat InfoObject.
    As we thought it's working fine; but on every 2nd load it's getting failed (1st load is success, 2nd load failed, 3rd load success likewise; so every alternate load is getting failed). We tried with all the options in Infopackage.
    As per our assumptions and the requirement we could able to load the data through user exit.
    We need your help in the following code where we are missing or we are missing some process in BW.
    We request you please give us suggestions ASAP.
    thanks in Advance.
    *&  Include           ZXRSAU04
    data:y_i_/BIC/PYIOSID type standard table of /BIC/PYIOSID,
         y_wa_/BIC/PYIOSID type /BIC/PYIOSID,
         lwa_upmode type char1.
    data:y_i_/BI0/HCRM_OBJ_ID type standard table of /BI0/HCRM_OBJ_ID,
         y_wa_/BI0/HCRM_OBJ_ID type /BI0/HCRM_OBJ_ID,
         y_wa_hienode type RSAP_S_HIENODE.
    data:y_I_table like standard table of C_T_HIENODE.
    data: y_v_active type char1.
    data:y_v_n(8) type n.
    *refresh C_T_HIENODE[].
    case I_DATASOURCE.
      when '80CRM_OBJ_IDH'.
    To load the data from YIOSID master data into 0CRM_OBJ_ID hierarchy
       delete  C_T_HIENODE where nodeid ne '00000001'.
        select single *
           from /BI0/HCRM_OBJ_ID
           into y_wa_/BI0/HCRM_OBJ_ID
           where nodeid = '00000002'.
        if sy-subrc eq 0.
         move:C_T_HIENODE[] to y_I_table[].
         refresh C_T_HIENODE.
         move  y_I_table[] to C_T_HIENODE[].
         refresh y_I_table[].
          CALL FUNCTION 'RSHIER_HIER_SUBTREE_DELETE'
            EXPORTING
              I_HIEID                   = y_wa_/BI0/HCRM_OBJ_ID-HIEID
              I_DEL_IOBJNM              = y_wa_/BI0/HCRM_OBJ_ID-IOBJNM
              I_DEL_NODENAME            = y_wa_/BI0/HCRM_OBJ_ID-nodename
      I_DEL_DATETO              =
           EXCEPTIONS
             FOREIGN_LOCK              = 1
             HIERARCHY_NOT_FOUND       = 2
             CANCELED                  = 3
             OTHERS                    = 4
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          else.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
           delete C_T_HIENODE where nodeid ge '00000002'.
            commit work and wait.
           wait up to 15 seconds.
            CALL FUNCTION 'RSHIER_HIER_CHECK_AND_ACTIVATE'
              EXPORTING
                I_HIEID        = y_wa_/BI0/HCRM_OBJ_ID-HIEID
              IMPORTING
                E_ACTIVE_STATE = y_v_active
              EXCEPTIONS
                CANCELED       = 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.
       wait up to 3 seconds.
            else.
             commit work and wait.
              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
            ENDIF.
          endif.
        endif.
        select *
                from /BIC/PYIOSID
                into table y_i_/BIC/PYIOSID.
        if sy-subrc eq 0.
          sort y_i_/BIC/PYIOSID by /BIC/YIOSID OBJVERS.
        endif.
        if y_i_/BIC/PYIOSID[] is not initial.
          move: '0HIER_NODE' to C_T_HIENODE-IOBJNM,
               'OPP_NUM' to C_T_HIENODE-NODENAME,
               '00000002' to C_T_HIENODE-NODEID,
               '02' TO C_T_HIENODE-TLEVEL,
               '00000001' to C_T_HIENODE-PARENTID,
               '00000001' to C_T_HIENODE-childid.
          append C_T_HIENODE.
       move:
             '0HIER_NODE' to c_t_foldert-IOBJNM,
              'OPP_NUM' to c_t_foldert-NODENAME,
              'E'       to c_t_foldert-langu,
              'OPP_NUM' to c_t_foldert-txtsh.
       append c_t_foldert.
          loop at y_i_/BIC/PYIOSID into y_wa_/BIC/PYIOSID.
            if y_wa_/BIC/PYIOSID-/BIC/YIOSID is not initial.
              if y_wa_/BIC/PYIOSID-/BIC/YIOSID gt 2.
                move: '0CRM_OBJ_ID' to C_T_HIENODE-IOBJNM,
                y_wa_/BIC/PYIOSID-/BIC/YIOOBJ to C_T_HIENODE-NODENAME,
                y_wa_/BIC/PYIOSID-/BIC/YIOSID to y_v_n,
                y_v_n to C_T_HIENODE-NODEID,
                y_wa_/BIC/PYIOSID-/BIC/YIOTLEV TO C_T_HIENODE-tlevel,
                y_wa_/BIC/PYIOSID-/BIC/YIOPLEV to y_v_n,
                y_v_n to C_T_HIENODE-PARENTID.
                append C_T_HIENODE.
              endif.
            endif.
          endloop.
        endif.
    endcase.
    *ROSHIENODE

    Hi!
    I had the same problem during this user exit run.
    When load failed a new dump DBIF_RSQL_INVALID_CURSOR appeared.
    My problem appeared because system was loosing cursor during a SELECT...ENDSELECT run.
    I made my SELECTs smaller and everything become fine.
    SDN gives some notes:
    SAP Note Number: 1124093 70SP17: Extraction terminates with DBIF_RSQL_INVALID_CURSOR
    SAP Note Number: 401847   DBIF_RSQL_INVALID_CURSOR during extraction
    SAP Note Number: 675 Unexpected abends in SELECT loops (COMMIT)
    Hope it helps.

  • USER EXIT CODE In BEX

    Friends,
    In Bex query for an ODS,I need to create a report
    -In the selection screen user has to enter one date value.(DATE1 Varible)
    I need to get the values in the report based on following condition
    ==>DATE1 < DATE2.
    As user defined variable can be used in one charcteristics only,I unable to include Date1 variable in DATE2 Restriction Option.
    I will have to write the user exist for this?.If so pls help me with the user exist code.
    Thanks in advance.
    Soujanya

    Hi,
    Pls create a customer exit variable 'ZPDATE2' for DATE2(Clearing Date) with the code below and use it as apprpriate in the query together with DATE2.
    What the code does is to transfer the value of the variable 'ZPDATE' to the variable 'ZPDATE2' (upon user entry of 'ZPDATE')
    CASE I_VNAM.
      WHEN 'ZPDATE2'. " Characterstic VARIABLE
        IF I_STEP = 2.
    get variable value 'ZPDATE'
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                       WHERE VNAM = 'ZPDATE'. " Current fiscal Period.
            CLEAR : L_S_RANGE.
    *--- fill value ranges
            MOVE : 'I' TO L_S_RANGE-SIGN,
                   'LT' TO L_S_RANGE-OPT.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.    " for After pop-up
    ENDCASE.
    Hope this helps !

  • RFQ User Exit -- Kindly help very urgent

    Hi,
    Can you please tell me , what user exit is used to save RFQ ? While using ME41 to create a RFQ, which user exit is used to Save ?
    Appreciate your help & Will reward with points
    Sorry 2 post the question @ couple of places
    Thanks
    Prithiv

    HI,
    here is list of User exits and BADI.. while saving RFQ in from ME41.
    MEVME001                                WE default quantity calc. and over/ underdelivery tolerance
    MM06E001                                User exits for EDI inbound and outbound purchasing documents
    MM06E003                                Number range and document number
    MM06E004                                Control import data screens in purchase order
    MM06E005                                Customer fields in purchasing document
    MM06E007                                Change document for requisitions upon conversion into PO
    MM06E008                                Monitoring of contr. target value in case of release orders
    MM06E009                                Relevant texts for "Texts exist" indicator
    MM06E010                                Field selection for vendor address
    MMAL0001                                ALE source list distribution: Outbound processing
    MMAL0002                                ALE source list distribution: Inbound processing
    MMAL0003                                ALE purcasing info record distribution: Outbound processing
    MMAL0004                                ALE purchasing info record distribution: Inbound processing
    MMDA0001                                Default delivery addresses
    MMFAB001                                User exit for generation of release order
    MRFLB001                                Control Items for Contract Release Order
    AMPL0001                                User subscreen for additional data on AMPL
    MEQUERY1                                Enhancement to Document Overview ME21N/ME51N
    LMEDR001                                Enhancements to print program
    LMELA002                                Adopt batch no. from shipping notification when posting a GR
    LMELA010                                Inbound shipping notification: Transfer item data from IDOC
    LMEQR001                                User exit for source determination
    LMEXF001                                Conditions in Purchasing Documents Without Invoice Receipt
    LWSUS001                                Customer-Specific Source Determination in Retail
    M06B0001                                Role determination for purchase requisition release
    M06B0002                                Changes to comm. structure for purchase requisition release
    M06B0003                                Number range and document number
    MELAB001                                Gen. forecast delivery schedules: Transfer schedule implem.
    MEFLD004                                Determine earliest delivery date f. check w. GR (only PO)
    MEETA001                                Define schedule line type (backlog, immed. req., preview)
    ME590001                                Grouping of requsitions for PO split in ME59
    M06E0005                                Role determination for release of purchasing documents
    M06E0004                                Changes to communication structure for release purch. doc.
    M06B0005                                Changes to comm. structure for overall release of requisn.
    M06E0005                                Role determination for release of purchasing documents
    M06E0004                                Changes to communication structure for release purch. doc.
    M06B0005                                Changes to comm. structure for overall release of requisn.
    M06B0004                                Number range and document number
    Business Add-in
    ME_PROCESS_COMP                         Processing of Component Default Data at Time of GR: Customer
    ME_PO_SC_SRV                            BAdI: Service Tab Page for Subcontracting
    ME_PO_PRICING_CUST                      Enhancements to Price Determination: Customer
    ME_PO_PRICING                           Enhancements to Price Determination: Internal
    ME_INFOREC_SEND                         Capture/Send Purchase Info Record Changes - Internal Use
    ME_HOLD_PO                              Hold Enjoy Purchase Orders: Activation/Deactivation
    ME_GUI_PO_CUST                          Customer's Own Screens in Enjoy Purchase Order
    ME_FIELDSTATUS_STOCK                    FM Account Assignment Behavior for Stock PR/PO
    ME_DP_CLEARING                          Clearing (Offsetting) of Down Payments and Payment Requests
    ME_DEFINE_CALCTYPE                      Control of Pricing Type: Additional Fields
    ME_COMMTMNT_REQ_RE_C                    Check of Commitment Relevance of Purchase Requisitions
    ME_COMMTMNT_REQ_RELE                    Check of Commitment Relevance of Purchase Requisitions
    ME_COMMTMNT_PO_REL_C                    Check for Commitment-Relevance of Purchase Orders
    ME_PROCESS_PO                           Enhancements for Processing Enjoy Purchase Order: Intern.
    MM_EDI_DESADV_IN                        Supplementation of Delivery Interface from Purchase Order
    MM_DELIVERY_ADDR_SAP                    Determination of Delivery Address
    ME_WRF_STD_DNG                          PO Controlling Reminder: Extension to Standard Reminder
    ME_TRIGGER_ATP                          Triggers New ATP for Changes in EKKO, EKPO, EKPV
    ME_TRF_RULE_CUST_OFF                    BADI for Deactivation of Field T161V-REVFE
    ME_TAX_FROM_ADDRESS                     Tax jurisdiction code taken from address
    ME_REQ_POSTED                           Purchase Requisition Posted
    ME_REQ_OI_EXT                           Commitment Update in the Case of External Requisitions
    ME_RELEASE_CREATE                       BAdI: Release Creation for Sched.Agrmts with Release Docu.
    ME_PURCHDOC_POSTED                      Purchasing Document Posted
    ME_PROCESS_REQ_CUST                     Enhancements for Processing Enjoy PReqs: Customer
    ME_PROCESS_REQ                          Enhancements for Processing Enjoy PReqs: Internal
    ME_PROCESS_PO_CUST                      Enhancements for Processing Enjoy Purchase Order: Customer
    ME_COMMTMNT_PO_RELEV                    Check for Commitment-Relevance of Purchase Orders
    ME_CCP_ACTIVE_CHECK                     BAdI to check whether CCP process is active
    ME_BSART_DET                            Change document type for automatically generated POs
    ME_BAPI_PR_CREATE_02

  • Reports6i - RWRUN60 command line exit codes - Help

    Basically I'm running a process in C# that execute multiple reports through Process.Start() method, once completed I'm checking the Process.ExitCode to verify if it was a successful execution.
    In the arguments for the command line execution I'm passing the ERRFILE=ErrorFile.txt argument to have an error log,.
    Usually after a successful execution, by 'standard' (actually best practice I think), the exit code of an application is 0, but in some reports I'm having exit codes like 4, and no errors are logged in the ERRFILE.
    I've checked the Reference Manual already, but I can't find any reference to command line error/exit level/code.
    If somebody has the RWRUN60.exe process exit codes I'd appreciate it.
    Thanks in advance.

    Please find the below code.
    I am not sure whether it is useful to you.
    DISPLAY=3.37.8.165:0.0;
    export DISPLAY
    #FTP ROUTINE
    ftp_proc()
    { if test -f $output_file/$output_file_web
    then
    a=`wc -l $output_file/$output_file_web| cut -c1-8`
    if [ $a = "" -o $a = "0" ]
    then
    echo 'FTP not required for $output_file_web because it has zero lines'
    $sh_path/crt_arch.sh $output_file $output_file_web $arch_file m
    else
    echo "ftp $output_file_web File"
    $sh_path/ftp_put_bin_script.sh centerpieceprod.motors.ge.com ftprpt test123 \
    $output_file $output_file_web /u03/app/applmgr/homepage/reports \
    $output_file_web $ftp_mode
    $sh_path/crt_arch.sh $output_file $output_file_web $archive_path m
    fi
    else
    echo 'WARNING : $output_file_unix file does not exist'
    fi
    unset a
    ## *** PROCESS STEP 010 ***
    ## Set environment, establish ID/password variables and process variables
    echo 'STEP010 : Setup variables and environment\n'
    echo 'STEP010 : Start Time - \c';date
    #!/bin/ksh
    #1###### Set the enviroment like APPS_SID, STEL_SID ##############
    CONST_ENV=$1                    
    . /var/opt/ge/bin/constell_environment $CONST_ENV
    if [ $? -ne 0 ]
    then
    echo "Environment not set\n"
    exit 1
    fi
    ####### Set the oracle environment for constellar database like NLS_LANG
    ORACLE_SID=$STEL_SID
    . /opt/bin/SET_environment
    ####### Get DB user and Password ########
    USER_PW=`/var/opt/ge/bin/GE_pw $STEL_SID $APPS_DB_USR`
    if [ $? -ne 0 ]
    then
    echo "Failed to get constellar password - "
    exit 1
    fi
    login=$STEL_DB_USR
    passwd=$USER_PW
    instance=$STEL_SID
    PRINTER=ps264laser1
    export PRINTER
    connect_str=$login/$passwd
    ##----------## Establish environment variables
    sh_path=$GESTEL_TOP/bin; export sh_path
    plsql_path=$GESTEL_TOP/plsql; export plsql_path
    tmp_path=$GESTEL_TOP/tmp; export tmp_path
    output_file=$GESTEL_TOP/out; export output_path
    input_path=$GESTEL_TOP/in; export input_path
    log_path=$GESTEL_TOP/log; export log_path
    archive_path=$GESTEL_TOP/archive; export archive_path
    scr_path=$GESTEL_TOP; export scr_path
    idw_name='REPORTS'; export idw_name;
    DISPLAY=3.37.8.165:0.0; export DISPLAY
    # <<<<<<<<<<<<<<<<<< M A I N P R O G R A M >>>>>>>>>>>>>>>>>>>>
    echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
    date "+%D %T Begin of the REPORT process."
    echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
    echo STARTING $0 `date +%c`
    echo $connect_str
    DAY=`date +%a`
    echo day of week is $DAY
    echo start batch jobs always executed
    echo start MSCP$plant programs always executed
    if [ $DAY = Sun -o $DAY = Mon ]
    then
    ## Build temp table containing all purchase orders ##
    sqlplus $connect_str @$plsql_path/exec_pop_tbl.sql
    fi
    # POPULATE THE IN SHIP TABLE AND THE OPEN PO TABLES
    echo "Executing Interface for Reports data\n"
    ## Build temp table containing all purchase orders ##
    sqlplus $connect_str @$plsql_path/create_open_po_report_tbl.sql
    ## Generate Receipt table for reports ##
    echo "Executed Interface for pos Reports data\n"
    sqlplus $connect_str @$plsql_path/crt_idw_rcpt.sql
    ## Look for any errors in HUB_SCHEDULE_TRACE table
    sqlplus $connect_str @$plsql_path/test_error.sql $idw_name $tmp_path
    unset a
    a=`wc -l $tmp_path/test_error.spl | cut -c1-8`
    if test $a != "0"
    then
    echo "\nERROR : Creating tables for reports\n"
    sqlplus $connect_str @$plsql_path/send_mail_msg.sql
    sqlplus $connect_str @$plsql_path/send_prod_support_mail.sql \
    $inf_rado $tmp_path
    exit 100
    fi
    echo '123'
    # FOR EACH PLANT IN THE TABLE,GET PLANT CODE
    echo '124'
    ######## Get password for apps ##########
    ORACLE_SID=$STEL_SID
    . /opt/bin/SET_environment
    unset TNS_ADMIN
    USER_PW=`/var/opt/ge/bin/GE_pw $STEL_SID $STEL_APP_USR`
    if [ $? -ne 0 ]
    then
    echo "Failed to get Apps password - "
    exit 1
    fi
    apps_conn=$STEL_APP_USR/$USER_PW
    echo '\nApps connected '
    echo $login
    echo $passwd
    for x in `sqlplus -s $apps_conn <<-MMM
    set pages 0
    set feedback 0
    SELECT
    TRANSLATE(RPAD(PARAM_VALUE,3),' ','x')||param_desc CODE
    FROM GECV_INT_PARAMS
    where interface_code = 'DLY_REPORTS'
    and param_code = 'Plant code and printer'
    EXIT
    MMM
    `
    do
    plant1=`echo $x | awk '{print substr($0,3,1)}'`
         echo $plant1
    if [ "$plant1" = "x" ]
    then
    plant=`echo $x | awk '{print substr($0,1,2)}'`
    else
    plant=`echo $x | awk '{print substr($0,1,3)}'`
    fi
    echo $plant
    box=`echo $x | awk '{print substr($0,4,length($0))}'`
    echo $box
    DAY=`date +%a`
    echo day of week is $DAY
    echo 'Start Time - \c';date
    echo start MSCP$plant programs executed on sunday or monday
    #DAILY RECEIVING FOR EACH PLANT
    echo $output_file
    #echo ' The Printer Name is : '
    #echo $PRINTER
    ORACLE_HOME=/u04/app/applmgr/DFWPR107ora/8.0.6
    rwrun60c report=$sh_path/rcvd1.rdf userid=$login/$passwd@$instance \
    destype=file desname=$output_file/$plant'rcvd1.txt' batch=yes ctrplt=$plant \
    pagesize=132x66 desformat=wide180
    output_file_unix=$plant'rcvd1.txt'
    output_file_web='rcvd1'$plant'.doc'
    # Verify the day of the week to do put or append
    if [ $DAY = Sun -o $DAY = Mon ]
    then
    ftp_mode=append
    else
    ftp_mode=put
    fi
    $sh_path/report_ascii_to_rtf.sh $output_file_unix $output_file_web
    ftp_proc
    #PLANT CODE PHL THEN RUN DIFF REPORTS
    if [ $plant = PHL ]
    then
    REP_POPLT=phl_poplt.rdf
    REP_POPD=phl_popd.rdf
    REP_POANA1=phl_poana1.rdf
    REP_POANA2=phl_poana2.rdf
    else
    REP_POPLT=poplt.rdf
    REP_POPD=popd.rdf
    REP_POANA1=poana1.rdf
    REP_POANA2=poana2.rdf
    fi
    echo $REP_POPLT
    #OPEN PURCHASE ORDERS
    ORACLE_HOME=/u04/app/applmgr/DFWPR107ora/8.0.6
    rwrun60c report=$sh_path/$REP_POPLT userid=$login/$passwd@$instance \
    destype=file desname=$output_file/$plant'poplt.txt' batch=yes ctrplt=$plant \
    pagesize=132x66 desformat=wide180
    output_file_unix=$plant'poplt.txt'
    output_file_web='poplt'$plant'.doc'
    ftp_mode=put
    $sh_path/report_ascii_to_rtf.sh $output_file_unix $output_file_web
    ftp_proc
    #PAST DUE PURCHASE ORDERS
    ORACLE_HOME=/u04/app/applmgr/DFWPR107ora/8.0.6
    rwrun60c report=$sh_path/$REP_POPD userid=$login/$passwd@$instance \
    destype=file desname=$output_file/$plant'popd.txt' batch=yes ctrplt=$plant \
    pagesize=132x66 desformat=wide180
    output_file_unix=$plant'popd.txt'
    output_file_web='popd'$plant'.doc'
    ftp_mode=put
    $sh_path/report_ascii_to_rtf.sh $output_file_unix $output_file_web
    ftp_proc
    #PURCHASE ORDERS BY ANALYST
    ORACLE_HOME=/u04/app/applmgr/DFWPR107ora/8.0.6
    rwrun60c report=$sh_path/$REP_POANA1 userid=$login/$passwd@$instance \
    destype=file desname=$output_file/$plant'poana1.txt' batch=yes ctrplt=$plant \
    pagesize=132x66 desformat=wide180
    output_file_unix=$plant'poana1.txt'
    output_file_web='poana1'$plant'.doc'
    ftp_mode=put
    $sh_path/report_ascii_to_rtf.sh $output_file_unix $output_file_web
    ftp_proc
    # PURCHASE ORDER BY PART
    # skl.run model for oracle reports executables
    ORACLE_HOME=/u04/app/applmgr/DFWPR107ora/8.0.6
    rwrun60c report=$sh_path/$REP_POANA2 userid=$login/$passwd@$instance \
    destype=file desname=$output_file/$plant'poana2.txt' batch=yes ctrplt=$plant \
    pagesize=132x66 desformat=wide180
    output_file_unix=$plant'poana2.txt'
    output_file_web='poana2'$plant'.doc'
    ftp_mode=put
    $sh_path/report_ascii_to_rtf.sh $output_file_unix $output_file_web
    ftp_proc
    echo start MSCP$plant programs always executed
    if [ $DAY = Sun -o $DAY = Mon ]
    then
    ## Build temp table containing all purchase orders ##
    # skl.run model for oracle reports executables
    # RECEIVING LOG BY WEEK
    ORACLE_HOME=/u04/app/applmgr/DFWPR107ora/8.0.6
    rwrun60c report=$sh_path/rcvw1.rdf userid=$login/$passwd@$instance \
    destype=file desname=$output_file/$plant'rcvw1.txt' batch=yes ctrplt=$plant \
    pagesize=132x66 desformat=wide180
    output_file_unix=$plant'rcvw1.txt'
    output_file_web='rcvw1'$plant'.doc'
    ftp_mode=put
    $sh_path/report_ascii_to_rtf.sh $output_file_unix $output_file_web
    ftp_proc
    # RECEIVING LOG BY ACCOUNT
    ORACLE_HOME=/u04/app/applmgr/DFWPR107ora/8.0.6
    rwrun60c report=$sh_path/wacsum.rdf userid=$login/$passwd@$instance \
    destype=file desname=$output_file/$plant'wacsum.txt' batch=yes ctrplt=$plant \
    pagesize=132x66 desformat=wide180
    output_file_unix=$plant'wacsum.txt'
    output_file_web='wacsum'$plant'.doc'
    ftp_mode=put
    $sh_path/report_ascii_to_rtf.sh $output_file_unix $output_file_web
    ftp_proc
    # COMMITTED DOLLAR DETAIL REPORT
    ORACLE_HOME=/u04/app/applmgr/DFWPR107ora/8.0.6
    rwrun60c report=$sh_path/cmtdet.rdf userid=$login/$passwd@$instance \
    destype=file desname=$output_file/$plant'cmtdet.txt' batch=yes ctrplt=$plant \
    pagesize=132x66 desformat=wide180
    output_file_unix=$plant'cmtdet.txt'
    output_file_web='cmtdet'$plant'.doc'
    ftp_mode=put
    $sh_path/report_ascii_to_rtf.sh $output_file_unix $output_file_web
    ftp_proc
    # COMMITTED DOLLAR SUMMARY REPORT
    ORACLE_HOME=/u04/app/applmgr/DFWPR107ora/8.0.6
    rwrun60c report=$sh_path/cmtsum.rdf userid=$login/$passwd@$instance \
    destype=file desname=$output_file/$plant'cmtsum.txt' batch=yes ctrplt=$plant \
    pagesize=132x66 desformat=wide180
    output_file_unix=$plant'cmtsum.txt'
    output_file_web='cmtsum'$plant'.doc'
    ftp_mode=put
    $sh_path/report_ascii_to_rtf.sh $output_file_unix $output_file_web
    ftp_proc
    fi
    done
    echo end MSCP$plant programs always executed

  • User Exit/BADI name required for changing schedule lines (VA01 and VA02)

    Hi all,
    Please tell me an exit or badi for modifying VBEP date i.e. VBEP-EDATU which triggers for a change in any of the following fields:
    1. VBAK-KUNNR;   2. VBAK-VDATU  and   3. VBAP-WERKS
    Currently I tried using USEREXIT_MOVE_FIELD_TO_VBEP and FORM USEREXIT_CHECK_VBEP but nothing is giving me the results as desired.
    Pls help, points will b awarded for helpful ans.
    thanks
    Sangharsh

    Have a look at below link which gives details related to user exits in VA01/VA02.
    http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • User-exit or BADI required for changing Plant-sp.matl status in MM02

    Hi Folks,
    Our user requirement is when standard price is 0, we should assign value 'Z4' to Plant-sp.matl status(in MRP1 and Costing1 tabsin MM02) . Could any one suggest me a user-exit name or a BADI name to change Plant-sp.matl status in MM02. <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Regards,
    Ramineni.
    Edited by: Alvaro Tejada Galindo on Aug 22, 2008 5:59 PM

    hi,
    u can use it.
    u can use this exit also.
    MGA00001
    EXIT_SAPLMGMU_001
    i hav done  this coding in this exit and it is working.
    not same of ur requirement but try somthing like this.
    tables : mara,makt.
    data : it_mara type mara occurs 0 with header line,
           it_makt type makt occurs 0 with header line,
           it_marc type marc occurs 0 with header line,
           it_mbew type mbew occurs 0 with header line.
           select * from mara into table it_mara .
           if it_mara[] is not initial.
           select * from makt into table it_makt for all entries
           in it_mara where matnr = it_mara-matnr.
           endif.
          loop at it_makt.
          if stext-maktx = it_makt-maktx.
           if it_makt[] is not initial.
          select * from marc into table it_marc for all entries
          in it_makt where matnr = it_makt-matnr.
          select * from mbew into table it_mbew for all entries
          in it_makt where matnr = it_makt-matnr.
           endif.
        read table it_marc with key matnr = it_makt-matnr.
          if wmarc-werks = it_marc-werks.
       read table it_mbew with key matnr = it_makt-matnr.
       if wmbew-bwtar = it_mbew-bwtar.  " 'VAL_OPEX' or wmbew-bwtar = 'VAL_CAPEX'.
          message e001(zgm_msg).
            endif.
            endif.
            endif.
            clear it_makt.
            clear it_marc.
            clear it_mbew.
            endloop.

Maybe you are looking for

  • How can I get my text into a wedge shape (without losing quality)?

    I'm using PS CS3... So the effect I'm going for is like what you would get if you had an image, and you do Edit > Transform > Distorted it, moving the lower right corner towards the center. The problem is that Distort is not an option for text layers

  • Error when editing or creating a new form...HELP!!!

    Here is part of the error message from Adobe LiveCycle: Adobe LiveCycle Designer ES has encountered a problem and needs to close. We are sorry for the inconvenience. Please tell Microsoft about this problem. Error signature AppName: formdesigner.exe

  • Workflow errors in Purchase Requisition

    Hello SAPiens, I have used standard workflow WS00000038 for item release PR. Assigned Agents and did all basic stuff in Spro but workflow is not getting triggered and purchase req docs are shown in my outbox under Documents folder with status as "wor

  • Mirroring issue with retina 5k

    i have bought Imac retina 5k and i've got latest apple tv.  The problem is when i connect my mac to apple tv, its just showing black screen  but when i airplay from itunes it plays ok.  I tried disconnecting the bluetooth and i also updated apple tv

  • How is someone able to pair their Arc Touch Mouse with my Macbook Pro?

    I had this happen a few times now and it's both annoying me and scaring me at the same time.  I am sitting in my office working away and then all the sudden, my mouse starts moving around randomly. I quickly go up to the Bluetooth menu, and I see the