Regarding types statement in ECC 6.0...plz reply..urgent

Hi,
I am copying a program which is in<b> 4.7 to ECC 6.0,</b>i am facing error regarding <b>structures with types<b>...
The following code in<b> 4.7</b>
<b>DATA:BEGIN OF W_BMM00.
        INCLUDE STRUCTURE BMM00.
DATA:END OF W_BMM00.
DATA:BEGIN OF W_BMMH1.
        INCLUDE STRUCTURE BMMH1.
DATA:END OF W_BMMH1.
DATA:BEGIN OF W_BMMH7.
        INCLUDE STRUCTURE BMMH7.
DATA:END OF W_BMMH7.
DATA : BEGIN OF TAB_TLINE OCCURS 0.
        INCLUDE STRUCTURE TLINE.
DATA : END OF TAB_TLINE.</b>
i have written the same in <b>ECC6.0</b> as below
<b>TYPES:BEGIN OF tw_bmm00.
        INCLUDE STRUCTURE bmm00.
TYPES:END OF tw_bmm00 ,
      tt_bmm00 TYPE STANDARD TABLE OF tw_bmm00.
TYPES:BEGIN OF tw_bmmh1.
        INCLUDE STRUCTURE bmmh1.
TYPES:END OF tw_bmmh1 ,
          tt_bmmh1 TYPE STANDARD TABLE OF tw_bmmh1.
TYPES:BEGIN OF tw_bmmh7.
        INCLUDE STRUCTURE bmmh7.
TYPES:END OF tw_bmmh7 ,
      tt_bmmh7  TYPE STANDARD TABLE OF tw_bmmh7.
TYPES:BEGIN OF tw_TAB_TLINE.
        INCLUDE STRUCTURE TLINE.
TYPES:END OF tw_TAB_TLINE,
      tt_tab_tline TYPE STANDARD TABLE OF tw_tab_tline.
lw_bmm00 TYPE tw_bmm00,
      lt_bmm00 TYPE tt_bmm00,
      lw_bmmh1 TYPE tw_bmmh1,
      lt_bmmh1 TYPE tt_bmmh1,
      lw_bmmh7 TYPE tw_bmmh7,
      lt_bmmh7 TYPE tt_bmmh7,
      lw_tab_thead TYPE tw_tab_thead,
      lt_tab_thead TYPE tt_tab_thead,</b>....
when i check SLIN errors i am getting the following errors<b>...plz resolve</b>..
<b>The current ABAP command is obsolete
<b>Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary
types (not "LIKE" or "STRUCTURE").</b></b>
<b></b>

