- Popup_to_confirm_loss_of_data
Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data.
- Popup_to_confirm_step
Create a dialog box in which you make a question whether the user wishes to perform the step.
- Popup_to_confirm_with_message
Create a dialog box in which you inform the user about a specific decision point during an action.
- Popup_to_confirm_with_value
Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.
- Popup_to_decide
Create a dialog box in which you require the user between the two processing alternatives, or to cancel the action.
- Popup_to_decide_with_message
Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.
- Popup_to_display_text
Create a dialog box in which you display a two-line message.
- Rfc_system_info
Fetch information from the current instance filling the structure FRCSI.
- Rs_send_mail_for_spoollist
Send messages from ABAP/4 programs to SAPoffice. The structure SOLI may contain the message.
ABAP - Advanced Business Application Programming :ABAP report,Interactive Report,ALV,ALE,IDOC,User Exit, RFC, Smartform,Sapscript,ABAP Performance,Remote Function Module( RFC ), Transactions Code. SAP Abap Tutorial. Abap Tutorials Programming, Abap Notes and Abap Tips.
Tuesday, May 27, 2008
ABAP/4 functions:
Report command field formats
%pri : Print the current report
%pc : Download the current report
%sc : Call the find function
p+ : Go to the next page
p- : Go to the previous page
p++ : Go to the last page
p-- : Go to the first page
Friday, May 23, 2008
How to find out the Form and Report Name from Standard?
---> goto se93>nace>enter
Convert the sapscript from spoollist to pdf
Convert the sapscript from spoollist to pdf.
When opening layout with "OPEN_FORM" function module specify:
DEVICE = 'PRINTER'
and OPTIONS = your_itcpo_variable
with your_itcpo_variable-TDGETOTF = 'X'.
When you close your layout with "close_form" function module suply an array to get OTFDATA.
This will generate your "print order" to an internal array not to spool. This will be in OTF format.
Then call "CONVERT_OTF_2_PDF" function module to get your OTF traslated to PDF. The array obtained can be saved to disk to get a pdf archive.
This works fine at least in 4.5B
You can use the standard program RSTXPDF4.
Hope this should work.
When u use the standard program [b]rstxldmc[/b] , there might be some probs with uploading of the bmp file.
So, a better approach is :
1. Go to T.C : se78(Graphics management).
2. select > Graphics > BMP.
3. Then click on Import on the standrad toolbar.
4. Press f4 and give the path where your BMP file is on the local system.
5. Give some name for your logo,,, Eg : 'MYLOGO' .
6. select the radiobutton for TYPE as Color Bitmap Image.
Continue. Finished.
Click on the print prewiev to view your Uploaded logo into the SAP System.
Saturday, May 10, 2008
SAPScript Transaction codes
SE72 - Style maintenance
SE78 - SapScript Graphics Management
SO10 - Create standard text moduleSapscript
Sometimes user have a requirement to create form. Using normal Abap Code this is not possible. Instead SAP provides an object called SAPSCRIPT to generate such kind of documents which can contain logos, tables and other objects and which can look like pre-printed documents.
A layout set is a template designed in SAP to place the stream of data coming from a SAP program on different parts of a physical page. The designer needs to lay out the various elements that need to be printed on the page and store it as an object in the SAP system. An ABAP program will subsequently call this object to generate an instance of the template – thus generating an output document from the program.
- Standard Attributes in Sapscript
- Description - Brief description or title of the layout set
- Default paragraph - The base paragraph that is globally applicable to the document. This can be overridden at lower level of the layout set by using other paragraphs
- Tab Stop - The base tab-stop that is globally applicable to the document. These can be overridden at lower level of the layout set by using other tab stops
- First Page - The start page of the layout set
- Page Format
- Orientation - The direction of printing the data on a page – P for portrait (vertical) and L for landscape (horizontal)
- Lines per inch
- Characters/inch
Thursday, May 8, 2008
General command field formats
/n | Skip to the next record if you are processing one batch input session |
/bend | Cancel a batch input foreground process |
/nend | Close all R/3 sessions and logoff |
/nxxxx | Call the transaction xxxx in the same session |
/o | Generate a session list |
/oxxxx | Call the transaction xxxx in an additional session |
/i | Delete the current session |
/h | Turn the debug mode on |
/$tab | Reset all buffers (for System Administrators) |
/$sync | Synchronize instances buffers (for System Administrators) |
Transactions
IDoc Transactions
-
WE09 / WE02 IDoc lists according to content. View IDocs via specific IDoc number or business application detail contained within the contents of a segment.
-
WE05 View IDocs
-
WE19 EDI test tool. Use to test inbound Function module changes.
-
WE20 Partner profile configuration. Add partner detail together with inbound and outbound relationships. We also incorporate message control on the outbound IDocs. Utilize the organizational units to trap functional errors for further processing
-
WE30 Create IDoc extension type
-
WE31 Segment create
-
WE57 Assign function module to logical message and IDoc type
-
WE60 IDoc type documentation tool
-
WE82 Link Release detail to Extension IDoc Type
-
BD55 Conversion rule user exit. Link conversion rule user exit to the different system \ partner combinations
-
BD87 Reprocess IDocs in error or waiting for action. (Both inbound and outbound in 4.6. Use BD88 in prior versions)
-
BALA ALE Application Distribution
-
BALM ALE Master Data Distribution
Sales & Distribution : Sales order / Billing / Sched Agreement / Contract
-
VA02 Sales order change
-
VA05 List of sales orders
-
VA22 Quotation change
-
VA32 Scheduling agreement change
-
VA42 Contract change
Billing
-
VF02 Change billing document
-
VF11 Cancel Billing document
-
VF04 Billing due list
-
FBL5N Display Customer invoices by line
-
FBL1N Display Vendor invoices by line
Delivery
-
VL02N Change delivery document
-
VL04 Delivery due list
-
VKM5 List of deliveries
-
VL06G List of outbound deliveries for goods issue
-
VL06P List of outbound deliveries for picking
-
VL09 Cancel goods issue
-
VT02N Change shipment
-
VT70 Output for shipments
General
-
VKM3, VKM4 List of sales documents
-
VKM1 List of blocked SD documents
-
VD52 Material Determination
Tuesday, May 6, 2008
BASICS OF INTERACTIVE REPORTS:
When the user starts an executable (type 1) program, the program context and memory space for data objects (variables and structures) are made available on the application server. The subsequent program flow is controlled by the ABAP runtime system.
If the program contains a selection screen, the ABAP runtime system sends it to the presentation server at the start of the program.
Once the user has finished entering data on the selection screen, he or she chooses 'Execute' to tell the system to start processing the rest of the program. The data entered on the selection screen is automatically placed in the corresponding data objects. The ABAP runtime system takes over control of the program.
In this simple example, there is only one ABAP processing block to be processed by the runtime system.
This processing block contains a read access to the database. The program sends information to the database about the records that should be read.
The database returns the required database records and the runtime system ensures that the data is placed in the relevant data objects.
The list output is also programmed in the processing block. After the processing block finishes, the runtime system sends the list as a screen to the presentation server.
Selection screens allow users to enter ranges of values. They are normally used to define the set of data that needs to be read from the database.
As well as the normal graphical elements (group boxes, checkboxes, radio buttons, and so on) that you use in screens, selection screens also have input/output fields (PARAMETERS) and special groups of input/output fields (SELECT-OPTIONS).
You place a single input/output field on the selection screen using the PARAMETERS statement.
You can use the SELECT-OPTIONS statement to place a group of fields on the screen that allows users to enter complex selections. The selection may be a single value, or any form of interval (discrete or continuous). You can also use patterns. (See following slides).
You can create variants for selection screens.
If you declare an input field with reference to an ABAP Dictionary field, any search helps defined for the Dictionary field will be available on the selection screen.
Selection texts can be translated into other languages. They are then displayed in the user's logon language.
Selection ranges are stored in programs using an internal table.
The ABAP statement SELECT-OPTIONS
source from : http://abapprogramming.blogspot.com
Sunday, May 4, 2008
SQL Interface.
Select Where VS Select + Check
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.
Select with Index Support
For all frequently used Select statements, try to use an index. You always use an index if
you specify (a generic part of) the index fields concatenated with logical Ands in the Select statement's Where clause. Note that complex Where clauses are poison for the
statement optimizer in any database system.
Select single vs. Select-Endselect
if there exists at least one row of a database table or view with a certain condition, use
the Select Single statement instead of a Select-Endselect-loop. Select Single requires one
communication with the database system, whereas Select-Endselect needs two.
Select Into table t
It is always faster to use the Into Table version of a Select statement than to use Append
statements.
Select aggregates
If you want to find the maximum, minimum, sum and average value or the count of a database
column, use a select list with aggregate functions instead of computing the aggregates
yourself. Network load is considerably less.
Select Endselect VS Aray Select
If you process your data only once, use a Select-Endselect-loop instead of collecting data
in an internal table with Select Into Table. Internal table handling takes up much more
space.
Select with View
To process a join, use a view instead of nested Select statements. Network load is
considerably less.
Select with join
To read data from several logically connected tables use a join instead of nested Select
statements. Network load is considerably less.
Select with select list
Use a select list or a view instead of Select * , if you are only interested in specific
columns of the table. Network load is considerably less.
Select with buffer support
For all frequently used, read-only tables, try to use SAP buffering. Network load is
considerably less.
Friday, May 2, 2008
Example : Standard Abap Report
RPDTRA00 - List all HR transactions.
RSABAPIV - Mass print/display of ABAP/4 help text.
RSSDOCTB- R/3 Table Manual - prints a list of all fields in the selected tables with the field name and the field documentation.
RSTXSCRP - Upload and download SAPScript layout sets.
Thursday, May 1, 2008
Better Aproach - Coding in Abap (Coding Format)
1.One Command Per line
-Each ABAP/4 command line consists of a sentence ending with a period. Each command should start on a new line (Even though ABAP allows several commands per line). This will
provide the option for easier deleting, commenting and debugging.
EXIT.
ENDIF.
IF F_STATUS EQ K_ERROR. EXIT. ENDIF.
2.Program Comments
Comments should be used to describe the program statements. Half line comments should be used to provide description of data declaration and parameters. Complex or unusual program logic should be documented with full line of comments prior to the statement and leaving one blank line before the comments.
Indexes - Form and Use
The primary index is always created automatically in the SAP System. It consists of the primary key fields of the database table, and there is at most one record in the table matching each possible combination of these fields. This kind of index is called a UNIQUE index.
If you cannot use the primary index to determine a selection result (for example, WHERE condition may not contain any primary index fields), the system searches the whole table. To prevent this, and determine the selection result by searching through a restricted number of database records, you can create a secondary index.
Creating an index
You can create an index in Transaction SE11 by choosing Change → Indexes... → Create. To make the index unique, select UNIQUE. To specify the fields that will comprise the index, choose "Choose fields". You then need to save and activate the index.