User exit-Actual day

Hi all,
I need the ABAP code to have the actual day in the query's variable, could you help me with this, 'cause i have no idea for this code and i need the actual day in one column..
Thanks for your help
Regards
Giovanni

Hi, i have the ABAP code in the user exit, but it doesn't work.
Could you help me with that?
DATA: L_S_RANGE TYPE RSR_S_RANGESID,
      L_S_VNAM  LIKE RRRANGEEXIT, "OCCURS 0 WITH HEADER LINE.
      VARIABLE  LIKE RRRANGEEXIT,
      VAR_RANGE LIKE I_T_VAR_RANGE.
IF I_STEP EQ 1.
  CASE I_VNAM.
    WHEN 'ZDIAACT1'.
      MOVE: SY-DATUM     TO L_S_RANGE-LOW,
            'I'          TO L_S_RANGE-SIGN,
            'EQ'         TO L_S_RANGE-OPT.
      APPEND L_S_RANGE TO E_T_RANGE.
  ENDCASE.
ENDIF.
Thanks a lot
Regards
Giovanni

Similar Messages

  • User exit for MD01

    Hii
    I am doing user exit for MD01 i am finding difficulty in writing the code .
    I want materials haveing MRP Type : 'V1'.
    I wrote code for it but its not working ..
    TABLES: t024d,
    mara,
    marc .
    TABLES : t023t.
    DATA: v_dispo TYPE dispo,
    v_matkl TYPE matkl.
    IF user_key = 'ZME'.
    IF user_par = SPACE.
    MESSAGE e000(zmessage) WITH 'User Parameter should not be blank'.
    ENDIF.
    SELECT SINGLE * FROM t024d INTO t024d
    WHERE dispo = user_par.
    IF sy-subrc ne 0.
    MESSAGE e000(zss) WITH 'Please Check the MRP controller number'.
    exit.
    ENDIF.
    SELECT SINGLE * FROM t024d INTO t024d
    WHERE werks = mt61d-werks AND
    dispo = user_par.
    IF sy-subrc = 0.
    SELECT SINGLE dispo FROM marc INTO v_dispo
    WHERE dismm = 'V1' and
    *matnr = mt61d-matnr
    *AND
    werks = mt61d-werks.
    *and DISMM = 'VB'.
    IF sy-subrc EQ 0.
    *CHECK v_dispo user_par.
    no_planning = 'X'.
    ENDIF.
    ENDIF.
    CLEAR v_dispo.
    ELSEIF user_key = '002'.
    SELECT SINGLE * FROM t023t INTO t023t
    WHERE matkl = user_par.
    IF sy-subrc eq 0.
    MESSAGE e000(zss) WITH 'Invalid material group no.' user_par.
    ENDIF.
    SELECT SINGLE matkl FROM mara INTO v_matkl
    WHERE matnr = mt61d-matnr.
    IF v_matkl = user_par.
    no_planning = 'X'.
    ENDIF.
    ENDIF.
    Please help me ....

    Hi,
    Please check if this user exit actually is triggered from MD01.
    I could not find it.
    Reg,
    Raj

  • User Exit Formula Variable - to calculate #days of any month

    Hello Team,
    I need a column in my report layout which shows the #days of any month entered by the user. User entry 01.2014 to 03.2014 report should have 31 28 & 31 according to the Calendar month in the rows.
    To achieve this I'm using a user exit formula variable in my local calculation. An Optional Interval User Entry variable on CALMONTH is also put in at the filter section.
    I created a CLASS with 2 methods CONSTRUCTOR( vNam = 'ZC2C_DSONWDAYS') & GET_VALUES. We may also use FM /OSP/GET_DAYS_IN_MONTH but i need the code because I failed terribly.
    GET_VALUES method code:
    if i_step = 2.
       DATA: wa like line of i_t_var_range[].
       DATA: L_V_INDICATOR TYPE SCAL-INDICATOR.
       data: begin of ccrange ,
               iobjnm(30) type c,
                 sign(1),
                  opt(2),
                  low(7) type c,
                 high(7) type c,
             end of ccrange.
      data: l_s_range type rrrangesid,
            no_of_wrkdays type i value 0,
            startdate     type d,
            enddate       type d,
            startmth(2)   type c,
            endmth(2)     type c,
            startyr(4)    type c,
            endyr(4)      type c,
            endday(2)     type c,
            leapyear      type i value 0,
            dayofmth      type syst-datum.
    DATA:  day           type SCAL-INDICATOR.
      loop at i_t_var_range into wa.
        if wa-iobjnm = '0CALMONTH'.
           ccrange-sign = wa-sign.
           ccrange-opt = wa-opt.
           ccrange-low = wa-low.
           ccrange-high = wa-high.
           exit.
        endif.
      endloop.
      startyr  = ccrange-low+0(4).
      startmth = ccrange-low+4(2).
      endyr    = ccrange-high+0(4).
      endmth   = ccrange-high+4(2).
      concatenate startyr startmth '01' into startdate.
    * determine last day of the end month
      if endmth = '02'.
         leapyear = endyr mod 4.
         if leapyear = 0.
            endday = '29'.
         else.
            endday = '28'.
         endif.
      elseif ( endmth = '04' or endmth = '06' or endmth = '09' or endmth = '11' ).
           endday = '30'.
      else.
           endday = '31'.
      endif.
      concatenate endyr endmth endday into enddate.
      dayofmth = startdate.
    IF startmth <= endmth.
       startmth = startmth+1.
    ENDIF.
    * do it for all days in space of time
       WHILE dayofmth <= enddate.     "to date
         CALL FUNCTION '/OSP/GET_DAYS_IN_MONTH'
         EXPORTING
           input = startmth
         IMPORTING
           output = no_of_wrkdays.
           CLEAR l_s_range.
           l_s_range-sign = 'I'.
           l_s_range-opt = 'EQ'.
           l_s_range-low = no_of_wrkdays.
       append l_s_range to e_t_range.
           startmth = startmth + 1.
           CONCATENATE startyr startmth '01' into dayofmth.
        ENDWHILE.
    endif.
    endmethod.

    Hi Vasavi,
    1)  Create a FV to calculate no.of days  like below, with calmonth in ref characteristics :
    2. If you see number of days is an attribute of calmonth. Please enter that as below :
    3. Create a formula with above variable and make sure calmonth is added in the row.
    Its giving output like this :
    I hope this will help you.
    Thanks,

  • User exit for actual dates in CJ20N

    I have a req,  When i start any activity i enter date in user field in actual dates as displayed in below pic
    Now when i enter date in user field it should be copied to actual  start date field in dates tab as shown in below pic
    Kindly suggest the user exit needed for it
    Best Regards,
    Nitesh H Panchal

    Hi Nilesh,
    Try this with Substitution & Validation rule.
    You want AFVGD-ISDD should have same detail as of AFVGD-USR08.
    However with the help ABAPer you can achieve this easily.
    Regards,
    Pranav

  • User exit for checking Actual dates before TECO of WBS element

    Hi,
    Is there a user exit in PS we can use that checks to see if Actual dates have been entered on the WBS element before the WBS element is set to TECO?

    Hi,
    I am not sure on this as i havent checked it. You can explore and check if defining validations can serve  your purpose.
    Best Regards,
    Gokul

  • How to change actual quantity in Outbound delivery User exit

    hi all ,
    My requirement is to change the quantity of outboud delivery according to some logic .but my issue is after writing the code MV50AFZ1 , system is not considering the quantity changed by me , it is taking the quanity directly from sales order confirmed quantity .
    please anybody help on this issue  .

    Hi,
    Under which user exit have your written your code:
    USEREXIT_MOVE_FIELD_TO_LIKP or
    USEREXIT_MOVE_FIELD_TO_LIPS or
    USEREXIT_SAVE_DOCUMENT or
    USEREXIT_SAVE_DOCUMENT_PREPARE
    I think if you write your code within the USEREXIT_SAVE_DOCUMENT, it should work.
    Regards,
    Subramanian

  • User exit for display of first day in report

    Hello friens,
    I have to design a query in which my user want to see following way
    Billed Packs----
    Week1   Week 2...................week 52
    packA
    packB
    Now user want to see the aggregated bill packs for each week.
    And user does not want to see Week numbers , for e.g.
    Billed Packs----
    01/20xx  02/20xx 03/20xx  ....................
    packA
    packB
    User want to see the Start date of that week which means Date of Monday for each week instead.
    Now it is not defined, for how much weeks user want to see , so i created a interval range variable for Week selection.
    Now from previous posts i learnt that to display Start date of Monday for each week I HAVE TO CREATE A USER EXIT.
    And also create text variable which then i will be using in Description to do the same.
    Can you please send me STEP BY STEP for same.
    Can all of you please send me Code for creating user exit
    Can you please send me some sample codes and sample documents for the same.
    My email id is [email protected]
    Points will be awarded.

    As you said "<i>Now it is not defined, for how much weeks user want to see , so i created a interval range variable for Week selection</i>.", how can you decide about the number of KFs in the structures?? (Because u'll have to create as many text variables as the no. of weeks)
    <b>But if that is not the case, following are the steps -
    1. Go to cmod to create customize project.
    2. Click on Enhancement Assignment & key in 'RSR00001'
    3. Click on Components & double click on the function exit EXIT_SAPLRRS0_001.
    4. Here you write the above code before the "Endcase" statement.
    5. Repeat the above code for rest of the text variables with slight modification as follows...
    insert modification between function module call & filling l_s_range9  --</b>i.e.
    <i>CALL FUNCTION 'WEEK_GET_FIRST_DAY'
      EXPORTING
        WEEK               = wa9-low
    IMPORTING
       DATE               =  l_fst_day
    EXCEPTIONS
      WEEK_INVALID       = 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.</i>
    <b>data: n_fst_day type sy-datum.
    clear n_fst_day.
    n_fst_day = l_fst_day + 8.
    l_s_range9-low =  n_fst_day.</b>
    <i>l_s_range9-sign   = 'I'.</i>
    Please assign the points if this is useful.

  • User exit about change item's goods issue day in transaction code VA01

    Hi everyone.
    Can someone give me some advice how to change item's
    goods issue by user exit?
    thank you in advanced.
    Regards.
    Eric xu.

    Can u be more clear.
    This are the exits used for the VA01
    SDTRM001            Reschedule schedule lines without a new ATP check
    V45A0002            Predefine sold-to party in sales document
    V45A0003            Collector for customer function modulpool MV45A
    V45A0004            Copy packing proposal
    V45E0001            Update the purchase order from the sales order
    V45E0002            Data transfer in procurement elements (PRreq., assembly)
    V45L0001            SD component supplier processing (customer enhancements)
    V45P0001            SD customer function for cross-company code sales
    V45S0001            Update sales document from configuration
    V45S0003            MRP-relevance for incomplete configuration
    V45S0004            Effectivity type in sales order
    V45W0001            SD Service Management: Forward Contract Data to Item
    V46H0001            SD Customer functions for resource-related billing
    V60F0001            SD Billing plan (customer enhancement) diff. to billing
    SDAPO001            Activating Sourcing Subitem Quantity Propagation
    V45A0001            Determine alternative materials for product selection
    Regards

  • User exit or badi to deactivate warning message

    Hi all
    I want to use the functionality of uploading points (goods receiving hours) which is there in customer master for creating the sales order.
    Actually client wants to create a sales order for particular customers (ex: sales office wise) on particular day only, so I am planning to use the uploading points functionality,
    (EX: I will make a entry  in goods receiving hours om monday for the praticular set of customers,so sales order has to create on Monday, system has to pick the customers which having the Monday  and start creating the sales orders ( ABAPer will right the program) but the problem is while creating the sales order system is giving a warning message(goods receiving hours), I want to deactivate that.
    Please let me know any USER EXIT or BADI for this requirement
    Thanks in advance,
      Regards,
      Nagesh N
    Edited by: nageshdb4u on Feb 7, 2011 5:51 PM

    Kindly  explained  how  you have  solved  others  may benefit..
    regards
    Arunkumar

  • Display active/implemented user exits in R/3 system

    Hi Guys,
    Here is a small report that I wrote to display all active and implemented user exits in R/3 system. It gives a snapshot of all the user exits being used and also takes to the follow-on screen on double click.
    Regards,
    Madhur
    *& Report ZMS_ACTIVE_EXITS
    *& This report displays all the active customer enhancements in the
    *& system and also displays whether they are active or implemented
    REPORT ZMS_ACTIVE_EXITS.
    * Data decleration
    types: begin of s_function,
    fname like MOD0-FUNCNAME,
    ftext like tftit-stext,
    impl,
    active,
    example,
    end of s_function.
    TYPEs : BEGIN OF display_str,
    project type modact-name,
    enhancement type modact-member,
    fm type modsap-member,
    status type char20,
    END OF display_str.
    data : lt_member type table of modact-member,
    ls_member like LINE OF lt_member,
    lt_fm type table of modsap-member,
    ls_fm like LINE OF lt_fm,
    lt_modname type table of modact-name,
    ls_modname like line of lt_modname,
    lt_display type TABLE OF display_str,
    ls_display like LINE OF lt_display,
    ls_function type s_function,
    field1(30).
    START-OF-SELECTION.
    * Select active customer enhancement.
    select name from modattr into ls_modname
    where status = 'A'.
    append ls_modname to lt_modname.
    CLEAR ls_modname.
    ENDSELECT.
    if lt_modname is INITIAL.
    WRITE / 'no active enhancements'.
    endif.
    * Determine the details about the customer enhancement.
    LOOP AT lt_modname INTO ls_modname.
    CLEAR : ls_display.
    SELECT member from modact into ls_member where name = ls_modname.
    select member from modsap into ls_fm where name = ls_member and typ = 'E'.
    ls_display-project = ls_modname.
    ls_display-enhancement = ls_member.
    ls_display-fm = ls_fm.
    clear : ls_function.
    ls_function-fname = ls_fm.
    perform get_impl_status USING ls_function.
    if ls_function-impl = 'X'.
    ls_display-status = 'Implemented'.
    ELSE.
    ls_display-status = 'Active'.
    endif.
    APPEND ls_display to lt_display.
    endselect.
    ENDSELECT.
    ENDLOOP.
    * Displaying results
    format color = 1.
    write : 'Please double-click on the object for follow-on action'.
    new-LINE. uline.
    write : 'Customer Project', at 30 'SAP Enhancement', at 60 'Exit Function Modul
    e', at 100 'Active/Implemented'.
    ULINE.
    format color = 0.
    loop at lt_display into ls_display.
    new-LINE.
    write : ls_display-project, at 30 ls_display-enhancement, at 60 ls_displayfm,
    at 100 ls_display-status.
    ENDLOOP.
    * For calling transaction CMOD / SMOD / SE37.
    at line-selection.
    get cursor field field1.
    CASE field1.
    WHEN 'LS_DISPLAY-PROJECT'.
    set parameter id 'MON_KUN' field sy-lisel(10).
    call transaction 'CMOD' and skip first screen.
    WHEN 'LS_DISPLAY-ENHANCEMENT'.
    set parameter id 'MON' field sy-lisel+29(10).
    call transaction 'SMOD' and skip first screen.
    WHEN 'LS_DISPLAY-FM'.
    set parameter id 'LIB' field sy-lisel+59(30).
    call transaction 'SE37' and skip first screen.
    WHEN OTHERS.
    message 'Click on the right place.' TYPE 'I'.
    ENDCASE.
    *& Form get_impl_status
    * This FORM checks whether an EXIT FM is implemented or not
    form get_impl_status using p_function type s_function.
    data : l_mand LIKE tfdir-mand,
    l_incl_names TYPE smod_names OCCURS 1 WITH HEADER LINE.
    l_incl_names-itype = 'C'.
    APPEND l_incl_names.
    CLEAR l_mand.
    SELECT SINGLE mand FROM tfdir INTO l_mand WHERE funcname = p_function-fname.
    IF sy-subrc = 0 AND l_mand(1) = 'C'.
    p_function-active = 'X'.
    * l_status-active = c_true.
    ELSE.
    p_function-active = ' '.
    * l_status-inactive = c_true.
    ENDIF.
    CALL FUNCTION 'MOD_FUNCTION_INCLUDE'
    EXPORTING
    funcname = p_function-fname
    TABLES
    incl_names = l_incl_names
    EXCEPTIONS
    OTHERS = 4.
    IF sy-subrc = 0.
    LOOP AT l_incl_names.
    SELECT SINGLE name FROM trdir INTO l_incl_names-iname
    WHERE name = l_incl_names-iname.
    IF sy-subrc = 0.
    p_function-impl = 'X'.
    ELSE.
    p_function-impl = ' '.
    ENDIF.
    ENDLOOP.
    ENDIF.
    endform. "get_impl_status

    Hi Sergio,
    Have you checked that the basis guys have actually plugged in the SAP system. The guys I've been working with have sworn that the portal can connect to SAP but actually they have no connectivity at all. It has meant that my collegue has spent the last 2 days pulling his hair out trying to work out why his code doesn't work and in fact it will never work as the portal cant even see SAP.
    Cheers
    Richard

  • User Exits in FI

    Dear All,
    Could you please tell me the general impacts of user exists in FICO with an example?. How can we use this concept in FICO module?
    I request you all, please reply your values.
    Thanks with regards,
    Ran

    Hi,
    I will give you my actual example of this aplication.
    I would like configure a payment condition with 15 days out of week, but the OBB8 transaction doesn't have any field to define days of week. Only sequencial days numbers.
    I have created a substituition Rule in GGB4 with a user exit. This User Exit is a ABAP logics codes in a especific SAP program. This allowed especific changes in my data field recognizing days in week.
    I hope I help you.
    Please, assign points for my contribution.
    Rgds

  • User Exit related Credit check

    HI All,
    I have createed one sales oreder, initailly credit check status is NOT APPROVED, i have released SO manually  from t-code VKM3 . then the status has changed to APPROVED.
    if change the sales order through VA02 on the same day status is not changes(still APPROVED status, this is fine),
    is we change next day(from creation date) credit status is NOT approved..
    what user exit is triggering the second block to happen.
    we are chnaging bulk sales order, which iare comnig frm Legacy system.
    Regards,
    DSK

    Thank you,
    Can u explain some more detail?
    How do i check whether VL10C triggers this exit in OVA8?
    Actually , it is triggering for VL01N or VL02N but not triggering for VL10c.
    And Will there be chances like , it triggers sometimes and not sometimes based on any condition?
    Regards
    Ramakrishna L

  • User-Exit or BADI for MB51

    Dear all,
    In MB51 report, sale order value is not showing values even though it actually has.
    What could be the reason?
    If the answer is User-exits or BADI, can u suggest me the correct user-exit or BADI.
    I have already tried the following user-exits by placing BREAK-POINT in the includes. But no where the execution is breaking.
    MBCF0002            Customer function exit: Segment text in material doc. ite
    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_CREATE
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc
    Plz give some suggestions.
    Regards,
    Prem

    Hi ,
    U need to change the layout of MB51 in order to get the SO no.
    goto MB51---> give some inputs ---> in the o/p screen ->click on the variant button-> on the pop screen u, top of it u will get 2 options
    1.Header
    2.Position
    click Position Button ---> here u will get all Fields avail. for this Report O/P , so u can add SO field and save the variant.
    regards
    Prabhu

  • User Exit for Requested Delivery Date in Sales Order

    Hi
    Which user exit can be used to change Requested Delivery Date in Sales Order.
    Scenario:  Sales Document Type: OR has Lead Time: 7 days.  System always proposes delivery date after 7 days.  We need to change this Lead Time based on plant.
    Thanks in advance for your support.
    Regards
    Uma

    Hello,
      try with USEREXIT_MOVE_FIELD_TO_VBEP or USEREXIT_SAVE_DOCUMENT_PREPARE, of program MV45AFZZ.
    Hope to be useful.
    Best regards,
    Andrea

  • Sales Order - user exit at item level

    I am new in writing user-exits. Pls do share your exp !
    When creating a sales order I encounter error, system says "Enter batch number".
    We basically create batch when doing GoodsReceive for Production Orders. At this time the Material Revision is copied as Batch into MCHB table.
    For example:
    Material ABC has the below,
    Rev    Batch
    A        A
    B        B
    C        blank
    If I create a SO for part ABC for Rev C, it does not allow me becos batch does not exists. But my SO should be allowed to be copy C into the batch field in VBAP.
    Pls let me know if we must create custom user-exit rather than modifying std.SAP user-exit for Sales Order processing (MV45AFZZ).
    Is there any contraints using the batch field in SO? As I came to know that the problem is when creating a Purchase Order  it allows to enter free text in batch field but SO doesn’t allow. Is't?
    Is there any standard way to config the system such that SO will bypass the existence checking of the batch
    Pls share !
    Pri

    Hi, but inplace of Batch we only enter the Revision of the material. Becos rev-batch relationship is 1-1, meaning is rev is A, the batch will be A too.
    We just use the batch field to represent the revision
    Rev    Batch
    A        A
    B        B
    C        blank
    I  can enter A in SO item batch field because system check that batch A exists
    I can enter B in SO item batch field because system check that batch B exists
    But I can’t enter C in SO item batch field because system check that batch C doesn’t exist
    Wondering how the system might know the batch is actually my revision. Not sure if I use User  EXIT to move “C” into VBAP-CHARG, will it give me error message because it will find out that there is no C batch
    Your views !

Maybe you are looking for

  • Batch problem with 'BAPI_PRODORDCONF_CREATE_TT'

    Hi All! We are using function 'BAPI_PRODORDCONF_CREATE_TT' but not fully sucessfully. We call this function to make a completion confirmation with a goods movement. Right now we are doing some test trying to get the same results that if we use COR6N.

  • Logical system not seen in ID  (7.0)

    Dear XI experts, i defined in SLD a logical system as application system (SAP BACKEND)to send and receive IDOCS. I am trying to assign a Business system in the ID which I defined in the SLD and cant seem to find this in the ID. What must have I misse

  • Server 4.0.3, OSX 10.10.2 Internet Reachable, no services available

    Hello, I am very new to using the server application and networks, so please understand this general question in order to understand networks and Server better. I have Server 4.0.3 installed on my Macbook Pro running the latest version of OSX (10.10.

  • JMS sender communicaton channel error

    Hi, The JMS sender communication channel throws the following error in Communication Channel monitoring in RWB. <b>Channel started but Inactive</b> <b>"Channel removed; check whether channel was deleted or moved to another Adapter Engine"</b> But the

  • How can I query signal strength FROM an Aironet 1200 AP?

    We are trying to query the signal strength of each connected client on Aironet 1200 APs from the AP. Does anyone know of a way to achieve this? We have examined the MIB documentation for an SNMP solution and have not found the reqired OID/MIB. This s