How to find the job which created the session with errors ?

Hi,
I am going to transaction SM35 to see the sessions which has errors. Now if I want to see, what Job was responsible to create that session, how can I see that ?
Regards,
Rajesh.

hi Rajesh,
Refer to this code to create a session for the erroreneous records
REPORT  ztest_report
NO STANDARD PAGE HEADING
                        LINE-SIZE 255
                        MESSAGE-ID ZRASH.
*                 Internal Table Declarations                          *
*--Internal Table for Data Uploading.
DATA : BEGIN OF IT_FFCUST OCCURS 0,
         KUNNR(10),
         BUKRS(4),
         KTOKD(4),
         ANRED(15),
         NAME1(35),
         SORTL(10),
         STRAS(35),
         ORT01(35),
         PSTLZ(10),
         LAND1(3),
         SPRAS(2),
         AKONT(10),
       END OF IT_FFCUST.
*--Internal Table to Store Error Records.
DATA : BEGIN OF IT_ERRCUST OCCURS 0,
         KUNNR(10),
         EMSG(255),
       END OF IT_ERRCUST.
*--Internal Table to Store Successful Records.
DATA : BEGIN OF IT_SUCCUST OCCURS 0,
         KUNNR(10),
         SMSG(255),
       END OF IT_SUCCUST.
*--Internal Table for Storing the BDC data.
DATA : IT_CUSTBDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*--Internal Table for storing the messages.
DATA : IT_CUSTMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA : V_FLAG1(1) VALUE ' ',
"Flag used for opening session.
       V_TLINES LIKE SY-TABIX,
       "For storing total records processed.
       V_ELINES LIKE SY-TABIX,
       "For storing the no of error records.
       V_SLINES LIKE SY-TABIX.
       "For storing the no of success records.
*          Selection screen                                            *
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS : V_FNAME LIKE RLGRAP-FILENAME,
             V_SESNAM  LIKE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK B1.
*          Start-of-selection                                          *
START-OF-SELECTION.
*-- Form to upload flatfile data into the internal table.
  PERFORM FORM_UPLOADFF.
*        TOP-OF-PAGE                                                   *
TOP-OF-PAGE.
  WRITE:/ 'Details of the error and success records for the transaction'
  ULINE.
  SKIP.
*          End of Selection                                            *
END-OF-SELECTION.
*-- Form to Generate a BDC from the Uploaded Internal table
  PERFORM FORM_BDCGENERATE.
*--To write the totals and the session name.
  PERFORM FORM_WRITEOP.
*&      Form  form_uploadff
*     Form to upload flatfile data into the internal table.
FORM FORM_UPLOADFF .
*--Variable to change the type of the parameter file name.
  DATA : LV_FILE TYPE STRING.
  LV_FILE = V_FNAME.
*--Function to upload the flat file to the internal table.
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      FILENAME                      =  LV_FILE
*     FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = 'X'
*     HEADER_LENGTH                 = 0
*     READ_BY_LINE                  = 'X'
*     DAT_MODE                      = ' '
*   IMPORTING
*     FILELENGTH                    =
*     HEADER                        =
    TABLES
      DATA_TAB                      = IT_FFCUST
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
  IF SY-SUBRC = 0.
*--Deleting the headings from the internal table.
    DELETE IT_FFCUST INDEX 1.
*--Getting the total number of records uploaded.
    DESCRIBE TABLE IT_FFCUST LINES V_TLINES.
  ENDIF.
