ABAP  Code for SAP exit varaibles?

Hi,
i) Where can I find the abap code for SAP exit variables
OP_KEYDT used for the net due date
OP_KEYD2 used for the posting date
OP_KEYD3 used for the clearing date, which are used in FI AR aging report(0FIAR_C03).
Based on the Net Due Date, which is key date(0NETDUEDATE), entered by the user at runtime, the posting date and celaring date are populated.
II) The problem is we want to simulate a similar scenario, but with key date, which user enters is based on the custom Net Due Date(ZNETDUEDATE).And this date is populated to posting date and clearing date variables.
How do we acheive that.
Thanks.

Hi Kumar,
Try this below mentioned example where default date is current date.
Step1: Create a variable(ex: cur_date) on requrired characteristic with Processing type "Customer Eixt" and check the check box for ready for input(if this variable need in selection screen).
Step 2: Goto T Code : CMOD and provide appropriate Project and choose components and click on display.
Step3: Double click on exit "EXIT_SAPLRRS0_001" you can see include "ZXRSRU01", double click on include.
Step4: Sample code to populate.
WHEN 'CUR_DATE'.
Data : l_p_range_SSS TYPE rrrangesid.
IF I_STEP = 1.
l_p_range_SSS-Low = sy-datum.
l_p_range_SSS-Sign = 'I'.
l_p_range_SSS-Opt = 'EQ'.
APPEND l_p_range_SSS TO e_t_range.
Endif.
The following values are valid for I_STEP:
· I_STEP = 1
Call up takes place directly before variable entry
· I_STEP = 2
Call up takes place directly after variable entry. This step is only started up when the same variable could not be filled at I_STEP=1.
· I_STEP = 3
In this call up, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called up again.
· I_STEP = 0
The enhancement is not called from the variable screen. The call up can come from the authorization check or from the Monitor.
Also, refer this link..
http://help.sap.com/saphelp_bw320/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm
Cheers,
Allen

