ABAP program error for user EXIT

Hi, I wrote code in  EXIT_SAPLRSAP_001
When check and active it there were no syntax errors but when go rsa3 and check it gives an error at the follwing line
  it_mcekpo[] = c_t_data[].
Runtime error: The internal talbles are neither compitable nor convertable.
I have defined it_mcekpo as below:
DATA  BEGIN OF IT_MCEKPO OCCURS 1.
        include structure mcekpo.
DATA  END   OF IT_MCEKPO.
But when I double click on 'c_t_data[]' , I get a message "object not defined, do you want do define".
Can some one tell me how should I define this, what aption I should choose and what is the strcture.
I am trying to add afnam, banfn and bednr from ekpo table to MC02M_0ITM (2LIS_02_ITM).
And is there any naming convention for 'it_mcekpo' and 'c_t_data'?
Any help is appreciated.
(This is my first userexit)
data: begin of it_ekpo occurs 0,
      ebeln like ekpo-ebeln,
      ebelp like ekpo-ebelp,
      afnam like ekpo-afnam,
      banfn like ekpo-banfn,
      bednr like ekpo-bednr,
     bukrs like ekpo-bukrs,
  end of it_ekpo.
when '2LIS_02_ITM'.
  it_mcekpo[] = c_t_data[].
  select ebeln ebelp afnam banfn bednr bukrs
  from ekpo  into table it_ekpo
    for all entries in it_mcekpo
    where ebeln = it_mcekpo-ebeln and
          ebelp = it_mcekpo-ebelp.
performance imprv.
  if not it_ekpo is initial.
     sort it_ekpo by ebeln ebelp.
  endif.
  loop at it_mcekpo.
    read table it_ekpo with key ebeln = it_mcekpo-ebeln
                                ebelp = it_mcekpo-ebelp
                                binary search.
    if sy-subrc = 0.
      it_mcekpo-zzafnam = it_ekpo-afnam.
      it_mcekpo-zzbanfn = it_ekpo-banfn.
      it_mcekpo-zzbednr = it_ekpo-bednr.
     it_mcekpo-zzabukrs = it_ekpo-bukrs.
   endif.
   modify it_mcekpo.
endloop.

Hi,
TRY the below code :
TYPES BEGIN OF TYPE_02ITM.
     INCLUDE STRUCTURE MC02M_0ITM.
TYPES END OF TYPE_02ITM.
TYPES:  BEGIN OF TYPE__ekpo,
ebeln like ekpo-ebeln,
ebelp like ekpo-ebelp,
afnam like ekpo-afnam,
banfn like ekpo-banfn,
bednr like ekpo-bednr,
bukrs like ekpo-bukrs,
end of type_ekpo.
CASE I_DATASOURCE.
when '2LIS_02_ITM'.
WHEN '2LIS_02_ITM'.
DATA:
  ITAB_EKPO TYPE STANDARD TABLE OF TYPE_EKPO
       WITH HEADER LINE
       WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
DATA:
  ITAB_02ITM TYPE STANDARD TABLE OF TYPE_02ITM
       WITH HEADER LINE
       WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
ITAB_02ITM[] = C_T_DATA[] .
select ebeln ebelp afnam banfn bednr bukrs
from ekpo into table itab_ekpo
for all entries in ITAB_02ITM
where ebeln = ITAB_02ITM-ebeln and
ebelp = ITAB_02ITM-ebelp.
performance imprv.
if not itab_ekpo is initial.
sort itab_ekpo by ebeln ebelp.
endif.
loop at ITAB_02ITM.
read table itab_ekpo with key ebeln = ITAB_02ITM-ebeln
ebelp = ITAB_02ITM-ebelp
binary search.
if sy-subrc = 0.
ITAB_02ITM-zzafnam = itab_ekpo-afnam.
ITAB_02ITM-zzbanfn = itab_ekpo-banfn.
ITAB_02ITM-zzbednr = itab_ekpo-bednr.
ITAB_02ITM-zzabukrs = itab_ekpo-bukrs.
endif.
modify ITAB_02ITM.
endloop.
c_t_data[] = ITAB_02ITM[].
With rgds,
Anil Kumar Sharma .P

