" The functions Hold data and Set data is used when you want to create a group of objects that contain the same data. The function Hold data can be used to create data that can be changed, for example if you wish to create multiple objects with slight variation in the field values (Sales order or Purchase order) then the function Hold data can be used. If you wish to create multiple objects with exactly the same data without changing any of the filed values then SET data can be used. To hold data on the screen you need to first enter the data in the field and then choose User Profile from the Systems Menu. Now choose Hold data. The data that you hold on the screen can be changed. In case if you wish to hold data on the screen without changing it then select SET data. This way the data will be held but you will not be able to change the contents of the individual fields. You can delete the Data that is held. To do this select User profile from the Systems menu and select the option Delete data. Once the delete Data option is selected no data will be displayed the next time you visit the screen. You may want to work in more than one screen, and would like to store data in each screen, to do this you can press Ctrl+S or click on the save icon while moving between screens. You can also Cancel the data that you have just entered on the screen. To do this press the cancel button. Please note that when using HOLD data and SET data options, the required/Mandatory fields on the screen cannot be ignored. The correct values should be entered in these fields before proceeding to the next screen. Using the menus and functions you can go to the other screens within your task, as well as in related tasks. Check the Goto Extras and Environment menus in the Menu bar to find out the other screens available within your task and related tasks. Depending upon the task the contents also change. "
"Radio Frequency Identification Devices are responsible for electronically capturing the data related to Materials. Once the data is captured, it is transmitted via Radio waves to the SAP server. The main use of RFID devices is in Warehouses where the data is physically moved from one location to another. It is very convenient for the warehouse personnel to make use of RFID so that all the material movement is captured automatically and the information is transferred to the SAP server. SAP Auto-ID Infrastructure is the component in SAP Netweaver that provides gateway to the RFID Data."
Many a times it is required to pass data from one ABAP program to another. This can be done using the EXPORT and IMPORT statement in ABAP. Please find the examples given below.
REPORT ZEX_MEMORY .
Data: D_MEMORY(20) value 'BEFORE EXPORT', MEMID(5) value 'MEMID'.
write:/ D_MEMORY.
EXPORT D_MEMORY to MEMORY ID MEMID.
D_MEMORY = 'MOVED BEFORE IMPORT'.
write:/ '"Value before import"', D_MEMORY.
EXPORT D_MEMORY to MEMORY ID MEMID.
write:/ sy-subrc, ' "Value after import"', D_MEMORY.
FREE MEMORY ID MEMID.
IMPORT D_MEMORY from MEMORY ID MEMID.
write:/ sy-subrc, ' "Value after freeing memory"', D_MEMORY.
As you can see from the above example the field D_MEMORY can be exported to memory and then imported back. Once you are done with importing the value you need to FREE the memory ID. Please make sure that you free only the MEMORY ID exported by you. Here we are using the syntax given below.
EXPORT filed1 to MEMORY ID MEMID. IMPORT filed1 from MEMORY ID MEMID. FREE MEMORY ID MEMID.
You can also export field contents to memory from one program and import them in another program. Please see the code given below.
PROGRAM1Passing Values from one program to other in SAP ABAP
REPORT ZEX_MEMORYEXPORT .
Data: D_MEMORY1(100) value 'Exportfromprog1'.
EXPORT D_MEMORY1 D_MEMORY2 FROM 'EXPORTING THIS FROM PROGRAM1' TO MEMORY ID 'MEMID1'.
SUBMIT ZEX_MEMORY1 and RETURN.
write:/ sy-subrc, D_MEMORY1.
The above program will call the following program, since the value 'EXPORTING THIS FROM PROGRAM1' has already been exported to ABAP Memory it can be retrieved as shown in the program given below.
PROGRAM 2Passing Values from one program to other in SAP ABAP
REPORT ZEX_MEMORY1 .
Data: D_MEMORY1(100).
EXPORT D_MEMORY1 TO MEMORY ID 'MEMID1'.
IMPORT D_MEMORY2 TO D_MEMORY1 FROM MEMORY ID 'MEMID1'. WRITE: / SY-SUBRC, D_MEMORY1.
As shown in program 1 and 2 the value 'EXPORTING THIS FROM PROGRAM1' is passed from ABAP memory from one program to the other. See Also SET PARAMETER GET PARAMETERS SUBMIT PROGRAM
Always specify your conditions in the Where-clause instead of checking
them yourself with check statements. The database system can then use an index
(if possible) and the network load is considerably less.
Always use Pretty Printer and Extended Program Check before releasing the code.
Do not leave unused code in the program. Comment the code thoroughly. Align the comments and the Code. Follow the SAP Standards and SAP Best Practices guidelines. It’s a good practice to take a dump of the code on your local drive.
No comments:
Post a Comment