cancel
Showing results for 
Search instead for 
Did you mean: 

Why Obsolete Statements

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

manuel_bassani
Contributor
0 Kudos

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

Answers (4)

Answers (4)

Former Member
0 Kudos

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

manuel_bassani
Contributor
0 Kudos

Gopeekrishnan,

is it your first post in SDN? So welcome!

please kindly remember to reward points and close thread then your problem is solved.

blue star->for problem solved (it closes the post)

green star->for very useful answer

yellow star->for useful answer

Have a nice day

Former Member
0 Kudos

Yes Manuel ,

This is my first post I never expected i will get a solution this much fast . Thak you so much

venkata_ramisetti
Active Contributor
0 Kudos

Hi,

check the below presentation.

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

THanks,

Ramakrishna

Former Member
0 Kudos

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

manuel_bassani
Contributor
0 Kudos

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-b4d7fa2...

from Marilyn Pratt's weblog

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

regards, Manuel