Export / Import to memory Id 2 . ( Unicode System)
hi all ,
we get unicode syntax error for the statement
EXPORT d1200 TO MEMORY ID 2.
Error discription is -
2 must be a character-type field (data type C, N, D, or T) . "INTERFACE".
We get similar error in import statement as well.
Please refer this code ..........
DATA: BEGIN OF d1200,
form LIKE mard-matnr,
formbez LIKE makt-maktx,
labst(10),
zeichnr LIKE drad-doknr,
zeichnr1 LIKE drad-doknr,
produktion_brutto(08) TYPE p, " (16) type c
reparatur(08) TYPE p,
zaehlerstand(16),
maxprod(08) TYPE p,
kapazitaet(06) TYPE p DECIMALS 2,
hoehe(07),
gewicht(07),
netto-gesamt(07) TYPE p,
ausschuss-gesamt(07) TYPE p,
brutto-gesamt(07) TYPE p,
restmenge(07) TYPE p,
*mico20000430
*notwendig für korrekte Anzeige in Druckliste
restmenge(08) TYPE p,
datenuebernahme(16),
menge(08) TYPE p decimals 0 ,
maxprod2(08) TYPE p decimals 0,
umwertung(08) TYPE p decimals 0,
ohnefa(08) TYPE p decimals 0,
charge like mchb-charg,
fhmnr LIKE mara-matnr,
END OF d1200.
EXPORT d1200 TO MEMORY ID 2.
Unicode systems have a problem in that you can't define stuff as type X. Structures also have to be properly "bounded". You can also no longer rely on code such as field1+7(9) .
You could define your structure as a STRING and delimit the fields with say a tab symbol ( use the attribute in cl_abap_utilities to get the tab char in a unicode system).
export the string to memory.
on the import end use the SPLIT command on the string to re-create your data elements.
You will then have to manage the decimal arithmetic yourself.
It's a pain - but that's largely the point of Unicode --everything is treated as TYPE C.
Structures containing anything other than type C data are also a real problem if you want to upload / download data. Handling Binary files is a nightmare.
There are some SAP supplied utilities / notes / documentations on converting to a Unicode system.
Cheers
jimbo
Similar Messages
-
Hi,
I want to know if a parameter ID of "export/import to memory" instruction is available in two differents session with different user's login?
tks
CarlosThe use of the shared buffer may be of some interest to you.
<b>From F1 help</b>
<i>EXPORT obj1 ... objn TO SHARED BUFFER dbtab(ar) ID key.
Additions:
1. ... = f (for each field you want to export)
2. ... FROM f (for each field you want to export)
3. ... CLIENT g (before ID key)
4. ... FROM wa (as last addition or after dbtab(ar))
In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Implicit field names not allowed in clusters and Table work areas not allowed.
Effect
Stores a data cluster in the cross-transaction application buffer.The specified objects obj1 ... objn (fields, structures, or tables) are stored as a single cluster in the buffer.
The specified table dbtab must have a standard structure.
The buffer area for the table dbtab is divided into various logically-related areas (ar, two-character ID).
You can export a collection of data objects (data cluster) to an area of the buffer under a key of your own choosing (key field).
You can import individual data objects from this collection using the IMPORT statement (as long as the data has not been deleted from the buffer).
Notes
In classes, you must always specify explicit names for the data objects. Addition 1 or addition 2 is therefore obligatory.
In classes, you must always specify the work area explicitly. Addition 4 is therefore obligatory.
The table dbtab that you specify after SHARED BUFFER must be declared under TABLES (except in addition 4).
You cannot export the header line of an internal table. If you specify the name of an internal table with a header line, the system always exports the actual table data.
You cannot export data, object, and interface references.
Please consult Data Area and Modularization Unit Organization documentation as well.
Example
Exporting two fields and an internal table to the buffer with structure INDX:
TABLES INDX.
TYPES: BEGIN OF ITAB3_TYPE,
CONT(4),
END OF ITAB3_TYPE.
DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
F1(4), F2 TYPE P,
ITAB3 TYPE STANDARD TABLE OF ITAB3_TYPE WITH
NON-UNIQUE DEFAULT KEY INITIAL SIZE 2,
WA_INDX TYPE INDX.
Fill data fields before CLUSTR
before the actual export
INDX-AEDAT = SY-DATUM.
INDX-USERA = SY-UNAME.
Export data.
EXPORT F1 FROM F1
F2 FROM F2
ITAB3 FROM ITAB3
TO SHARED BUFFER INDX(ST) FROM WA_INDX ID INDXKEY.
Addition 1
... = f (for each object you want to export)
Effect
Exports the contents of the field f and stores them under the specified name.
Addition 2
... FROM f (for each field you want to export)
Effect
Exports the contents of field f and stores them under the specified name.
Addition 3
... CLIENT g (before ID key)
Effect
The data objects are stored in client g (as long as the import/export table dbtab is client-specific).
Addition 4
... FROM wa (as last addition or after dbtab(ar))
Effect
Use this addition if you want to store user data fields in the application buffer. Instead of the table work area, the system uses the specified work area wa. The specified work area must have the same structure as the table dbtab.
Example
DATA WA LIKE INDX.
DATA F1.
WA-AEDAT = SY-DATUM.
WA-USERA = SY-UNAME.
WA-PGMID = SY-REPID.
EXPORT F1 = F1 TO SHARED BUFFER INDX(AR)
CLIENT '001' ID 'TEST'
FROM WA.
Note
Catchable runtime error
EXPORT_BUFFER_NO_MEMORY: The EXPORT data cluster is too big for the application buffer. This error should not occur often, since the buffer uses a procedure similar to the LRU(Least Recently Used) procedure to monitor the buffer contents. However, if the error does occur, you can increase the profile parameter rsdb/obj/buffersize (see Profile Parameter Attributes), which may help.</i>
Regards,
Rich Heilman -
Export- Import to Memory Query
Hello Everyone,
I have 2 FMs where one exports variable to memory and other FM imports the same .
FM A:
DATA: id TYPE c LENGTH 10 VALUE 'SWITCH_WO',
id1 TYPE c LENGTH 10 VALUE 'SWITCH_OP'.
EXPORT g_workorder from g_workorder TO MEMORY ID id.
EXPORT g_operation from g_operation TO MEMORY ID id1.
FM B:
DATA: id TYPE c LENGTH 10 VALUE 'SWITCH_WO',
id1 TYPE c LENGTH 10 VALUE 'SWITCH_OP'.
IMPORT g_workorder FROM MEMORY ID id.
IMPORT g_operation FROM MEMORY ID id1.
When it export Sy-subrc is 0 but when i import it is 4 , where can i check memory variable in new debugger.
Please let me know ,
Regards,
RajHello,
You can use the Import and export to Memory Id only with the programs and FM which runs in the same session, because that memory is only available in the same session of the memory. Once you have imported say a internal table/work area to some memory id and the session ends the memory is cleared by the Garbage Collector.
In your case you are using 2 FM each running in different session, Import and Export to memory id will not work for you (as said it works in a single session). Try to use concepts of Shared Memory Object or populate a table (Custom table) and try to retrieve the same from 2nd FM.
Hope it helps.
Thanks,
Jayant -
EXPORT/IMPORT TO MEMORY ID
Hi,
I'm using FM EXIT_SAPLV51S_001.(USER EXIT)
In the row :
EXPORT sy-uzeit TO MEMORY ID 'YTIME'.
I got sy-subrc = 4.
Why??? What is the problem?
Thanks
DIANAHi,
try this in user exit.
data: v_time type sy-uzeit.
<b>GET TIME.</b>
V_time = sy-uzeit.
EXPORT v_time TO MEMORY ID 'YTIME'.
GET TIME is must.
Regards
vijay -
Export / Import from Memory in background.
Hi,
I have a trouble and I dont know very well how to solve it.
I have a Z report running in background, and this report uses a SUBMIT to call another one.
Before the SUBMIT, there is an EXPORT to memory sentence; and the second report read this memory cluster and works with the data; but it doesnt work.
When I execute online, there is no problem, and the 2nd report shows an ALV with data exported in 1st report, but in background, nothing is shown.
Could you give me some help?
A lot of thanks!Hello Alvaro,
This is simple. There are two types of memories in SAP. ABAP and SAP memory. These memories have some properties. ABAP memory remains active as long as the program is in the same session. When ever there is a new session the old ABAP memory get refreshed, and a new ABAP memory comes into picture.
In your case, before submitting the program to some other program you are exporting the value. Export will transfer the value to the ABAP memory. And after that you are submitting the program so a new session is being created and the ABAP memory is refreshed and so when you import that value you will get nothing.
So in order to solve the matter. Find a data element whose parameter ID you can set or you can create a custom data element witha custom parameter id and use that parameter id. Use the GET / SET parameter id to set or get the values. In that case the value is being stored at the SAP memory instead of ABAP memory.
You can have a look the following site for the custom parameter ID creation:
http://www.****************/Tutorials/ABAP/ParameterID/custom.htm
Rewards points if found useful.
Regards.
Abhijit. -
Sometimes after I export from one program, user exit, etc., then I import in another program, user exit, etc. the field value does not show up. It is usually in two totally unrelated programs, or other, that are in different function groups, but sometimes it works? I need to capture a value in a PAI screen, that later goes into another user exit. Has anyone had this issue with Import/Export? Is there another way I can tru to pass this parameter to the second program?
Thank-You.Hi TMM,
You have to consider that the Memory Variables from Program 1 will be released if the session is over and that's why maybe our Program 2 might not get them correctly. If that is the scenario you will need to save your data in maybe a table then use it in program 2.
Regards,
Gilberto Li -
Data transfer (Export & Import) of Delta Queue between two system.
We are planning to implement the following senario for a certain R/3 and BW system.
1. Implement storage snap shot copy solution for R/3 database and create replicated system of production R/3 every day in order to avoid load of production R/3 to BW directly. That is to say, we will extract business data from the replicated R/3 system and forward to BW.
2. We need to utilize Delta Queue function in order to feed the only gap data between production R/3 and BW. but as stated in 1. the source data will be replicated from the production R/3 every day and so we could not keep the Delta Queue data in R/3.
3. So, we are examining the following method in order to keep the Delta Data in the replicated R/3 system. i,e after feeding business data from the replicated R/3 to BW, we will extract the following Delta Queue table and keep it.
- TRFCQOUT (Client Dependent pointer table per queue name and destination.
- ARFCSSTATE: Likn between TRFCQOUT and ARFCSDARA
- ARFCSDATA: Compressed data for tRFC/qRFC
And then, next day, after replicating R/3 system, we will import those Delta data to the replicated R/3 system before stating extract business data and feed to BW.
Is the such method realistic? if not, is there any alternative?
Please advice!
Best regards,I found the following document and this is one that I want to inplement.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5d51aa90-0201-0010-749e-d6b993c7a0d6
Additionaly, I want to execute this senario repeatedly. Does someone have experience such implementation?
Eguchi. -
Dear all,
is there a function or transaction or command where I can see which memorys are aktiv ?
At the moment we are using Free Memory without ID, but so we delete them all.
I need something that I can see a overview which memory is at the moment aktiv.
Thanks for a tip.Hi,
I think that by link given below you will deffinately find the solution of your question.
The Link is:
http://help.sap.com/saphelp_nw04/helpdata/en/02/96283e538111d1891b0000e8322f96/frameset.htm
Thanks And Regards
Sarita Singh Rathour -
Issue with Memory ID export / import
Hi Experts,
We are facing strange issue during export/import from memory ID.
We are exporting value to Memory ID from module pool program and trying to import same value in SAP workflow method.
While importing the value from memory ID it is failing to import and gives sy-subrc =4.
Any idea how can we do export/import in module pool program to Workflow method?
Regards,
SanjanaHi sanjana,
Please check the link. Here you can find some examples also.
http://wiki.scn.sap.com/wiki/display/Snippets/Import+and+Export+to+Cluster+Databases
P.S
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/content.htm
You just need to create a key and an ID to save data into INDX table.Once its saved you can use same key and id to import .
Again mentioning , dont forget to delete using same key and ID once you have imported else it may give error.
Regards,
Sandeep Katoch -
EXPORT - IMPORT in BACKGROUND JOB
Hello ABAP Gurus,
There are two programs I am using.
In 1st Program I am Exporting the Data to the ABAP Memory and then after that scheduling the second program in background from 1st Program through
1 ) JOB_OPEN
2 ) SUBMIT
3 ) JOB_CLOSE
Now I am trying to Import the data that is Exported in the second program which is scheduled in background.
But I am not able to Import it.
My question is that - Does EXPORT - IMPORT Statements works in such scenario when background job is scheduled.
As it is working fine if, I only submits and does not put in the Background JOB.
Looking forward for the answer.
Helpful answers will definately be awarded.
Thanks in Advance
Sudhanshu GargHi Sudhanshu,
Export/import to memory uses ABAP memory which will not be accessible by the background job.
No need of creating the structures in dictionary
You can use the Table INDX for storing your data in the database.
See the link below for an example.
http://help.sap.com/saphelp_45b/helpdata/en/34/8e73a36df74873e10000009b38f9b8/content.htm -
Client Copy Using Client Export/Import
Hi Everyone,
This is regarding Client Copy Using Client Export/Import Method. We have two system Production and Development system. Iam planning to do a client copy from from PRD to DEV. I know most of the steps to perform Client Copy.I have some doubhts So if some one can please help me out i would really appreciate it.
!) I want to know which user should be used to perfrom Client Export ?
2) I want to know know which user to be used to perform Client delete?
3) Is there any particular USER who is recommended to perform Client Copy or any USER can do it?
4) After the Client Delete Procedure thorugh SCC5 ..to get back the client space we do Reorganization ? can anyone plzz tell me what are the tables that i need to reorganize or if anyone can provide me the steps for Reorganization i would be really thankful.
Waiting For your Replies
Best RegardsHi Mohammed,
1)I want to know which user should be used to perfrom Client Export ?
You can use your personal defined on the system UserID.
2) I want to know know which user to be used to perform Client delete?
Same as above, just make sure you have an account on the client and you log on to the right client
3) Is there any particular USER who is recommended to perform Client Copy or any USER can do it?
I am not aware that you should use a particular user. I have been doing copies/deletions with my UserID, as system administrator.
4) After the Client Delete Procedure thorugh SCC5 ..to get back the client space we do Reorganization ? can anyone plzz tell me what are the tables that i need to reorganize or if anyone can provide me the steps for Reorganization i would be really thankful.
Reorganization ( I personally) use SAPDBA tool. However -if you use ORACLE, there are other alternatives as well. What is your DB vendor? I will append more info in a bit.
Rgds,
Loukas -
Exporting / importing the Enhancement (or the project?)
Hi!
is it possible to perform exporting / importing of the Enhancement from one system to other? Systems are not connecting, so no TRs are possible...
Probably need to export / import the whole Z project (is it possible?), because Z project contains the enhancement which contains FMs, Funtion codes and screen areas..
Will reward,
Mindaugas.thanks for reply, Seshu, but in my case systems are not connected, in fact it is transfering from Prod to Dev (special case), so no transport request is available between Prod and Dev...
That is why I would like to know how to do it manually. Of course I will assign Enhancement to some TR when creating it in Dev server.
Full sequence of systems is this:
Prod1 -> Dev2 -> Qual2 -> Prod2
So I need to take Enhancement from Prod1 and create it in Dev2, after transport to Qual2 and Prod2.
M. -
Hi,
I imported a couple of tables using the export and import utilities. Here is a break down of the process.
-Exported SH schema as SH.
-Created a new user 'HT' as sys, granted it resource and connect roles.
-Ran import utility as HT and imported only 2 tables (sales & products) from the schema export .dmp file.
-The import runs successfully, saying the tables have been imported.
-I run a select against user_tables as HT to find the imported tables, which returns no rows selected.
Why is this?Hello,
How did you exported the tables?
If you are cloing the entire schema and using conventional export/import utility then do following
exp system/manager owner=userA file=userA.dmp log=userAexport.log
imp system/managet fromUser=userA toUser=userB file=userA.dmp log=userBimport.logAnd if you are importing just couple of tables then do following
exp username/password tables=table1,table2 file=tables.dmp log=tableexport.log
imp username/password tables=table1,table2 file=tables.dmp log=tableimport.log rows=Y ignore=Y
#With tables (make sure table doesn't exists in target schema).
imp username/password tables=table1,table2 file=tables.dmp log=tableimport.log YOu can also use datapump but it has different options and I recommend you should refer to oracle documenation for using datapump.
Regards
Edited by: OrionNet on May 25, 2009 2:27 PM -
Issues with Export/Import using Database & Shared buffer
Hi All,
I have a method that calls a program via a job and I am having issues passing data between the two.
Note that two different users process the method and program (via job) resp. This is how I am calling the second prog-
SUBMIT ZPROGRAM
VIA JOB l_jobname
NUMBER l_jobcount
USER i_user
AND RETURN.
I need to pass data from method to the second program and vice versa and then the method continues its processing with the data acquired from the second program.
I have tried using Import/Export using database and also shared buffer. What I have found is that most of the times I am able to pass data from method to program. However the job takes a couple of min to execute and I think that the data is not making back to the method in time.
I have looked at some useful forum links-
Problem with export/import in back ground
Re: EXPORT/IMPORT to MEMORY
but havent been able to find an answer yet. Any solution? Thanks in advance for your help!
LizHi Suhas, Subhankar
I have tested the scenario without the job previously itself and it works. Thats the reason, i am trying with the job now as my requirement is that I need to change the user while executing the second report.
Here is an example of my import/export - I am passing the return value from the second report to the first.
Code in second report-
DATA: INDXKEY LIKE INDX-SRTFD VALUE 'RET1'.
INDX-AEDAT = SY-DATUM.
INDX-USERA = SY-UNAME.
EXPORT RETURN1 TO SHARED BUFFER INDX(ST) ID INDXKEY.
Code in first report -
SUBMIT ZPROGRAM
VIA JOB l_jobname
NUMBER l_jobcount
USER i_user
AND RETURN.
Once Job close FM is executed successfully, I import the values as follows
IMPORT RETURN1 TO RETURN1 FROM SHARED BUFFER INDX(ST) ID INDXKEY3.
INDXKEY is having value RET1.
However Return1 is not having any values in first report. It has some value in executed without the job
Please note that I have tried Export/import with Database too and I am getting the same results.
Thanks for your suggestions.
Regards, Liz -
System copy using SAPInst(Export Import database Independent prcoess failed
Hello ,
I am doing a System copy using SAPInst export/import process .
Source system : SAP Netweaver'04( BW 3.5 , Kernel : UC 640 ,Patch level 196 )
Export process fails at Phase 2 - Database Export at R3load jobs running 1,waiting 0 . Below is the log details
SAPSDIC.log
(EXP) INFO: entry for BAPICONTEN in DDNTT is newer than in DDNTT_CONV_UC: 20040211101817 > 20000621155733
(EXP) INFO: entry for BAPICONTENT255 in DDNTT is newer than in DDNTT_CONV_UC: 20040211101817 > 20031127161249
(EXP) INFO: entry for BAPICONVRS in DDNTT is newer than in DDNTT_CONV_UC: 20040211101817 > 20010131174038
(EXP) INFO: entry for BAPICREATORDATA in DDNTT is newer than in DDNTT_CONV_UC: 20040211101817 > 20000621155733
(EXP) INFO: entry for BAPICRMDH1 in DDNTT is newer than in DDNTT_CONV_UC: 20051229175654 > 20031211120714
(EXP) INFO: entry for BAPICRMDH2 in DDNTT is newer than in DDNTT_CONV_UC: 20051229175654 > 20031211120714
(EXP) INFO: entry for BAPICRMEXP in DDNTT is newer than in DDNTT_CONV_UC: 20051229175513 > 20031211120627
(EXP) INFO: entry for BAPICRMEXT in DDNTT is newer than in DDNTT_CONV_UC: 20051229175514 > 20031211120627
(EXP) INFO: entry for BAPICRMKEY in DDNTT is newer than in DDNTT_CONV_UC: 20051229175654 > 20031211120714
(EXP) INFO: entry for BAPICRMKEY_T in DDNTT is newer than in DDNTT_CONV_UC: 20051229175835 > 20031211120803
(EXP) INFO: entry for BAPICRMMSG in DDNTT is newer than in DDNTT_CONV_UC: 20051229175654 > 20031211120714
(EXP) INFO: entry for BAPICRMMSG_T in DDNTT is newer than in DDNTT_CONV_UC: 20051229175835 > 20031211120803
(EXP) INFO: entry for BAPICRMOBJ in DDNTT is newer than in DDNTT_CONV_UC: 20051229175514 > 20031211120628
(EXP) INFO: entry for BAPICRMPAREX_T in DDNTT is newer than in DDNTT_CONV_UC: 20051229175452 > 20031211120305
(EXP) INFO: limit reached, 5000 tables in DDNTT are newer than in DDNTT_CONV_UC
(EXP) INFO: NameTab check finished. Result=2 #20100113131216
(EXP) INFO: check for inactive NameTab entries: Ok.
(RSCP) INFO: I18N_NAMETAB_TIMESTAMPS not in env: checks are ON (Note 738858)
(DB) INFO: disconnected from DB
D:\usr\sap\B35\SYS\exe\run/R3load.exe: job finished with 1 error(s)
D:\usr\sap\B35\SYS\exe\run/R3load.exe: END OF LOG: 20100113131216
***SAPCLUST.log ****
(NT) Warn: EDIDOC: normal NameTab from 20040211095029 younger than alternate NameTab from 20000621155733!
(EXP) TABLE: "EDIDOC"
(NT) Warn: PCDCLS: normal NameTab from 20040211095029 younger than alternate NameTab from 20000621155733!
(EXP) TABLE: "PCDCLS"
(NT) Warn: SFHOA: normal NameTab from 20040211095029 younger than alternate NameTab from 20000621155733!
(EXP) TABLE: "SFHOA"
(NT) Warn: SFHYT: normal NameTab from 20040211095029 younger than alternate NameTab from 20000621155733!
(EXP) TABLE: "SFHYT"
(NT) Warn: UMG_TEST_C: normal NameTab from 20040211095029 younger than alternate NameTab from 20031113150115!
(EXP) TABLE: "UMG_TEST_C"
myCluster (55.22.Exp): 712: error when retrieving alternate nametab description for physical table UMG_TEST_F.
myCluster (55.22.Exp): 713: return code received from nametab is 32
myCluster (55.22.Exp): 299: error when retrieving physical nametab for table UMG_TEST_F.
(CNV) ERROR: data conversion failed. rc = 2
(RSCP) INFO: I18N_NAMETAB_TIMESTAMPS not in env: checks are ON (Note 738858)
(DB) INFO: disconnected from DB
D:\usr\sap\B35\SYS\exe\run/R3load.exe: job finished with 1 error(s)
D:\usr\sap\B35\SYS\exe\run/R3load.exe: END OF LOG: 2010011312563
Please suggest.
Thanks & Regards
GaneshIs your DB unicode? If so, did you select the unicode flag in sapinst?
This [thread|System Copy Error while exporting ABAP; might offer some help.
-Zach
Maybe you are looking for
-
Dear Sir Please Help me ..... I have Lenovo Laptop I3 3rd generation, 2 GB RAM, 500 GB HDD, Integrated Graphic card. this laptop have OS Window 7 and also is my mistake to format it.... then I install again but my system installation disk is 5 GB Onl
-
Textfields in advanced search from LOV non-editable
I have a LOV where the textfields in advanced search are always non-editable. When I look into the LOV JSP page, maxlength of the textfields is 0. One of the textfields uses following attribute: in EntityObject: attribute "Kuerzel", type "String" (da
-
Cast 'ManagedDataAccess.Client' to 'DataAccess.Client'
I get the error "Unable to cast object of type 'Oracle.ManagedDataAccess.Client.OracleConnection' to type 'Oracle.DataAccess.Client.OracleConnection'." when try to do something like EntityConnectionStringBuilder myConn = new EntityConnectionStringBui
-
Hi Any one having Project Demo PPT Files. If you please send to my email id [email protected] Thanks Bhima
-
I have CS5 photoshop and indesign. and it isn't working properly, help please?
I have CS5. In the photoshop I can't open ANY documents or even open a new one. I can see the document in the layers bar but nothing on the open window, I've tried uninstalling and no luck. Also InDesign, when in the writing tool box and I hit the re