Difference  between  scripts and  idocs

In real time  why we are  using scripts and idocs?what is the difference between scripts and idocs?pls tell me  where we r using  scripts and  idocs?

Hi,
IDocs are simple ASCII data streams. When they are stored to a disk file, the IDocs are simple flat files with lines of text, where the lines are structured into data fields. The typical structured file has records, each record starting with a leading string that identifies the record type. Their specification is stored in the data dictionary.
Electronic Interchange Document
IDocs is the acronym for Interchange Document. This  indicates a set of (electronic) information which builds a logical entity. An IDoc is e.g. all the data of a single customer in your customer master data file, or the IDoc is all the data of a single invoice.
Data Is transmitted in ASCII format, i.e. human readable form
IDoc data is usually exchanged between systems and partners that are completely independent. Therefore, the data should be transmitted in a format that can easily be corrected by the computer operators. It is therefore mandatory to post the data in a human readable form.
Nowadays, this means that data is coded in ASCII format, including numbers which are sent as a string of figures 0 to 9. Such data can easily be read with any text editor on any computer, be it a PC, Macintosh, UNIX System, S/390 or any internet browser.
IDocs exchange messages
The information which is exchanged by IDocs is called a message and the IDoc is the physical representation of such a message. The name “messages” for the information sent via IDocs is used in the same ways as other EDI standards. .
Scrpits...
If the user wants to print documents such as invoices, purchase order, all such documents are printed with the use of forms. SAP allows the user to define these forms by using layout sets. SAP script is the tool used to create the layout set.
In order to print the document, the SAP system runs a program that collects the data for the document and feeds it into the layout set. This is called as Print Program.
SAP Provides a standard layout set for every printable document and usually there is no need to create layout sets as such. User just modifies the existing layout sets as per requirement of client.
Regards,
Sam