Similar Messages

  • Trigger a waiting ABAP program from a User Exit of CO01

    Hi all,
       We would like to launch a ABAP program from a User Exit (EXIT_SAPLCOZV_001) of CO01, this ABAP program has a special characteristic: using Function Module RFC_PING_AND_WAIT, so this program will be existing until terminating event coming.
        Our purpose is terminate CO01 normally before finishing of ABAP program. We don't know if it's possible?
        Actually:
           1. when we use SUBMIT ..., the process will stop CO01 (stop not normally) and then launch ABAP program. => This is not suitable for our purpose.
           2. when we use SUBMIT ... and RETURN, CO01 will wait for finishing of ABAP program => This is not suitable for our purpose too, because we wish CO01 terminated normally when ABAP program is still existing and waiting for its terminating event.
    Do you have a solution that is suitable for our purpose, could you please help us?
    (The context is below:
    Time:  Begin-->CO finished> ABAP finished-->    
       Launch CO01 --> Call User Exit --> Call ABAP program for waiting --> CO01 saved normally.
    > ABAP program still waiting ---> waiting for terminating event       
    Thanks a lot,
    Vinh Vo

    Hi,
         Try with the function module BP_EVENT_RAISE, it takes eventid, and eventparm as import parameters in the User exit.
    1) With Eventid, you create a background job of the ABAP program and schedule it. Eventparm can be the Production order number.
    2) So when ever the Event is triggered the FM gets triggered and which in turn run the ABAP program, so the foreground the CO01 transaction runs without waiting for the ABAP program to complete.
    Regards
    Bala Krishna

  • RFC_NO_AUTHORITY  error for user SAPSYS in client 000

    Hi
    I have a lot of abap dumps in ST22 RFC_NO_AUTHORITY  error for user SAPSYS in client 000 for today which I'm not sure what they mean.  I don't have a SAPSYS user in client 000.
    The reason that I'm concerend is we had an incident with the SAP server last night where it became unresponsive about 2.30 am and had to be manually rebooted this morning. The R3 jobs all ran OK but the BW loads failed and had to be re-run this morning. There were no unusual jobs or programs running last night and the Server Event Log does not contain any further information as to the probable cause of the problem.
    I'm not sure if this error is related to the BW jobs running and was wondering did anyone come accross it and what it means.
    Thanks
    Siobhan

    Check notes 944615 and 93254.
    Rich

  • Need help for user exit mereq001

    Hi,
    I need help for user exit mereq001. I think I messed up with include table CI_EBANDB and CI_EBANMEM. And When I tried to check the syntax . It gives me error like : <b>Class IF_PURCHASE_REQUISITION. Inconsistency in the dictionary for the structure mereq_item_s_cust_data.</b> Anyone had experience for this exit? I just need to extract costcenter information of the each item from the requisition and block the requisiton if the costcenter are differents from each other before the requisition is saved. Any one has idea about it?
    Thanks.

    biao,
    Have you checked this struture consistency from SE11. Also check the activation log.
    If there are any errors and you are not able to rectify the same use RSDDCHECK program, give your table name and run the report.
    This will list down the error structures releated this table and also prompts for you to activate it.
    Regds
    Manohar

  • Is it safe/okay to use RSNAST00 program in a user-exit?

    Hi Experts,
    I got a business requirement and its:
    After SAVEing the sales order......by using the user-exit USEREXIT_SAVE_DOCUMENT I have to trigger custom IDOC (currently its in the system and using for some other application) outbound direction to XYZ logical system.
    But, the functional spec is asking me to to use RSNAST00 program in the above said user-exit.
    So pls clarify,
    1) Is it safe to use this RSNAST00 program in the user-exits?
    2) If so, Wht is the best/safest approach to use it? is it by using SUBMIT AND RETURN statement? or do we have any other?
    3) Actually, guess this is not good approach (achieving via ABAP workbench/triggering IDOC outbound by custom code of user-exit) to meet this functionality.......its a configuration task need to done by functional guy.

    Thank you Vinod.
    If thats the ONLY concern, then I can write a seperate FM, where in I will use SUBMIT RSNAST00 AND RETURN statements, and I will call this FM in a SEPERATE / BACKGROUND TASK, which works in a seperate LWU.
    Pls. shade some light
    Thank you

  • Message error on user-exit MV50AFZ1

    Hi!
    I need to send a message error on user-exit MV50AFZ1 (VL01N), but I can't, because when I use BAPI_DELIVERYPROCESSING_EXEC for create deliveries, it will abort my program.
    My program try to create many deliveries together, when occurs a message error, I don't know what order is the problem!!
    Thanks,
    Tatiana

    Hello.
    In the exit, use a condition like:
    IF sy-tcode EQ 'VL01N'.
      MESSAGE E000(...)
    ENDIF.
    This will avoid the error in BAPI execution.
    Regards,
    Valter Oliveira.

  • Value for user-exit variable  is invalid

    Hi Gurus,
    My Value for a Fiscal Year Prd returns a invalid value for the 12th month of each year( for Example 12/2004, returns the error "Value 200313 for User-exit variable is invalid.
    This is the code that is being used.
    *Rolling 12 months for entered month
    when 'ZCALM12'.
          clear: v_mth, v_yr.
          REFRESH E_T_RANGE.
          CLEAR L_S_RANGE.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                   WHERE VNAM = 'ZCALMON'.
            exit.
          endloop.
          v_yr = LOC_VAR_RANGE-LOW+0(4) - 1.
          v_mth = LOC_VAR_RANGE-LOW+4(2) + 1.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT = 'BT'.
          concatenate v_yr v_mth into L_S_RANGE-LOW.
          L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
          APPEND L_S_RANGE TO E_T_RANGE.
    Thanks in Advance.

    Hi Ravi,
    when 'ZCALM12'.
    clear: v_mth, v_yr.
    REFRESH E_T_RANGE.
    CLEAR L_S_RANGE.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZCALMON'.
    exit.
    endloop.
    <b>-->> Here, you are not checking any thing.</b> <i>On which logic you are reducing year by one and increasing month by 1..?</i>
    v_yr = LOC_VAR_RANGE-LOW+0(4) - 1.
    v_mth = LOC_VAR_RANGE-LOW+4(2) + 1.
    -->><i>IF month is 200512 you will get output from above code is :</i> please check.
    v_yr = 2005 - 1 = 2004
    v_mth = 12 +1 = 13.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    concatenate v_yr v_mth into L_S_RANGE-LOW.
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
    APPEND L_S_RANGE TO E_T_RANGE.
    Try to debug the code by keeping break point after When. and execute the report, you will be debugging mode.
    Hope it Helps
    Srini

  • ABAP runtime error for 0CRM_OPPT_H and I while running RSA3

    hello Gurus,
         I'm having problems while running RSA3 transaction for these data sources.
    0CRM_OPPT_H
    0CRM_OPPT_I
    0CRM_SALES_ACT_1
    0CRM_SALES_ACT_I.
    I'm getting ABAP runtime error for these.
    This is the error:
    Runtime Error          CALL_FUNCTION_CONFLICT_TAB_TYP
    Exception              CX_SY_DYN_CALL_ILLEGAL_TYPE
    I tried finding OSS notes for these, but I didn’t succeed.
    I activated the data source from RSA5, and then I tried RSA3. That time I got “Errors occurred during extraction”.
    After that I activated delta at BWA5, then I started getting runtime error.
    Even though I activated at BWA5, I am not able to see the data sources at BWA7.
    Am I missing any thing…please guide me through this….
    Thanks
    RKR

    Thanks for your replay... All the DS and related tables are active..
    But wen I tried to re-generate the DS again... this is the warning I'm getting... Any idea why I'm getting this....
    The even-numbered length of the DEC field SAMPLE_QTY_ALLOW can lead to problems
    <b>Message no. R8569</b>
    <b>Diagnosis</b>
    You want to use the field SAMPLE_QTY_ALLOW in the extract structure for DataSource 0CRM_OPPT_I. This field has a field of type 'DEC' (or 'CURR' or 'QUAN') with an even number of characters.
    This can create problems since the length resulting from calculations in ABAP (for example, in extractors or Customer Exits for extraction) is too large to be inserted in the database later (PSA in BW), causing a short dump.
    <b>Procedure</b>
    This warning is only relevant when the maximum length of this field is exceeded during extraction, for example when the field is expanded in the Customer Exit through a calculation.
    More information and a remedy can be found in SAP Note 641744.
    When I search the OSS note, SAP suggesting to apply 883310 note.
    In my company we are using CRM 4.0 servie pak8. SAP suggsting to install service pak 11, but my client is not interested to upgrade to 11 as CRM people are working on service pak 8.
    By any chance we can use specific note which change the ABAP code to solve this problem... Please give me some suggetions...
    Thanks
    RKR

  • ABAP Program to unlock users

    Hi Everyone,
    I am trying to develop a ABAP Program to unlock users in sap client. Please if anyone can help me I will be thankful to them.
    Thanks in advance.
    Regards,
    Gaurav.

    eh, such a functionality already exists. in SU01 you got a button for that.

  • ABAP Programming Error when saving the Process Order confirmation in COR6N

    Hello,
    We have an issue related to Process Order confirmation using Tcode COR6N. When we enter all the inputs to confirm( Activity, yield and phase) and click on save it gives ABAP Programming Error (Exception condition "SEQ_NOT_FOUND" raised).
    Any inputs in this regard, would be appreciated.

    Hello
    I can observe that you have implemented the report ZOPSECRE and that an inconsistency was found.
    This repor corrects inconsistent orders which do not have an operation or a sequence, or the two of them.
    The report checks whether there is at least one operation or one sequence and creates both including status objects.
    Therefore, you need to have the default valus for the operation generation defined on OPJG for this order type/plant.
    BR
    Caetano

  • ABAP programming Error in DTP execution

    Hi
    When execute DTP on InfoCube it generate following error after approx 10 to 15 minutes:
    ABAP programming Error in DTP execution
    Screen Shot also attached.
    In PSA is shows all records OK (30 records)
    What is the solutions?

    Hi Imran,
    Good to knew you got resolution for this issue.
    If you are getting output from above replies mark the correct or helpful answers. So that it will be helpful if some one faces the same issue again. http://scn.sap.com/docs/DOC-46006. You marked your answer as correct now.

  • Help reqd for user exit

    Hi all,
    the requirement is...
    In MIRO,the Incoimg invoice should not be posted without an empty field of amount(WRBTR) in the Basic Data.Currently as per std,it's not a mandatory field and can be posted by not entering any amount in that.So, either we have to make it as a mandatory field or should restrict not to saving the data if posting of empty field.(Not giving any amount)***seems,it tells the user to give the amount as mandatory.
    How to do this.....if its coming under the USER Exit object...pls post both how to get the std program and enhancement assignment(it asks while creating user exit in CMOD) also for user exit.
    thanks & regards
    sankar.

    hi
    Program name is SAPLMR1M
    For MIRO tcode, you have below user exits.
    LMR1M001            User exits in Logistics Invoice Verification                    
    LMR1M002            Account grouping for GR/IR account maintenance                  
    LMR1M003            Number assignment in Logistics Invoice Verification             
    LMR1M004            Logistics Invoice Verification: item text for follow-on docs    
    LMR1M005            Logistics Inv. Verification: Release Parked Doc. for Posting    
    LMR1M006            Logistics Invoice Verification: Process XML Invoice             
    MRMH0001            Logistics Invoice Verification: ERS procedure                   
    MRMH0002            Logistics Invoice Verification: EDI inbound                     
    MRMH0003            Logistics Invoice Verification: Revaluation/RAP                 
    MRMN0001            Message output and creation: Logistics Invoice Verification     
    EXIT_SAPLMR1M_003 may useful to you. Check with this.
    Reward if it dose
    Thanks
    Siva Kumar.

  • Precautions for User Exits

    Can anyone tell me what are the precautions to be taken for user exits?
    i mean...what are the ABAP statements that are not used in user exits...
    can anybody plz suggest me?

    Hi,
    Welcome to SDN.
    COMMIT WORK should not be used in a user exit. This reason is that it could/will commit all work done by the entire transaction and could possibily create data inconsistancy.
    Also LEAVE TO TRANSACTION and SUBMIT statements should also be not used. It will terminate the current LUW.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • ABAP Programming Error, OBJECTS_OBJREF_NOT_ASSIGNED, CL_GRFN_FPM_UTIL======

    Hi All,
    I am running GRC 10.0 SP07 when trying to add a response to a risk I get the following ABAP programming error,
    Category               ABAP Programming Error
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED
    ABAP Program           CL_GRFN_FPM_UTIL==============CP
                                                                                    |
    |    Access via 'NULL' object reference not possible.  
    You attempted to use a 'NULL' object reference (points to 'nothing')    
    |    access a component (variable: " ").                                                  
    |    An object reference must point to an object (an instance of a class)
    |    before it can be used to access components.                                  
    |    Either the reference was never set or it was set to 'NULL' using the              
    |    CLEAR statement.
    Any help on the error would be greatly appreciated.
    Thanx
    Warren

    Hi Victor,
    When I am on a risk in NWBC, I select the "Response Plan" Tab, then when I try create a response I get the error.
    This is the error that is displayed:
    Error while processing your query
    What has happened?
    The URL call http://ravenclaw.cqs.co.za:8000/sap/bc/webdynpro/SAP/GRRM_WD_RNP was terminated because of an error.
    Note
    The following error text was processed in system GRC : Access via 'NULL' object reference not possible.
    The error occurred on the application server ravenclaw_GRC_00 and in the work process 7 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: GET_OIF_INFO of program CL_GRFN_FPM_UTIL==============CP
    Method: GET_INSTANCE of program CL_GRFN_OIF_BASE==============CP
    Method: INIT_UIBB of program /1BCWDY/06EI2HED04NJ1RLM34O4==CP
    Method: IF_COMPONENTCONTROLLER~INIT_UIBB of program /1BCWDY/06EI2HED04NJ1RLM34O4==CP
    Method: HANDLEDEFAULT of program /1BCWDY/06EI2HED04NJ1RLM34O4==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/06EI2HED04NJ1RLM34O4==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    Method: NAVIGATE of program CL_WDR_CLIENT_APPLICATION=====CP
    Method: DO_NAVIGATION of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Thanx
    Warren

  • ABAP Programming error UNCAUGHT_EXCEPTION

    HI All,
    I am trying to install BI content  infocube with grouping before and after
    Category               ABAP Programming Error
    Runtime Errors         UNCAUGHT_EXCEPTION
    Except.                CX_RSD_INFOPROV_NOT_FOUND
    ABAP Program           CL_RSO_EXCEL_WORKBOOK_PROXY===CP
    Application Component  BW-WHM-MTD
    Date and Time          02.01.2007 04:42:08
    SAP Release..... 740
    SAP Basis level 0005
    Regards
    Kuzhanthaivel

    Hi,
    you can install one by one.
    if your facing any problem use the do only necessary objects
    please find the below doc it will give an idea.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/102906a4-f13d-2e10-7199-ce316ff254b8?overridelayout=true
    Thanks,
    Phani,

Maybe you are looking for