VARIABLES USING USER EXIT

Hi,
I am trying to populate a fiscal year period (from and to) dynamically  using a user exit variable. The fiscal year selection is for data slicing at the planning area.
Anyone has an idea of how I can achieve this ?  Some function module lines will be appreciated.
Regards,
uche

Hi Uchenna,
i don't clearly understand your scenario, but i there's a great HOWTO for user exit variable. If you specify your mail i can send you.
However i have created an user exit var filled with the entries on a customer table, follows the code:
FUNCTION z_sem_bps_slice_comp.
""Interfaccia locale:
*"  IMPORTING
*"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA
*"     REFERENCE(I_VARIABLE) TYPE  UPC_Y_VARIABLE
*"     REFERENCE(I_CHANM) TYPE  UPC_Y_CHANM
*"     REFERENCE(ITO_CHANM) TYPE  UPC_YTO_CHA
*"  EXPORTING
*"     REFERENCE(ETO_CHARSEL) TYPE  UPC_YTO_CHARSEL
  CONSTANTS:
*l_source_var TYPE upc_y_variable VALUE 'SOURCE',
*l_source_area TYPE upc_y_area VALUE '4PERF001',
  l_use_restricted_values TYPE boole-boole VALUE ' ',
  l_buffer_call TYPE boole-boole VALUE 'X'.
  DATA:
  l_type LIKE upc_var-vartype,
  lto_varsel_all TYPE upc_yto_charsel,
  lto_varsel TYPE upc_yto_charsel,
  lto_var TYPE upc_yto_charsel,
  lto_chanm TYPE upc_yto_cha,
  z_noslice(1) TYPE n.
BREAK-POINT.
  DATA: ls_varsel TYPE upc_ys_charsel,
        lt_chavl TYPE STANDARD TABLE OF zcompslice,
        ls_chavl TYPE zcompslice.
HERE I FILL LT_CHAVL WITH THE VALUE IN THE CUSTOMER TABLE
  CLEAR:lt_chavl,ls_chavl,z_noslice.
  REFRESH:lt_chavl.
  SELECT zsocieta FROM zcompslice INTO TABLE lt_chavl
  WHERE zflag = 'X'.
  IF sy-subrc <> 0.
    z_noslice = 1.
  ENDIF.
HERE YOU FILL THE "USER EXIT VAR" WITH PROPER VALUE EXTRACTED ABOVE, LT_VARSEL IS THE TABLE FOR THE OUTPUT VALUE OF THE USER EXIT VARIABLE
  IF z_noslice EQ 1.
    ls_varsel-seqno = '0000'.
    ls_varsel-chanm = '0COMP_CODE'.
    ls_varsel-opt = 'EQ'.
    ls_varsel-sign = 'I'.
    ls_varsel-low = '#'.
    APPEND ls_varsel TO eto_charsel.
  ELSE.
    ls_varsel-seqno = '0000'.
    ls_varsel-chanm = '0COMP_CODE'.  
    ls_varsel-opt = 'EQ'.
    ls_varsel-sign = 'I'.
    LOOP AT lt_chavl INTO ls_chavl.
      ls_varsel-seqno = ls_varsel-seqno + 1.
      ls_varsel-low = ls_chavl-zsocieta.
      APPEND ls_varsel TO eto_charsel.
    ENDLOOP.
  ENDIF.
ENDFUNCTION.
Hope it helps
Fabio

