Professional Documents
Culture Documents
A: Independent.
A: Modification, we are modifying which is already exists, In enhancement we are adding additional functionality.
A: Data in data dictionary is not the actual data like emp.name.name or emp.address but rather a type data whose
function is to define the properties of the data, such as type, length, and relationship.
A: When you change data of one table the sy-subrc is returned. And then updation of other affected tables takes
place.
So if system fails to update other tables still sy-subrc returned is 0 (ie, Whwn first table gets updated).
A: Data element
ABAP/4 Development Workbench (BC-DWB)
A data element describes the contents of a field. For example, a data element contains the F1 help texts and
the key word texts (field texts) for displaying the field on the screen.
Several table fields with identical contents can refer to the same data element.
Domain
ABAP/4 Development Workbench (BC-DWB)
A domain describes the technical attributes of a table field.
These technical attributes include the data type and the field length.
Several fields with the same technical attributes can refer to the same domain. In this case, each of these fields
has the technical attributes specified in this domain.
A: 1. Usage data
2. SAP data
3. Host data
4. SAP system data
5. Database data.
Q: When we create a customer the information is updated in structure RF02D and the some tables like KNA1 are
updated. How can we find the tables for master data transactions?
A: Go to ABAP Workbench -> Overview -> application hierarchy - SAP -> follow the customizing based tree for
your application. Double click on a lowest hierarchy level to get for the correct marked development class. Here
you can find all the tables, views, logical databases etc. used for a system operation.
A: Third party tools from Eigner + Partner provide interfaces to SAP. Another third party software - Fastlook Plus
from
Kamel Software enables you to view all of the Autocad formats.
A: SAP has its own Internet transaction Server (ITS) . Other products include Haht, WebObjects, NetDynamics etc.
Each product has its' own architecture.
However to access the database, access paths SAP GUI or RFC Channel have to be used.
A: Refer note 3355 in OSS for a complete explanation. The SAPscript objects that should be transported must be
written in a transport request.
The entries are as follows:
R3TR FORM NAME (NAME = Name of the layout set)
R3TR STYL NAME (NAME = Name of the style)
R3TR TEXT OBJECT,NAME,ID,L
(OBJECT = Text object, NAME = Text name, ID = Text ID, L = Text language)
If you want to transport a number of texts, you can use report RSTXTRAN to insert the individual text keys into a
correction.
The transport request must be entered and released via the transport system.
Q: How to find what transactions a particular user was running for a given period in the past (Eg: from 1st of a
month )
Q: We want protect/lock a field so that only selected people can change the value while others can only read. How
to set the authorizations?
A: Create an authorization object for change mode. Loop at screen in the user exit and set input to 0. Check the
user based on sy-uname and the authorization. Decide whether input should be 0 or 1.
Q: How to lock an user defined transaction for some time during which no user can access the same?
A: Use transaction SM01. Scroll through the transactions and check against the transaction to be locked. And after
the maintenance is over, go back to SM01 and uncheck the same to unlock.
BDC
Q: Our ABAP program is working properly in Foreground. Can I schedule it for background processing on the
weekend?
A: SAP standard program RSBDCSUB helps you to schedule the job. Create a variant for RSBDCSUB with the
BDC session name.
Q: How can we send a mail to the user intimating him that his report/BDC is completed in background?
A: You can use FUNCTION RS_SEND_MAIL_FOR_SPOOLLIST
If Unix is being used, you may send a report to any internet mail with the following:
REPORT ZSNDMAIL .
DATA: COMND(200) type c.
DATA: RESULT(200) type c occurs 100 with header line.
PARAMETERS: FILE(60) type c lower case default '/sapdata/sd_outbound/testmail.dat'.
PARAMETERS: SUBJECT(60) type c lower case.
PARAMETERS: EMAIL(60) type c lower case.
INITIALIZATION.
TRANSLATE EMAIL TO LOWER CASE.
START-OF-SELECTION.
TRANSLATE EMAIL TO LOWER CASE.
CONCATENATE 'cat' FILE '| elm -s "' subject '"' email into comnd seperated by space.
CALL 'SYSTEM' ID 'COMMAND' FIELD comnd 'TAB' FIELD UNIX_RESULTS-*SYS*.
Loop at Results.
write: /1 results.
endloop
end-of-selection.
SAPScript
Q: We get the total number of pages as expected by using 'SAPSCRIPT-FORMPAGES' in a duplex layout. In our
case duplex case is always 'Terms & Conditions'. We do not want the number of pages as in duplex printing. What
is the best possible solution?
A: On the Terms & Conditions page, Change the Page counter mode to 'HOLD' to keep the page counter from
incrementing when you print the Term & Conditions.
A: Save a Logo using Paintshop Pro or Corel Draw as Tiff file. Use RSTXLDMC to convert the logo to standard text
in SapScript. When the program is executed, the path and file name have to be correctly specified.
RFC
Q: We want to move a SAP table to an Access table using TABLE_EXPORT_TO_MSACCESS_RFC
Importing parameters are
DBNAME
DEST
FLG_APPEND
FLG_POPUP
LANGU
The table has three columns:
TABNAM
MANDT
SDATA
We have no Exporting parameters.
A: Install the PS utilities, which are part of SAPGUI install CD. You may run report RIACCESS from SE38.
Go to SALE -> Communication -> Define RFC Destination. Setup two RFC destinations PS_ACCESS_1
and PS_ACCESS_2 and will have to get them to point to wdpsastr.exe and wdpsatab.exe respectively. Then
execute RIACCESS and choose PS_ACCESS_1 to generate access tables. Please note that Access only
supports
tables with up 255 fields.
A: Call the RFC INBOUND_IDOC_PROCESS with IDOC_CONTROL and IDOC_DATA. The structure in the fields
data in the IDOC_DATA are e1mbxyh and e1mbxyi.
Transports
Q: In a Dev instance, we want to transport a modification to a layout set from one client to another. What is the best
way?
A: use transaction SE71. Choose Utilities->Copy from Client. Layout sets need not be transported between clients ,
via transport requests DEVKxxxxxx.
Q: We need to keep track of the transports that need to flow through to other systems (ie, DEV, TST, TRN, PRD
etc). Is there a way do this?
A: SAPCRAFT enables you to control the CTS from DEV system. This keeps track of all transports at all stages
and enables you to allocate Import, export and Authorization functions to specific user.
Tables
Q: We specify the logical database. And we want a field that is not present in any of the tables defaulted in logical
database. How can we want to add this additional field from a different table?
A: . Presume you have a logical database
table 1
table 2
table 3
Define the required field as additional field say fld of table 1, table 2 or table 3
and then in the code section define.
Perform get_f1d(zxxxxxxx) using f1d.
Form zxxxxxxx could be like;
Form get_f1d using f.
Select * from where 'conditions'
f = table4 - f1d.
Q: We need to download an internal table to the Presentation Server(local workstation). Whenever we run the
program, the same file has to be saved as a separate file in sequential order. Ex: 0001.txt, 0002.txt etc. Where can
we store the last file
number?
A: Batch-inputs can not be used to fill the "delivery due list" screen because it is not a dynpro. This is a standard
SAP report.
A SAP report (check with "System -> Status") may be called using SUBMIT sentence with the appropriate
options .
It is preferred to call a report than create a Batch-input program.
ABAP/4
E D I / IDOC
Q:1 We created an EDI Vendor and created all required output conditions. However no IDOC is generated when
PO is printed. Why?
A: Go to Header->output for the PO. The output type shall be '6'. The status shall be '1'. If the status is '0' check the
timing. If the status is '2' , go to 'GOTO->Processing Log' and the explanation for non-generation of IDOC can be
seen.
Q: We want to receive an outbound EDI 855 IDOC only if E2EDP20 -scheduling confirmation segment is present.
Else get an "error" status preventing triggering the EDI subsystem.
A: User exit logic has to be added in function IDOC_INPUT_ORDRSP.
# Set up a test flag and set it off when the IDOC header is read.
# Turn the flag ON when the EDP20 segment is read.
# Interrogate this flag when the next segment after EDP20 in the same IDOC comes in. If it is on ,you have an
EDP20 coming in.
# Issue an error status 51 with suitable message for whichever condition you don't want the IDOC to be processed,
This will stop the IDOC from posting.
Q: Where ever PO is sent to the vendor via EDI, we want an acknowledgement of the PO by vendor. Which fields
are updated and what should be my procedure?
A: Execute Program: IDOC_INPUT_ORDRSP
Process code: ORDR
Message type: ORDRSP
IDOC: ORDERS01
The confirmation process allows the supplier to return an acknowledgment. Only Dates and quantities can be
changed The information is stored in the PO and can be viewed via Item->Confirmation->Overview. The PO can be
flagged as 'confirmation required' so that Pos without acknowledgement receipt can be monitored. Control keys
and tolerances (days and quantities) have to be customized.
ALE
Q: Our IDOC remains in status 51 ( not posted) while testing ALE setup by passing DEBMAS02 Idocs. The
message 'Field KNA1-BRSCH is not an input field'. This is the Industry key. What are we missing?
A: Go to IMG - menu path IMG->LogisticsGeneral-> Logistics Basic Data: Business partners->Customers->
Control->Define Account groups and field selection for customer.
Select sold-to or ship-to. Select General Data. Select control and double click. Industry key is found here. Change
the option to 'Optional Entry'.
Check OSS 5599. You may have to update view V_T078D also.
4. In selection screen I have three fields plant, mat no and material group. If I input plant how do I get the
mat no and material group based on plant dynamically?
AT SELECTION-SCREEN ON VALUE-REQUEST FOR MATERIAL.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' to get material and material group for the plant.
5. How do you get output from IDOC?
Data in IDOc is stored in segments, the output from Idoc is obtained by reading the data stored in its respective
segments.
9. Which transaction code can I used to analyze the performance of ABAP program.
TCode AL21.
The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications
without having to modify the original applications.
SAP creates user exits for specific programs, screens, and menus within standard R/3 applications. These exits do
not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality
onto these hooks.
Types of Exits
There are several different types of user exits. Each of these exits acts as hooks where you can attach or "hang"
your own add-ons.
Menu Exits
Menu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to call
up your own screens or to trigger entire add-on applications.
SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function
codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on
project.
Screen Exits
Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas
on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.
When you add a new menu item to a standard pull down menu, you use a function module exit to define the
actions that should take place once your menu is activated.
Function module exits also control the data flow between standard programs and screen exit fields. SAP
application developers create function module exits by writing calls to customer functions into the source code of
standard R/3 programs.
Field Exits
Field exits allow you to create your own programming logic for any data element in the Dictionary. You can use this
logic to carry out checks, conversions, or business-related processing for any screen field. Example: The data
element BBBNR identifies a company’s international location number. You might want to set up your R/3 System
so that all international location numbers are larger than 100.
The field exit concept lets you create a special function module that contains this logic.
You assign the special function module to the data element BBBNR. You then assign the module to any programs
and screens in which users can add new international location numbers. When you activate your field exit, the
system automatically triggers your special routine whenever a user enters a company location number.
o Since the field exit is not processed until PAI, an action must be triggered on the screen (Return, Save, ...).
o Set profile parameter abap/fieldexit to YES and restart the system.
After activating the function module FIELD_EXIT... and the field exit, leave the transaction on whose screen
the field exit is to be executed. The screen is not generated until the transaction is started.
o Do not work on different application servers since there may be some delay before the field exit is activated.
o The profile parameter must be set on all or none of the application servers.
If the field exit is to only be active on specific screens, check whether you chose the correct program and the
correct screen number (take care with subscreens).
Using SE51 -> Field list, check that the screen field does have a reference to a data element. In the name of
the field exit use the name of the data element and not the field name.
After transport, field exits are marked as active but will not be processed. Tip: First try deactivating the field
exit once more and then afterwards, activate it again.
If a screen is generated and the profile parameter is set, a check is run on 2 tables (TDDIR, TDDIRS) to see
whether a field exit must be generated for the respective field. In practice, the screen load is not generated
until the screen is selected after an update. The user should not notice any difference because screen
generation is very fast.
3. Can you read the contents of other screen fields in the field exit?
o In principle, every field exit can store its value in the global variables of the function group (TOP) and hence
make them available to other field exits. Note here that field exits are always called and not only if an entry is made
in the field or if the field is empty. In addition, it is not possible to make any assumptions about the order in which
the field exits will be called in the future.
o After the user has entered data, the field exit is called in PAI as often as there are visible fields in the step loop.
The system variable SY-STEPL is incremented each time. If a new value is assigned to the field, it is displayed in
the module between LOOP and ENDLOOP. This module is also called once for each visible step loop line.
o No. Field exits must be tested separately in the ABAP/4 Development Workbench. For errors which only occur
in the screen environment, it is helpful to write interesting variable to the file system using TRANSFER... . These
can then be analysed there.
6. What can you do if the field contents are no longer transported to to ABAP/4.
7. When is the field exit called if a conversion exit is attached to the data element ?
o The field exit is called after the conversion exit. This means that the INPUT field receives the data in the same
format as the ABAP/4 program also receives it.
8. Although a global field exit is inactive, a function module is called which does not exist (for example
FIELD_EXIT_PROGRAMM_@)
o This is an error in the kernel which no longer occurs as of 3.0C. As a temporary measure, it is useful to assign
a program and a screen which do not exist to the field exit and then activate the field exit.
o If you want to create a field exit for a data element, a function module is proposed with the name
FIELD_EXIT_. This function module must exist for the field exit to work. If you do not create this function module,
but do create one with a suffix, the data element is not displayed in CMOD.
o Fields which do not have the 'Input field' attribute usually do not trigger a field exit. The field exit is designed to
allow an extended input check. It is therefore only called for input fields - even if they are not ready for input at
runtime of the application by LOOP AT SCREEN. This rule does not apply, however, if the field is located within a
steploop. Here the field will be always activated, even if it is invisible.
o Field exits can only be executed for fields that are directly related to the dictionary. If the relation is indirect, i.e.
via an ABAP declaration ( LIKE ), no field exit can be executed.
o Field exits are only intended for input fields. As check buttons count as graphical elements, you cannot install
field exits on them.
or
/: PRINT-CONTROL 'xxxxx'
where xxxxx stands for the five-character name of the print control.
Example:
/: PRINT-CONTROL ZM100
If characters belonging to the print command follow after the print control in the text (only useful for the HPL2
printer driver for PCL-5 printers), the text line following after the PRINT-CONTROL command should begin with an
equals sign (=) in the format column.
Example:
/: PRINT-CONTROL SESCP = *c5G
If you do not use the equals sign, a space character is inserted between the print control SESCP and the character
*c5G.
Go to SM51. Choose the server in which your background program is running. Place the cursor on the line which
shows your program. Choose the menu option 'Debugging'. Depending on your version the menu option is in
different places. If you have the correct authorizations, a window will pop up, with your program in the debugger.
What is the difference between a user exit and a customer exit? Do I need to get some kind of access key
from SAP to do a user exit?
Strictly speaking a user exit is any place within standard SAP, where SAP have added a mechanism for client
specific code to be executed.
Customer exits are maintained with transaction CMOD. They are constructed in such a way that all development is
in the customer name range, so no access keys are required.
Most other types of exits require an access key, as they are places where you can put your own code directly into
standard SAP. For example, in Sales Order Processing, SAPMV45A, a number of user exits can be found in
include MV45AFZZ. To modify this, however, you would need an access key from SAP for this include. If you
wanted to utilize the screen exits available in Sales Order Processing, you would need an access key for
SAPMV45A.
VOFM transaction manages many user exits. When a VOFM exit is created, two access keys are required. One for
the include in which the code will be, and one of the function group in which it sits.
Is there any better (easier) way to find user-exits for particular transactions?
For a specific transaction, find out the name of the controlling module. Sometimes it may also be a function group.
Either way, do a global search for 'customer-function'. This will show you all the cmod exits. For non-cmod exits, a
global search for 'userexit' or 'user_exit' usually identifies the user exit forms.
Use CMOD
Search the major module pools of the applications for forms beginning userexit
Check the IMG, often there are links to user exits here.
On the report selection screen, how can I get a radio button selection to affect the value of another field on
the screen? The problem that I have to deal with is defaulting a G/L account number based on the type of
sales posting that the user selects (external, intercompany, etc.)
Use the INITIALIZE event to set the initial defaults. Use the AT SELECTION-SCREEN OUTPUT event to
determine the defaults for the G/L account numbers, according to the setting of your radio button.