Similar Messages

  • Abap code for sap exit variables?

    Hi,
    i) Where can I find the abap code for SAP exit variables
    OP_KEYDT used for the net due date
    OP_KEYD2 used for the posting date
    OP_KEYD3 used for the clearing date, which are used in FI AR aging report(0FIAR_C03).
    Based on the Net Due Date, which  is key date(0NETDUEDATE),  entered by the user at runtime, the posting date and celaring date are populated.
    II) The problem is we want to simulate a similar scenario, but with key date, which user enters is based on the custom  Net Due Date(ZNETDUEDATE).And this date is populated to posting date and  clearing date variables.
    How do we acheive that.
    Thanks.

    Please tell how u solved ur issue i have the same scenario to be do.

  • How to see the ABAP Code behind SAP Exit Variables.

    Hi Everyone.
    I was wondering if anyone could help me with the steps to see the ABAP Code behind a SAP Exit Variable.
    Sometime back I remember of going to Transaction SE37 - Function Module and give the Variable name,
    Eg: 0F_ADAY, Hit F4 or something like that and was able to see the ABAP Code/Function Module/Exit written for that Variable.same
    But today I tried to do the same thing to see the code for Variable 0P_FVAEX but I was NOT able to see it.
    I think I am missing something.
    Can someone help me recollect what I am missing.
    Thank You for your time
    NOVICE

    Hi bi novice,
    big sorry for the late reply!
    The following variables are defined in function module RREX_VARIABLE_EXIT as case statement:
    '0CMONTH', '0CWEEK', '0CYEAR', '0CQUART', '0DAT', '0CWD', '0FYEAR', '0FPER', '0FYTCFP',
    '0FYTLFP', '0FYTCD', '0CYTCM', '0CYTLM', '0CYTCD', '0LYTCLD', '0CMONTHT', '0CWEEKT', '0CYEART', '0CQUARTT', '0DATT', '0FYEART', '0FPERT'
    Best regards,
    Andreas

  • How to Find Code for SAP Exit variables.....

    Gurus:
    The SAP Business Content Query "0FIAR_C03_Q0005" uses several BC variables of 'SAP Exit' type for determining "Date" values. I would like to see the code used in these variables. Can anyone please suggest how I can find it?
    For examople, the variable on Posting Date is "0P_KEYD2". What is the ABAP code for this? Please give me the Steps..!
    Thanks in Advance......PB

    Generally SAP doesn't give access to the code behind SAP exit variables, but you can find what the variable is doing using help documentation. Here is some info i saw on SAP help for your variable
    0CWD Current workday
    0DAT Current calendar day
    0P_KEYDT Key date of due date
    0P_KEYD2 Key date of posting (from key date of due date)
    0P_KEYD3 Key date of clearing (from key date of due date)
    0P_KEYD4 Key date of posting (posting date)
    0P_KEYD5 Key date of clearing (from key date of posting)

  • Error in the ABAP Code for Customer Exit Variable

    Could you please update me what is the wrong with the below ABAP Code developed for Customer Exit Variable in BW
    i created a Variable (ZVWKNO) of Customer Exit,Single Value ,Mandatory and Variable is ready for input
    In CMOD i had written the below Code:
    When 'ZVWKNO'.
    DATA: WEEK(2) TYPE N,
    WEEKNO(2) TYPE N.
    IF i_step = 1.
    l_st_date = SY-DATUM.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = l_st_date
    IMPORTING
    WEEK = l_fn_week.
    CHECK sy-subrc = 0.
    WEEK = l_fn_week+4(2).
    If WEEK 0.
    WEEKNO = WEEK - 1.
    l_s_range-low = WEEKNO.
    l_s_range-sign = k_sign_inclusive.
    l_s_range-opt = k_option_equals.
    APPEND l_s_range to e_t_range.
    ENDIF.
    ENDIF.
    But when i execute the query the default value is not populated with Week-1 No in the variable screen
    Please update me what went wrong
    Thanks

    Case ZVWKNO.                "write this with out comments
    When '1'.              "write the value that needs to equal with value in varaible ZVWKNO after when in sungle quotes
    DATA: WEEK(2) TYPE N,
    WEEKNO(2) TYPE N.
    IF i_step = 1.
    l_st_date = SY-DATUM.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = l_st_date
    IMPORTING
    WEEK = l_fn_week.
    CHECK sy-subrc = 0.
    WEEK = l_fn_week+4(2).
    If WEEK 0.                                    "check this Week Minimum is '01' and Maximum '52'
    WEEKNO = WEEK - 1.
    l_s_range-low = WEEKNO.
    l_s_range-sign = k_sign_inclusive.
    l_s_range-opt = k_option_equals.
    APPEND l_s_range to e_t_range.
    ENDIF.
    ENDIF.
    Prabhudas

  • Reg: ABAP code for customer exit variable

    Hi Team,
    I have a requirement to create a report  based on an multiprovider 'TEST'.
    Based on the input selection of Period; I need to define a Keyfigure X which will be a count of value available for that Period in one cube involved in the MProvider. E.g.: If for period 12, the value = 1 in the cube; then this keyfigure will give the count as 1 in the output of the report.
    The second KF Y values are available in the second infocube directly: ibut should be displayed based on the value of the KF 'X' with logic as if X > 0 ; then the values should be read from the second infocube in the report. & if X <= 0; no values should be displayed.
    Please help me with the ABAP code to be used in the query level.
    Thanks & Regards
    Sneha

    Hi Sneha,
       I would suggest the following
    1.Please change the design the cube and include a key figure Zcount that would be incremented for each record.
    Now as per the first requirement you need to get the count for a Input Period from First cube
    This would be very simple to implement , all you have to do is restrict this KF with the Input characteristic/variable and also the First Infocube.
    2.You can also use exception aggreation counter to address this requirement . Even in this case you need to include a dummy key figure in the cube and the exception characteristic would be the period in the Infocube.
    But performance would be on downside when compared to the first one.
    3.The second requirement is quite simple
    Create a formula KF as follows
      (KF1 > 0)*KF2 . 
      KF1 > 0 is a logical operation and it would always return 1 on success and 0 otherwise.
    Hope this helps,
    Regards,
    James Harold.

  • Abap code for Customer Exits

    Hi Xperts,
    can anybody give me the Correct Coding todisplay the month year in the format "Dec 2006".
    WHEN 'ZT_PRVMT-1'.
      Data : month_nam(3) type c.
      IF i_step = 2.
        CLEAR l_s_range.
        LOOP AT i_t_var_range INTO loc_var_range
                              WHERE vnam EQ 'ZPPRVMTH'.
          l_s_range-low = loc_var_range-low.
          wa_month = loc_var_range-low+4(2).
          wa_year = loc_var_range-low(4).
          wa_month = wa_month - 1.
          If wa_month = 00.
             wa_month = 12.
             wa_year = wa_year - 1.
          Endif.
          CASE wa_month.
            WHEN '01'.
              month_nam  = 'JAN'.
            WHEN '02'.
              month_nam  = 'FEB'.
            WHEN '03'.
              month_nam  = 'MAR'.
            WHEN '04'.
              month_nam  = 'APR'.
            WHEN '05'.
              month_nam  = 'MAY'.
            WHEN '06'.
              month_nam  = 'JUN'.
            WHEN '07'.
              month_nam  = 'JUL'.
            WHEN '08'.
              month_nam  = 'AUG'.
            WHEN '09'.
              month_nam  = 'SEP'.
            WHEN '10'.
              month_nam  = 'OCT'.
            WHEN '11'.
              month_nam  = 'NOV'.
            WHEN '12'.
              month_nam  = 'DEC'.
          ENDCASE.
          CONCATENATE month_nam wa_year INTO L_S_RANGE-LOW  SEPARATED BY ' '.
          l_s_range-sign     = 'I'.
          l_s_range-opt      = 'EQ'.
          APPEND l_s_range TO e_t_range.
          EXIT.
        ENDLOOP.
      ENDIF.
    Please help me.

    Hi,
          Try like this
    p_date EQ 'X'.                                                                "The date format is like 31 apr, 2007
        CONDENSE temdate NO-GAPS.
        SPLIT date AT ',' INTO daymonth year.
        IF STRLEN( year ) NE '4'.
          error = 'X'.
          WRITE :  'Invalid date format.'.
        ELSE.
          daymonth1 = daymonth.
          CONDENSE daymonth1 NO-GAPS.
          SHIFT daymonth1 LEFT BY 2 PLACES.
          CONDENSE daymonth1 NO-GAPS.
          month  = daymonth1.
          CONDENSE month NO-GAPS.
          TRANSLATE month TO UPPER CASE.
          SORT t_month BY monthstx.
          MOVE month to mon.
          READ TABLE t_month WITH KEY monthstx = mon.                                 
          IF sy-subrc <> 0.
            error = 'X'.
            WRITE : 'Invalid date format.' .
          ELSE.
            CONDENSE daymonth NO-GAPS.
            day =  daymonth+0(2).
            CONDENSE day NO-GAPS.
            CONCATENATE year t_month-monthnumber day INTO o_date.
    Regards

  • ABAP Help for customer exit

    Hi All, I need help with ABAP code for customer exit for formula variable. I have ZVKDATE as formula var from customer exit. user enters date in ZVKEYDT(this is selection type var). I have the below code, I debugged it the l_var_range-low get the date but when I append it to e_t_range the table doesn't gets the date. The report shows the ZVKDATE has empty demarcation. kindly help.
    data l_var_range like rrrangeexit.
    data: l_s_range type RSR_s_RANGESID.
    data: w_day(2) type c,
          w_mth(2) type c,
          w_year(4) type c.
    define append_range_table.
    l_s_range-low = &1.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    append l_s_range to e_t_range.
    end-of-definition.
    *Activities performed before selection screen pop-up window
    if i_step = 2.
    Calculate the current date based on system date
      case i_vnam.
        when 'ZVKDATE'.
          read table i_t_var_range into l_var_range
                            with key vnam = 'ZVKEYDAT'.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          w_day = l_var_range-low+6(2).
          w_mth = l_var_range-low+4(2).
          w_year = l_var_range-low(4).
          concatenate w_year w_mth w_day into l_var_range-low.
          append l_s_range to e_t_range.
      endcase.
    endif.
    puneet

    Hi,
    Check your code again. You are not appending l_var_range but l_s_range. Also I think the concatenate statement should contain l_s_range-low instead of l_var_range-low.
    Hope this will help you.
    Regards,
    Vaibhav

  • ABAP-Programming for SAP BW u0096 User-Exits und BAdIs

    Hi experts,
    i am a novice und looking for informations about Badi and User-exits for BW .
    i want to learn how to programm extractors.
    Can you you help me by giving me some informations or documents or sap links where i can find informations?
    Cheers

    Dear Mr Herzog,
    Congratulations for the book: Abap Developement for SAP Netweaver BI: User exits and BadIs.
    We're trying to implement the suggestions on the chapter 5.1.1 Interface of function module EXIT_SAPLRSR0_001 (page 136), however, we're having problens with the abap sintax CALL_FUNCTION  l_d_name IF FOUND.
    The command IF FOUND is not accepted.
    It'll be very helpful to avoid issues on tranporting include zxrsru01.
    I appreciate any additional help on how to implement it.
    Best Rgs
    Eliseo Bouzan

  • How can i see the code of SAP Exit for SAP Defined Variables

    Hi,
       It's very Urgent! How can i see the Source Code of SAP Provided Variables. I need to write code for User Defined Variables. please help me. It's very Urgent.
    Thanks in Advance.
    Nagesh.

    hi Nagesh,
    sample code for variable exit,
    there is 'how to' docs, can't see your email address.
      DATA: L_S_RANGE TYPE RSR_S_RANGESID.
      DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
      CASE I_VNAM.
      WHEN 'CUMMONTH'.
        IF I_STEP = 2.                                  "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'MONTH'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW      = LOC_VAR_RANGE-LOW(4)."low value, e.g.200001
            L_S_RANGE-LOW+4(2) = '01'.
            L_S_RANGE-HIGH     = LOC_VAR_RANGE-LOW.   "high value = input
            L_S_RANGE-SIGN     = 'I'.
            L_S_RANGE-OPT      = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.
      ENDCASE.

  • ABAP code for BI 7.0 transformations start routine

    Hi all,
    I am trying to update data from DSO1 (Source1: transaction data) to Infocube(TARGET)
    In the transformations Start routine, I have to read DSO2(Source2: Master data) for some fields.
    DSO1 has CUSTOMER as part of key
    DSO2 has CUSTOMER (key) and other fields....FIELD1, FILED2, FIELD3
    Infocube to be updated with FIELDS1,2 & 3 WHILE READING DSO2.
    WHERE DSO1 CUSTOMER matches with DSO2 CUSTOMER.
    Also, data NOT TO BE UPLOADED into Infocube if FIELD1 in DSO2= NULL
    Please give me the abap code for the above logic.
    Appreciate any help in this regard.
    Thanks.

    This is a doc from this site:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321ee19
    Ravi Thothadri

  • Transaction code for SAP query reports

    Hi All,
    I am trying to create transaction code for sap query report but couldn't go further.
    1) Created User group in SQ03
    2) Created infoset in SQ03 and assigned that to the user group
    3) Created query in SQ01 using the infoset.
    I executed the report in SQ01 and it is working fine.
    Now I try to create a transaction code in SE93 using the steps mentioned in the following link:
    Assign transaction code to SAP Query (created via SQ01)
    But when try to execute the report using the transaction code, it is giving error message 'User group xxxxxx is not yet created'
    Could any one advice me if I miss something? Or please help me to create this transaction code and transport to production?
    Thanks in advance

    HI,
    based on the thread you've already mentioned:
    In SE93, Create a Paramter Transaction
    -> Transaction = Start_report
    -> In default values, give the below details:
    D_SREPOVARI-REPORTTYPE = AQ
    D_SREPOVARI-EXTDREPORT = Name of the Query
    D_SREPOVARI-REPORT = User Group
    So check if the user group is typed correct in SE93 and check also if the user group exits in the system where you are trying to run the transaction.
    best regards, Christian

  • How To Create ABAP Code For HR Context Sensitive Structural Authorization

    Hello,
    We have created a HR Custom Program which IS NOT built off the PCH or PNP Logical Database. As a result, we need to manually create ABAP code for HR Context Sensitive Structural Authorization Check in our custom HR program. Via HR Context Sensitive Structural Authorizations, we are restricting access to personnel numbers and the underlying HRP* tables.
    Any assistance would be greatly appreciated with the identification of the SAP standard function modules (Ex. RH_STRU_AUTHORITY_CHECK, HR_CHECK_AUTHORITY_INFTY, HR_CHECK_AUTHORITY_INFTY , etc) used in HR Context Sensitive Structural Authorization Check, how they are used to control HR Structural authorization (P_ORGINCON), and some sample code.
    Thank you in advance for all your assistance,
    Ken Bowers

    Hello Ken
    You can use the interface methods IF_EX_HRPAD00AUTH_CHECK to get the same structural authorization as you can see in PA20/PA30. You need to use the methods set_org_assignment and check_authorization for this purpose. For more information you can refer to include FP50PE21 from line 237 onwards till 270.
    Regards
    Ranganath

  • ABAP Code for BI objects

    Hi Friends,
    I have created BI objects like infocubes, infoobjects, DTP, Datasource to transfer data from a flat file to BI system using SAP GUI... All data from flat file are transfered to BI successfully... i dont have any knowledge in ABAP... So i need to see the ABAP code for the BI objects i created above in my project... how can i see the coding for that?
    thanks in advance
    sasi

    Hi Sasi,
    All the objects which you create in BI will be stored in some standad tables,it only fetch details accordingly from those tables.For MasterData you can find the option as Display Routines in Extras.If you want to get more infomation about the STD Table and the Program involed in BI objects,just enter in (/h) mode.
    Regards,
    Prem

  • ABAP code for Hierarchy Loading from Flat File

    Hi,
    Can anyone give me some idea / ABAP code for generating parent - child relationships (NODEIDS) from a flat file and load into BW.
    Best regards
    Any insight into this development is highly appreciated

    Hi,
    also have a look at this how to to get informations about the file structure:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb
    /manfred

Maybe you are looking for

  • IPhone no longer works with car audio

    I'm running a 16 GB 3G-S and it worked wonderfully for my internet music such as Pandora or listening to iHeart radio. The unit would sync up easily to both my new car audio systems and everything detected and played beautifully! However, once I upgr

  • Whenever I try to open, or open firefox after installation, I am told it "Needs to close".

    Today, Firefox crashed and told me to submit a report and restart. After I did so, it began to load, then crashed, and told me there was a problem. I closed it and restarted again, where the same problem happened again. I followed the steps on the tr

  • Tried to send too large a message - mail now not working

    Hi, We have a problem. We tried to send a message containing a number of high res. pictures from our .mac account. Clearly this was far too big to send. The message has not appeared in the sent box but is not shown in an outbox. We now keep getting a

  • Error Starting Coherence 3.6.1 packed in War File From Tomcat 6.0.26

    Hi All, I have been receiving the following error when trying to startup coherence from within a War file: INFO: Deploying configuration descriptor services#test#processor#v1.xml java.net.MalformedURLException: no !/ in spec      at java.net.URL.<ini

  • Trouble with purchase order?

    I had some problems with a po receipts. I create a PO, but I can´t see it in some of the organizations. the ship to organization is for the master item of the organization.