ENDFORM.                    " form_uploadff
*&      Form  Form_bdcgenerate
*     Form to Generate a BDC from the Uploaded Internal table
FORM FORM_BDCGENERATE .
*--Generating the BDC table for the fields of the internal table.
  LOOP AT IT_FFCUST.
    PERFORM POPULATEBDC USING :
                                'X' 'SAPMF02D' '0105',
                                ' ' 'BDC_OKCODE'  '/00' ,
                                ' ' 'RF02D-KUNNR' IT_FFCUST-KUNNR,
                                ' ' 'RF02D-BUKRS' IT_FFCUST-BUKRS,
                                ' ' 'RF02D-KTOKD' IT_FFCUST-KTOKD,
                                'X' 'SAPMF02D' '0110' ,
                                ' ' 'BDC_OKCODE'  '/00',
                                ' ' 'KNA1-ANRED'  IT_FFCUST-ANRED,
                                ' ' 'KNA1-NAME1' IT_FFCUST-NAME1,
                                ' ' 'KNA1-SORTL'  IT_FFCUST-SORTL,
                                ' ' 'KNA1-STRAS' IT_FFCUST-STRAS,
                                ' ' 'KNA1-ORT01' IT_FFCUST-ORT01,
                                ' ' 'KNA1-PSTLZ' IT_FFCUST-PSTLZ,
                                ' ' 'KNA1-LAND1' IT_FFCUST-LAND1,
                                ' ' 'KNA1-SPRAS' IT_FFCUST-SPRAS,
                                'X' 'SAPMFO2D' '0120',     
                                ' ' 'BDC_OKCODE'  '/00',
                                'X' 'SAPMF02D' '0125',     
                                ' ' 'BDC_OKCODE'  '/00',
                                'X' 'SAPMF02D' '0130',     
                                ' ' 'BDC_OKCODE'  '=ENTR',
                                'X' 'SAPMF02D' '0340',     
                                ' ' 'BDC_OKCODE'  '=ENTR',
                                'X' 'SAPMF02D' '0360',
                                ' ' 'BDC_OKCODE'  '=ENTR',
                                'X' 'SAPMF02D' '0210',     
                                ' ' 'KNB1-AKONT'  IT_FFCUST-AKONT,
                                ' ' 'BDC_OKCODE'  '/00',
                                'X' 'SAPMF02D' '0215',
                                ' ' 'BDC_OKCODE'  '/00',
                                'X' 'SAPMF02D' '0220',     
                                ' ' 'BDC_OKCODE'  '/00',
                                'X' 'SAPMF02D' '0230',     
                                ' ' 'BDC_OKCODE'  '=UPDA'.
*--Calling the transaction 'fd01'.
    CALL TRANSACTION 'FD01' USING IT_CUSTBDC MODE 'N' UPDATE 'S'
    MESSAGES INTO IT_CUSTMSG.
    IF SY-SUBRC <> 0.
*--Populating the error records internal table.
      IT_ERRCUST-KUNNR = IT_FFCUST-KUNNR.
      APPEND IT_ERRCUST.
      CLEAR IT_ERRCUST.
*--Opening a session if there is an error record.
      IF V_FLAG1 = ' '.
        PERFORM FORM_OPENSESSION.
        V_FLAG1 = 'X'.
      ENDIF.
*--Inserting the error records into already open session.
      IF V_FLAG1 = 'X'.
        PERFORM FORM_INSERT.
      ENDIF.
*--Populating the Success records internal table.
    ELSE.
      IT_SUCCUST-KUNNR = IT_FFCUST-KUNNR.
      APPEND IT_SUCCUST.
      CLEAR IT_SUCCUST.
    ENDIF.
*--Displaying the messages.
    IF NOT IT_CUSTMSG[] IS INITIAL.
      PERFORM FORM_FORMATMSG.
    ENDIF.
*--Clearing the message and bdc tables.
    CLEAR : IT_CUSTBDC[],IT_CUSTMSG[].
  ENDLOOP.
*--Getting the total no of error records.
  DESCRIBE TABLE IT_ERRCUST LINES V_ELINES.
*--Getting the total no of successful records.
  DESCRIBE TABLE IT_SUCCUST LINES V_SLINES.
*--Closing the session only if it is open.
  IF V_FLAG1 = 'X'.
    PERFORM FORM_CLOSESESS.
  ENDIF.
ENDFORM.                    " Form_bdcgenerate
*&      Form  populatebdc
*       FOrm to Populate the BDC table.
FORM POPULATEBDC  USING    VALUE(P_0178)
                           VALUE(P_0179)
                           VALUE(P_0180).
  IF P_0178 = 'X'.
    IT_CUSTBDC-PROGRAM = P_0179.
    IT_CUSTBDC-DYNPRO = P_0180.
    IT_CUSTBDC-DYNBEGIN = 'X'.
  ELSE.
    IT_CUSTBDC-FNAM = P_0179.
    IT_CUSTBDC-FVAL = P_0180.
  ENDIF.
  APPEND IT_CUSTBDC.
  CLEAR IT_CUSTBDC.
ENDFORM.                    " populatebdc
*&      Form  FORM_OPENSESSION
*       Form to Open a session.
FORM FORM_OPENSESSION .
*--Variable to convert the given session name into reqd type.
  DATA : LV_SESNAM(12).
  LV_SESNAM = V_SESNAM.
*--Opening a session.
  CALL FUNCTION 'BDC_OPEN_GROUP'
   EXPORTING
     CLIENT                    = SY-MANDT
     GROUP                     = LV_SESNAM
     HOLDDATE                  = '20040805'
     KEEP                      = 'X'
     USER                      = SY-UNAME
     PROG                      = SY-CPROG
