Skip to Content
author's profile photo Former Member
Former Member

Why Obsolete Statements

Hi,

What are the problems we need to face while using obsolete statements in a program.

Is there any other options insted of Import and export of memory ids comes under the obsolute statements?

DATA:lv_run_id TYPE XXXX_run_id,

lv_memrunid TYPE c LENGTH 11 VALUE 'XXXX_RUNID'.

GET PARAMETER ID 'ACC_SYSTEM' FIELD lv_accsys.

*--- For RunId we use a memory ID

IMPORT lv_run_id FROM MEMORY ID lv_memrunid.

Last statement is an obsolete statement . is there any other way ? for getting the parameter id.

.........Gopeekrishnan

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 10:55 AM

    hi,

    suppose you want a parameter id for MATNR in that case

    you goto MARA table and double click the component of matnr and double click it , you will get a popup in that go to further characteristics.

    regards,

    manohar.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      Your last statement is obsolete.

      IMPORT lv_run_id FROM MEMORY ID lv_memrunid.

      correct is:

      IMPORT lv_run_id = lv_run_id FROM MEMORY ID lv_memrunid.

      implicit field names are no more allowed.

      From F1 help:

      *****************************************

      Reason:

      The use of implicit names may lead to errors. The specified names are to be understood as field identifications in the cluster. With the implicit method, the specified identifications are used literally when data clusters are exported, i.e., including offset/length specifications or preceding selectors. When clusters are imported in a different context, these identifications must be known and must be specified identically. Because of the similarity to method and function module calls, the use of the equals sign (=) emphasizes that formal parameters appear on the left and actual parameters on the right. The expressions FROM and TO are also additionally used to specify where data is stored.

      *****************************************

      Regards, Manuel

  • Posted on Nov 18, 2005 at 10:47 AM

    Hi,

    check this guideline. It gives some explanations regarding obsolete statements

    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5ac31178-0701-0010-469a-b4d7fa2721ca

    from Marilyn Pratt's weblog

    /people/marilyn.pratt/blog/2005/11/09/why-don146t-they-accept-my-code-samples

    regards, Manuel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 11:03 AM

    Gopeekrishnan,

    I think you can use INDX data cluster for this purpose. It imports data objects from the data cluster with the ID key in the area of the database table.

    Import two fields from the data cluster

    DATA: IDKEY LIKE INDX-SRTFD,

    FLD1(4), FLD2 TYPE P,

    WA_INDX TYPE INDX.

    IDKEY = 'IDKEY'.

    IMPORT FLD1 = FLD1

    FLD2 = FLD2

    FROM DATABASE INDX(ST) ID IDKEY

    TO WA_INDX.

    Please reward points if this solves your problem.

    Regards,

    Satya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 10:53 AM

    Hi IMPORT lv_run_id FROM MEMORY ID lv_memrunid

    is not an obsolete statement.

    if it is obsolete it would have mentioned there in the help documentation.

    please press f1 on import and check.

    satish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 18, 2005 at 10:58 AM

    Hi,

    check the below presentation.

    http://www.asug.com/client_files/Calendar/Upload/New%20SAP%20Skills.pdf

    THanks,

    Ramakrishna

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.