Sunday, September 1, 2024

ABAP Miscellaneous Questions

 

How do you get help in ABAP? 
HELP-SAP LIBRARY, by pressing F1 on a keyword.

 

Does SAP handle multiple currencies? Multiple languages? 
Yes.

What are the different modules of SAP? 
FI, CO, SD, MM, PP, HR.

Are programs client dependent? 

Yes. Group of users can access these programs with a client no.

 

What are the general naming conventions of ABAP programs? 
Should start with Y or Z.

 

Which transaction code can I used to analyze the performance of ABAP PROGRAM?

SE30 runtime analysis 
ST05 Performance trace

 

When top of the page event is triggered?

When the first write statements is occurring that time top of page event is triggered

 

What are internal tables? - Internal tables are a standard data type object which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organizing the contents of database tables according to users need.

 What is a collect statement? How is it different from append? 
If an entry with the same key already exists, the COLLECT statement does not append a new line, but adds the contents of the numeric fields in the work area to the contents of the numeric fields in the existing entry. 

What’s an effective way of using an internal table record? What are the types of internal tables?

The types of internal tables are: standard table, sorted table and hashed table. Hash table is the most efficient of the three with a constant response time.

 

What are different data types in ABAP/4? 
Elementary - 
          predefined C,D,F,I,N,P,T,X.
          userdefined TYPES.
 Ex: see in Intel book page no 35/65

     Structured - 
         predefined    TABLES.
         User defined Field Strings and internal tables.

What are the different types of data dictionary objects? 
Tables, structures, views, domains, data elements, lock objects, Match code objects.

 

 

What is the step by step process to create a table in data dictionary?

Step 1: creating domains (data type, field length, range).

Step 2: creating data elements (properties and type for a table field).

Step 3: creating tables (SE11).

 

What happens when a table is activated in DD? 
It is available for any insertion, modification and updating of records by any user.

What are match codes? Describe? 
It is a similar to table index that gives list of possible values for either primary keys or non-primary keys.

 

What is an ABAP data dictionary?- ABAP 4 data dictionary describes the logical structures of the objects used in application development and shows how they are mapped to the underlying relational database in tables/views.

What are domains and data element? - Domains: Domain is the central object for describing the technical characteristics of an attribute of a business objects. It describes the value range of the field. Data Element: It is used to describe the semantic definition of the table fields like description the field. Data element describes how a field can be displayed to end-user.

Can you create a table with fields not referring to data elements? 
YES.  eg:- ITAB LIKE SPFLI.here we are referencing to a data object(SPFLI) not data element.

 

Can a transparent table exist in data dictionary but not in the data base physically?  NO.
TRANSPARENT TABLE DOES EXIST WITH THE SAME STRUCTURE BOTH IN THE DICTIONARY AS WELL AS IN THE DATABASE, EXACTLY WITH THE SAME DATA AND FIELDS.

What is foreign key relationship? - A relationship which can be defined between tables and must be explicitly defined at field level. Foreign keys are used to ensure the consistency of data. Data entered should be checked against existing data to ensure that there are now contradictions. While defining foreign key relationship cardinality has to be specified. Cardinality mentions how many dependent records or how referenced records are possible.

What are indexes? - Indexes are described as a copy of a database table reduced to specific fields. This data exists in sorted form. This sorting form eases fast access to the field of the tables. In order that other fields are also read, pointers to the associated record of the actual table are included in the index. The indexes are activated along with the table and are created automatically with it in the database.

Describe data classes. - Master data: It is the data which is seldomly changed. Transaction data: It is the data which is often changed. Organization data: It is a customizing data which is entered in the system when the system is configured and is then rarely changed. System data: It is the data which R/3 system needs for itself.

Define Meta data, Master data and Transaction data - Meta Data: Data that describes the structure of data or MetaObjects is called Metadata. In other words data about data is known as Meta Data. Master Data: Master data is data that remains unchanged over a long period of time. It contains information that is always needed in the same way. Characteristics can bear master data in BW. With master data you are dealing with attributes, texts or hierarchies. Transaction data: Data relating to the day-to-day transactions is the Transaction data.

What are internal tables check table, value table, and transparent table? - Internal table: It is a standard data type object, which exists only during the runtime of the program.

Check table: Check table will be at field level checking.

Value table: Value table will be at domain level checking ex: scarr table is check table for carrid.

Transparent table: - Exists with the same structure both in dictionary as well as in database exactly with the same data and fields.