*  IMPORTING
*    QID                       =
   EXCEPTIONS
     CLIENT_INVALID            = 1
     DESTINATION_INVALID       = 2
     GROUP_INVALID             = 3
     GROUP_IS_LOCKED           = 4
     HOLDDATE_INVALID          = 5
     INTERNAL_ERROR            = 6
     QUEUE_ERROR               = 7
     RUNNING                   = 8
     SYSTEM_LOCK_ERROR         = 9
     USER_INVALID              = 10
     OTHERS                    = 11
  IF SY-SUBRC <> 0.
    WRITE :/ 'Session not open'.
  ENDIF.
ENDFORM.                    " FORM_OPENSESSION
*&      Form  FORM_INSERT
*       fORM TO INSERT ERROR RECOED INTO A SESSION.
FORM FORM_INSERT .
*--Inserting the record into session.
  CALL FUNCTION 'BDC_INSERT'
    EXPORTING
      TCODE                  = 'FD01'
*     POST_LOCAL             = NOVBLOCAL
*     PRINTING               = NOPRINT
*     SIMUBATCH              = ' '
*     CTUPARAMS              = ' '
    TABLES
      DYNPROTAB              = IT_CUSTBDC
    EXCEPTIONS
      INTERNAL_ERROR         = 1
      NOT_OPEN               = 2
      QUEUE_ERROR            = 3
      TCODE_INVALID          = 4
      PRINTING_INVALID       = 5
      POSTING_INVALID        = 6
      OTHERS                 = 7
  IF SY-SUBRC <> 0.
    WRITE :/ 'Unable to insert the record'.
  ENDIF.
ENDFORM.                    " FORM_INSERT
*&      Form  FORM_CLOSESESS
*       Form to Close the Open Session.
FORM FORM_CLOSESESS .
  CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
      NOT_OPEN    = 1
      QUEUE_ERROR = 2
      OTHERS      = 3.
  IF SY-SUBRC <> 0.
  ENDIF.
ENDFORM.                    " FORM_CLOSESESS
*&      Form  FORM_FORMATMSG
*       Form to format messages.
FORM FORM_FORMATMSG .
*--Var to store the formatted msg.
  DATA : LV_MSG(255).
  CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
      ID        = SY-MSGID
      LANG      = SY-LANGU
      NO        = SY-MSGNO
      V1        = SY-MSGV1
      V2        = SY-MSGV2
      V3        = SY-MSGV3
      V4        = SY-MSGV4
    IMPORTING
      MSG       = LV_MSG
    EXCEPTIONS
      NOT_FOUND = 1
      OTHERS    = 2.
  IF SY-SUBRC = 0.
    WRITE :/ LV_MSG.
  ENDIF.
  ULINE.
ENDFORM.                    " FORM_FORMATMSG
*&      Form  form_writeop
*       To write the totals and the session name.
FORM FORM_WRITEOP .
  WRITE :/ 'Total Records Uploaded :',V_TLINES,
           / 'No of Error Records :',V_ELINES,
           / 'No of Success Records :',V_SLINES,
           / 'Name of the Session :',V_SESNAM.
  ULINE.
ENDFORM.                    " form_writeop