Similar Messages

  • Formula Variable with User Exit....Problem

    Hi
      My requirment is to create a Formula Variable on User Exit that will give me Current Cal Year...so that i can use that vale in Formulas
    Created Formula Variable with processing Type Customer Exit single Value,Mandator and Unchecked the Variable input ready
    The below code in CMOD
    WHEN 'XXXXXXX'.
    Year  = sy-datum(4).
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = Year.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND l_s_range TO e_t_range.
    But when i execute the query i am getting the below error
    No value could be determined for variable xxxxxxx.
    Incorrect call of OLAP layer CL_RSR_OLAP; error in BW-BEX-ET
    Diagnosis
    This error diagnosis is specific only to the variables 0P_FVAEX or 0P_CTPCA !
    Termination message BRAIN 632 appears:
    Could not determine value for variable 0P_FVAEX (or 0P_CTPCA).
    WHAT WRONG I AM DOING...please update me

    Use the code:
    WHEN 'XXXXXXX'.
         IF i_step = 2.
              Year = sy-datum(4).
              CLEAR L_S_RANGE.
              L_S_RANGE-HIGH = Year.
              L_S_RANGE-SIGN = 'I'.
              L_S_RANGE-OPT = 'EQ'.
              APPEND l_s_range TO e_t_range.
         ENDIF.
    Let me know, if it is work or not!
      - Balajee Kannan

  • Text Variable using Customer Exit .

    Hello Friends. I have a requirement to create Text Variable using Customer Exit . So I created the Text Variable as "ZVRBMS" and assigned that with YTD &ZVRBMS& in the Structure of Query Desigener . so that Out put will YTD AUTO
    OR YTD RETAIL
    Now this Auto And Retail comes from Version that user choose via variable ZFIBMSVER IN User Promt. if ZFIBMSVER = 10
    then ZVRBMS = auto . and if ZFIBMSVER = 20
    then ZVRBMS = RETAIL
    Please correct my ABAP code in customer exit and let me know to make this work
    when 'ZVRBMS'.
        if I_STEP = 2.
          clear LOC_VAR_RANGE.
          loop at I_T_VAR_RANGE into LOC_VAR_RANGE.
            if LOC_VAR_RANGE-VNAM = 'ZFIBMSVER'.
          if SY-SUBRC = 0 OR LOC_VAR_RANGE-LOW = '10'.
            L_S_RANGE-LOW = 'AUTO'.
          elseif LOC_VAR_RANGE-LOW = '20'.
            L_S_RANGE-LOW = 'RETAIL'.
          L_S_RANGE-SIGN ='I'.
          L_S_RANGE-OPT  = 'EQ'.
          append L_S_RANGE to E_T_RANGE.
      endif.
      endif.
      exit.
          endloop.
    endif.
    Thanks
    Soniya

    The code should be:
    when 'ZVRBMS'.
    if I_STEP = 2.
    clear LOC_VAR_RANGE.
    loop at I_T_VAR_RANGE into LOC_VAR_RANGE.
    if LOC_VAR_RANGE-VNAM = 'ZFIBMSVER'.
    if LOC_VAR_RANGE-LOW = '10'.
    L_S_RANGE-LOW = 'AUTO'.
    elseif LOC_VAR_RANGE-LOW = '20'.
    L_S_RANGE-LOW = 'RETAIL'.
    endif.
    L_S_RANGE-SIGN ='I'.
    L_S_RANGE-OPT = 'EQ'.
    append L_S_RANGE to E_T_RANGE.
    endif.
    exit.
    endloop.
    endif.

  • Change gl account in MIGO by using user exit

    Dear all,
    Could you tell me how to use user exit to change the gl account in MIGO?
    I have searched in SDN and found some code.
    In user exit: MBCF0002 ( EXIT_SAPMM07M_001 ).
    FIELD-SYMBOLS <F2> TYPE ANY."Field Symbol for the GL ACCOUNT
    DATA : W_KONTO_NAME(50) VALUE '(SAPMM07M)DM07M-KONTO'.
    ASSIGN (W_KONTO_NAME) TO <F2>.
    MOVE "GLACCOUNT" TO <F2>.
    "GLACCOUNT" is the new GL account you want to change.
    but thecode doesn't work, it can not change the BSEG-HKONT.
    Could you help me solve this problem?
    Many thanks
    Message was edited by:
            Chen Zhonghua

    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.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    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

  • How to update old records of LIPS used user exit MV50AFZ1

    To All Experts,
    I have used User Exit MV50AFZ1 and in this user exit i updated the fields
    USEREXIT_MOVE_FIELD_TO_LIPS.
    LIPS-ETENR = VBEP-ETENR.
    Its working fine for new VL0N1 t-code, but what about old recods of LIPS table ?
    How to update old records ? Pl. guide me.
    Yusuf

    Hi Yusuf,
    See SAP Note 415716 - User exits in delivery processing, it explain how these userexits work and cautions that you must have.
    Regards
    Eduardo

  • How to set ENV variable using user profile in solaris 10 while using ssh

    Hi,
    Please help me in setting the environment variable using user profile file while using ssh method of connection (Can I use the same ~/.profile file?)
    when i am logging in using the telnet, the environment variable is automattically set, but not when I am using SSH.
    Thanks in advance
    ushas symon

    Please list your .profile and a ls -la of your home directory.
    also list the result of env after your logged through telnet and ssh.
    There should be no difference - it depends mostly on your login shell which startup script it executes. ksh uses .profile, bash: bash_profile then .profile.

  • Formula variable with User Exit

    Hi,
    Can we create a Formula Variable of processing type USER EXIT...which will display a constant Value Y
    Any syntax would be helpful
    Thanks

    Hi,
    check this for formula variables with user exits;
    http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    http://sap.ittoolbox.com/groups/technical-functional/sap-bw/customer-exit-to-derive-formula-variable-to-text-variable-sap-bw-35-3030684
    Also Check the issues and solution :
    Formula Variable with User Exit....Problem
    Thanks
    Hemav

  • Can i use user exits

    Hi,
    Can anybody tell me if i can use user exits for not applying cost centre fields for Assets and liabilites gl a/c when we post transcations in fb60 0r fb50 f-22 etc
    warm regards
    Manjunath

    hi Manjunath,
    you can try to set up a substitution and see if it is working. On the other hand P/L accounts must have a CO object by posting, of course cost center is just one option.
    ec

  • MIRO using user exit  EXIT_SAPLFYTX_USER_001

    We are using user exit EXIT_SAPLFYTX_USER_001 for both ME21N and
    MIRO.  ME21N works fine in that we added an item number field to I_INPUT_USER  and it populates with the current item number on the po so we are able to get the gl account from EKKN.  The problem is for tcode
    MIRO.  The data in the I_INPUT_USER is all header data.  There is no material number, qty, item number, etc.  So we cannot go back to the po/item to get the gl account number to pass to vertex.  I used note 302998 to try and add fields EVRPT and EVRTN to the  I_INPUT_USER but they are not populated and when I look at KOMP those fields are also blank there. 
    For MIRO the I_INPUT_USER-KPOSN always has a value of 999999 where for ME21N it has the actual item that it is processing on the po.  I have looked and tried multiple OSS notes and nothing seems to work.  It seems that the MIRO transaction will only pass header data to vertex.  Any help is greatly appreciated!!!! thanks  - deb

    Martha - I did have an OSS note out there but I found the solution for us.
    To get the line item info in I_INPUT_USER and I_TAX_ITEM_INPUT for MIRO we had to go to transaction OBCO and turn on line item processing for our external tax system.  As for your question  - the header information should be in I_TAX_ITEM_INPUT and in I_TAX_HEADER_INPUT.  the I_INPUT_USER is for users to add their own fields that are currently in KOMP.  Look at OSS note 302998 it explains how to extend the I_INPUT_USER  and how to export and import data that you might need.  If this note does not help - go to OSS and do a search on EXIT_SAPLFYTX_USER_001 and some of the other notes should help you. thanks - deb

  • How to use User exit for MM_MATBEL

    Hi
    I want to exclude some material documents while archiving a range of material document through archive Object MM_MATBEL.
    Can you please suggest how to use user exit for this to exclude the material document while archiving.
    Please brief me details.
    Thanks,
    Debadatta

    Hi Debadatta,
    Welcome to SDN.
    Have you looked report program <b>RM07MAAU</b> (Report for Material Document Archiving)?
    Hope this will help.
    Regards,
    Ferry Lianto

  • Can I use User Exit u2013 IWOC0004 u2013 Change Single-Level List for TCODE IW37N?

    Hi All,
    Can I use User Exit u2013 IWOC0004 u2013 Change Single-Level List for TCODE IW37N?
    In documentation of the User Exit I can see that I  can use this user Exit for IW37(Program - RIAFVC20) , but I want to use this for IW37N (RIH_ORDER_OPERATION_LIST).
    Please tell me is it possible.
    With best regards,
    Narendra

    Hi Pete Sir,
           I am on 4.7 , how to work with it. I am going to use screen exit IW0110018 and I want to add User fields in the IW37N.
    Thanks with best regards,
    Narendra

  • Using user exit. ( LVMPTZZ, LVKMPFZ1). used in Credit Management

    Hi
    How to find  using user exit. ( LVMPTZZ, LVKMPFZ1). used in Credit Management .
    Plz provide path
    Regards
    Rohit

    Hi,
    You can find exits through transactions# SMOD & CMOD also.
    Regards
    Chandra

  • Creating delivery, can I check the sales order's field using user-exit or ?

    Hi dear.
    When I create a delivery in VL01N or other transactions, I want automatically to check the sales order's some field and to decide whether create or not.
    Can I use user-exit for that?
    Or other solutions is there?
    Thanks regards

    Yes your requirement can be achieved thru a User Exit.
    There are many User Exits available in Delivery as listed in the link below:
    https://wiki.sdn.sap.com/wiki/display/ERPLO/SDUserexits
    The selection of necessary User Exit is based on your specific requirement.
    Also if you want to check some feild of Sales Order whether it is completed or not, then you can also use Incompletion Procedure in Sales Order, which will make sure that no Sales Order is saved until the end-user enter data in those feilds.
    Hope this helps...
    Thanks,
    Jignesh Mehta

  • How to use User Exit for SD...

    Hi there,
    My client's requirement is to block the overall status of the Sales Order header under status tab to be blocked when user r-enters a new scheduled date in the "First Date" column in the SO.
    When they goto VA02, & put a new date it must automatically put a delivery block in the header as well as make the order header status to be blocked.
    I see the “First date” field in the SO is in a Structure “RV45A”, the field name is ETDAT.
    Can you let me know how to use User exit MV45AFZZ?
    When doing it, it must put the Delivery block in table VBAK – LIFSK.
    Rgds,
    Pri

    Hi Debadatta,
    Welcome to SDN.
    Have you looked report program <b>RM07MAAU</b> (Report for Material Document Archiving)?
    Hope this will help.
    Regards,
    Ferry Lianto

  • Geography based industry scenario which can be implemented using user exit

    Hi All,
    I am searching for a geography based industry scenario which can be implemented using user exit strategy.
    Please let me know me if anyone knows about any such scenario.
    Thanks & Regards,
    Pranjali.

    Hi Amith,
                   IDOC configured throgh CHANGE pointers.So no need to worry about IDOCS and all.My work was trigger idocs by user exits.Wen  ever i change venodr no.. idocs shoud be triger.
                 Now my question was Insted of going transaction( from there we can  go to debuging mode) i want to check this Exit by RBDMIDOC programe(ofter excute this programe and give Message type as CREMAS,from there i want to go debugging mode).
    Just now i checked,i put breakpoint in Include programe(INCLUDE ZXF05U01) and excute from XK01,it goes to debuging mode,so its fine.But i want triger from RBDMIDOC programe.Ofter excute RBDMIDOC programe,we can enter CREMAS.From there i want to go debuging mode.
    Pls help me,
    Thanks