Similar Messages

  • Difference between BAPI and IDocs

    hello all
    what is difference between BAPI and IDocs

    Hi,
    BAPI
    One of the big plusses for BAPIs is that the interface and function are not supposed to change.  This is a big plus when you do upgrades or hot packs because the transaction can change (format, required inputs etc) which means you then need to update the call transaction.
    Some of the BAPIs are better documented and easier to use than others. You usually need to perform the BAPI that actually does the COMMIT after you call your BAPI.
    The Program coding for calling a BAPI is usually cleaner than setting up the screen flow etc for the Call Transaction.
    You don't need to worry about special data circumstances interrupting the normal data flow of the screens and causing errors because of that.
    BAPIs probably have better performance since they don't do the screen flow processing.
    In general if the BAPI exists for the transaction you want to perform and you can figure out how to use it the BAPI is probably the best way to go.
    BAPIs are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.
    IDOC
    IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed.   Therefore an IDoc data exchange is always an
    asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
    While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
    The philosophical difference between EDI and ALE can be pinned as follows: If we send data to an external partner, we generally speak of EDI, while ALE is a mechanism to reliable replicate data between trusting systems to store a redundant copy of the IDoc data.   The difference is made clear, when we think of a purchase order that is sent as an IDoc. If we send the purchase order to a supplier then the supplier will store the purchase order as a sales order. However, if we send the purchase order via ALE to another R/3 system, then the receiving system will store the purchase order also as a purchase order.
    Regards,
    Bhaskar

  • What is the difference between rfc and idoc

    hi,
       My name is rambabu.can anyone of u please tell me the main differences between idoc and rfc??
    Thanks in Advance

    hi Ramesh,
    Remote Function Calls (RFC) and data exchange through IDoc
    message documents. RFC makes direct and synchronous calls of a program in
    the remote system. If the caller is an external program it will call an
    RFC-enabled function in R/3 and if the calling program is the R/3 system
    it will call an RFC-function in another R/3-system or it will call a
    non-R/3 program through a gateway-proxy (usually rfcexec.exe). BAPIs are
    a subset of the RFC-enabled function modules, especially designed as
    Application Programming Interface (API) to the SAP business object, or in
    other words: are function modules officially released by SAP to be called
    from external programs.
    IDocs are text encoded documents with a rigid structure that are used to
    exchange data between R/3 and a foreign system. Instead of calling a
    program in the destination system directly, the data is first packed into
    an IDoc and then sent to the receiving system, where it is analyzed and
    properly processed. Therefore an IDoc data exchange is always an
    asynchronous process. The significant difference between simple RFC-calls
    and IDoc data exchange is the fact, that every action performed on IDocs
    are protocolled by R/3 and IDocs can be reprocessed if an error occurred
    in one of the message steps.
    While IDocs have to be understood as a data exchange protocol, EDI and ALE
    are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to
    deliver data to the receiving system. ALE is basically the scheduling
    mechanism that defines when and between which partners and what kind of
    data will be exchanged on a regular or event triggered basis. Such a
    set-up is called an ALE-scenario.
    Regards
    Sreeram.G.Reddy

  • Difference between scripts and smartforms

    Dear Experts,
    I require a same example or tutorials for scripts and smartforms, to know its exact difference. can any one provide me with that.
    Regards,
    CHK

    Hi,
    SAPscript technology is based on a mainframe product from the 1980s, while Smart Forms have only been around since (roughly) 2001. With that sort of time gap, there are bound to be significant differences between the two tools. Client dependence is a fundamental one. Although SAPscript has had some incremental improvements over time, its forms have always been -- under the hood -- relatively ...
    1. script is client dependent one while smartform is client independent.
    2. In scripts we have to write print program while in smart forms it is not necessary.
    3. In scripts we can print background logo while in smartforms we cant print background logo
    4. In scripts we have 99 main windows while in smartforms we have only 1 main window.
    5. In scripts we should write paragraph format otherwise we cant execute program while in smartforms no need to create paragraph formats .
    6. In scripts we can print the text in only two character formats.
    while in smartforms we can do with more.
    7. In scripts we dont have line types while in smartforms we have linetypes.
    the main diffarences between smart form and script form are:
    1) smart forms are clinent independent where as scripts are client dependent.
    2) smart form require half the time to create and maintain forms compare with
    script.
    3) smart forms provide multiple page formats where as in script not possible
    4) smart forms exisist without main window also where as in script not possible.
    5) smart form is entairely graphical user interface comapre with script.
    6) labeling is not possible in smart form where as it is possible in script.
    7) smart form genarate function module whenver it activate where as script
    doesn't genarate.
    8) smart form can easily web publishing using the genarated XML output compare
    with script.
    9) using smart forms we can design web forms but bot possible with script.
    10) we can maintain background graphics in smartform wher as in script not
    possible.
    11) in smart form we use transaction codes SMARTFORM for designing FORM
    and SMARTSTYLES to create differnt styles of text, where as in script we
    use SE71 for form painter and SE72 for different styles of text and font.
    12) we can migrate script to smart form vice-versa is not possible.
    Regards,
    Priyanka.

  • Mail attachment: difference between script and app bundle?

    Hiya Folks,
    I am trying to make an application in Applescript that will receive a file, then create a new email (in Mail.app) with that file attached. I would prefer it to be an app, rather than a script when it's finished. I have a script that appears to work.
    This simple script will put up a Choose File window asking for a file, then bring Mail to the front and create a new message, with the selected file attached (it won't send it). For debugging, I made a dialog box pop up showing the path to the file selected:
    -- begin script
    set OpenedFile to choose file
    display dialog "OpenedFile: " & OpenedFile
    tell application "Mail"
    activate
    set newMessage to make new outgoing message with properties {subject:"Subject", content:"Content"}
    tell newMessage
    set visible to true
    tell content
    make new attachment with properties {file name:OpenedFile} at after the last paragraph
    end tell
    end tell
    end tell
    -- end script
    So I tried to make that into an app onto which I could drag n drop a file, and have Mail make a new message with that file attached. Try saving this following script as an Application or an Application Bundle:
    -- begin script
    on open OpenedFile
    display dialog "OpenedFile: " & OpenedFile
    tell application "Mail"
    activate
    set newMessage to make new outgoing message with properties {subject:"Subject", content:"Content"}
    tell newMessage
    set visible to true
    tell content
    make new attachment with properties {file name:OpenedFile} at after the last paragraph
    end tell
    end tell
    end tell
    end open
    -- end script
    Run the first script as a script, and it works as advertised. Drag a file onto the second script saved as an app, and the message is created, but no attachment.
    Note that the path displayed in the pop-up is the same for both scripts.
    Anybody know what I'm doing wrong?
    Thanks for your help,
    Drewstre

    on open (dragged_items)
    my handleFiles(draggeditems) -- Send selected items to custom handler.
    end open
    on handleFiles(localItems)
    tell application "Mail" -- Use terms of 'Mail'
    activate -- Launch 'Mail'.
    -- Add text to 'Subject' and 'Message' fields.
    set newMessage to make new outgoing message with properties {subject:"Subject", content:"Content"}
    tell newMessage -- Set focus to 'newMessage'
    set visible to true -- Make message visible.
    repeat with i in local_Items -- Cycle through the dragged items, adding each to new message.
    tell content to make new attachment with properties {file name:i} at after the last paragraph
    end repeat
    end tell
    end tell
    end handle_Files
      Mac OS X (10.4.4)  

  • Main Difference Between EDI and IDOC Based On RFC

    In IDOC ,RFC is Used to define the characteristics of communication links to a remote system on which a functions needs to be executed.
    What About EDI ?

    Hi Saurabh,
    Check this..Hope it helps you.
    EDI is nothing but Electronic data interchange. SAP will support EDI through Intermediate documents (IDOCS).
    EDI (Electronic Document interchange) - EDI is the electronic exchange of business documents between the computer systems of business partners, using a standard format over a communication network. 
    EDI is also called paperless exchange. 
    Advantages: 
    Reduced Data entry errors
    Reduced processing time
    Availabilty of data in electonic form
    Reduced paperwork
    Reduced Cost
    Reduced inventories and better planning
    Standard means of communications
    Better business process
    EDI has two process
    1. Outbound process
    2. Inbound process
    OP:
    1.Application document is created.
    2.IDOC is generated
    3.IDoc is transferred from SAP to Operating system layer
    4.Idoc is converted into EDI standards
    5.Edi document is transmitted to the business partner
    6.The Edi Subsystem report status to SAP
    IP:
    1.EDI transmission received
    2.EDI document is converted into an IDOC
    3.IDOC is transferred to the SAP layer
    4.The application document is created
    5.The application document can be viewed.
    IDOC:
    IDOC is a container that can be used to exchange data between any two process.
    Each iDoc is assigned a unique number for tracking and future reference.
    iDoc Consist of several segments,and segments contain several fields.
    iDoc contains the following three type of records...
    1.One Control Record.
    2.One or many Data Record
    3.One or many Status record.
    PORT:
    Port is used in the outbound process to determine the name of the EDI subsystem program,the directory path where the idoc file will be created at the operating system level,the idoc file names and the rfc desinations.
    RFC Destination:
    Used to define the characteristics of communication links to a remote system on which a functions needs to be executed.
    Partner Profile:
    Partner profile specified the various componets used in an outbound process ( Partner number,IDoc type,message type,Port,Process code),the mode in which it communicates with the subsystem(batch or immediate) and the person to be notified in case of errors.
    Message Control
    Used in pricing,account determination,material determination,and output determination.The message control component enables you to encapsulate business rules with out having to write abap programs.
    Process:
    Setup RFC destinations SM59
    Port Destinations WE21
    Partner Profile WE20
    Message control NACE
    Purchase Order ME21
    Check IDOCs WE02,WE05
    Explain to me about Idoc?
    IDoc (for intermediate document) is a standard data structure for electronic data interchange (EDI) between application programs written for the popular SAP business system or between an SAP application and an external program. IDocs serve as the vehicle for data transfer in SAP's Application Link Enabling (ALE) system. 
    IDocs are used for asynchronous transactions:  Each IDoc generated exists as a self-contained text file that can then be transmitted to the requesting workstation without connecting to the central database. 
    Another SAP mechanism, the Business Application Programming Interface (BAPI) is used for synchronous transactions. 
    A large enterprise's networked computing environment is likely to connect many geographically distributed computers to the main database. These computers are likely to use different hardware and/or operating system platforms. An IDoc encapsulates data so that it can be exchanged between different systems without conversion from one format to another. 
    IDoc types define different categories of data, such as purchase orders or invoices, which may then be broken down into more specific categories called message types. Greater specificity means that an IDoc type is capable of storing only the data required for a particular transaction, which increases efficiency and decreases resource demands. 
    An IDoc can be generated at any point in a transaction process. For example, during a shipping transaction process, an IDoc may be generated that includes the data fields required to print a shipping manifest. After a user performs an SAP transaction, one or more IDocs are generated in the sending database and passed to the ALE communication layer. The communication
    layer performs a Remote Function Call (RFC), using the port definition and RFC destination specified by the customer model. 
    The IDoc is transmitted to the receiver, which may be an R/3, R/2, or some external system.
    Re,Manas

  • Difference betwwen script and smartforms

    plzzzzzzzzzz  difference between script and smartforms

    SAPscript technology is based on a mainframe product from the 1980s, while Smart Forms have only been around since (roughly) 2001. With that sort of time gap, there are bound to be significant differences between the two tools. Client dependence is a fundamental one. Although SAPscript has had some incremental improvements over time, its forms have always been -- under the hood -- relatively ...
    1. script is client dependent one while smartform is client independent.
    2. In scripts we have to write print program while in smart forms it is not necessary.
    3. In scripts we can print background logo while in smartforms we cant print background logo
    4. In scripts we have 99 main windows while in smartforms we have only 1 main window.
    5. In scripts we should write paragraph format otherwise we cant execute program while in smartforms no need to create paragraph formats .
    6. In scripts we can print the text in only two character formats.
    while in smartforms we can do with more.
    7. In scripts we dont have line types while in smartforms we have linetypes.
    also refer
    difference between smartforms and scripts
    Diff betwen Scripts & smartforms
    advantages of smartforms over scripts
    the main diffarences between smart form and script form are:
    1) smart forms are clinent independent where as scripts are client dependent.
    2) smart form require half the time to create and maintain forms compare with
    script.
    3) smart forms provide multiple page formats where as in script not possible
    4) smart forms exisist without main window also where as in script not possible.
    5) smart form is entairely graphical user interface comapre with script.
    6) labeling is not possible in smart form where as it is possible in script.
    7) smart form genarate function module whenver it activate where as script
    doesn't genarate.
    8) smart form can easily web publishing using the genarated XML output compare
    with script.
    9) using smart forms we can design web forms but bot possible with script.
    10) we can maintain background graphics in smartform wher as in script not
    possible.
    11) in smart form we use transaction codes SMARTFORM for designing FORM
    and SMARTSTYLES to create differnt styles of text, where as in script we
    use SE71 for form painter and SE72 for different styles of text and font.
    12) we can migrate script to smart form vice-versa is not possible.
    Thanks
    reward if useful
    Richa

  • Differences between rfc and ale/idoc.

    hi ..
           will u please send the differences between rfc and ale/idoc's.

    Hi,
    Please reward with points if helpful................
    ALE is SAP proprietary technology that enables data communications between two or more SAP R/3 systems and/or R/3 and external systems. There are three layers in ALE system: application services, distribution services, and communication services.
    For communication services, ALE performs a Remote Function Call (RFC) using the port definition and RFC destination specified by the customer model. RFC is used to communicate between applications of different systems in the SAP environment includes connections between SAP systems as well as between SAP systems and non-SAP systems. Remote Function Call (RFC) is the standard SAP interface for communication between SAP systems. The RFC calls a function to be executed in a remote system.
    Means of creating and operating distributed applications.
    The purpose of Application Line Enabling is to guarantee a distributed, but integrated, R/3 installation. This involves business-controlled message exchange with consistent data across loosely linked SAP applications.
    Application integration is achieved not via a central database, but via synchronous and asynchronous communication.
    Application Link Enabling comprises the following three layers:
    application services
    distribution services
    communication services
    Two Development Models
         Distribution using BAPIs
         Distribution using Message type
    The programming model "Distribution using message types" contains the definitions of message types and IDoc types and the ABAP code for processing inbound and outbound IDocs.
    Defining message types and IDoc types:
    If you want to create message type enhancements for master data distribution, you also have to create a new message type for each enhancement.
    The ALE interface does not allow you to create different segment data for different IDoc types for the same message type.
    Writing ABAP code:
             Outbound Processing
               Inbound Processing
    You can find information on other ALE functions under:
                                   Master Data Distribution
                                  Communicating with Non-R/3 Systems
    1. The Remote Function Call facility allows you to call an R/3 Function module on a “remote” machine.
    2.  To communicate between two R/3 Systems and also with an External System.  External Application program also can call these function module for integration.
    3. RFC or sRFC  - Synchronous RFC
                     aRFC - Asynchronous RFC
                      tRFC - Transactional RFC
                      qRFC - Queued RFC (I.e. Serialization of tRFC)
    Types of RFC Call
    Synchronous
    CALL FUNCTION Func Destination Dest
    CALL FUNCTION func DESTINATION 'NONE' ...
    CALL FUNCTION func DESTINATION ’BACK' ...
    Asynchronous
    CALL FUNCTION func … STARTING NEW TASK taskname
    PERFORMING form ON END OF TASK
    RECEIVE RESULTS FROM FUNCTION func
    Thanks
    sivaparvathi

  • Script logic: differences between MS and NW?

    Hi to all,
    at last SAP Tech Ed I've bought a book on SAP BPC 7, Netweaver version...I did it because I'm already working with the MS version, but I hoped to get a better vision on BPC over NW, and to understand some critical subjects.
    One question that I've been wondering is this one: I've found that some script logic examples that I've been able to reuse even in the MS version of BPC, while other won't. For example, I've found the *RUN_ALLOCATION (which I couldn't find in the logic assistent helper installed), and used it happily , and at the same time, I've found the *RUN_PROGRAM, which I don't really get any help from the web. I've found some posts in the NW version, not in the MS.
    So: is there any kind of document about the differences between scripting logic for MS and NW?
    Thank you
    Daniele

    Between 7.0 M and 7.0 NW we have a document with differences.
    But after that new SP or release was bringing new functionalities into NW.
    So it is depending what versions you will compare.
    Any way you will find key words into NW which are not into M version and oposite.
    So my suggestion will be to check the help documentation for version of NW used and to use the key words existing into that version.
    Principle of script logic is the same.
    Regards
    Sorin Radulescu

  • Difference between abort_exec_request and deactivate_execution scripts

    Does anybody can explain the difference between abort_exec_request and deactivate_execution scripts which come with OWB?
    The first one will "abort the job in a managed way" the other "deactivate it so that the job is Completed in a managed way". What does that exactly mean?
    Thanks in advance for some explanations!!

    Hi Tonguç,
    Your AQ have four subcriber. "State" column value chances* after all subscribers dequeue the message.
    On the other hand, you won't see this result because of retention parameter. if you don't set retention time, message deleted from queue after dequeueing.
    Look at "retention_time"
    ex :
    EXEC dbms_aqadm.alter_queue(
    queue_name => 'AQ_MARKETING_DATA_QUEUE',
    retention_time => dbms_aqadm.INFINITE);
    also you can set this parameter when creating your queue
    * i ignored failing cases, such as exception queue etc.

  • What is exact difference between table and template in script

    hello all
    what is exact difference between table and template in script

    Hi there.
    Tables alow you to achieve more complex flows with internal tables. You can use different types os lines, like footer, header, line items, and differente types of line items. Also, and most important, you have different processing blocks, again header block (processed before processing of first row), body block (rows) and footer block (after last row or page break).
    If you don't need any of this, use a template inside a loop to achieve something like a table. I personaly use templates only to draw lines, for example, before and after a loop, or to align some header in my documents.
    A table, is a loop and template mixed to become a very good tool.
    Regards.
    Valter Oliveira.
    Edited by: Valter Oliveira on Jun 5, 2008 5:10 PM

  • Difference between LSMW and CATT

    Hi all,
    Can anybody tell me the difference between LSMW and CATT?

    CATT
    SAP users use CATT frequently to upload master data or to
    make changes to master data records. SAP Consultants and
    Abapers tend to use it for creating test data. The
    transactions run without user interaction. You can check
    system messages and test database changes. All tests are
    logged. The CATT records your keystrokes while performing
    the actual transaction. You then identify the fields that
    you wish to change in that view. Then export this data to a
    spreadsheet to populate with the data required. This is
    uploaded and executed saving you keying in the data
    manually.
    To perform CATT, it has to be enabled in your production
    environment (your systems administrator should be able to
    do this - SCC4). You will also need access to your
    development system to create the CATT script.
    The process of uploading data with a CATT:
    Activate CATT in your client
    In transaction code SCC4 - click the change button
    Double click on the client number
    In the Restriction section, tick Allows CATT processes to
    be started.
    Upload data using CATT
    1. Create Import variant for the fields you need
    Transaction SCAT
    Goto Parameters
    Create Import Variant
    Goto Variant -> Edit
    Goto Variant -> Fast entry or F9
    Duplicate 01
    2. To change the MRP Group for a list of Material
    Assuming that I want to change the MRP Group for a list of
    Material.
    My text files should look something like this:
    [Variant ID] [Variant Text] &ZDISGR &ZMATNR
    --> Parameter texts MRP group Material
    --> Default Values M1 A001
    Changes to the default values displayed above not
    effective
    #01  M1 A001
    #02  ''     A002
    #03  M1 A003
    Note : '' denotes a blank in the field. e.g. Material A002
    MRP group will be replaced by a blank.
    3. Configure the recorded entry fields to read from the
    imported text file data
    In the CATT : Maintain functions test case Screen
    Double click on the Object Name
    Double click on the screen number with your desired fields
    Park the cursor on the fields
    Click Edit -> Details
    Fill in the Parameters Name and Field Contents
    Finish Save it.
    Assign your text file data.
    In the CATT : Execute test case Screen
    Click External from file and choose your text file
    CATT will now read from your text file and update whatever
    data you have specified.
    LSMW
    Using LSMW you can update any kind of data but no changes to database are allowed, where as CATT tool can update only master data, which also allows changes to the master data and also a significant testing of data is possible. LSMW is a tool that offers you 4 ways to import data into SAP, they are BDC, Direct Input, BAPI(BO), IDOC.It is used for migrating the data b/w the Non-SAP and SAP application to do for that we can take the Non-SAP application data and Converts the data into the Legacy data. After the Legacy data creation convert the data in to the "Flat file". That flat file is in the form of text file or excel format.If the file is in the form of text format
    we can create the ".txt" file ("ABC.txt")and in the form of
    excel ".xls" file is created. flat file for dos and .xls
    file for IBM. The converted file (.txt/.xls)is either upload or download. The Upload functionality if used for .txt file to SAP and where as Downloading is the concept while SAP to .txt/.xls file.
    Execute the transaction LSMW to start transfer of data,Before using the LSMW we should have good knowledge about the business object and the fields that will be transferred.
    There are 14 steps that are normally used and these are :
    1)   Maintain Object Attributes.
    2)   Maintain Source Structures.
    3)   Maintain Source Fields.
    4)   Maintain Structure Relations
    5)   Maintain Field Mapping and conversion rules .
    6)   Maintain Fixed Values,translations ,user defined routines.
    7)   Specify Files .
    8)   Assign Files .
    9)   Read DATA.
    10) Display Read Data.
    11) Convert Data.
    12) Display Converted Data.
    13) Create Batch Input Session.
    14) Run Batch Input Sesion.

  • What is the difference between TO_CHAR and TO_DATE()?

    Hi everybody,
    i am facing a problem in my system.It is quite urgent, can you explain me "What is the difference between TO_CHAR and TO_DATE()?".
    According to user's requirement, they need to generate a code with format "YYMRRR".
    YY = year of current year
    M = month of current month (IF M >=10 'A' ,M >=11 'B' , M >=10 'C')
    RRR = sequence number
    Example: we have table USER(USER_ID , USER_NAME , USER_CODE)
    EX: SYSDATE = "05-29-2012" MM-DD-YYYY
    IF 10
    ROW USER_ID , USER_NAME , USER_CODE
    1- UID01 , AAAAA , 125001
    2- UID02 , AAAAA , 125002
    10- UID010 , AAAAA , 12A010
    This is the original Script code. But This script runs very well at my Local. Right format. But it just happens wrong format on production.
    12A010 (Right) => 11C010 (Wrong).
    SELECT TO_CHAR(SYSDATE, 'YY') || DECODE( TO_CHAR(SYSDATE, 'MM'),'01','1', '02','2', '03','3', '04','4', '05','5', '06','6', '07','7', '08','8','09','9', '10','A', '11','B', '12','C') ||     NVL(SUBSTR(MAX(USER_CODE), 4, 3), '000') USER_CODE FROM TVC_VSL_SCH                                                       
         WHERE TO_CHAR(SYSDATE,'YY') = SUBSTR(USER_CODE,0,2)                         
         AND TO_CHAR(SYSDATE,'MM') = DECODE(SUBSTR(USER_CODE,3,1),'1','01',          
              '2','02', '3','03', '4','04', '5','05',          
              '6','06', '7','07', '8','08', '9','09',          
              'A','10', 'B','11', 'C','12')                    
    I want to know "What is the difference between TO_CHAR and TO_DATE()?".

    try to use following select
    with t as
    (select TO_CHAR(SYSDATE, 'YY') ||
             DECODE(TO_CHAR(SYSDATE, 'MM'),
                    '01', '1',
                    '02', '2',
                    '03', '3',
                    '04', '4',
                    '05', '5',
                    '06', '6',
                    '07', '7',
                    '08', '8',
                    '09', '9',
                    '10', 'A',
                    '11', 'B',
                    '12', 'C') as code
        from dual)
    SELECT t.code || NVL(SUBSTR(MAX(USER_CODE), 4, 3), '000') USER_CODE
      FROM TVC_VSL_SCH
    WHERE SUBSTR(USER_CODE, 1, 3) = t.codeand yes you need check time on your prodaction server
    good luck
    Edited by: Galbarad on May 29, 2012 3:56 AM

  • DIFFERENCE BETWEEN BAPI AND ALE

    HI
    COULD ANYBODY TEL ME
    DIFFERENCE BETWEEN BAPI AND ALE

    Hi Kalyan
    ALE is a SAP specific method how to distribute data from and to SAP. It uses the asynchronous calls based on IDOC structures.
    However in the distribution modell of ALE can also be used BAPIs. They will then automatically converted into IDOC structures. After creating the IDOCs they will be passed over to the receiver using the tRFC protocol.
    Wheras the BAPIs are using the sRFC protocol.
    fir more information please check this:
    http://www.sap-img.com/abap/ale-bapi.htm
    regards
    Srinivas

  • Differences between LSMW and BDC

    Hi All
    Please can you give me the few points about the differences between LSMW and BDC?
    Awaiting for your Responce
    Praveen

    Hai Check with the following document
    GOOD
    THERE IS THREE TYPE OF METHOD IN BDC
    BDC SESSION
    CALL TRANSACTION
    CALL DIALOG
    What is BDC or batch input
    The Batch Input is a SAP technic that allows automating the input in transactions. It lies on a BDC (Batch Data Commands) scenario.
    BDC functions:
    · BDC_OPEN_GROUP : Opens a session group
    · BDC_CLOSE_GROUP : Closes a session
    · BDC_INSERT : Insert a BDC scenario in the session
    · The ABAP statement "CALL TRANSACTION" is also called to run directly a transaction from its BDC table.
    It runs the program RSBDCSUB in order to launch automatically the session. The session management is done through the transaction code SM35.
    The object itself is maintanable through the transaction SE24.
    BDC methods:
    Method
    Description
    Parameters
    OPEN_SESSION
    Opens a session
    SUBRC (Return Code – 0 OK)
    SESSIONNAME (Session to be created)
    CLOSE_SESSION
    Closes a session
    None
    RESET_BDCDATA
    Resets the BDC Internal Table...
    None. Normally, for internal purpose…
    BDC_DYNPRO
    Handles a new screen
    PROGNAME (Name of the program)
    DYNPRONR (Screen Number)
    BDC_FIELD
    Puts a value on the screen
    FIELDNAME (Name of the field)
    FIELDVALUE (Value to be passed)
    CONSTRUCTOR
    Constructor - Initializes NO_DATA
    NODATA (No data character). The constructor is called automatically when the object is created.
    RUN_SESSION
    Launches a session with RSBDCBTC
    None
    CALL_TRANSACTION
    Calls a transaction with the current BDC Data
    MODE (Display Mode)
    UPDATE (Update Mode)
    TCODE (Transaction to be called)
    BDC_INSERT
    Inserts the BDC scenario in the session
    TCODE (Transaction to be called)
    BDC techniques used in programs:
    1) Building a BDC table and calling a transaction,
    2) Building a session and a set of BDC scenarios and keeping the session available in SM35,
    3) Building a session and lauching the transaction right after closing the session.
    BDC using Call Transaction
    BDC using Call transaction involves calling an SAP transaction in back ground from within the ABAP
    program. The process involves building an Internal BDC table containing the screen information needed to
    execute the required transaction and then passing this to the Call transaction command (See code example).
    The full procedure for creating a BDC program is as follows:
    What is the difference between batch input and call transaction in BDC?
    Session method.
    1) synchronous processing.
    2) can tranfer large amount of data.
    3) processing is slower.
    4) error log is created
    5) data is not updated until session is processed.
    Call transaction.
    1) asynchronous processing
    2) can transfer small amount of data
    3) processing is faster.
    4) errors need to be handled explicitly
    5) data is updated automatically
    BATINPUT/DIRECT INPUT
    A: Batch-inputs can not be used to fill the "delivery due list" screen because it is not a dynpro. This is a standard SAP report. A SAP report (check with "System -> Status") may be called using SUBMIT sentence with the appropriate options . It is preferred to call a report than create a Batch-input program.
    GO THROUGH THIS LINK
    http://www.guidancetech.com/people/holland/sap/abap/zzsni001.htm
    The LSM Workbench is an SAP R/3 based tool that supports the one-time or periodic transfer of data from non-SAP systems ("legacy systems") to SAP systems.
    The LSM Workbench helps you to organize your data migration project and guides you through the process by using a clear sequence of steps.
    The most common conversion rules are predefined. Reusable conversion rules assure consistent data conversion for different data objects.
    LSMW vs DX Workbench
    The LSM Workbench covers the following steps:
    Read the legacy data from one or several files (e.g. spreadsheet tables, sequential files).
    Convert the data from source format to target format.
    Import the data using standard interfaces (Batch Input, Direct Input, BAPI, IDoc).
    Experiences made in successful implementation projects have shown that using the LSM Workbench significantly contributes to accelerating data migration.
    SAP provides this tool along with documentation to customers and partners free of charge.
    Users of the LSM Workbench receive the usual support via SAP Net - R/3 Frontend (component BC-SRV-DX-LSM).
    Releases:
    Version 1.7.2 of the LSM Workbench ("LSMW 1.7.2") available
    Attention : LSMW 1.7.2 requires an SAP R/3 system with SAP R/3 4.0 or SAP R/3 4.5.
    Version 1.8.0 of the LSM Workbench (1.21mb) ("LSMW 1.8.0") available
    Attention : LSMW 1.8.0 requires an SAP R/3 system with SAP R/3 4.6.
    Version 3.0 of the LSM Workbench (1.89mb) ("LSMW 3.0") available for Web Application Server 6.10
    Attention : LSMW 3.0 requires a SAP WAS 6.10. Functionality of version 1.7.2 and 3.0 are identical !
    Version 4.0 of the LSM Workbench ("LSMW 4.0") integrated in Web Application Server 6.20
    Attention : LSMW 4.0 is an integrated part of SAP WAS 6.20.
    Thanks & regards
    Sreenivasulu P
    Message was edited by: Sreenivasulu Ponnadi