Similar Messages

  • Could not edit original smart object because the application which created the smart object could not be launched

    could not edit original smart object because the application which created the smart object could not be launched

    Hi there,
    I got this problem when I installed Adob master collection Over CS 5.
    I had children book story storis which created in Adobe illustrator CS 5 and I created art boards in Adobe photoshop cs 5.
    After installting CS 6 i tried to edit the smart objects and it was not opeinging the smart object file in Illustrator.
    I did some tests.
    1) Right click on smart object layer and click export contents. Save on desktopp or anywhere you want. (I saved on desktop)
    2) I had this file on my desktop (Vector Smart Object10.ai) but it didn't show any icon, which program should open this type of file.
    3) Double click on the file and it pop up a extension window 'Click on change and select adobe illustrator' and press OK.
    4) Go back to your photoshop file and right click on smart object layer and click dit content. now this time it opens up assets in illustrator.
    ENJOY!
    Thanks
    Haroon
    www.4d-studios.co.uk

  • How to find a program which modifies the variant of a standard program?

    Hi,
    I have an issue where the variant values of the standard program RKEVEXT3 (Transaction : KEFC), is getting changed by a background job.I need to find the program which modifies the values of the variant.
    Any input on this will be helpful.
    Regards,
    Raj

    hi Raj,
    you can change variants with FM RS_VARIANT_CHANGE. I would suggest to run a where used list for this variant in your system.
    hope this helps
    ec

  • HT4623 International Missed calls on 4s do not show 00s before the number, which creates the problem of call back. Is it a Tecnical fault or a Setting problem?

    International Missed Calls on my i phone 4s do not reflect 00s which creates a problem of a Call Back. Is it a Tecnical inadequacy or a Setting problem?

    It has righted itself. I am not sure how. But I turned off the Powerbook. And on the MacBook Air, I made sure to change the MAC number to the MacBook Air one.
    I restarted the MacBook Air. Now, the internet radio is working well, no rebuffering the stream every ten seconds.
    And when I turned on the Powerbook and tried the internet this time, I could not get connected.
    I think the bad internet connection on the MacBook Air was due to the fact that the internet was being shared by two computers. Funnily enough, the internet was OK on the Powerbook but was not good on the MacBook Air when I did that.
    So, it didn't turn out to be a MacBook Air problem but an internet provider problem.
    I will keep my fingers crossed that the MacBook Air internet connection keeps working fine.
    I think it's possible to use the internet on both computers simultaneously but the quality of the connection is poor on the MacBook Air when I do that. And when I turn off one of the computers, it is not possible to share an internet connection when I turn that computer back on again. I have to set up the MAC number of that computer again on the nespot site for it to access the internet. But if I do that, the internet quality on the MBA suffers.

  • How to find Background job which is running program RSWUWFML2

    Hi Experts, i am trying to find which background job is running standard program 'RSWUWFML2', anyone can help on this?

    Go to SM37. Put * in the Job name and user name. The enter the program name in the last field.
    this should give you the job scheduled or running.

  • How to find out to which query the query-elements in a transport belong?

    Hi specialists,
    the topic should already say everything.
    I've got a changeable transport-request with several query-elements in it.
    But I haven't any idea to which query this elements belong. Where do I need to look-up that information?

    The excat table is not known to me..try finding in the following tables:
    RSZCALC                       
    RSZCEL                        
    RSZCHANGES                    
    RSZCOMPDIR                   
    RSZCOMPIC                     
    RSZCONTROLTEXTS               
    RSZELTATTR                    
    RSZELTDIR                     
    RSZELTPRIO                    
    RSZELTPROP                    
    RSZELTTXT                     
    RSZELTTXT_MULTI               
    RSZELTXREF                    
    RSZGLOBV                      
    RSZIELPICMON                 
    RSZOPRATOR                    
    RSZOPRATXT
    Thanks..
    Shambhu

  • How to find out that which port is configured with modem?

    Can some one please shed some light on this..

    try sending 'ATZ' to each port in turn until you get 'OK' back

  • How to find program which created the session

    Hi friends,
    can anybody tell me, how to find out the program name that as generated   perticular batch session in SM35.
    I have session name and i want to find out the program which created the session.
    Thanks in advance.
    Saya

    Hi Saya,
    Check table <b>TBTCO</b> and<b> TBTCP</b> to know about the program created by a session.
    Give Job name to TBTCP-JOBNAME and get report name in the field TBTCP-PROGNAME.
    Thanks,
    Vinay

  • How to find the tables which are the candidates for gathering stats in 10g

    Hi,
    In 10g how can we find the tables, partitions which are the candidates for gathering the stats.
    I want to findo those tables, partitions and gather the stats on daily basis.
    Thanks,
    Mahi

    The probem you describe has been posted about before. There are known issues with the default dbms_stats parameter settings for some environements.
    What you can do is just go ahead an manually submit dbms_stats commands with appropriate parameters for tables that have not been analyzed or modify the maintenance window to give it more time.
    I would rather just generate the missing statistics myself then the job can continue to run in the normal maintenance window. Since the job should be looking only for tables that meet the stale requirements then once everything is analyzed it is likely the job can keep the statistics updated in the default time allowed.
    Be warned that the default parameter settings do not work well for some tables in some environments and if that proves true for your shop you can generate workable statistics on a table and then lock them so the nightly job ships regenerating the statistics for that table. You would then manually unlock, generate, and lock that statistics for that table as necessary.
    HTH -- Mark D Powell --

  • How to find the Job Name in the debugging from the SM37

    Hi All,
    Here my problem is i want to update the Actual UOM into MM02 and if new material is coming i need to create the material and UOM in MM01.
    for this requirement i am using RMDATIND standard Direct Input program and I am using Background JOB Schduling by giving name MRP_MATERIAL_MASTER_DATA_LOAD
    I am getting the data into my internal table and i am successfully getting the message "JOB started" once i execute the program.
    then i gone into SM37 there i found my job is completed.
    but when i try to find the data has updated in MM02 or MM01, here i could not found the updated data.
    Can any one can help me in this.
    Thanks & Regards,
    Venkat N

    hi,
    When ever you schedule any job, it gives the name of the job in the screen.
    Now after going to SM37 filter the screen for the time period you did the job and put the user id as your user id, so that it show only your jobs which started from the given time interval
    regards,
    Omkar.

  • Finding out the username which created a spesific company code

    How can I find out the username which created a spesific company code?
    Thanks in advance.

    Hi:
    In IMG (Tcode SPRO), go to Enterprise structure > Definition > FI > Edit, copy, delete, check Company code; double click on the Co Code, Utilities > Change Logs, check the dates.
    Give it a try
    Reward if helpful
    Aaon

  • How to use the DLLs which created from c++ in Java?

    And How to use the DLLs which created from JNI in C++?

    Huh?
    Are you asking how to do JNI - you should read the tutorial.
    Are you asking how to load it - then use System.loadLibrary()
    Are you asking what to do with the output from javah - put it in a C file and write some code, compile it into a dll.

  • I created a photo album on my iPhone 4s - edited photos etc. but I cannot figure out how to transfer it to my pc (using Windows 8).  The only folder in the iphone drive is the one which has the Camera roll photos :( Help please - I really need the photos!

    I created a photo album on my iPhone 4s - edited photos etc. but I cannot figure out how to transfer it to my pc (using Windows 8).  The only folder in the iphone drive is the one which has the Camera roll photos Help please - I really need the photos!

    The camera roll is not part of the sync process at all.
    You should be importing these photos to your computer regularly as you would with any digital camera.  Youc an organize them on your computer and sync the to the iphone if you wish.
    The photos sync from the computer to the iphone is one way.
    The iphone mirrors the selected content of the computer to which it is synced.

  • How can I cancle the job that created by SGEN

    Dear all,
             How can cancle the job that created by SGEN. after i run the T-code SGEN. I have shutdown the server. But after i restart the Server, the job is dead. but can not be cancled by SM37. When i terminate the job in the SGEN it can not work too. any other way to cancle the job?
             thanks!

    Hi Michael,
    PLease click on "CHECK STATUS" for this job in SM37 and check on "process ASAP".
    Then if there is no BTC work process for this job running in SM50, then this job status will change from "running" to "cancelled".
    Please try this and let me know the output.
    Regards,
    Hari Kishan

  • How to find when index was created in the database.

    Hi,
    Please help me, how to find when index was created in the database. It should give with date and time.
    Thanks... Bakser

    Please help me, how to find when index was created in the database. It should give with date and time.DBA_/ALL/User_objects Created
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(128)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                           DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    select OBJECT_NAME,TIMESTAMP,CREATED  from ALL_OBJECTS where OWNER='OWNERNAME' AND OBJECT_NAME='OBJECT_NAME' AND OBJECT_TYPE='INDEX';Edited by: Anantha on Apr 21, 2009 3:18 PM
    Edited by: Anantha on Apr 21, 2009 3:19 PM

Maybe you are looking for

  • Help in program

    Hi, i have to change  transaction CNA1 that don't bring any message when i run ,  and when i choose and run the transaction i don't wont to see the screen-> progress analyses , i wont to bring just message that its run successful . there is some that

  • Naming Problems with EJB when accessing from WebApplication

    Hi all, I'm trying to deploy an application consisting of several stateless session beans, one message driven bean and a web application. Everything works fine, until I try to log in (webapp). Then I get the following error: com.sap.engine.services.j

  • How is the Kalman filter estimator implemented in an MPC?

    I have a physical process with 2 inputs, 4 states and 2 outputs. Two of the states are measured while the other two needs to be estimated using kalman filter.I have developed the controller (2 i/p-2 o/p) with an MPC. I can see the 4 states in the imp

  • IPhone Wi-Fi not working...

    Hi, I have the 16gb 3G model of the iPhone. I don't know if it has to do with the 2.2 update. However after I did the update my iPhone won't find any Wi-Fi networks, even manually searching for them. I Now my Mac laptop finds my Wi-Fi fine, so it's n

  • Where are the streams?

    Hi, I'm trying to figure out where the streams are stored on the server. I'm running through the sample app "publishlive" and it seems be to be working, in that I get two videos (one local, one presumably from streaming from the server) going. On the