Coding in cmod

Hi All,
CMOD is used for coding relating to data source enhancement and when we create variables, please let me know if we are using for any other coding purpose in bi.
Thanks & Regards
Surendra

HI,
CMOD & SMOD
http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7ceb940e11d295df0000e82de14a/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/content.htm
User Exits,CMOD, SMOD
Diff between SMOD and CMOD
CMOD &SMOD
Tarak

Similar Messages

  • Error in reading the value from cmod in BI

    Hi experts,
    We had a requirement in the query, ie when we execute a query the user will be asked to enter the key
    date and after he enters the date which was entered should be populated into other date variable (
    posting date ).
    For this we have written the following coding in cmod inthe bi system:
    ========================
    data: l_s_range type rsr_s_rangesid,
        wa_key type rrs0_s_var_range.
    Case i_vnam.
      When 'CLR_DT' .
      break-point.
        If i_step = 2.
          clear l_s_range.
          Loop at i_t_var_range into wa_key.
            if wa_key-vnam = '0P_CSDAT'.
              l_s_range-low = wa_key-low.
              l_s_range-sign = 'EQ'.
              l_s_range-opt = 'I'.
              Append l_s_range to e_t_range.
            endif.
          endloop.
        Endif.
    Endcase.
    ============================
    When syntax checked there is no errors or warnings.
    But when we executed the query and given the key date, an error is coming saying that the error is in exit.
    Please check the code and let me know whether i need to do any modifications.
    Regards,
    Nishuv.

    Hi Praveen,
    Thanks for the reply.
    I replaced : i_t_var_range into wa_key with the thing given by u i.e
    Loop at i_t_var_range into wa_key where vnam = <your key date variable name>.
    But it is showing error as:
    Field "0P_CSDAT" is unknown. It is neither in one of the specified
    tables nor defined by a "DATA" statement. "DATA" statement. "DATA" statement.          
    What else do i need to change..
    Please let me know.
    Regards,
    Nishuv.

  • Variables in CMOD??

    I have a situation where I need to execute the query without including company code and variable defined on it. I have to filter the value in the CMOD globally and pass that value to the query so that it displays the data only for that company code. This is related to authorization and below is the code implemented but somehow I am unable to get the desired result.
    How to execute a bex report without providing the input variable. Variable should fill dynamically in CMOD. How to fill a variable at runtime in CMOD for Bex report. Here in my below case i want to display a data only relavant to XYZ company and xyz input fill at run time...
    Please go through the code and suggest any changes needed.
    data : LV_COMP1(255) TYPE c.
    LV_COMP1 = 'XYZ'.
    IF i_step = 1.
    CLEAR: lwa_var_rng,
    lwa_range.
    lwa_range-low = LV_COMP1.
    lwa_range-sign = 'I'.
    lwa_range-opt = 'BT'.
    APPEND lwa_range TO e_t_range.
    CLEAR lwa_range.
    ENDIF.
    CASE i_vnam.

    Hi,
    you need not display the company code in the report output. just include it in the filter section of the query , then create a variable and make it "not available for manual input" and use istep=2 for coding in CMOD for that variable.
    ELSE.
    you can create a report program and use FM to run the query. this will give you output in an internal table . filter the internal table for the company code and provide the output in a .txt file and store it on application server.
    i don't think SAP has provided any user-exit after the report output has been determined.So, changing a report output is not a possibility here other than using variables.
    Also, one more suggestion. do not hard code the company code value in the CMOD code or wherever. either get the authorised company code using a FM to get authorised company code using the user name OR create a custom transparent table to store the comany codes against relvant user ids and select the company code from the table .
    Regards,
    Neeraj.

  • Enhanced 3 fields unavailable in BI after DS enhancement

    I did datasource enhancement in R/3 to add 3 fields into DS "0FI_GL_4". Then I go to RSA6 to click unhide for those 3 fields, activate DS. And then I put coding in CMOD. After that I replicate DS to BW system. I found those 3 fields are existing in DS, but the Transfer check box show uncheck for those 3 fields. That mean those 3 enhanced fields are still unavailable in BI. Does anybody know the reason for that?

    Hi,
    Need few clarifications.
    You said that Transfer check box is Unchecked. Which Transfer check box you are refering to?
    Regards,
    Nagasekhar

  • Help needed in Customer exit variable

    Hi Experts,
    We have a scenario as below.
    User enters fiscal year period.Based on the fiscal year period,entire year will be selected.
    Row would contains
    0fiscper3(Fiscal months from Jan to Dec)
    Column contains Amount(Actual or Forecast)--There is a restricted keyfigure on amount.If value type=60 then forecast
    and value type=10 then actual amount
    If the user enters 002.2010 then it should give Actual values ie value type=10 for 001.2010 and 002.2010.For all values greater than 002.2010, it should give forecast values(value type=60)
    Report Format.
    Jan----
    Actual Value(value type=10 in the column for amount)
    Feb----
    Actual Value(value type=10 in the column for amount)
    Mar----
    Forecast Value(value type=60 in the column for amount)
    Apr----
    Forecast Value(value type=60 in the column for amount)
    May----
    Forecast Value(value type=60 in the column for amount)
    Jun----
    Forecast Value(value type=60 in the column for amount)
    Jul----
    Forecast Value(value type=60 in the column for amount)
    Aug----
    Forecast Value(value type=60 in the column for amount)
    Sep----
    Forecast Value(value type=60 in the column for amount)
    Oct----
    Forecast Value(value type=60 in the column for amount)
    Nov----
    Forecast Value(value type=60 in the column for amount)
    Dec----
    Forecast Value(value type=60 in the column for amount)
    I know that i have to create a customer exit variable for value type
    But in this scenario.the value for value type may change in each row based on fisper3(month).
    How can i obtain such a scenario in the customer exit
    Your help will be appreciated.
    Thanks,
    Senoy
    Edited by: senoy laxman on Feb 15, 2010 6:42 AM

    Hi Senoy,
    you have to create two customer exit variables for fiscal year period(0fiscper) as given below.
    1. for actual values (value type=10), coding in cmod such that showing values less than and equal to user input values.
    2. for forecasting values(value type=60,)coding such that showing values greating than user input values.
    use the first varible in the first selction and the second varible in the second selection in the given below structure(use the structure in rows)
    use the fiscal period user input varible in the third selection in the given structure below.
    structure
    selection - (Actual)-restrict with value 20 and first customer exit variable .
    selection -(Forecast)-restrict with value type 60 and second customer exit variable.
    Selection - 0fiscper
    Add the key figure 0Amount in the columns or in rows(in the selection of second structure) as per your requirment.
    hope this helps you.

  • Regarding monthly reports.

    I have a requirement of when user enters at user exit variable of may 2010 for instance has to get report of may 2010 with
    regarding has to retrieve may 2009 data too for comparision.
    I heard it can be acheived by customer exit variable, can anyone share the code.

    hello there,
    yeah anything is possible with the dark art of abap...
    i would suggest you have a customer exit variable to allow multiple values ... e.g. user input 2010 and you do some abap coding under cmod to return you 2010 and 2009. look up the forum for customer exit variable.
    good luck and let us know if you have other problems regarding this.

  • Adding one more field in extract structure maintenance

    Hi Gurus,
    I have already extarcted data to BW using 2LIs_13_Vditm datasource and the deltas are also loaded.
    Initially when the extract structure(in LBWE) was maintained in LBWE, the field KTGRM-Acct.Assgnmt group was not selected from the POOL.Now there is a requirement to include that in the maintenance of extract structure.
    My question is, can i directly add the field to the datasource in R/3,without any coding in CMOD like in enhancements, and replicate again to BW without disturbing the existing data? OR Do I have to add the field in Trans.Stru, Update rules and cube and goahead loading data.
    Thanks in advance.
    Regards,
    Satya

    You can add any field listed in the pool of available fields directly to your LO datasource without enhancing the extract structure and coding in CMOD. But be aware to empty the delta queue and the extraction queue before, otherwise you can't change the extract structure.
    After replicating the changed datasource you have to update the relevant infoproviders, update rules and the infosource, because the new field was not known before.
    It is also recommended to reload the data from the source system in order to populate the new field for all data.

  • Usage Customer Exit EXIT_SAPLCUKO_003 / Enhancement CCUX0004

    Hello,
    I like to add new attributes of instances in LOVC during configuration of material in VA02. I found this Userexit and with function module CUDB_SET_VAL it is possible to add new values in the global table cudbd_pr_at_msg of function group CUDB. After calling EXIT_SAPLCUKO_003 SAP calls function module CUDB_PR_GET_AT_MSGS to get changed values.
    Is this the only solution to add new values, because exit EXIT_SAPLCUKO_003 has no changing parameters and there is no sample coding in CMOD or other documentations. Please add your sample to show your solution.
    Another question : It is possible to change attributes of multilevel instances? For example : Root instance is for material in sales document position, but in sales order BOM there are other configurable materials, which attributes should be maintained by userexit ( external configurator ), too. Normally only root instance is editable, but I want to add new attributes on the lower levels in background.
    Best regards,
    Markus

    Hi Markus,
    I have the problem that I want to delete some characteristics after configuration befor saving. Therefor I found the same exit and only your question in the web. Did you make further expierence with it? It would be very helpful if you could give me an answer.
    Best regards,
    Harald

  • Create a new "actual day variable" for 0CALDAY

    Hello,
    i want to create a new "actual day variable" for InfoObject 0Calday. The variable should have the same functions like 0DAT.
    How can I create this? Coding for CMOD?
    Thanks and regards,
    Heiko

    Hi,
    As I understand your question properly, You need a dynamic variable which will give the actual date i.e current date.
    create a variable for 0calday with single value processing type customer exit. reay for input deselect.
    in cmod
    When 'vARIABLE FOR CALDAY'.
    CLEAR L_S_RANGE.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    L_S_RANGE-LOW = SY-DATUM.
    APPEND L_S_RANGE TO E_T_RANGE.
    Regards,
    Ranganath.

  • CCustomer Exit Problem...

    Hi
    In BI, I created one simple query and have customer Exit Variable with 0Material. and wrote code at appropriate place (ZXRSRU01 Include) in CMOD and write many break points inside my variable. Everythign looks gr8 But i m surprised that Bex is not looking into coding...
    Can u pls suggest me what might be the reason that Customer Exit not looking teh coding into CMOD?
    Thanks.....

    I got it. I used RSRT to debug. Thanks...

  • Probelm in transpoting Cmod Coding in ECC

    Hi All,
    We are transporting C Mod coding request to ECC Quality system for the first time.We have collected the coding in request and transported to quality but in quality system Iam not able to fine the project in which we do cmod coding, Is there any procedure to be followed to transport cmod coding in ECC for the first time.
    Reagrds
    Albaik

    Dear Albiak,
    First of all ,it is not recomended to create local request in  Quality system.
    Reason why it is recomended to create local request in  Quality system is: When ever we crete same cmod objects in Development and moved to Quality at that time it will lock the objects creted in Q system.
    And we have follow the sequence of all transports with same domain id and it should follow till production.
    Any how for moving objects from one system to another system, we have few check list items for validation.
    1) We have one common package for moving all the required Transports in a group.
    2) After assignement , validate the transport in se09. i.e. validate all the objects assigend properly or not..
    3) Do consistency check up.
    4) Release the transport request befor importing into traget system.
    Hope this info may give you some light on your trsnaport.
    Cheers,
    Maruthi

  • Coding in user exit in program rffous_t

    The ACH file generated has to be updated with company specific information required by the NACHA file format standards. SAP functionality will be used to generate the interface file. 
    The ACH file will contain all employees who have pay for the current pay period being processed and have direct deposit set up for the current pay period.  The ACH file will run during the biweekly and monthly payroll runs.&#61485;This file will be generated upon completion of the current payroll processing.
    The user-exits are invoked when the RFFOUS_T program is executed.For each record type, use the mentioned user-exit below:
    •     1 (File Header Record)
    o     EXIT_100
    o     Function Module EXIT_RFFOEXIT_100
    •     5 (Batch Header Record)
    o     EXIT_101
    o     Function Module EXIT_RFFOEXIT_101
    •     8 (Batch Control Record)
    o     EXIT_105
    o     Function Module EXIT_RFFOEXIT_105
    Based on the account id (REGUH table-HKTID field), the other fields have been identified.
    Record Type "1"          
    File ID (Immediate Origin) - Structure DTAMUSFH, Component FH4     
    Origination Bank (immediate destination name) - Structure DTAMUSFH,Component FH11
    Company Name (immediate origin name) - Structure DTAMUSFH, Component FH12
    Record Type "5"                         
    Company Name - Structure DTAMUSBH, Component BH3     
    Company Discretionary Date - Structure DTAMUSBH, Component BH4
    Company ID - Structure DTAMUSBH, Component BH5     
    Company Entry Description - Structure DTAMUSBH, Component BH7
    Company Descriptive Date - Structure DTAMUSBH, Component BH8
    Effective entry date - Structure DTAMUSBH, Component BH9
    Record Type "8"     
    Company ID - Structure DTAMUSBC, Component BC7     
    Message Authentication Code - Structure DTAMUSBC, Component BC8
    Can somebody please advice me after reading the above information that how should i proceed for the coding to be done inside the user exit!!

    Hi Bhaskar,
    1. Go to CMOD(transaction) create an enchancement project .
    2. enter the project name ZName and click create and enter the short description of the project.
    3.now click on the enhancement assigment button on the application tool bar and enter the enhancement number: RFFOX100 (File Header Record),RFFOX101(Batch Header Record), RFFOX105(Batch Control Record).
    4.now select the first enhancement number i'e RFFOX10 and click on the components it will show you the fuction module exit EXIT_RFFOEXIT_100.
    5.double click on it it will take you to the fuction builder screen now click on the include it will show you the warrining 'Program names ZX... are reserved for includes of exit function groups' just ignore the warning and press enter after placing your coursour on the include, system asks to create the include press yes.
    6..and now in the include code your logic to update The ACH file generated has to be updated with company specific information required by the NACHA file format standards as per your needs.
    follow the procedure from 4 to 6 to populate Batch Header Record and Batch control record in the exits EXIT_RFFOEXIT_101and
    EXIT_RFFOEXIT_105 respectively.
    thanks and Regards,
    pavankumar

  • Unable to debug/correct the CMOD code for a variable used in a query

    unable to debug/correct the CMOD code for a variable used in a query
    i am using the data in a DSO in a query and using a custom coding variable in that query , but this data not coming in that query ..
    can anyone suggest how to debug that cmod code for the variable?
    code is written in CMOD tocde for the variable.

    belowis the code that i have written for a custom coding for a variable
    *******Start***
    IF i_step = 2.
      CASE i_vnam.
        WHEN 'IC_COMPCD'.
         TYPES:       BEGIN OF gt_itab_DyAuthTable,
                           username  TYPE /bic/afiop_o1200-/BIC/IC_USER,
                           companycode TYPE /bic/afiop_o1200-COMP_CODE,
                      END OF gt_itab_DyAuthTable,
                      BEGIN OF gt_itab_Cocd_all,
                            companycode TYPE /BI0/MCOMP_CODE-COMP_CODE,
                      END OF gt_itab_Cocd_all.
          DATA: gi_itab_DyAuthTable TYPE STANDARD TABLE OF gt_itab_DyAuthTable,
                wa_itab_DyAuthTable TYPE gt_itab_DyAuthTable.
           DATA: gi_itab_Cocd_all TYPE STANDARD TABLE OF gt_itab_Cocd_all,
                wa_itab_Cocd_all TYPE gt_itab_Cocd_all.
          SELECT /BIC/IC_USER
                 COMP_CODE FROM /bic/afiop_o1200
            INTO CORRESPONDING FIELDS OF TABLE gi_itab_DyAuthTable
            WHERE /bic/ic_user = sy-uname.
          LOOP AT gi_itab_DyAuthTable INTO wa_itab_DyAuthTable.
            IF wa_itab_DyAuthTable-companycode EQ '*'
              OR
              wa_itab_DyAuthTable-companycode EQ ' '.
              SELECT COMP_CODE FROM /BI0/MCOMP_CODE
                  INTO CORRESPONDING FIELDS OF TABLE gi_itab_Cocd_all.
              LOOP AT gi_itab_Cocd_all INTO wa_itab_Cocd_all.
                l_s_range-low    = wa_itab_Cocd_all-companycode.
                l_s_range-sign   = 'I'.
                l_s_range-opt    = 'EQ'.
                APPEND l_s_range TO e_t_range.
              ENDLOOP.
          to exit the loop if any one value is */space/all for a user's compcode values
            EXIT.
            ENDIF.
          ENDLOOP.
           if control is here means, the comp codes values didnt have */space
              LOOP AT gi_itab_DyAuthTable INTO wa_itab_DyAuthTable.
                l_s_range-low    = wa_itab_DyAuthTable-companycode.
                l_s_range-sign   = 'I'.
                l_s_range-opt    = 'EQ'.
                APPEND l_s_range TO e_t_range.
              ENDLOOP.
      Endcase.
    Endif.

  • How to do coding in the customer exit

    Hi I have found the customer exit by finding "Call function Exit" in the program. Now my question is how to do coding for that exit as I can not enter it directly in CMOD.

    Hi Suchender,
    in TA CMOD you first have to create a Z- project. Then assign an enhancement.
    The assigned enhancement offers one or more components. After assigning the enhamcement,
    display the components. in case enhancemnet is a function exit simply double click it and you will navigate
    to function builder. there you will find an include, where you can place your coding.
    regards
    rea

  • ABAP coding for variable SAP exit

    Hi,
    I'm looking for a way to see the coding of a SAP-exit query variable: 0FYTLFP.
    So this is NO custom-exit (via CMOD).
    I've tried the FM: RSVAREXIT<varname> but it doesn't exist.
    Via RSRT i couldn't find the piece of coding either.
    I'm not looking for the functionality but the piece of coding that is used for this.
    How can I find it??
    Cheers.

    Ok, this code works as per my note above. If the period of the system date is the first of the fiscal year, it will return to the previous fiscal year to get a range for YTD.
    Basically, this acts as if you're running the query in the previous period for current YTD.
    WHEN 'ZFYTLFP'.
            CLEAR: ZE_T_RANGE, E_T_RANGE, ZI_T_VAR_RANGE, W_YEAR, W_PERIOD, L_FPER.
            DATA: l_poper    LIKE t009b-poper.
            DATA: l_fiscyear LIKE t009b-bdatj.
            DATA: l_curdate  LIKE sy-datum.
            l_curdate = SY-DATUM.
            CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
              EXPORTING
                  i_date         = l_curdate
                  i_periv        = i_periv
              IMPORTING
                  e_buper        = l_poper
                  e_gjahr        = l_fiscyear
              EXCEPTIONS
                  input_false    = 1
                  t009_notfound  = 2
                  t009b_notfound = 3
                  OTHERS         = 4.
           W_YEAR = l_fiscyear(4).
            W_PERIOD = l_poper(3).
            IF W_PERIOD = '001'.
              W_YEAR = W_YEAR - 1.
              W_PERIOD = '012'.
            ELSE.
              W_PERIOD = W_PERIOD - 1.
            ENDIF.
            ZE_T_RANGE-LOW(4)   = W_YEAR."  year
            ZE_T_RANGE-LOW+4(3) = '001'.
            ZE_T_RANGE-HIGH(4) = W_YEAR. "  year
            ZE_T_RANGE-HIGH+4(3) = W_PERIOD.
            ZE_T_RANGE-SIGN = 'I'.
            ZE_T_RANGE-OPT = 'EQ'.
            APPEND ZE_T_RANGE TO E_T_RANGE.

Maybe you are looking for

  • Make few columns of Excel file read only when downloaded

    Hi Experts, Is there any way we can set few of the columns in excel sheet as read only when downloaded from SAP. We have requirement where a program will generate a report and download it into an excel file on desktop.  When the file is downloaded, t

  • How can I add the text from a Word document to an existing PDF that is my letterhead?

    I have a business letterhead created to a PDF file.  I'd like to add text from letters to this letterhead but do not know how.  Please help.

  • Problem with my n70

    hi i have nokia n70 but i cant update my contacts using nokia pc suite v.6.8! i can synchronisating the phone and the pc but when i try to add or delete some data in the dialog box appear the messageC Sync has encountered a problem and has terminated

  • Using Slideshows to Rate Photos

    In previous versions I always ran a quick slideshow following an import in order to quickly rate my photos (I use smart libraries based on ratings). From within the slide show I could press a number key to rate each photo. This seems to have gone fro

  • Executing *.java using unix process

    Hi, I have a problem with executing *.java command using unixprocess in java class. My java code snippet contain like... Process p = Runtime.getRuntime().exec(command); where command= "/data1/oracle/product/10.1.3.1/OracleSOA/jdk/bin/javac -d /tmp/cl