SAP ABAP MATERIALS

SAP PRESS EBOOKS,INSTITUTE MATERIALS,SUPPORT ISSUES,TICKETTING TOOLS

1463988 10202039058114141 1070888609 n

SAP ABAP MATERIALS DOWNLOADS

REPORTS,INTERFACES,BATCH DATA COMMUNICATION PROGRAMMING,ENHANCEMENTS,SCRITS,SMART-FORMS,MODULE POOL PROGRAMING.

SAP ABAP MATERIALS

CLASS ROOM TEACHING MATERIALS

sap web gui login

http://molgaard.consolut.eu/sap/bc/gui/sap/its/webgui

Wednesday, July 30, 2014

Migrating BAdIs

Migrating BAdIs 

Procedure

       1.      Call the classical BAdI Builder (transaction SE18).
       2.      Enter the name of the BAdI you want to migrate.
       3.      Choose Utilities  Migrate.
                            a.      Specify an enhancement spot. For more information, see Creating, Editing, and Deleting Enhancement Spots.
                            b.      Specify an enhancement implementation. For more information, see Creating, Editing, and Deleting Enhancement Implementations.
       4.      Transport the change into a follow-up system:
                            a.      Call transaction SPAU if a BAdI implementation exists for a migrated BAdI.
In this case, a message with identifier 6 will appear in the input log of the transport request.
                            b.      Choose the traffic light in front of the BAdI implementation.
                            c.      Enter an enhancement implementation.

Differences Between Classic and New BAdIs

Differences Between Classic and New BAdIs 

Classic and new BAdIs differ in a number of features that are important for migration:
  1. BAdI object
                            a.      With classic BAdIs, a BAdI object is created by calling a factory method, and referenced via a reference variable of the type of the BAdI interface.
                            b.      With new BAdIs, a BAdI object is created via the ABAP statement GET BADIas a handle for the calls of BAdI methods, and referenced via a reference variable of the type of the BAdI. A BAdI object is an instance of an internal BAdI class, which otherwise is invisible to the outside.
  1. Passing comparison values for the filter
                            a.      With the classical BAdIs, the filter values are stored in a structure and passed with the call of the BAdI methods.
                            b.      With the new BAdIs, the comparison values for the filters used to search for implementations are passed when the BAdI object is created with the GET BADIstatement.
There is no way of migrating the call of the factory method one-to-one into the ABAP statement, because GET BADI can also return an existing BAdI object, which is not possible with the factory method.
  1. Calling BAdI methods
                            a.      A classic BAdI can be called only once and the call positions are registered centrally.
                            b.      With new BAdIs, multiple calls are possible and the call positions are not registered centrally.
For the above reasons, an automatic call migration is not possible.

Tuesday, July 29, 2014

Uploading customer master extended address using bapi method


Uploading customer master extended address using bapi method





Re-Processing inbound IDOC using WE02

Re-Processing inbound IDOC using WE02

Whenever posting an inbound IDOC results in error, the general tendency is to post the IDOC again by executing the posting application/program again or by correcting the errors and re-processing the IDOC using transaction WE19. Both these options would create a new IDOC in the system leaving the old IDOC useles.

There is a provision in SAP wherein we can re-process the same IDOC without creating any additional IDOC’s in the system. This can be achieved by using the transaction WE02. The below steps tell how to do it:

1.Open the IDOC in error in WE02 Transaction.















2.Expand the status records, and see which segment is in error.





















3.     Double click on the page type iconadjacent to the error segment name, 
    as shown in the figure below.
























4.     It will take you to the below screen, this shows which fields are filled for that particular segment.























5.     Go to change mode, this will show all the fields that exist in the segment whether filled or not.  





















































6.     Replace the error value with the correct value and click on the save button.

























7.     Now go to transaction BD87, enter the IDOC number and click on execute.



















8.     Now expand all the drop downs and click on the Process Button















9.     It will re-process the IDOC with the modified data and display the success message if there are no errors in the edited data.  

Monday, July 28, 2014

Using folder options for page protection in smartforms