Difference between transparent tables and pooled tables. - Transparent tables: Transparent tables in the dictionary have a one-to-one relation with the table in database. Its structure corresponds to single database field. Table in the database has the same name as in the dictionary. Transparent table holds application data. Pooled tables. Pooled tables in the dictionary have a many-to-one relation with the table in database. Table in the database has the different name as in the dictionary. Pooled table are stored in table pool at the database level.

What is cardinality? 
For cardinality one out of two (domain or data element) should be the same for Ztest1 and Ztest2 tables. M: N
Cardinality specifies the number of dependent (Target) and independent (source) entities which can be in a relationship.

What is BDC programming? - Transferring of large/external/legacy data into SAP system using Batch Input programming. Batch input is an automatic procedure referred to as BDC (Batch Data Communications).The central component of the transfer is a queue file which receives the data vie a batch input programs and groups associated data into “sessions”.

What are the functional modules used in sequence in BDC? - These are the 3 functional modules which are used in a sequence to perform a data transfer successfully using BDC programming: BDC_OPEN_GROUP - Parameters like Name of the client, sessions and user name are specified in this functional modules.

BDC_INSERT - It is used to insert the data for one transaction into a session. BDC_CLOSE_GROUP - This is used to close the batch input session.

 

What should be the approach for writing a BDC program?

STEP 1: CONVERTING THE LEGACY SYSTEM DATA TO A FLAT FILE to internal table CALLED "CONVERSION".

STEP 2: TRANSFERING THE FLAT FILE INTO SAP SYSTEM CALLED "SAP DATA TRANSFER".

STEP 3: DEPENDING UPON THE BDC TYPE

 I) call transaction (Write the program explicitly)

ii) Create sessions (sessions are created and processed. if success data will transfer).

 

What is the structure of a BDC sessions. 
BDCDATA (standard structure).

What are the fields in a BDC_Tab Table. 
Program, dynpro, dynbegin, fnam, fval.

What has to be done to the packed fields before submitting to a BDC session? 
Fields converted into character type.

 

What is the alternative to batch input session?

Call transaction.

 

What is the advantage of structures? How do you use them in the ABAP programs?

Adv: - GLOBAL EXISTANCE (these could be used by any other program without creating it again).

 

What kinds of BDC programs are written?

Batch Input method,

Call Transaction method,

Direct Input method

 

What is the difference between Upload and WS_Upload?

The difference between WS_Upload and Upload is when you use function Upload it prompts for a dialog box where in you need to key in the file location. Where as in case of WS_Upload you specify the file location in the function input parameters itself

 

Upload requires a User Interaction for uploading i.e., user has to respond to the dialog boxes that appear while WS_Upload does not

 

 

Update types in Call transaction method. What is the difference?

Call transaction update types: S /A/L S-SYNCHRONOUS A-ASYNCHRONOUS L-LOCAL MEMORY synchronous mode is waiting for commit work and asynchronous is not waiting for commit work.

 

SM35 transaction. How to automate BDC?

After execution of batch input program, the session created is placed in the session queue which can be viewed using SM35 transaction executing / releasing the session will start the transfer of the data from the session into the database tables

 

Recording Function

Recording tr code: shdb. It’s used to find the screen no and field name and program name also. Mainly used to write bdc programs.

 

What is a batch input session? - BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session i.e. data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.

 

Our ABAP program is working properly in Foreground. Can I schedule it for background processing on the weekend? 

SAP standard program RSBDCSUB helps you to schedule the job. Create a variant for RSBDCSUB with the BDC session name.

 

A situation: An ABAP program creates a batch input session. 
We need to submit the program and the batch session in back ground. How to do it? 

 Go to SM36 and create background job by giving 
 job name, job class and job steps (JOB SCHEDULING)

What is ERP? - ERP is a package with the techniques and concepts for the integrated management of business as a whole, for effective use of management resources, to improve the efficiency of an enterprise. Initially, ERP was targeted for manufacturing industry mainly for planning and managing core business like production and financial market. As the growth and merits of ERP package ERP software is designed for basic process of a company from manufacturing to small shops with a target of integrating information across the company.

 

What is SAP? - SAP is the name of the company founded in 1972 under the German name (Systems, Applications, and Products in Data Processing) is the leading ERP (Enterprise Resource Planning) software package.

Different types of ERP? - SAP, BAAN, JD Edwards, Oracle Financials, Siebel, PeopleSoft. Among all the ERP’s most of the companies implemented or trying to implement SAP because of number of advantages aver other ERP packages.