Maybe you are looking for

  • Log SSP and Authorization Errors

    I asked for this on the feature request website "It seems that apex does not log SSP errors or Authorization errors, or if it does, they are no available in an apex view. For example, if a user changes the page number in the url to a page he is not a

  • Installation Error for SQL Server 2008 R2 on windows vista

    2014-09-20 07:49:26 Slp: ---------------------------------------- 2014-09-20 07:49:26 Slp: Setting: TIMESTAMP 2014-09-20 07:49:26 Slp: Value specified: 20140920_074907 2014-09-20 07:49:26 Slp: New setting source: CommandLine; previous setting source:

  • Business Object "Service Order" not found in Web Service Tool

    Dear Experts, We're trying to create a web service for Service Order via Web Service Tool, but we can't find the business object "Service Order" there. How to step to reproduce the problem: 1. Logon CRM WEBUI with the business role ITSERVICEPRO. (or

  • Output side by side.....!!!!

    Hi, Can we show output side by side? In ALV or Classic we pass the values of internal table and it shows output row wise,is it possible to show it side by side? Selection Screen should be on BNK. If user inputs BNK : 001-012 the all three sets of val

  • Rename mail attachments

    Hi, How can I rename mail attachments using the subject line of the email as part of the name.  I have filtered the emails to a specific folder and ceated an automator action to extract the attachment and move it to another folder then rename it but