Using folder options for page protection
In this recipe, we will see how we can create a folder comprising a number of lines (block of text) so that they are all printed on the same page. If the space within a page is not enough for printing all the lines, the entire text block is printed on the subsequent page, that is, page protected.
How to do it...
For defining a folder with page protection, follow these steps:
1.     Right-click on the MAIN window. Then, from the context menu that appears, choose the option Create and then select Folder, as shown in the following screenshot:




2.     Next, enter a suitable folder name. In the right-hand pane, on the Output Options tab of the created folder, check the Page Protection indicator.



3.     Then add a text under the given folder.


4.     Add three lines to the text.


5.     Save and activate your Smart Form.
How it works...
When the form output is generated, irrespective of the number of lines printed above our three-line text, a page protection is applied. If the space on the page is not enough so that all three lines may be printed, a page break is automatically triggered and the lines are printed on a fresh new page. Otherwise, the same page is utilized. In no case will the three lines be broken into two pages.


BDC interview questions

BATCH DATA COMMUNICATION

1. What is expansion of BDC session?
Batch Data Communications Session.

2. What are the steps in a BDC session?
The first step in a BDC session is to identify the screens of the transaction that the program will process.
Next step is to write a program to build the BDC table that will be used to submit the data to SAP.
The final step is to submit the BDC table to the system in the batch mode or as a single transaction by the CALL TRANSACTION command.

3. How do you find the information on the current screen?
    The information on the current screen can be found by System Status command from any menu.

4. How do you save data in BDC tables ?
The data in BDC tables is saved by using the field name ‘BDC_OKCODE’ and field value of ‘/11’.

5. What is the last entry in all BDC tables ?
In all BDC tables, the last entry is to save the data by using the field name BDC_OKCODE and a field value of ‘/11’.

6. What is a multiple line field ?
A multiple line field is a special kind of field which allows the user to enter multiple lines of data into it.

7. How do you populate data into a multiple line field ?
      To populate data into a multiple line field, an index is added to the field name to indicate which line is to be populated by the BDC session (Line index ).

8. Write the BDC table structure.
      BDC table structure    
  
FIELD         TYPE           DESCRIPTION
Program      CHAR(8)     Program name of transaction
DynPro        CHAR(4)     Screen number of transaction
DynBegin    CHAR(1)     Indicator for new screen
Fnam           CHAR(35)   Name of database field from Screen
Fval             CHAR(80)   Value to submit to field

9. Does the CALL TRANSACTION method allow multiple transactions to be
processed by SAP ?
No. The CALL TRANSACTION method allows only a single transaction to
be processed by SAP.

10. Does the BDC_INSERT function allow multiple transactions to be processed
by SAP ?
Yes.

11. What is the syntax for ‘CALL TRANSACTION’ ?
CALL TRANSACTION trans [ using bdctab MODE mode ].
Three possible entries are there for MODE.
A - show all screens
E - show only screens with errors
N - show no screens

12. Syntax for CALL Transaction
CALL TRANSACTION <transaction code>
                           USING <bdc table>
                           MODE <display mode>
                           UPDATE <update mode>
                           MESSAGES INTO <msgtab>

13. Which mode of ‘CALL TRANSACTION’ method allows background
processing ?
N is the only mode that allows background processing.

14. Is it possible to use ‘CALL TRANSACTION’ without a BDC table ?
Yes, it is possible to use ‘CALL TRANSACTION’ without a BDC table. In such case, the current program is suspended, the transaction specified is brought up, and a user must enter the data into the screens.

15. What is TCODE ?
TCODE is the transaction code for the transaction that should be used to process the data in the BDC table being inserted.

16. What are the function modules that need to be called from BDC program to submit the transactions for processing ?
BDC_OPEN_GROUP
BDC_INSERT
BDC_CLOSE_GROUP

17. How many sessions will be opened using BDC_OPEN_GROUP ?
 Only one session can be created using the BDC_OPEN_GROUP functon.

18. What is ‘BATCH INPUT’ or ‘BDC’ ?
The SAP system offers two primary methods (BDC SESSION METHOD, CALL TRANSACTION METHOD) for transferring data into the system from other systems and Non-SAP systems. These two methods are collectively called as ‘BATCH INPUT’ or ‘Batch Data Communication’ (BDC).

19. What are the advantages in Batch Input ?
The Batch Input ensures Data integrity.No manual interaction is required during Data transfer.

20. BDCMSGCOLL – Structure that captures all error messages.