Why do you usually choose to implement SAP? - There are number of technical reasons numbers of companies are planning to implement SAP. It’s highly configurable, highly secure data handling, min data redundancy, max data consistency; you can capitalize on economics of sales like purchasing, tight integration-cross function.

Can BW run without a SAP R/3 implementation? - Certainly. You can run BW without R/3 implementation. You can use pre-defined business content in BW using your non-SAP data. Here you simply need to map the transfer structures associated with BW data sources (InfoCubes, ODS tables) to the inbound data files or use 3rd part tool to connect your flat files and other data sources and load data in BW. Several third party ETL products such as Acta, Informatics, Data Stage and others will have been certified to load data in BW.

What is IDES? - International Demonstration and Education System. A sample application provided for faster learning and implementation.

What is SAP R/3? - A third generation set of highly integrated software modules that perform common business function based on multinational leading practice. Takes care of any enterprise however diverse in operation, spread over the world. In R/3 system all the three servers like presentation; application server and database server are located at different system.

What are presentation, application and database servers in SAP R/3? - The application layer of an R/3 System is made up of the application servers and the message server. Application programs in an R/3 System are run on application servers. The application servers communicate with the presentation components, the database, and also with each other, using the message server. All the data are stored in a centralized server. This server is called database server.

Explain open SQL vs. native SQL? - ABAP Native SQL allows you to include database-specific SQL statements in an ABAP program. Most ABAP programs containing database-specific SQL statements do not run with different databases. If different databases are involved, use Open SQL. To execute ABAP Native SQL in an ABAP program, use the statement EXEC. Open SQL (Subset of standard SQL statements), allows you to access all database tables available in the R/3 System, regardless of the manufacturer. To avoid conflicts between database tables and to keep ABAP programs independent from the database system used, SAP has generated its own set of SQL statements known as Open SQL.

What are the events in ABAP/4 language?- Initialization, At selection-screen, Start-of-selection, end-of-selection, top-of-page, end-of-page, At line-selection, At user-command, At PF, Get, At New, At LAST, AT END, AT FIRST.

 

What are screen painter and menu painter?- Screen painter: Screen painter is a tool to design and maintain screen and its elements. It allows user to create GUI screens for the transactions. Attributes, layout, filed attributes and flow logic are the elements of Screen painter. Menu painter: Menu painter is a tool to design the interface components. Status, menu bars, menu lists, F-key settings, functions and titles are the components of Menu painters. Screen painter and menu painter both are the graphical interface of an ABAP/4 application.

What is DynPro?- DynPro is a Dynamic Programming which is a combination of screen and the associated flow logic Screen is also called as DynPro.

What are the components of SAP scripts?- SAP scripts is a word processing tool of SAP which has the following components: Standard text. It is like a standard normal document. Layout sets. - Layout set consists of the following components: Windows and pages, Paragraph formats, Character formats. Creating forms in the R/3 system. Every layout set consists of Header, paragraph, and character string. ABAP/4 program.

What are the different elements in layout sets? 
PAGES, Page windows, Header, Paragraph, Character String, Windows.

Can you use if then else, perform...etc statements in sap script? 
Yes.

 

What is Smart Forms?- Smart Forms allows you to create forms using a graphical design tool with robust functionality, color, and more. Additionally, all new forms developed at SAP will be created with the new Smart Form solution.

 

How can I make a differentiation between dependent and independent data? - Client dependent or independent transfer requirements include client specific or cross client objects in the change requests. Workbench objects like SAPscripts are client specific; some entries in customizing are client independent. If you display the object list for one change request, and then for each object the object attributes, you will find the flag client specific. If one object in the task list has this flag on, then that transport will be client dependent.

 

 

What is an ABAP/4 Query?- ABAP/4 Query is a powerful tool to generate simple reports without any coding. ABAP/4 Query can generate the following 3 simple reports: Basic List: It is the simple reports. Statistics: Reports with statistical functions like Average, Percentages. Ranked Lists: For analytical reports. - For creating a ABAP/4 Query, programmer has to create user group and a functional group. Functional group can be created using with or without logical database table. Finally, assign user group to functional group. Finally, create a query on the functional group generated.

What is ALV programming in ABAP? When is this grid used in ABAP?- ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.