include strture not allowed.
rules.
ABAP Development under Unicode
Prior to Unicode the length of a character was exactly one byte, allowing implicit typecasts or memory-layout oriented programming. With Unicode this situation has changed: One character is no longer one byte, so that additional specifications have to be added to define the unit of measure for implicit or explicit references to (the length of) characters.
Character-like data in ABAP are always represented with the UTF-16 - standard (also used in Java or other development tools like Microsoft's Visual Basic); but this format is not related to the encoding of the underlying database.
A Unicode-enabled ABAP program (UP) is a program in which all Unicode checks are effective. Such a program returns the same results in a non-Unicode system (NUS) as in a Unicode system (US). In order to perform the relevant syntax checks, you must activate the Unicode flag in the screens of the program and class attributes.
In a US, you can only execute programs for which the Unicode flag is set. In future, the Unicode flag must be set for all SAP programs to enable them to run on a US. If the Unicode flag is set for a program, the syntax is checked and the program executed according to the rules described in this document, regardless of whether the system is a US or a NUS. From now on, the Unicode flag must be set for all new programs and classes that are created.
If the Unicode flag is not set, a program can only be executed in an NUS. The syntactical and semantic changes described below do not apply to such programs. However, you can use all language extensions that have been introduced in the process of the conversion to Unicode.
As a result of the modifications and restrictions associated with the Unicode flag, programs are executed in both Unicode and non-Unicode systems with the same semantics to a large degree. In rare cases, however, differences may occur. Programs that are designed to run on both systems therefore need to be tested on both platforms.
Other Changes
1. Bit Statements
2. Adding Field Sequences
3. Loops with VARY and VARYING
4. Creating Subroutines
5. Saving Programs
6. Assigning Types for GET/SET PARAMETER
7. Unreachable Statements
8. Function Modules with Incorrect Parameter Names
1. Bit Statements
Previously, the system checked for the bit statements SET BIT i OF f [TO g] and GET BIT i OF f [INTO g]whether the field f is character-type; X fields, X strings, and flat structures are usually regarded as character-type. For Unicode programs this is no longer useful, because the types X and XSTRING no longer count as character-type and the bit by bit access to character-type fields or structures is no longer platform-independent. Therefore, with these operations in Unicode programs, the field f must be type X or XSTRING.
For the bit mask operations f O x, f Z x, and f M x you could previously use all number-type and hence all character-type types for the left operand f. In Unicode programs, the f operand must now be type X or XSTRING.
2. Adding Field Sequences
When adding field sequences, restrictions apply to the following statements in Unicode:
ADD n1 THEN n2 UNTIL nz [ ACCORDING TO sel ] GIVING m ...
ADD n1 THEN n2 UNTIL nz TO m [ RANGE str ].
1. The operands n1, n2, and nz must be type-compatible with one another.
2. The distance between nz and n1 must be an integral multiple of the distance between n2 and n1.
3. A syntax or runtime error occurs if the fields n1, n2, and nz are not in a structure. This structure must be recognizable statically or its valid area must be marked explicitly using the RANGE addition.
4. At runtime, the system ensures that the RANGE area is not left.
ADD n1 FROM i1 GIVING m [ RANGE str ].
1. Field n1 must be within the structure. The structure must be explicitly defined using the RANGE addition if it is not recognizable statically.
2. For this variant, the system also checks at runtime whether n1 and the addressed values are within the structure.
3. Loops
Loops with the VARY or VARYING addition are also problematic in Unicode, since a type-a access to memory contents cannot be ensured and memory can be overwritten inadvertently.
DO ... VARYING f FROM f1 NEXT f2.
For this statement, the fields f, f1, and f2 must be type-compatible with each other. To prevent memory contents being overwritten, a RANGE for valid accesses is introduced implicitly or explicitly for the following statements:
DO ... TIMES VARYING f FROM f1 NEXT f2 [ RANGE f3 ].
WHILE ... VARY f FROM f1 NEXT f2 [ RANGE f3 ].
A syntax or runtime error is caused if f1 or f2 are not included in f3. If the RANGE addition is missing, it is defined implicitly from FROM f1 NEXT f2 as follows:
1. If both f1 and f2 are statically recognizable components of the same structure, the valid RANGE area is defined from the smallest structure that comprises f1 and f2.
2. A syntax error is triggered if it is recognizable statically that f1 and f2 are not part of the same structure.
3. A valid area must be defined explicitly using the RANGE addition if the connection between f1 and f2 is not recognizable statically.
If you specify a deep structure as the RANGE addition, the system checks for every loop pass that there are no field references, object references, tables, or strings in the area read.
4. Creating Subroutines
When automatically generating subroutines using the statement GENERATE SUBROUTINE POOL itab NAME name, the generated program inherits the content of the Unicode flag of the generating program.
5. Saving Programs
When automatically generating programs using the statement INSERT REPORT prog FROM itab, default values are set for the TRDIR entry as before. Amongst other things, this statement has the new addition UNICODE ENABLING uc, with which the Unicode flag of the inserted report receives the value of uc. If this addition is missing, the following applies:
1. A Unicode program creates a Unicode program.
2. A non-Unicode program in turn creates a non-Unicode program.
3. A non-Unicode program becomes a Unicode program if it is overwritten by a Unicode program.
4. A Unicode program remains a Unicode program if it is overwritten by a non-Unicode program.
6. Assigning Types for GET/SET PARAMETER
For the statements GET PARAMETER ID pid FIELD f and GET PARAMETER ID pid FIELD f, f must be character-type. You can use the EXPORT and IMPORT statements for storing non-character-type fields and structures.
7. Unreachable Statements
In Unicode programs, unreachable statements cause a syntax error. In non-Unicode programs, there was previously only a syntax warning.
8. Function Modules with Incorrect Parameter Names
In Unicode programs, calling a function module, whose parameter names are specified statically as a literal or constant, causes an exception that can be handled if an incorrect parameter name was specified. This only applies to function modules that are not called via Remote Function Call. In non-Unicode programs, an incorrect name was previously ignored.
http://service.sap.com/instguides
--> SAP Business Suite Applications
--> SAP ERP
--> mySAP ERP 2005
--> Upgrade
--> Upgrade Documentation - mySAP ERP 2005 SR2
There choose your database and operating system.
If you're looking for functional details check
http://service.sap.com/releasenotes

Similar Messages

  • Regarding obselete statements in ECC 6.0 ...plz help uregent

    Hi guys...
    I am importing a program from <b>4.7 to ECC 6.0.</b>
    When i am checking <b>SLIN errors</b> i am getting followin error..
    <b>The current ABAP command is obsolete
    Field groups cannot be created in the OO context.
    Internal Message Code: FIELD-GROUPS 000</b>
    The 4.7 program uses the follwing code where i am getting the error
    <b>FIELD-GROUPS: HEADER, ITEMS.</b>So plz find a solution for this...
    thank u.
    madhavi

    Hi Madhavi,
    There is no other solution than rewriting the program, e.q. by creating internal tables for the fields now defined with FIELD-GROUPS in  HEADER and ITEMS and looping over these tables.
    Regards,
    John.

  • Plz reply urgent!!!!!!!!!!!!!!!!!!!displaying the blank space with $0

    Hi all,
    Plz help Its very urgent!!!!!!
    I have a requirement to show the data of consecutive two months in the report with the difference of two months in another column "variance".
    ex: mm1/yyyy , mm2/yyyy, variance = mm1/yyyy-mm2/yyyy
    I have made a new selection "&MNTH / Amount" , where in it calculates the prior month with the amount. On the new selection i need to make the amount = amount*-1 and display $0 whenever there is a blank space.
    I tried achieving this with a customer exit, but could not succeed.
    the final output should show
    mm1/yyyy = prior month amount
    mm2/yyyy = current month amount
    amount needs to show negative value
    the blank space should be filled with $0
    Thanks
    rani
    Edited by: rani on Dec 27, 2007 2:08 PM

    hi
    to show negative values for amount
    Select mm1/yyyy & mm2/yyyy one by one .
    Then in the properties hit the DISPLAY tab.
    Then look for SIGN CHANGE.
    Use "REVERSE SIGN"
    do it for both keyfigures
    Secondly,
    Hit QUERY from the menu and then select properties
    Go to Value Display tab
    Here select Zero instead of space or Zero with currency unit....
    Try following options until u get required output.
    Let me know.

  • Enterprise structure (plz reply urgent)

    Hi,
    Can same personnel Area can be assigned to two or more company codes.
    Thanks
    Arc

    Hi Archana,
    Why you want to to assign one Personnel area to different company code?
    Secondly SAP doesn't give this flexibility.
    Regards,
    Kumar

  • PROBELM WITH TYPE X  VALUE '20' IN CONCATENATE STATEMENT in ECC version

    Hi EXPERTS,
             I am working in ECC 6.0 version.
             PROBELM WITH TYPE X  VALUE '20' IN CONCATENATE STATEMENT in ECC           version
             C_DEL     TYPE X VALUE '09' having solution --C_DEL TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,
             If  C_DEL     TYPE X VALUE '20'   what was the solution in ECC version.
             Please let me know. I am awaiting for ur answers
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

    Hi
    welcome to SDN forum
    move that X field to a char field and use in concatenation
    CONCATENATE works only with CHAR fields
    Regards
    Anji

  • BAPI to create and update scheduling agreement (type LZM) in ECC

    Hi,
    We have a requirement to create and update scheduling agreement of type LZM in ECC from an external system.
    Is there a BAPI available for this in ECC 6.0 which can be used?
    The integration is using PI.
    Regards,
    Srivatsan

    Hello,
    Please use the T-code "SE93" and then click on Display option after entering the T-code. After entering into the detail screen of the T-code, you shall find option to click on OBJECT LIST and then enter into the Function Group. Now enter the T-code and then click on function module and a list of function module will be displayed in referrence to the T-code. 
    For your easy reference i have also mentioned the flow.
    SE93 --> Use tcode (eg. VA01) > display> Object list ---> Function Groups --> Tcode ---> Function module.
    Regards,
    Sarthak

  • Obsolete statements in ECC with respect to 4.5b

    Hi Gurus,
    This is really very urgent.i need an information on Obsolete Statements in ECC 6.0 with respect to 4.5B R/3 Version.please help me..
    Full marks would be rewarded 100%
    regards
    Sahil

    Hi
    check the table PRGN_CORR2 which gives the list of transactions that were changed from different versions from 3.1G to 4.70 and also above versions
    Pls check this
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5ac31178-0701-0010-469a-b4d7fa2721ca
    Reward if useful
    Regards
    Raghav T

  • CRM TX(TA) TYPE-- MAPPING TO ECC DOCUMETN (OR)TYPE??????

    Hello CRM gurus,
    I have defined the transaction type:TA IN CRM. i have defined sales document type:OR in Ecc system
    how to map the transaction type (ex: TA) in CRM to transaction type  to  sales document type (Ex: OR) in ECC. if there is any process for this mapping please let me know that process. Ex: If we create sales order (TA) in CRM that will be replicated to ECC, but which transaction type will be assigned to sales order in ECC..
    How does the system know that an crm order (Tx type TA ) when it gets replicated to Ecc goes as Standard Order (OR) only and not as a quotation or a contract
    Please let me know If any specific settings should be done for this mapping or is this maintained i any table ?
    Regards
    sai

    Please refer to online help
    Data Exchange for Sales Transactions: CRM Enterprise– ERP System - Data Exchange for Business Transactions - SAP Library
    1, OR is german name for TA in ECC. So in standard, TA in CRM is the same as OR in ECC.
    2, If you create a z transaction type, for example ZTA, you need to create ZTA in VOV8 in ECC as well. In another word, you need to have the same process type in both CRM and ECC. There is mapping of process type, unlike the partner function. So you do not have to maintain any mapping table.

  • Transfer material type DIEN in ECC system to CRM product type Service

    Hi Experts,
    I have a requirement to transfer material type DIEN in ECC system to CRM product type Service.
    How can we do this?

    Hi Viswanath,
       I dont think its possible to replicate material type DIEN from ECC to CRM Service Product.
       Service Products need to created in CRM, from here transfer to ERP. To transfer service product from CRM to ECC, you need to enable upload for Service Product in SPRO.
           Customer Relationship Management -->
                 Master Data -->
                        Products -->
                            Settings for Product Type -->
                                    Allow Upload for a Product Type.
       Now here select the check box for product type 02(service).
      To send product from CRM to ECC, open the product you need to send it to ECC in COMMPR01.
             Go To -> Transfer to ERP. Here give the ECCRFC Destination and mapping material type.
    //Bhanu

  • Regarding case statement and decode function

    Hi Experts,
    I have question.....regarding case statement and decode statement....
    Can you please explain me that which one will be efficient,to place in insert statement...
    insert statement(
    (case when ........then
                         case when ....then
                         else
                         end)
      else
    end)
    or
    insert statement(
    case when.....then
    decode(....)
    else
    end)
    Can you people explain me which one is more efficient method?
    Thanks in advance.......

    The are major differences to talk about in case of CASE vs DECODE, but performance wise both are pretty much the same.
    Have a look at Tom's thread
    Ask Tom &amp;quot;better performance - case or decode&amp;quot;
    I would suggest to use CASE whenever possible. Don't worry about the performance part.

  • Types statement

    Hi ABAP Experts,
      I have some doubt on declaring Internal tables, could you tell me which case  case1 or case 2  is correct.
    Case1.
    types: begin of t_kunnr,
               name1(30) type c,
               name2(30) type c,
               kunnr(10) type c,
           end of t_kunnr.
    TYPES it_kunnr TYPE standard table of t_kunnr.
    DATA: wa_kunnr TYPE t_kunnr.
    DATA: it_kunnr type t_kunnr.
    wa_kunnr-name1 = 'KK'.
    wa_kunnr-name2 = 'MM'.
    wa_kunnr-kunnr = '4999'.
    append wa_kunnr to it_kunnr.
    wa_kunnr-name1 = 'KK1'.
    wa_kunnr-name2 = 'MM1'.
    wa_kunnr-kunnr = '4999'.
    append wa_kunnr to it_kunnr.
    wa_kunnr-name1 = 'KK1'.
    wa_kunnr-name2 = 'MM1'.
    wa_kunnr-kunnr = '3999'.
    append wa_kunnr to it_kunnr.
    loop at it_kunnr into wa_kunnr.
      write : / wa_kunnr-name1, wa_kunnr-kunnr.
    endloop.
    case2
    types: begin of t_kunnr,
               name1(30) type c,
               name2(30) type c,
               kunnr(10) type c,
           end of t_kunnr.
    DATA: wa_kunnr TYPE t_kunnr,
               it_kunnr TYPE STANDARD TABLE OF t_kunnr.
    wa_kunnr-name1 = 'KK'.
    wa_kunnr-name2 = 'MM'.
    wa_kunnr-kunnr = '4999'.
    append wa_kunnr to it_kunnr.
    wa_kunnr-name1 = 'KK1'.
    wa_kunnr-name2 = 'MM1'.
    wa_kunnr-kunnr = '4999'.
    append wa_kunnr to it_kunnr.
    wa_kunnr-name1 = 'KK1'.
    wa_kunnr-name2 = 'MM1'.
    wa_kunnr-kunnr = '3999'.
    append wa_kunnr to it_kunnr.
    loop at it_kunnr into wa_kunnr.
      write : / wa_kunnr-name1, wa_kunnr-kunnr.
    endloop.
    Thanks in advance.

    Hi,
    As everyone has said case 2 is the right way.
    In Case1.
    TYPES it_kunnr TYPE standard table of t_kunnr.
    DATA: it_kunnr type t_kunnr.
    these two statements are wrong.  First one rong because 'Types ' statement is used to decalre local program types, which only have a defenition and no related object in Data Base.  Data statement is used to create objects in DB of a specific type.
    Second statement is wrong because it only creates a DB object of structure type and not table type.
    As suggested u can use occurs 0 additions but this is obsolete and not advisable anymore. This is because occurs 0 creates a table with a header line and header line concept is obsolete.
    The best practise is to declare the Type using TYPES statement and the decalring table of that type using  "type [STANDARD/HASHED/SORTED] table of " addition.

  • What is the use of step type Block in ecc.6

    what is the use of step type Block in ecc.6. What ca i do with that.

    You can group together steps in a Workflow in a block. You have the following options for a block and the steps it contains:
    ·        Define local data (local container)
    ·        Define deadline
    ·        Define exceptions and exception handlers
    ·        Define dynamic processing (parallel or sequential)
    In the Workflow definition, a block is represented by the following symbols: Block Start  and Block End .
    give points to valuable answers

  • Idoc type provided by ECC to hold all project data

    Hi All,
    Please provide me the Basic Idoc type and message type provided by ECC which hold all project data like WBS Elements Info, Network & Activity info.
    Thanks,
    Suresh

    Hello,
    Please check if Basic Type PROJECT01and Message Type PROJECT suits your requirement.
    BR/Yogesh

  • Difference between DEclaring Itab with DATA & TYpe Statement?

    HI Friends,
      What is the Difference between Declaring Itab with DATA & TYpe Statement?

    Hi,
    The Statements TYPES and DATA
    Each ABAP program define its own data types using the statement.
    TYPES dtype TYPE type ...
    and declare its own variables or instance attributes of classes using the statement
    DATA var {TYPE type} ...
    Within the program or a class, you can also define local data types and variables within procedures. Local variables in procedures obscure identically-named variables in the main program or class.
    When creating data types and data objects, there are a number of naming convention that also apply for other local program definitions, such as procedures. These are described in detail in the keyword documentation.
    The Additions TYPE and LIKE
    The additions TYPE type and LIKE dobj are used in various ABAP statements. The additions can have various meanings, depending on the syntax and context.
    ·        Definition of local types in a program
    ·        Declaration of data objects
    ·        Dynamic creation of data objects
    ·        Specification of the type of formal parameters in subroutines
    ·        Specification of the type of formal parameters in methods
    ·        Specification of the type of field symbols
    TYPES: BEGIN OF struct,
             number_1 TYPE i,
             number_2 TYPE p DECIMALS 2,
           END OF struct.
    DATA:  wa_struct TYPE struct,
           number    LIKE wa_struct-number_2,
           date      LIKE sy-datum,
           time      TYPE t,
           text      TYPE string,
           company   TYPE s_carr_id.
    This example declares variables with reference to the internal type STRUCT in the program, a component of an existing data object wa_struct, the predefined data object SY-DATUM, the predefined ABAP type t and STRING, and the data element S_CARR_ID from the ABAP Dictionary.
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • PLZ ITS URGENT!!!!!!!!!!

    hi i developed a smartforms......
    in it i am using 'SSF_OPEN' and 'SSF_CLOSE' functions to suppress the print preview box which was coming again n again.....
    firstly it was working properly bt i made some changes in my smartforms and then it started giving me the problem n giving the error after executing'Previous Output Request was not finished'...
    plz help me out how to solve this problem....
    PLZ ITS URGENT!!!!!!!!!!!!!!!!!
    plz tell me anyone...........
    Edited by: Pardeep Sharma on Dec 24, 2007 11:38 AM
    Edited by: Pardeep Sharma on Dec 24, 2007 11:57 AM
    Edited by: Pardeep Sharma on Dec 24, 2007 12:12 PM

    Hi,
    Is the requirement to supress the print preview or the dailog box containing the parameters for the print?
    Regards,
    Kk

Maybe you are looking for