21. What is the functionality of ‘Classical Batch Input’ ?
In ‘Classical Batch Input’ an ABAP/4 program reads the external data that is to be entered in the SAP system and stores the data in a Batch Input session. This session stores the actions that are required to enter your data using normal SAP transactions.

22. Which Function Modules are used in ‘Classical Batch Input’ ?
BDC_OPEN_GROUP , BDC_INSERT, BDC_CLOSE_GROUP.

23. Can we use the ABAP/4 dictionary to generate data structures for SAP tables
with the programming languages ?
Yes, we can use COBOL, PL/1, AND ‘C’.

24. What is the use of ‘Structure Identifiers’ in SAP ?
With ‘Structure Identifier’ we can generate a listing of all of the table fields that are required by the corresponding Batch Input program. We do not need to find out which tables are required for the Batch Input program and generate their structures individually.

25. What is the use of RFC or CPI-C in SAP ?
With RFC or CPI-C we can transfer data between two R/3 systems.

26. What is Synchronous Database update ?
During the processing no transaction is stored until the previous transaction has been written to the Database. This is called Synchronous Database update.

27. What are the types of Batch Input?
Classical Batch Input
Call Transaction
Call Dialog (Obsolete)

28. What is BDC_OKCODE?
The command field is identified by a special name in batch input calledBDC_OKCODE. This name is constant and always identifies the command field.

29. What are the differences between CALL TRANSACTION and BATCH
INPUT SESSION ?
CALL Transaction Session Method
1. Synchronous Processing
2. Synchronous and Asynchronous Database Update
3. Transfer form individual transaction, each time the CALL Transaction is called.
4. Separate LUW for the transaction.
5. System executes commit immediately before and after CALL TRANSACTION USING statement.
6. No batch input processing log is generated.
1. Asynchronous processing
2. Only Synchronous Database update (During processing, no transaction is started until the previous transaction has been written to the database.)
3. Transfers data for multiple transactions.
4. Sessions cannot be generated in parallel.
5. Supports playback for correcting sessions that contains errors.
6. A batch input processing Detailed Log is generated for each session. (Prgg opens a session in queue before data transfer)

30. How can we execute a function in a BDC session?
We can execute a function in a transaction by entering the function code orfunction key number in the command field of an SAP session. A function key number must be prefixed with the / (slash) character. A function code must be prefixed with the = character.
Example:
BDCDATA-FNAM = 'BDC_OKCODE'
BDCDATA-FVAL = '=UPDA'

31. How can we position the cursor on a particular field?
BDCDATA-FNAM = ‘BDC_CURSOR’
BDCDATA-FVAL = <FIELDNAME>

32. Who are Dialog users and who are Background users?
Dialog users are normal interactive users in the SAP system. Backgroundusers are user master records that are specially defined for providing authorizations for background processing jobs.

33. What is the use of BDC_INSERT?
We add a transaction to a Batch Input Session by using this function.

34. What are the update modes in CALL TRANSACTION?
S: Synchronous
A: Asynchronous
L: Local

35. What does the message parameter indicates?
The message parameter indicates there all system messages issued during a CALL TRANSACTION are written into the internal table <itab>. The internal table must have the structure of BDCMSGCOLL.

36. What is Direct Input?
To enhance the batch input procedure, the system offers the direct input technique especially for transferring large amount of data. This technique doesn’t create sessions but stores the data directly. The direct input programs must be executed in the back ground only. To maintain and start these programs, use program RBMVSHOW or the transaction BMVO.

37. What are the features of Recording Function?
Recording transaction runs Creating batch input sessions from the recorded transaction runs.
Generating a batch input program from the recorded data.

38. What is synchronous database update?
During the processing, no transaction is stored until the previous transaction has been written to the database. This is called Synchronous database update.

39. What should be the approach for writing a BDC program?
Functional Steps:
1. Identify the Business Object
2. Determine the Transfer Method
3. Organize the Data Transfer
Technical Steps:
1. Identify the fields
2. Analyze the legacy data
3. Map the data to R/3
4. Prepare legacy data
5. Transfer data

40. What is a batch input session?
It’s a standard method to do a BDC. It offers management of sessions, supports play back for correcting sessions that contains errors & then for detailed logging. A session is a collection of transaction data for one or more transactions.

