Where to insert code to check batch in t.code lt03(t.order)

Where to insert program  code to check batch in t.code LT03(t.order)

Hi,
         Use the below program to find the exit for ur reqirement
Just create a program with this code.
It will supply the User Exits for the given transaction with drill down to SMOD
Finding the user-exits of a SAP transaction code
Enter the transaction code in which you are looking for the user-exit
and it will list you the list of user-exits in the transaction code.
Also a drill down is possible which will help you to branch to SMOD.
REPORT YUSEREXIT .
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
parameters : p_tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq p_tcode.
if sy-subrc eq 0.
select single * from tadir where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir where pname = tstc-pgmna.
select single * from enlfdir where funcname =
tfdir-funcname.
select single * from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name eq enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
select * from tadir into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct where sprsl eq sy-langu and
tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
<b>Reward points</b>
Regards

Similar Messages

  • Any standard transaction code to check Batch Creation Date of a batch?

    Please let me know if you know any transaction to check batch creation date of a batch , preferably with valuation information.

    Hi
    You can try with MB5B. It wont give batch creation date, but it will give posting date (most of the cases posting date may be batch creation date)
    Otherwise you can try to pull the information at table level MCHA-ERSDA and develop query.
    regards
    Srinivas

  • [svn:osmf:] 14105: Fixed bug where canSeekTo(0) wasn' t checked before the auto rewind code in play was called.

    Revision: 14105
    Revision: 14105
    Author:   [email protected]
    Date:     2010-02-10 11:34:06 -0800 (Wed, 10 Feb 2010)
    Log Message:
    Fixed bug where canSeekTo(0) wasn't checked before the auto rewind code in play was called.  Fixed 347.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/media/MediaPlayer.as

    Have I mentioned how much i love my playbook now Great job on os 2.0

  • A sample code to check records of a system table?

    hi ABAP4 experts,
    We are pretty new at ABAP4.  We would be appreciated if you can provide a sample code to check how many records and calculate a total amount for a specific field, e.g., DMBTR in a system table, e.g., BSEG.  Note: there is no any selection for this table BSEG, we just want to get the total record count in this table and also the total amount for a specific field e.g. DMBTR in this table.
    Do we have to use an internal table to transfer all the records of BSEG into the internal table to get the result?
    We will give you reward points!

    Hi Kevin,
    Using SUM directly in SQL will NOT work for table BSEG because BSEG is pool table. You will get an ABAP error.
    "Aggregate functions and the addition DISTINCT are not supported in field lists for pooled and cluster tables".
    You need an internal table to transfer all data from BSEG and perform calculation for count and sum.
    Concerning about performance running perhaps you can code something like this.
    REPORT ZZFLTEST NO STANDARD PAGE HEADING.
    TABLES: BSEG.
    DATA: CURS          TYPE CURSOR,
          PACKAGE_SIZE  LIKE RMCS4-MC_CM_PSIZE VALUE '10000'.                                                                               
    DATA: BEGIN OF I_BSEG OCCURS 0,
            BELNR TYPE BSEG-BELNR,
            BURKS TYPE BSEG-BURKS,
            GJAHR TYPE BSEG-GJAHR,       
            BUZEI TYPE BSEG-BUZEI,       
            DMBTR TYPE BSEG-DMBTR,
            SHKZG TYPE BSEG-SHKZG.
    DATA: END OF I_BSEG.
    DATA: TOT_DMBTR TYPE BSEG-DMBTR,
          TOT_REC   TYPE I.
    SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS: P_SIZE LIKE RMCS4-MC_CM_PSIZE DEFAULT '10000'.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK B01.
    START-OF-SELECTION.
      PACKAGE_SIZE = P_SIZE.
      OPEN CURSOR WITH HOLD CURS FOR
      SELECT BELNR BURKS GJAHR BUZEI DMBTR SHKZG
      FROM BSEG
      WHERE BELNR <> SPACE
        AND BURKS <> SPACE
        AND GJAHR <> SPACE
        AND BUZEI <> SPACE.
    *Fetch internal table I_BSEG for every 10000 records.
      DO.
        FETCH NEXT CURSOR CURS
        INTO TABLE I_BSEG PACKAGE SIZE PACKAGE_SIZE.
        IF SY-SUBRC <> 0.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE CURSOR CURS.
      LOOP AT I_BSEG.
        TOT_REC = TOT_REC + 1.
        IF I_BSEG-SHKZG = 'S'.
          TOT_DMBTR = TOT_DMBRT + I_BSEG-DMBTR * -1.
        ELSE.
          TOT_DMBTR = TOT_DMBTR + I_BSEG-DMBTR.
        ENDIF.
      ENDLOOP.
      WRITE: / 'TOTAL BSEG-DMBTR:', TOT_DMBTR,
             / 'TOTAL RECORD:    ', TOT_REC.
    END-OF-SELECTION.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Insert chinese characters in oracle81 database(with code here)

    Hi all,
    I have problem on insert chinese characters in oracle8i database(with code below). But no problem when display chinese characters in HTML( not include in the follow program)
    Can anyone help me?????
    In unix:
    Database setting:
    charset: ZHT16BIG5
    version:8.1.7
    In NT 4.0 with SP5:
    web/app server setting
    webserver: iWs4.0.1
    appserver: iAs6.0
    Java 1.2.2 with download classes12.zip/nls_charset12.zip
    JDBC thin driver
    code:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    import javax.sql.*;
    import java.util.*;
    import java.lang.*;
    import java.lang.reflect.*;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import java.math.*;
    import oracle.sql.*;
    public class updatedata extends HttpServlet
    Connection dbCon = null;
    ResultSet rs = null;
    DataSource ds1 = null;
    String input_data = "";
    public void doGet(HttpServletRequest req, HttpServletResponse res)
         throws ServletException,IOException{
         input_data = req.getParameter("chinese_input");
    res.setContentType("text/html; charset=BIG5");
    PrintWriter out = res.getWriter();
    // draw a table
    ConnDB(out);
    DrawTable(out);
    public void JDBC(PrintWriter out) throws NamingException {
    InitialContext ctx = null;
    String dsName1 = null;
    Connection conn = null;
         dsName1 = "jdbc/project";
         try {
    ctx = new InitialContext();
    ds1 = (DataSource)ctx.lookup(dsName1);
         }catch (NamingException e) {
         out.println("exception in servlet in JDBC : " + e.toString());
    /** big5 to unicode conversion **/
    private String b2u(String str2convert)
         throws IOException {
         StringBuffer buffer = new StringBuffer();
         byte[] targetBytes = str2convert.getBytes();
         ByteArrayInputStream stream = new ByteArrayInputStream(targetBytes);
         InputStreamReader isr=new InputStreamReader(stream, "BIG5");
         Reader in = new BufferedReader(isr);
         int chInt;
         while ( (chInt = in.read()) > -1 ) {
              buffer.append((char)chInt);
         in.close();
         return buffer.toString();
    private void DrawTable(PrintWriter out){
    try{
         try{
         // update data
         String u="update test_chinese set chinese_script=? where prod_cd=?";
         String sProd = "T1";
         PreparedStatement ps = dbCon.prepareStatement(u);
         ps.setString(1, input_data);
         ps.setString(2, sProd);
         ps.executeUpdate();
         dbCon.commit();
         catch(SQLException e){
              out.println("exception in insert: " + e.toString());
    out.println("<html>");
    out.println("<body>");
    out.println("update success!!!!");
         out.println("</body>");
    out.println("</html>");
         catch(Exception e){
         out.println("exception in servlet in statement: " + e.toString());
    private Connection ConnDB(PrintWriter out){
         try{
         try{
              JDBC(out);
         catch (Exception e) {
              out.println("Database connect failed (init)");
              out.println(e.toString());
              return null;
         dbCon = ds1.getConnection();
         catch(Exception e){
         out.println("exception in servlet in connection: " + e.toString());
    return dbCon;
    public void destroy() {
    //Close database connection
    try {
    dbCon.close();
    catch (Exception e) {
    System.out.println("Error closing database (destroy)");
    System.out.println(e.toString());

    Hi, Jenny,
    When you said unable to insert to database, do you mean you get all ? marks in the database or garbage characters in the database?
    ? marks mean there are some byte chop off, and garbage characters mean the bytes are ok, just encoding problem.
    --Lichu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to access source code for checked in .sca files in the dev environment

    Hello,
    I am trying to do some CRM E-commerce development. The basis personnel has checked in all the relevant SCA archives listed in the setup documentation.  He has since given me the Servername and port for accessing the NWDI that I can set in the Development Environment. I can log on to the system and see the repository browser with all the branches.
    For example:
       CustomerConfig -> CRMEXT -> sap.com_SAP-CRMWEB -> dev -> active
    CustomerConfig -> CRMEXT -> sap.com_SAP-CRMWEB -> dev -> inactive
    How ever there is no code there to sync. Is there something missing in our setup for the NWDI so I can sync the CRM E commerce projects to the local system and modify them.
    Is there anything we have to do either in NWDI or in the IDE to see the source code to extend it.
    Thank You for your help in this matter.
    Sumit.

    Hey Pascal, Thanks for the help. We did a batch check in and the code did not go through. After we tried the check-in in the non-batch  mode it worked.

  • Check out ESS source code

    Hi Experts,
    EP7.0 SP11 ESS1.0 ERP2005, NW2004s.
    NWDI is installed successfully and two tracks are created according to the NWDI cookbook for ESS. Development configuration is imported into NWDS. Here our NWDI DEV  system is used as local J2EE engine in NWDS for local test purposes.
    I also created a project under <b>InActive DCs</b> views in NWDS. In the web dynpro perspective I could see the source of the applications (ex. DC ess~ben). I have read in the forums to check out the source code. Here I do not see any option to check out!! where will I see the option?
    when a new project is created in Inactive Dcs view, it should ask for creating an activity, but this did not happen!! should i create a activity in DTR perspective?
    it seems to me i can make the changes in the inactive dcs and then activate them later and deploy into local j2ee engine (here NWDI DEV) for test purposes. Is it ok?
    Regards!

    Hi,
    WebDynpro should automatically check-out source files if you want to modify something.
    If you are not asked for an activity: Or you logged on? You didn't accitdentally check the checkbox "keep local for now" when creating a new DC? Or do you have an activity that is marked as default activity so the NWDS automatically added the files to that activity without an explicit dialog?
    Making changes, activating them later and deploying locally built (inactive) deployables into a local/test J2EE engine does make perfect sense to me. You are testing before you commit your changes and publish them to you colleagues (to switch language a bit). Sounds OK to me.
    Regards,
    Marc

  • Performance checking inside the source code

    performance checking inside the source code who to check it.
    thanks and regards
    chandra sekhar

    I guess you are asking how to check it, then here is the answer
    SQL Trace transaction ST05
    The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on the SPFLI table in our test program is mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use

  • Check next number (activity code)

    Good day experts.
    This is the issue we are currently importing a SFC into the system or using the supplier barcode for the SFC inside visprise.  We unfortnately use two diferent product types from the same supplier where the two don't really have any differeneces.  The products are hard drives one is 40 gig and the other is a 80 gig, but inside visprise we are having troubles keeping the product seperated.
    We are wanting a way to check the barcode, because the part number is inside this barcode from the supplier to seperate the two inside visprise.
    I thought about using check next number activity code, but unfortnately this isn't getting the job done.  I was wondering if I was doing something wrong.  As of right now I have the acitivity codes create SFC as Pre-start and check next number as a pre-validate start.   I have tried changing the hook point, but nothing seems to work.  I can force it to not work at all or work for everything.
    I have a setup the next number maintenance and I can print out the correct barcode for this material, but I can't prevent us importing a incorrect barcode.

    Basically this is what is happening.  We are 'importing' Barcodes into the data base.  Problem lies we have two materials that are very close to each other (both hard drives) they are getting mixed inside the test equipment causing us to much down time.  I was reading up on the activity codes and was wondering how next number maintenance or mask valiation was working inside SAP ME.  To try and prevent the confusion.
    The biggest differences between the materials, that concerns SAP ME, is the barcode format.  The two different part numbers are inside the the supplier barcode that is given to us, which we are currently using for our SFC in SAP ME.
    It isn't a requirement for me to use SAP ME, but I was exploring every avenue.  If it is true that these only work at the specific points that the help site is suggesting i will try a different avenue, this is looking very possible right now.  I have tried using the activity codes with no luck in succeeding in the goal.

  • MIGO - how check batch classification.

    Hi all,
    When using the transaction Migo (create), the user can enter a certain characteristic through -> batch -> classification for each position. I have to check that the input code is not already used in another posizion.
    I found the Badi CACL_VALUE_CHANGE, but at this point I have only the characteristic of a single position.
    Does anybody know the internal table which stores the characteristics and at what point can I go to check them?
    I also found these internal tables IZH, AMM and ZM, but at the time of final check, they are not available.
    I thank you in advance

    Hi,
    You can get the characteristic values from the standad table AUSP , and table CHVW.
    Thanks and Regards,
    Narayani

  • OraRRP Error with "Unable to copy data file;Error code 2, check disk space"

    Hi,
    Some users get this message -"Unable to copy data file;Error code 2, check disk space" when run report with orarrp, but most users do not get it.
    I check free space at both server and client side, they are very sufficient.
    I also checked directory exists for REPORTXX_TMP variable.
    My user call reports via URL (rwservlet) and it occur for all reports.
    How I can solve this problem?
    Thanks in advance.
    Tawatchai R.

    Hi,
    have the same problem now. One user has temporarily problems to download .rrpa files via URL (rwservlet) request. Error code: -"Unable to copy data file;Error code 2, check disk space". Did you get a solution??
    Thanks in advance. Axel

  • HT1937 I have successfully restored my iPhone 3 gs( Ios )  by itunes. After activation it is asking for activation. When I am going for activation its saying that no SIM card is inserted, but I have already Ufone SIM card is inserted. I checked it with ot

    I have successfully restored my iPhone 3 gs( Ios )  by itunes. After activation it is asking for activation. When I am going for activation its saying that no SIM card is inserted, but I have already Ufone SIM card is inserted. I checked it with other SIM card like Zong etc but the response was same i.e; no SIM card is inserted. It not catching the signals. I am trying to use  my wifi to activate my iphone but it iss not processing then i used itunes to activate by it's again saying that no sim card is detected.
    My all contacts and all data is in this mobile. Now Iam unable to contact anyone. Please help me. How can I sort it out?
    Thank you
    Regards
    Wazir Ali

    Well, if you did it yourself, then there is a chance that you damaged some other component inside the device that is causing your issue. The iPhone's are not user serviceable, and once you have opened the device you have voided any warranty and post-warranty support from Apple. I would try Google to see if you can find any other way to repair your device, as Apple will no longer look at it.

  • My computer will not let me click the box in iTunes where it says "sync only checked music and videos." So i cant unsync songs that i don't want on my iPod but still want in my iTunes. HELP?!

    My computer will not let me click the box in iTunes where it says "sync only checked music and videos." So i cant unsync songs that i don't want on my iPod but still want in my iTunes. HELP?!

    These are your options:
    1. Restore the iPhoto library from the most recent backup that predates the issue.
              Advantages: Always works, if library damage is causing the problem and the backup is intact.
              Disadvantages: Impossible if you don't have a backup. All changes made since the backup are lost.
    2. Repair or rebuild the library. Be sure to back it up first.
              Advantages: May solve the problem with no loss of data.
              Disadvantages: May fail. May take a long time if the library is large.
    3. Scavenge the library with a third-party application called "iPhoto Library Manager," which you can find in a web search. From the application's menu bar (not the iPhoto menu bar), select Library ▹ Rebuild.
              Advantages: All images should be preserved.
              Disadvantages: All books, calendars, and slideshows will be lost.

  • Company code authority check

    Hi
    we have created ZTTL01 table maintenance view. Should not allow unauthorized company code to update/create or display.
    I searched thru forums and collected below points. but could not test it successfully.
    Authorization object (Z_XXX_BUK) was created.But <Permitted activities> Button is not available in display authorization object(SU21) to see what are the activities are permitted.
    In su01 for my user no roles or profiles are defined.
    To do
    Trying to write  below code in PBO and PAI flow logic of ZCHECK_BUK table for screen 01
    PBO & PAI
    *First statement
    Module Authorictycheck.
    module Authoritycheck
      LOOP AT EXTRACT.
        AUTHORITY-CHECK OBJECT 'ZCHECK_BUK'
                            ID 'ACTVT' FIELD '01,02,03'
                            ID 'BUKRS' FIELD ZTTL01-BUKRS.
        IF sy-subrc <> 0.
          MESSAGE e000(zrpt) WITH 'You do not have the authorization to'
        EXIT.                          'access Bukrs'extract-bukrs.
        ENDIF.
      ENDLOOP.
    endmodule
    Can i use above code in PBO and PAI to check change of company code?
    I am sharing role and profile created by other user, which allows only company code 'A10'.
    How to test this now?
    se11->Utilities->table contents create should not allow me to input A11 or other company codes? pls confirm.
    Regards
    Chandra

    Hi Suhas
    Regarding 1) It works when i remove the FORM routine assinged for EVENTS.
    Thanks for ur input.
    Regarding 2)When the user displays record in SM30 for a table, he must not be able to see the company code AD01.
    To achieve this can i use EVENT AA?
    I create FORM routine <hide_cocode> in EVENT AA and store at include LZXXXXF01.
    FORM ZHIDE_COCODE.
    DATA: F_INDEX LIKE SY-TABIX."Index to note the lines found"
    LOOP AT TOTAL.
    READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
    IF SY-SUBRC EQ 0.
    F_INDEX = SY-TABIX.
    ELSE.
    CLEAR F_INDEX.
    ENDIF. "(make desired changes to the line TOTAL)
    MODIFY TOTAL.
    CHECK F_INDEX GT 0.
    EXTRACT = TOTAL.
    MODIFY EXTRACT INDEX F_INDEX.
    *ENDIF.
    ENDLOOP.
    SY-SUBRC = 0.
    ENDFORM.
    I made break point at line LOOP at Total. and executed SM30 and clicked Display button.
    Sorry Code stops here and table TOTAL has flat line structure of empty.Loop at total is skipping
    what should be done now?
    Regards
    Chandra

  • T.Code for checking the total value of a material

    Hi Experts,
      Can anybody tel me the T.code for checking the total value of a material which is procured in a specified period?
    Thanks in advance
    Channa

    Refer Tcode ME80FN click on Change Veiw & select Purchase Order History with this you can get PO-GRN-INVOICE Qty & Value details
    Last button on Application tool Bar it is in line of filter, total etc icons
    Also check below reports :
    MC$G - PURCHIS: Material PurchVal Selection
    MC$0 - PURCHIS: PurchGrp PurchVal Selection
    MC$< - PURCHIS: MatGrp PurchVal Selection
    MC$4 - PURCHIS: Vendor PurchVal Selection

Maybe you are looking for

  • Safari crashes after update to OS X 10.4.10

    Hy together, I just updated to OS X 10.4.10. Now safari crashes on different websites. Some are still okay (google.ch for example), but pages like heise.de, golem.de and nzz.ch make safari to quit. The crashreport is quiet long, so I resign to post i

  • TV shows sorting issues

    Hi all, I have couple of my favourite TV Shows in iTunes, and while iTunes keeps all my tv shows episodes sorted perfectly well (season#, than episode#) when I sync them to my iPhone the sorting is gone; I have the episodes in random(?) order, furthe

  • Unable to install Photoshop Elements 11

    So, I purchased PSE 11, popped in the disc, entered the serial # and waited. Pop! Up comes an error message. So I tried it again. And again. Error messages again. Went to the Adobe site, find the help section and tried Plan B. Tried copying the files

  • What is the problem with the printer dialogue?

    I am running OS X 10.4.11 on a G5 Powermac w 1.5 GB RAM, and Photoshop CS3. For as long as I can remember, printing anything from Photoshop has produced the dialogue box: "The image is larger than the paper's printable area and some clipping could oc

  • Is it possible to write to an open DOS windows - command line

    HI, I am able to open applications from LabVIEW, But except for the first command I am unable to write to the same application again and the LabVIEW will always open a new application. Is there a way to communicate with a DOS window application witho