Maybe you are looking for

  • Synching To Do in iCAL with my iPod touch

    I enter To Do items in iCAL. They seem to appear automatically in a folder called To Do under Reminders in Mail. However, I have not found a way to get the To Do items to appear on my iPod. If this cannot be done by simply synching either iCal or Mai

  • Unable to convert an image (.bmp) to PDF

    I have a written servlet that uses Adobe LiveCycle API to convert files to PDF. This works. I have a problem with one image (.BMP) for which the PDF conversion fails. I then tried converting the image to PDF using Adobe Acrobat. I see the following e

  • Report to Identify Parked Invoices and Invoices without PO#

    Experts: Is there a report out there that will provide me 1. All Parked Invoices 2. All Parked Credit Notes 3. All invoices without ref to PO# Thanks! Rahul

  • How to create a dynamic page from a parameter table at runtime?

    I have a table which has the information of item names,types,default values of an input form. Is it possible to create a dynamic page at runtime from these parameters? I saw htmldb_item but what i need is something like attaching athis input form to

  • Access object on the stage using an as3 widget

    I am trying to use a FlashPro as3 widget and Captivate 6, to toggle an image on the Captivate stage (hide/show) and can't find enough information on how to access the stage objects. I can use  var numKids:int = parent.parent.parent.numChildren()  to