|
| |
TotalSAP
ABAP,ABAP report,Interactive Report,ALV grid,ALV list,IDOC,User Exit,RFC,Smartform,sapscript,ABAP Performance,Remote Function Module
|
Statistics
Unique Visitors:
Total Unique Visitors:
Visitors Out:
Total Visitors Out: |
3
0
53
53 |
|
|
| Articles
|
SAPscript FAQ
2008-03-01 12:57:56
1. What are smart forms (if candidate worked in SAP 4.6c). Smart forms are equivalent versions of SAP scripts in 4.6c version. 2. What is the program used for downloading the logo into SAP. The program is RSTXLDMC, the logo needs to be save in .TIF format. 3. How will you transfer forms from one client to other & from development to prod system? In transaction SE71 follow the menu. UTILITIES->COPY FROM CLIENT. 4. How many main windows can be placed in a page? Only one main window. 5. What are function modules associated with SAPscript? OPEN_FORM; WRITE_FORM; CLOSE_FORM etc. ...
|
How to call a subroutine form SAPscripts
2008-03-01 12:57:34
The Form : /:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK /:USING &EKKO-EBELN& /:CHANGING &CDECENT& /:ENDPERFORM The report : REPORT zkrpmm_perform_z1medruck .DATA : BEGIN OF it_input_table OCCURS 10. INCLUDE STRUCTURE itcsy.DATA : END OF it_input_table.* déclaration de la table output_table contenant lesvariables exportéesDATA : BEGIN OF it_output_table OCCURS 0. INCLUDE STRUCTURE itcsy.DATA : END OF it_output_table. DATA : w_ebeln LIKE ekko-ebeln,* w_vbeln LIKE vbak-vbeln, w_zcdffa LIKE vbak-zcdffa. *-----------------------------------------------------** FORM CDE_CENT**-----------------------------------------------------*FORM cde_cent TABLES input output. it_input_table[] = input[]. it_output_table[] = output[]. READ TABLE it_input_table INDEX 1. MOVE it_input_table-value TO w_ebeln. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = w_ebeln IMPORTING output = w_ebeln. SELE ...
|
Additional changed features for Purchase Order Layout sets
2008-03-01 12:57:13
Additional changed features for Purchase Order Layout sets REPORT ZPOCHANGE. ************************************************************************************* This is a subroutine perform in the Purchase order Layout sets.* Description : To retreive the details of changed remarks in PO output and to capture the retrival date* Additional features with the previous changed appearing. e.g. from .... to* Note : If the latest modification details required* Please Uncomment the lines mentioned under 'Last Modified Remarks only'************************************************************************************* Information* /: PERFORM CHDATE IN PROGRAM ZPOCHANGE* /: USING &EKKO-EBELN&* /: CHANGING &RVDATE2&* /: ENDPERFORM.* /: IF &RVDATE2& EQ ' '.* / Revision Date: NIL* /: ELSE.* / Revision Date: &RVDATE2&* /: ENDIF.* Main Window* /E CHANGE_REMARKS* /: PERFORM CHDET IN PROGRAM ZPOCHANGE* /: ...
|
How to Convert SAP Script to Text (OTF)?
2008-03-01 12:56:49
How to Convert SAP Script to Text (OTF)? Manual conversion to OTF format If there are more than 10 pages, Tick the spool request then click Edit -> OTF display -> No. of OTF pages Convert SAP Script to text Display the spool request then click Goto -> List display Automatic conversion to OTF formattables: tline. data: begin of int_tline1 occurs 100. include structure tline.data: end of int_tline1. call function 'OPEN_FORM' device = 'OTF_MEM' ......................................... * after CLOSE_FORMcall function 'CONVERT_OTF_MEMORY' exporting format = 'ASCII' max_linewidth = 132 tables lines = int_tline1 exceptions err_max_linewidth = 1 err_format = 2 err_conv_not_possible = 3 others = 4. * write the text file to spoolloop at int_tline1. if int_tline1-tdline = space. ...
|
How to Print TIF image in SAP Script?
2008-03-01 12:56:27
How to Print TIF image in SAP Script? To print image, you have to import a tif file from your local hardisk via the SAP abap program RSTXLDMC.In the sap script, add in the following script. : / INCLUDE ZLOGO OBJECT TEXT ID ST LANGUAGE EN. or Tested in 4.6x Go to transaction SE78. Follow the path given below (on the left windows box) :- SAPSCRIPT GRAPHICS --> STORED ON DOCUMENT SERVER --> GRAPHICS --> BMAP Enter the name of the graphics file on the right side and Go to the menu GRAPHIC --> IMPORT. ...
|
SAP Script - calling SAP layout set from ABAP/4
2008-03-01 12:56:05
SAP Script - calling SAP layout set from ABAP/4 Table ITCPO - SAPscript output interface Spool ControlPrint Immediately - itcpo-tdimmed = 'X'.Delete after print - itcpo-tddelete = 'X'.New spool request - itcpo-tdnewid = 'X'.Output device - itcpo-tddest = 'SAP1'. Calling layout script from ABAP/4call function 'OPEN_FORM' exporting form = space language = 'E' device = 'PRINTER' options = itcpo dialog = 'X' exceptions form = 5. call function 'START_FORM' exporting form = 'ZSAP_FORM' language = 'E' startpage = 'FIRST'. call function 'WRITE_FORM' exporting window = 'MAIN' type = 'BODY' element = 'HEADER_TEXT'. call function 'END_FORM'. call function 'CLOSE_FORM'. ...
|
Upload/Download SAP Scripts To/From PC
2008-03-01 12:55:46
If you wish to keep a copy of your layout sets in your own hardisk. You can run this SAP program. You can keep it as a backup copy and upload it back whenever you need it again. RSTXSCRP - SAP Scripts Export/Import ...
|
Transfer Table Along With Its Contents
2008-02-27 06:27:54
Is there anyway where by I can transfer table along with its contents from the TR? Do the following: - tcode se10 - create workbench request - give desc. and target system. - double click on request and click displaychange (ctrl+f1) Give the following: - program id ->R3TR - Object type -> TABU - Object name -> Your table name - press enter - click on key. - Add values * to transport all content of table - Transport the request. ...
|
Archiving (transaction SARA)
2008-02-27 06:27:32
Archiving (transaction SARA) Data archiving removes bulk data which is no longer required in the System, but which must be retained accessibly, from the database. Data in the R/3 database can only be archived via archiving objects, which describe the data structure. Financial accounting documents, for example are archived via the archiving object FI_DOCUMNT, which comprises the document header, company-code-dependent postings, change documents, SAPscript texts and other elements. The application archiving objects are pre-defined in the system. The archiving programs are scheduled as background jobs, but can run during on-line processing. The system need not be shutdown. The archiving procedure comprises two main steps: Create archive files: the data to be archived are first written sequentially into a newly created file. The data then exist twice in the database. These archive files can, e.g. be passed to an archive system, via ArchiveLink. Execute delete program: the data in the arch ...
|
SAP Table Extent using SAPDBA
2008-02-27 06:27:08
SAP Table Extent using SAPDBA login to your server and activate sapdba Choose :- d - Reorganization b - Alter/show table or index storage parameters b - Table or index s - Alter/show parameters b - Next - here you check the current extent value and decide the best next extent s - Commit - confirm you extent value q - quit q - Return q - Return q - Quit End of steps. ...
|
SAP Table Space Daily Check List
2008-02-27 06:26:47
When any of the table space hit 100% usage, the SAP server will hang. Users will get this message when they tried to execute any posting "Update Delay. Please wait." If the table extent hit 300 (maximum extent), users will not be able to update their data anymore. Update will be deactivate to prevent any unforeseen data corruption once the maximum extent of 300 is hit. If you get the message "Update Delay. Please wait.", check SM13 - look at the Info, it should show Update is active. You should schedule this 2 jobs to be run background on a daily basis. Temporary, use SAPDBA to extent the table to 350. SAP have reserved 50 extend for such emergency. At the end of the day, you have to reorganized the table extent counter to prevent it from hitting the maximum extend. RSORAT01 - Check Table SpaceRSORATC5 - Check Table Extent From Oracle release 7.3 there is no longer a hard limit for the number of extents of a database object. For performance reasons, SAP recommends that you do n ...
|
Open SAP tables for direct maintenance
2008-02-27 06:26:24
1. SE11 enter table name 2. Go to Attributes tab 3. Change the delivery class to 'L' 4. Follow the path Utilities -> Table maintenance generator 5. Change the recording routine ( bottom of the screen) to NO, or user. 6. Activate the table, do NOT recreate the table maintenance routines ...
|
Table Mass Change
2008-02-27 06:26:02
Table Mass Change 4.6x Assuming that you want to make some changes to the field content of table MAKT - Material Descriptions :- Transaction code MASSObject type BUS1001Click ExecuteFill in the Selection Criteria and Click ExecuteSelect Row table MAKTClick the Select Fields buttonSelect the field you want to change by moving it to the Selection CriteriaHit EnterClick the Test Changes button to check for errorsFinally, click Save to confirm the new values Additional features:-You can select multiple table if you need additional table field e.g. MARC :- Plant Data for Material.This is done if you need more selection criteria. e.g. selection by plant and material.At the Selection Criteria Screen, you can click Choose Selection Fields button for more selection fields. ...
|
Security/User Tables
2008-02-27 06:25:38
Question : Subject : Security/User Tables We currently do a full database restore when refreshing our QAS data with Production Data. Each time they refresh, all users and their profiles in PRD overwrite our users and profiles in QAS. Can someone tell me how to identify all tables that contain the users and their access (and any transparent links)? We'd like to export these tables during the restore and reapply them later. Any information would be greatly appreciated! Reply : Subject : Security/User Tables Hi! Export the User Master data before the refresh and import it back later.--- Do Client Export by selecting only the User Master Data Profile. Reply : Subject : Security/User Tables Before you do the refresh of the system, do a client copy with user data and import the same after the refresh to get the users as same. HTH, Reply : Subject : Security/User Tables Steve, thanks for the information! Again, I'm very new at SAP, so when you state do a client copy, is this just ce ...
|
Rebuilding Indexes in SAP
2008-02-27 06:25:17
Rebuilding Indexes in SAP 1. How do we find out the indexes that are to be rebuild? You can use sapdba --> reorganization --> check extents and fragmentation. 2. Is there any tcode available in SAP to rebuild indexes or should we do it only at oracle level? You can also do it at oracle level, but using sapdba is the best option to have sync between oracle and sap. 3. What are the precautionary steps before rebuilding the indexes? a. Update statistics to latest.b. Enough space in Tablespace or filesystem depends on the reorg methodc. Stop SAP and start the database in restricted mode so that no process is having any locks on that index nor any process will try use the index when performing the reorg. I wouldn't rebuild indexes using SAP, unless you have to. It will likely lock tables, so you would need system offline. At Oracle 8.1.7 you can (usually but not always, depending upon the nature of the index) alter index rebuild online ; zero (well, as close as you'll get... ) impact on th ...
|
Cons of Allowing ODBC Access to SAP
2008-02-27 06:24:49
Please give me some cons (and pros if you have them) to allowing ODBC access to SAP tables. I can think of a few but want some advice from you Basis gurus. I'm the SAP development lead at my company where I've been for the last 2 years. This company has had SAP for 5-6 years but is relatively inexperienced at doing things the 'SAP way', simply because the IT department is comprised of bright individuals who get by without consultants for the most part. We have been using the .Net connector and RFC calls to hit SAP for information for web apps, but now, our main IT analyst and our Basis admin have set up ODBC access to our R/3 and CRM environments. At first, I thought it was just for playing around and some limited reading of tables. Now they're talking about updating Z-tables, and I wonder how long it will be before they want to update SAP tables. Please give me some concrete cons so I can discuss them with my boss. === I am totally against using any third party program to access the ...
|
Logging Table History
2008-02-27 06:24:25
Logging Table History You can log the changes of data like append, modification or delete fields in a table. When you create your transparent table, you can go to the technical settings screen and set the flag "Log data changes".SE11 -> Technical Settings -> tick the Log data changes Remember that you must have the parameter rec/client set in the system profile.RZ10 - Extended Maintenance rec/client = ALL (log all clients) rec/client = 000(,...) (log all specified clients) rec/client = OFF (do not log) You can see the changes to the table in the transaction OY18 or SCU3. Logging is independent of update. Obviously, it will slow down the accesses when you change the table as record have to be written into the log table for each change. DBTABPRT - Table of log records for table changes ...
|
Find Logical Database with table name
2008-02-27 06:24:02
Find Logical Database with table name Version 4.6x If you need to find the logical database for a table name, you can used SE36 - Logical Database Bulider. Steps :- Go to transaction SE36 Click Extras -> Table usage Supply the Table name and hit enter. A Display Logical Database will be shown on a pop-up windows. ...
|
Logical Database - SE36
2008-02-27 06:23:40
A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables. Reading a SAP standard logical database (DB M - MRP Documents) in your ABAP/4 program. start-of-selection. * get is equal to select * from....get mdkp. check field-name. get mdtb. check field-name end-of-selection. ...
|
Finding fields with Table Name
2008-02-27 06:22:32
I'm working as a JR. ABAPer & frequently I encounter this situation when I'm given a report either with fields from a structure or no fields at all. I have following doubts:- 1) Who's responsibility it is to find out the fields complete with table name? Functional consultant or ABAPER?2) Is there some std. way of finding out these fields? You can go through Tables i.e. Data dictionary.The table which store information about Structures and Tables are as follows: DD02L - table properties DD02T - table texts DD03L - field properties DD03T - field texts How to find data related to a structure? With GREAT difficulty, but here are some ways (which will NOT always work! LOL) to find specific fields if you know the structure's fieldname. 1) First, goto SE11, and enter your structure name. Goto the field that holds your data, and double-click on the element name. Once inside the element, do a where-used list for that element, searching tables only. Then go into each table, and see if you c ...
|
Find the table use by a transaction code
2008-02-27 06:22:11
You can easily find all the table access by a transaction code via SE49. Supply the transaction and click the Display button and all the table access by the particular transaction code will appear. ...
|
SE30 - Runtime Analysis Tool
2008-02-27 06:21:49
This runtime analysis tools allows the ABAP/4 programmer to trace the tables used by the SAP dialog/reports programs. In the Analyze button, you can see four more buttons like:- Hit List Displays the execution time of each statement in the program. Tables Displays the tables accessed during run time. Group hit list Displays the execution time of all the statements and grouping them based on the type of command. e.g. performs, SQL and internal tables used. Hirarchy Displays the execution time of each statement in the actual order in which were executed. Uses indentation to indicate the level of nesting of statements within subroutines. Any tables use by the transaction or program can be easily trace with the runtime analysis tools. Go to transaction SE30Type in the transaction code you want to analyze 4.6x In the Restriction section: select the TMP -> Temporary variant Click the Change button Click the Duratn/type Select None for Aggregation Save the variant and execute again Af ...
|
System fields in ABAP/4 programs
2008-02-27 06:21:25
When you execute an ABAP programs, all the system fields data are passed to the structure SYST Use transaction SE11 - Dictionary to view the structure. Structure are used for storing temporary data. Some common system fields you can used in your ABAP programs. SY-DATUM - System: Date SY-UZEIT - System: Time SY-UNAME - SAP user logon name SY-PAGNO - Page number SY-REPID - Name of ABAP/4 Program ...
|
ABAP Sample program for Working with temporary programs
2008-02-20 15:47:21
*&---------------------------------------------------------------------**& Chapter 25: Working with temporary programs*&---------------------------------------------------------------------*REPORT CHAP2501.* Internal table for source code, field for name of temporary programDATA: SOURCE_TABLE(72) OCCURS 10 WITH HEADER LINE, PROGRAM_NAME LIKE SY-CPROG.* Building the source codeAPPEND 'report test.' TO SOURCE_TABLE.APPEND 'form display.' TO SOURCE_TABLE.APPEND 'write ''I am a temporary program''.' TO SOURCE_TABLE.APPEND 'endform.' TO SOURCE_TABLE.* Generating the temporary programGENERATE SUBROUTINE POOL SOURCE_TABLE NAME PROGRAM_NAME.* Calling a form externallyPERFORM DISPLAY IN PROGRAM (PROGRAM_NAME). ...
Program
|
ABAP Sample program for Syntax errors in temporary programs
2008-02-20 15:46:54
*&---------------------------------------------------------------------**& Chapter 25: Syntax errors in temporary programs*&---------------------------------------------------------------------*REPORT CHAP2502.* Variables for later useDATA: SOURCE_TABLE(72) OCCURS 10 WITH HEADER LINE, PROGRAM_NAME LIKE SY-CPROG, SYNTAX_CHECK_MESSAGE(128), LINE_NO TYPE I.* Building the source codeAPPEND 'report test.' TO SOURCE_TABLE.APPEND 'form display.' TO SOURCE_TABLE.APPEND 'write ''I am a temporary program''.' TO SOURCE_TABLE.APPEND 'endform' TO SOURCE_TABLE.* Generating the temporary program, checking syntax errorsGENERATE SUBROUTINE POOL SOURCE_TABLE NAME PROGRAM_NAME MESSAGE SYNTAX_CHECK_MESSAGE LINE LINE_NO.IF SY-SUBRC NE 0. WRITE: / 'Syntax error, message', SYNTAX_CHECK_MESSAGE, / 'in line', LINE_NO. EXIT.ENDIF.* Cal ...
Errors
Program
|
A real life example for using a temporary program
2008-02-20 15:46:26
*&---------------------------------------------------------------------**& Chapter 25: A real life example for using a temporary program*&---------------------------------------------------------------------*REPORT CHAP2503.* Variables for later usePARAMETERS TABNAME(10) DEFAULT 'CUSTOMERS'.DATA: SOURCE_TABLE(72) OCCURS 100 WITH HEADER LINE, PROGRAM_NAME LIKE SY-CPROG, SYNTAX_CHECK_MESSAGE(128), LINE_NO TYPE I.* Building the source codePERFORM BUILD_THE_SOURCE_CODE USING TABNAME.* Generating the temporary program, checking syntax errorsGENERATE SUBROUTINE POOL SOURCE_TABLE NAME PROGRAM_NAME MESSAGE SYNTAX_CHECK_MESSAGE LINE LINE_NO.IF SY-SUBRC NE 0. WRITE: / 'Syntax error, message', SYNTAX_CHECK_MESSAGE, / 'in line', LINE_NO. EXIT.ENDIF.* Calling a form externallyPERFORM DISPLAY_TABLE IN PROGRAM (PROGRAM_NAME).* Form to build the source code of the temporary programFORM BUILD_THE_S ...
Life
Program
Real Life
|
ABAP Sample program for Generating a persistent program
2008-02-20 15:46:05
*&---------------------------------------------------------------------**& Chapter 25: Generating a persistent program*&---------------------------------------------------------------------*REPORT CHAP2504.* Internal table for source code, field for name of temporary programDATA: SOURCE_TABLE(72) OCCURS 10 WITH HEADER LINE, PROGRAM_NAME LIKE SY-CPROG.* Building the source codeAPPEND 'report zgenprog.' TO SOURCE_TABLE.APPEND 'write ''I am a generated program''.' TO SOURCE_TABLE.* Insert the report, if necessaryREAD REPORT 'zgenprog' INTO SOURCE_TABLE.IF SY-SUBRC NE 0. APPEND 'report zgenprog.' TO SOURCE_TABLE. APPEND 'write ''Here is zgenprog''.' TO SOURCE_TABLE. INSERT REPORT 'zgenprog' FROM SOURCE_TABLE.ENDIF.* Execute the reportSUBMIT ZGENPROG AND RETURN. ...
Program
|
ABAP Sample program for Transferring data to a file
2008-02-20 15:45:43
*&---------------------------------------------------------------------**& Chapter 26: Transferring data to a file*&---------------------------------------------------------------------*REPORT CHAP2601.* Data declarations for later usePARAMETERS FILENAME(128) DEFAULT '/usr/tmp/testfile.dat' LOWER CASE.TABLES CUSTOMERS.DATA MSG_TEXT(50).* Get data for file transferDATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE.SELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS.SORT ALL_CUSTOMERS BY CITY.LOOP AT ALL_CUSTOMERS. WRITE: / ALL_CUSTOMERS-CITY, ALL_CUSTOMERS-NAME.ENDLOOP.* Opening the FileOPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE MESSAGE MSG_TEXT.IF SY-SUBRC NE 0. WRITE: 'File cannot be opened. Reason:', MSG_TEXT. EXIT.ENDIF.* Transferring DataLOOP AT ALL_CUSTOMERS. TRANSFER ALL_CUSTOMERS-NAME TO FILENAME.ENDLOOP.* Closing the FileCLOSE DATASET FILENAME. ...
Data
Program
|
ABAP Sample program for Reading data from a file
2008-02-20 15:45:17
*&---------------------------------------------------------------------**& Chapter 26: Reading data from a file*&---------------------------------------------------------------------*REPORT CHAP2602.* Data declarations for later useTABLES CUSTOMERS.PARAMETERS FILENAME(128) DEFAULT '/usr/tmp/testfile.dat' LOWER CASE.DATA: MSG_TEXT(50), ALL_CUSTOMER_NAMES LIKE CUSTOMERS-NAME OCCURS 100 WITH HEADER LINE.* Opening the FileOPEN DATASET FILENAME FOR INPUT IN TEXT MODE MESSAGE MSG_TEXT.IF SY-SUBRC NE 0. WRITE: 'File cannot be opened. Reason:', MSG_TEXT. EXIT.ENDIF.* Reading DataDO. READ DATASET FILENAME INTO ALL_CUSTOMER_NAMES. IF SY-SUBRC NE 0. EXIT. ENDIF. APPEND ALL_CUSTOMER_NAMES.ENDDO.* Closing the fileCLOSE DATASET FILENAME.* Display the resultLOOP AT ALL_CUSTOMER_NAMES. WRITE / ALL_CUSTOMER_NAMES.ENDLOOP. ...
Data
Program
|
ABAP Sample program for Transferring data to a file (presentation server)
2008-02-20 15:44:46
*&---------------------------------------------------------------------**& Chapter 26: Transferring data to a file (presentation server)*&---------------------------------------------------------------------*REPORT CHAP2603.* Data declarations for later usePARAMETERS FILENAME(128) DEFAULT 'c:\users\default\testfile.dat' LOWER CASE.TABLES CUSTOMERS.DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE.* Get data for file transferSELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS.SORT ALL_CUSTOMERS BY CITY.LOOP AT ALL_CUSTOMERS. WRITE: / ALL_CUSTOMERS-CITY, ALL_CUSTOMERS-NAME.ENDLOOP.* Transferring DataCALL FUNCTION 'WS_DOWNLOAD' EXPORTING FILENAME = FILENAME TABLES DATA_TAB = ALL_CUSTOMERS EXCEPTIONS FILE_OPEN_ERROR = 1 OTHERS = 2.CASE SY-SUBRC. WHEN 1. WRITE 'Error when file opened'. EXIT. WHEN 2. WRITE 'Error during data transfer'. ...
Data
Program
Server
|
| |