What is CTS and what do you know about it?- The Change and Transport System (CTS) is a tool that helps you to organize development projects in the ABAP Workbench and in Customizing, and then transport the changes between the SAP Systems and clients in your system landscape. This documentation provides you with an overview of how to manage changes with the CTS and essential information on setting up your system and client landscape and deciding on a transport strategy. Read and follow this documentation when planning your development project.

What are logical databases? What are the advantages/ disadvantages of logical databases? - To read data from a database tables we use logical database. A logical database provides read-only access to a group of related tables to an ABAP/4 program. Advantages: i) check functions which check that user input is complete, correct, and plausible. ii) Meaningful data selection. iii) Central authorization checks for database accesses. iv) Good read access performance while retaining the hierarchical data view determined by the application logic. Disadvantages: i) If you don’t specify a logical database in the program attributes, the GET events never occur. ii) There is no ENDGET command, so the code block associated with an event ends with the next event statement (such as another GET or an END-OF-SELECTION).

What is the difference between macro and subroutine? - Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program the are defined in and other programs. A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (I’ve never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.

What are datasets? - The sequential files (processed on application server) are called datasets. They are used for file handling in SAP.

What is AWB?. What is its purpose? - AWB stands for Administrator WorkBench. AWB is a tool for controlling, monitoring and maintaining all the processes connected with data staging and processing in the business information warehousing.

 

What is the difference between ALE, EDI, IDocs and BAPI?

The interface concept of the classic R/3 is based on two different strategies: Remote Function Calls (RFC) and data exchange through IDoc message documents. RFC makes direct and synchronous calls of a program in the remote system. If the caller is an external program it will call an RFC-enabled function in R/3 and if the calling program is the R/3 system it will call an RFC-function in another R/3-system or it will call a non-R/3 program through a gateway-proxy (usually rfcexec.exe). BAPIs are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.

IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.

While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.

The philosophical difference between EDI and ALE can be pinned as follows: If we send data to an external partner, we generally speak of EDI, while ALE is a mechanism to reliable replicate data between trusting systems to store a redundant copy of the IDoc data. The difference is made clear, when we think of a purchase order that is sent as an IDoc. If we send the purchase order to a supplier then the supplier will store the purchase order as a sales order. However, if we send the purchase order via ALE to another R/3 system, then the receiving system will store the purchase order also as a purchase order.


How do you determine which interface method to use when interfacing to SAP/R3? In other words, do you go with BAPI, IDocs, RFC or ALE and so on?


RFC is the technology that allows to call a function module within an R/3 system from another R/3 instance or an external program from an R/3 instance.

BAPI function modules are special function modules that are released by SAP as an official application programming interface, which is releases and supported for public use. Hence, BAPIs are a subset of the RFC enabled function modules. Technically, there is no difference between RFCs and BAPIs, but SAP wants you to use a BAPI to access R/3 functionality from external programs, whenever a BAPI exists.

IDoc is a transport vehicle for data transfer in and out of an R/3 system. The data transferred between the system in the IDoc format, which is a text format. The IDoc is either exchanged via a file, so R/3 writes the IDoc to a file and the other one picks up the IDoc and vice versa or the IDoc is handed other via an R/3 RFC call. To send an IDoc to R/3 you call the special BAPI function: IDOC_INBOUBD_ASYNCHRONOUS and to send it out, R/3 ultimately calls IDOC_SEND. (However, for sending you should customize the route in transaction menu WEDI, and let the IDoc engine do the work).

ALE is a scheduling mechanism that defines a scenario to determine the triggers and data types to exchange with an external system. ALE uses IDocs to exchange the data at a given time.

So the general decision is: Would you rather use IDocs (or ALE) or RFCs (or BAPIs) to exchange the data? If you need the data to be protocol led or to be exchanged asynchronously, then you need IDocs. If you can dispose of logging the data in the receiving system (and thus dispose of the possibility to reprocess the data), then you can call the handling RFC function directly, which is quicker, produces less data garbage, but requires that the sending system must care for the error handling.

 

How do you find if a logical database exists for your program requirements? 
SLDB-F4.

What are IDOCs? 
IDOCs are intermediate documents to hold the messages as a container.

What are interface/conversion programs in SAP? 
CONVERSION: LEGACY SYSTEM TO FLAT FILE.
INTERFACE: FLAT FILE TO SAP SYSTEM.

 

No comments:

Post a Comment

CoPilot For Eclipse - The Joule Alternative

GitHub CoPilot works alongside you in the Eclipse Editor. It autogenerates code suggestions, provides correction syntax. Free version includ...