User exit to get Calday from Calmonth to populate Key Date

Gurus
we have a requirement to populate key date using exit variable where the user is going to fill in the Calmonth and the last day of the month should go to Key date at query run time.
Would you please advise the sample code I can write to achieve this? Appreciate your quick help on this.
Thanks
Kris

Thanks Tripple K
I wrote the following but its giving me error when i execute the query saying "Value is too long for VAR_LASTDAY_CALMONTH.
Data: v_date type sy-datum.
     WHEN 'VAR_LASTDAY_CALMONTH'.
     IF i_step = 2.
          READ TABLE i_t_var_range INTO l_s_var_range WITH KEY vnam = 'VAR_CALMONTH_SO'.
          IF sy-subrc EQ 0.
            CONCATENATE l_s_var_range-low '01' INTO v_date.
            ADD 40 TO v_date.
             v_date+6(2) = '01'.
              l_s_range-low = v_date - '1'.
              l_s_range-sign = 'I'.
              l_s_range-opt = 'EQ'.
              APPEND l_s_range TO e_t_range.
                            ENDIF.
                           ENDIF.
Would anyone please advise where I am making mistake?

Similar Messages

  • User exit to get pop-up in co09

    hello,
    i have a question.
    is there an user exit to get a pop-up in co09? we don't wanna check availability in order. we only want check material status in co09.
    thanks a lot
    best regards

    Believe it or not, I've done this successfully.
    The exit is
    EXIT_SAPLIE01_007
    This fires after save/post and I used it to pop a custom screen to get some custom data.
    If you want to use the custom data from the screen in a custom update, you'll have to export to...database and import the data back in the MIGO update BADI or exit.  (If your prod instance isn't multi-server, then you can use export to shared buffer.)
    I didn't find this exit on my own - it was suggested here - I think by Suresh or Narendran or aRs or NXO.

  • User exit which gets triggered when a line item is deleted in va02

    Hello all,
                   I am unable to find a User exit which gets trigerred when i delete a line item from va02.If I use the User Exits for saving data in Include MV45AFZZ the screen field VBAP-POSNR for line item is not getting accessed.All i need to compare the line item texts. Which means if any of these texts change then i need to write my logic. But the screen field name for all the texts is the same.Please guide me.

    Hello,
    Whever you perform any actions on the line item, we have the user exit in MV45AFZZ, userexitxvbap. Whenever the the item is deleted the UPDKZ value in XVBAP value is set to 'D', else since you are using the transaction VA02, any change is recorded in YVBAP(for old values) and XVBAP(for new values), so using this two internal table you can write any necessary logic.
    BR
    Sudhakar.

  • User Exit not getting triggered

    Dear all,
    we are creating a workflow for PR Release which needed release strategy customization. so we are trying to set the release stratagy by changing the communciation structure CEBAN-USRC1 field.
    for this, i had done the following things:
    1. SMOD->M06B0005->components->EXIT_SAPLEBND_004->INCLUDE ZXM06U31 (double clicked) wrote few lines of code.
    2. CMOD-> created a proj ZMM_PREL->assigned Enhancement M06B0005 under enhancements tab-> EXIT_SAPLEBND_004-> activated all
    (User exit, project eveything).
    Now my problem is when i create a PR, this user exit does not get triggered at all. I am working on ECC6.0 the same code which i did in Ecc5.0 for my previous client is still working fine.
    Can anyone please guide me where i might have gone wrong?
    Thank you,
    Regards,
    Lakshmi

    Hi,
    HAve u verifiyed that the user-exit u r using is triggered whenever u create ou PR.?
    First of all u have to put breakpoints at each and every user-exits provided for that transaction, then check which user exit is getting triggered when u carete ur PR. and thenafter write ur code in this user-exit only.
    Reward is useful.
    Regards,
    Harsha

  • User-exit not getting triggered in VA32

    Hello Experts,
    Iu2019ve a requirement and Iu2019m working on Change Scheduling Agreement u2018t-code VA32u2019. According to requirement I need to capture all header data and data in Sales, Item Overview, Item Detail and Ordering party tabs. Iu2019ve set the break points in almost all the user-exits but only one FM (EXIT_SAPLV45L_002) of exit u2018V45L0001u2019 is getting trigger. Even though other exits/FM has all the tables as import/export parameters which I need but they are not getting triggered. Can anybody please tell me which user-exit / BADI I should use to capture the required data?
    Thanks.

    Hello Experts,
    Thanks a lot Vijay for you reply. Iu2019ve seen user exits of MV45AFZZ include and looks like USEREXIT_SAVE_DOCUMENT_PREPARE is the correct user exit. But I havenu2019t use Includes before can you or anybody else please tell me how to write code in include. I know how to search an include in a program but not sure how to add code in the user exit.
    Thanks

  • User exit that gets triggered at the press of 'Enter' in IW42

    Hi,
    Is there any user exits that gets triggered at the press of Enter key in PM order confirmation IW42 transaction. Basically the requirement is to give a customized message at the order confirmation screen when the enter key is pressed.
    Regards,
    Prabaharan.G

    Hi,
    You may try the following enhancement points and exit respectively.
    CMFU0001        E            EXIT_SAPLCMFU_001
    CMFU0002        E            EXIT_SAPLCMFU_002
    Pls reward points if useful.
    Regards,
    Renjith Michael.
    Edited by: Renjith Michael on Jan 12, 2008 12:57 PM

  • User exit to change shi-from address

    Hi Guys,
          Help me if you know an user exit for changing ship-from address while creating sale order.
    Thanks.

    Hi
    EXIT_SAPLV09A_001
    You can use this user exit to control whether an address that was entered manually and has already been used in other documents (referenced), should be referenced again if it changes or whether a new address should be created (duplicated).
    Hope this may help you
    Regards
    Srinath

  • Is there a user exit for Excel download from Web Template?

    Hi,
    Is there a user exit for Excel download from Web Template?
    Thanks,
    Frank

    Hi,
    I need to do some data manipulation before export to Excel.  I could use Table Interface to manipulate the data before rendering to the Web.
    Regards,
    Frank

  • Get postion from vacancy when transfer applicant data

    Dear all,
    Pls tell me how to get postion from vacancy when transfer applicant data? At the Initial data entry, i chose the advertisement that determine vacancy. But when transfer data, i have to choose the position again.
    Best reagrds,
    Quanglv

    Hi,
    IN PB40 enter additional data you assign applicant to position or vacancy, and when u will transfer data to pa position will come automatically...
    Regards,
    Kapil

  • ABAP: SD user-exits - custom fields using from KNVV or VBAK

    Hi all,
    I have a technical question.
    I've created some custom fields in table KNVV. The values of these custom fields have to be used during Sales Order creation/modification for determining materials or princing, in sales order user-exits.
    My question is:
    During the Sales Order creation/modification, in the userexits:
    Is it preferable to get directly the values of the custom fields from KNVV?
    OR
    Is it preferable to transfer values of the custom fields from KNVV to VBAK (which was extended with the same custom fields like KNVV...) with transfer data, and then use only VBAK?
    Thanks in advance for your answers.
    Have a nice day!

    Anderton,
    I would prefer moving them to VBAK and then using it. Why?
    1. Once you have queried KNVV and moved it to VBAK you do not have to perform the select again.
    2. During SO change, you already have the data in VBAK so you do not have to fetch again from KNVV.
    3. Lets say the Z field was changed on KNVV after creation of SO and if your requirement is to use the Z field content when the SO was created, you cannot go back to KNVV since the data is changed. But if the same was stored in VBAK, you do not have that problem.
    Thanks,
    Vikram.M

  • User Exit Variable picking values from InfoProvider

    Hi,
    I've created a User Exit variable (of type Interval, Mandatory) on 0CALMONTH and populating it in exit.
    The problem is at the time of query execution, I get "BRAIN 657" error i.e.  "Value <value> is Invalid for Variable <variable name>".
    After doing some analysis I figured out that once the user-exit code is performed, system validates the entries populated in this Variable against the values in InfoProvider and gives error when it doesn't find those values.
    E.g. lets say InfoProvider has values for 0CALMONTH from 06.2010 till 10.2010 and if I populate my variable with range 03.2009 till 12.2010 then it throws above error. But if I populate the variable with exact values i.e. 06.2010 till 10.2010 then it works.
    Any idea how can I remove this validation and populate with my own value range?
    Regards,
    Vikrant.

    hi remove that default value from the variable.
    and you shd be able to run the query without any problem.
    regards,
    VJ

  • IS-U print workbench - User exit - to get current page number

    Hi,
    I have a doubt in IS-U print workbench where in I need to get the current page number which is being processed inside the user exit of the application form.
    I have a user exit called Z_EXIT_150 and here I have a subroutine which is inside the LOOP DOC_ITEM …ENDLOOP.
    Inside the subroutine, I need to get the current script page number.
    There is an option of getting the current page as &PAGE& inside the Script but I need to know the page number inside the exit.
    Do you have any idea of getting the current page number?
    Thanks and Regards,
    Sakthi.

    Hi Sakthi,
    I have also had this problem while working in IS-U Print Workbench but was also unable to solve.  I tried looking into the output_text that is called when reaching an object that references SAPSCRIPT-FORMPAGES but I too could not find a way to save PAGE to a variable for later use.
    The only idea I can think of, although I have not tried, would be to place some sort of counter variable in the BUILD_DOCUMENTS and increment the counter each time there is a successful printout of a header logo or some other object that you expect to see printed on each new page - that way maybe you can determine later in the exit processing what page # you are currently in. 
    I hope this has helped some.  I would be really interested to hear if someone else has a solution of how to access items in the SAPSCRIPT structure from outside of the SAPscript code.
    Regards,
    Geoff

  • Help of User exit to get to updated cuobj value in SAPMV45A

    Hi All,
    In Va01 / Va02 Transaction we have some characteristic Values (In fast entry Tab)
    which are comming from Material Master. which is display on screen using structure
    RV45A.
    when i debug in USEREXIT_SAVE_DOCUMENT_PREPARE OR
    USEREXIT_SAVE_DOCUMENT I connot find data in RV45A structure.
    my problem is : when user changes the char. value in fast data entry tab. i want to get updated values.
    vbap-cuobj is created but char. value is avilable only upon saving va01.
    can anyone tell me
    1. how to get this updated char. values in user exit move_fields_to_vbap or SAVE_DOCUMENT OF SAVE_DOCUMENT_PREPARE
    or
    2. any exit which is executed after saving va01/02 or after USEREXIT_SAVE_DOCUMENT
    Thanks in advance

    I solved using  userexit_new_pricing_vbap.

  • User exit while creating delivery from sales order

    Hi Guys ,
    Is there any user exit in sales order which triggers when we try to DELIVER(from the menu bar) .
    My requirement is to not include some line items(base on some condition) before they are included in the delivery .
    Thnx in advance .
    Anil

    Hi Naimesh ,
    Thnx for your reply.
    I'm not sure of the functionality in VOFM .Can u please tell me how can i acheive my current functionality as explained above in my question .
    I'll tell u my requirement .
    When creating delivery , I have to check for some condition and depending upon this condition , the line items must not be included in the delivery .
    I have acheived this by BADI  LE_SHLP_DELIVERY~SAVE_DOCUMENT_PREPARE.
    if suppose any line items gets deleted in the delivery(based upon my condition) , and then if I look at the status of the slaes order(VA03) , it shows partially confirmed at the header level and the item which is rejected(in delivery) shows OPEN .
    Can u tell me how to update the status of the sales order header and item level (if any item is deleted) during creation of delivery .
    Thnx .
    Anil

  • Exit to get InternalOrder from Customer in F-22

    Hi Friends,
                      In Transaction F-22 for posting key 01 (customer), I need to fetch the internal  orders related to the given customer only. As we created internal orders for each particular customer.
    are ther any user exits for this.
    I searched the related exits.
                       RFKORIEX           Automatic correspondence
                       RFEPOS00          Line item display: Checking of selection conditions
    But these exits are not getting triggered when I run the transaction.
    Please suggest me the suitable exits or badis.
    Searched the Forum for these exits.
    Thanks & regards
    Murali

    Please find the enhancements and badi's here for F-22 tcode.
    Enhancement
    SAPLF051                                Workflow for FI (pre-capture, release for payment)
    RFKORIEX                                Automatic correspondence
    RFEPOS00                                Line item display: Checking of selection conditions
    RFAVIS01                                Customer Exit for Changing Payment Advice Segment Text
    FEDI0001                                Function Exits for EDI in FI
    FARC0002                                Additional Checks for Archiving MM Vendor Master Data
    F180A001                                Balance Sheet Adjustment
    F050S001                                FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002                                FIDCC1: Change IDoc/do not send
    F050S003                                FIDCC2: Change IDoc/do not send
    F050S004                                FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005                                FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006                                FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007                                FIDCCH Outbound: Influence on IDoc for Document Change
    BADI's
    BADI_FDCB_SUBBAS01                      Screen Enhancement 1 on FDCB Basic Data Screen (010, 510)
    BADI_FDCB_SUBBAS02                      Screen Enhancement 2 on FDCB Basic Data Screen (010, 510)
    BADI_FDCB_SUBBAS03                      Screen Enhancement 3 on FDCB Basic Data Screen (010, 510)
    BADI_FDCB_SUBBAS04                      Screen Enhancement 4 on FDCB Basic Data Screen (010, 510)
    BADI_FDCB_SUBBAS05                      Screen Enhancement 5 on FDCB Basic Data Screen (010, 510)
    INVOIC_FI_INBOUND                       BADIs for Inbound IDoc INVOIC FI (Vendor Invoice)
    F050S008                                FIDCC1, FIDCC2 Inbound IDoc: Update Comparison Ledger
    FBAS_CIN_LTAX1F02                       Tax interface
    FBAS_CIN_MF05AFA0                       EWT - Downpayment Clearing - Tax transfer for CIN
    RFESR000_BADI_001                       BAdI for Own Processing of POR Item
    AC_QUANTITY_GET                         Transfer of Quantities to Accounting - Customer Exit
    ADJUST_NET_DAYS                         Change to Net Due Date
    FVFZ                                    Replacement for Function Modules of Function Group FVFZ
    BADI_F040_SCREEN_600                    Screen Enhancement on F040 0600 Document Header
    F107_RUN                                Enhance Valuation Run for Open Items
    BADI_MIRO_SPLT_ADD                      Append additional fields of ACCVS to ACCIT
    BADI_PRKNG_NO_UPDATE                    BAdI for Deactivating Update of Parked Documents
    FI_AUTHORITY_ITEM                       Extended Authorization Check for Document Display (FB03)
    FI_DOC_DISP_LI                          Diversion to Document Items (FB03)
    FI_FB08_SUBST_BUDAT                     FB08: Check Posting Date for Reversal of FI Doc. with FB08
    FI_GET_INV_PYMT_AMT                     BAdI for determining the payment amount for an invoice
    FI_HEADER_SUB_1300                      Screen Enhancement for Document Header SAPMF05A
    FI_PAYREF_BADI_010                      BAdI: Payment Reference Number
    FI_RES_ITEM_CURRENCY                    Document of Residual Item with Invoice Currency
    FI_TRANS_DATE_DERIVE                    Derive BKPF-WWERT from Other Document Header Data
    FISPLIT                                 Online Split: Cash Discount, Exchange Rate Differences
    Thanks and Regards
    Gururprasad

Maybe you are looking for

  • Oracle single instance rac installation

    hi, do I need minimum of 2 servers in order to carry out 11.2 oracle single instance RAC installation ? or that its possible with one node? and then can add more nodes in future? is there any article/documents on this? thanks

  • Saved File Groups Issue in Bridge Center - script problem?

    Hi all, I tried posting this in the Bridge forum with no replies. After browsing through this forum I'm wondering if this is a script problem? I have the CS2 premium, and use all packages. The problem I have is saving and retrieving files in the 'Sav

  • Best MacPro configuration to run Photoshop CC

    I am planning to buy the fastest MacPro possible to run Photoshop CC. I have a photography studio and have to process large files, some as large as 1 TB. Money is not an issue here!! I would like to configure the fastest MacPro as long as Photoshop c

  • SetRenderToTexture bug report

    The setRenderToTexture feature has strange, broken behaviour in certain situations. I encountered this bug while creating a 'bloom' post-process effect. Steps to reproduce are as follows: Create a 1024x1024 back buffer. Render the scene to a 1024x102

  • Mac osx, really slow, beachball all the time

    Hi helpful people.... My imac, 6 years old but lovely, is soooo slow. Don't know if it needs more RAM or I can sort it some other way?? Any help very welcome! roxannefromgbr