41. What is the alternative to batch input session?
CALL Transactions
Direct Input Methods

42. A situation: An ABAP program creates a batch input session. We need tosubmit the program and the batch session in background. How to do it?
43. What are the problems in processing batch input sessions? How is batch
input process different from processing on line?
44. What do you do when the system crashes in the middle of a BDC batch
session?
45. What do you do with errors in BDC batch sessions?
46. How do you set up background jobs in SAP? What are the steps? What are
the event-driven batch jobs?
47. What is difference between BDC and Call Transaction?
48. Setting up a BDC program where you find information?
49. What has to be done to the packed fields before submitting to a BDC session?

50. What is the structure of a BDC sessions.

51. Correcting Sessions:
Error Handling:
1. Re-Run the session in Display All mode or Error Display mode. This skips the transactions that were successfully completed.
2. With Analysis display check the screen that has errors & correct the program, which generated the session & regenerate the session. Ensure that the session does not include the transactions that were successfully completed.

Interrupting Sessions:
/bend [OK Code] – Terminates & marks the status as Incorrect.
Restarting a Transaction:
/bbeg [OK Code] – Terminates the current transaction & then restarts it.
Deleting a Transaction:
/bdel [OK Code] – Transaction is removed from the session.

52. BDC Authorization Object: S_BDC_MONI
This object S_BDC_MONI is used for authorization checks in batch input
processing.
You can use this auth. Object to restrict processing to particular sessions.
You can also protect specific activities in batch input processing (by making an entry in activities field)

53. Standard Utility Reports for Batch Inputs:
RSBDCSUB – To Schedule the batch input sessions.
RSBDCREO-  Deletes all sessions which r flagged as successful and still in system, together with their logs. Physically deletes all logs for which there are no sessions. Recognizes the log file. Function integrated in SM35.
RSBDCDRU
o Allows u to print out the contents of selected sessions.
o Function integrated in SM35.
RSBDCLOG
o Generates a list of batch input logs, selected by session name
o Can display or delete logs and if sessions exist, activate the analysis
o Function integrated in SM35.

54. BDC Failures?
Common Problems
The Program does not find your Flat File Synchronization between master data enhancements and data transfer structures Field Values arrive in the wrong place There is no Batch input session
Authorizations and user master defaults External and Internal format

The legacy system provides other values than needed in R/3 Different Organizational structures
Inconsistent source Data

55. In Migration Workbench, which data transfer method is used?
Direct Input and
Batch Input (Session Method)
56. If we predict that a particular type of error(s) may occur in Data Transfer,
(back ground processing mode), can we handle that error?
57. What effect will the session will have, if the data transfer takes place in
background mode.
58. In what scenario the Direct Input method is used?
There are two ways to trigger direct input
Start the program directly: Note that the system does not generate an error
log, nor is it possible to restart the system if an error occurs.
Direct input in the background: In this case, you can restart processing if
the program terminates or logical errors occur (material missing, for
example). The ability to restart the system ensures that data cannot be
posted twice to the database, as the program can be reset to where it
terminated. Using the trace you can correct any errors that occurred.
Direct input also has the advantage that it places little load on the system.
You can transfer the following data transfer objects using the direct input
method:
Material masters
Accounting documents
Sales documents
Fixed assets
Classification
If you are working with test data, start the direct input directly. For the final data
transfer, SAP strongly recommends that you use Transaction BMVO.
59. Does SAP have any FLAT file standards, for data migration?
No
60. Can BDC be done for Migration Workbench?
Yes
Data Transfer Workbench
Transaction: SXDA
Purpose
The Data Transfer Workbench supports the automatic transfer of data into the R/3 System.
The Workbench is particularly useful for business objects with large data volumes. It guarantees
that data is transferred efficiently and ensures that data in the R/3 System is consistent.
Features
The Data Transfer Workbench provides the following functions:
Administration and organization of data transfer projects
Tools for analyzing the required SAP structures
Integration of standard data transfer programs
Registration and integration of your own data transfer programs and help programs
Various techniques to load data into R/3.
The data is read from a transfer file in SAP format and loaded into the R/3 System using
one of the techniques below:
BAPI interface
Batch input
Direct input (DINP)