Q: Is ABAP program client dependent or independent?A: Independent.Q: What is the diffference between modifications and enhancements?A: Modification, we are modifying which is already exists, In enhancement we are adding additional functionality.Q: What type of objects exist in the data dictionary?A: Data in data dictionary is not the actual data like emp.name.name or emp.address but rather a type data whosefunction is to define the properties of the data, such as type, length, and relationship.Q: Explain the concept of asynchronous update?A: When you change data of one table the sy-subrc is returned. And then updation of other affected tables takesplace. So if system fails to update other tables still sy-subrc returned is 0 (ie, Whwn first table gets updated).Q:What components does a dynpro consists of?A: Number of screen. Length(4)Q: What is the difference between data elements and domain?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 andthe 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 fieldshas the technical attributes specified in this domain.Q:What are the main elements of a status?A: 1. Usage data 2. SAP data 3. Host data 4. SAP system data 5. Database data.Q: How many lists can exist in parallel in an interactive reporting?A: In the interactive reports, we can create as many as 21 lists. The first list is called Basic list and all the successive lists are called Secondary lists. Each list is again an interactive.Q:What are the 3 main events in interactive reporting?A: 1. Top-of-page during line selection. 2. At line-selection 3. At user-commandQ: What is IDOC and when, how to use it ?A: IDOC is one of the EDI(Electronic data interface). It is used as a format modifier.
Q: Is there any standard SAP report which gives a count of the number of times a program is executed ?A: Try transaction STATQ: When we create a customer the information is updated in structure RF02D and the some tables like KNA1 areupdated. How can we find the tables for master data transactions?A: Go to ABAP Workbench -> Overview -> application hierarchy - SAP -> follow the customizing based tree foryour application. Double click on a lowest hierarchy level to get for the correct marked development class. Hereyou can find all the tables, views, logical databases etc. used for a system operation.Q: How can we use CAD with SAP ?A: Third party tools from Eigner + Partner provide interfaces to SAP. Another third party software - Fastlook PlusfromKamel Software enables you to view all of the Autocad formats..Q: How can I access SAP through Internet?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.Q: How can we transport the standard text?A: Refer note 3355 in OSS for a complete explanation. The SAPscript objects that should be transported must bewritten 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 acorrection. 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 amonth )A: You may use the transaction - STAT.Q: We want protect/lock a field so that only selected people can change the value while others can only read. Howto set the authorizations?A: Create an authorization object for change mode. Loop at screen in the user exit and set input to 0. Check theuser 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 afterthe maintenance is over, go back to SM01 and uncheck the same to unlock.BDCQ: Our ABAP program is working properly in Foreground. Can I schedule it for background processing on theweekend?A: SAP standard program RSBDCSUB helps you to schedule the job. Create a variant for RSBDCSUB with theBDC 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.endloopend-of-selection.SAPScriptQ: We get the total number of pages as expected by using SAPSCRIPT-FORMPAGES in a duplex layout. In ourcase duplex case is always Terms & Conditions. We do not want the number of pages as in duplex printing. Whatis the best possible solution?A: On the Terms & Conditions page, Change the Page counter mode to HOLD to keep the page counter fromincrementing when you print the Term & Conditions.Q: Can I Print a logo on an Invoice?A: Save a Logo using Paintshop Pro or Corel Draw as Tiff file. Use RSTXLDMC to convert the logo to standard textin SapScript. When the program is executed, the path and file name have to be correctly specified.RFCQ: We want to move a SAP table to an Access table using TABLE_EXPORT_TO_MSACCESS_RFCImporting parameters areDBNAMEDESTFLG_APPENDFLG_POPUPLANGUThe table has three columns:TABNAMMANDTSDATAWe have no Exporting parameters.How shall we set the 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 onlysupports tables with up 255 fields.Q: We want an RFC do the following transactions - MB1A, MB1C,>MB01 (goods receipt/issue).A: Call the RFC INBOUND_IDOC_PROCESS with IDOC_CONTROL and IDOC_DATA. The structure in the fieldsdata in the IDOC_DATA are e1mbxyh and e1mbxyi.
TransportsQ: In a Dev instance, we want to transport a modification to a layout set from one client to another. What is the bestway?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, PRDetc). 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 stagesand enables you to allocate Import, export and Authorization functions to specific user.TablesQ: We specify the logical database. And we want a field that is not present in any of the tables defaulted in logicaldatabase. How can we want to add this additional field from a different table?A: . Presume you have a logical databasetable 1table 2table 3Define the required field as additional field say fld of table 1, table 2 or table 3and 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 conditionsf = table4 - f1d.Q: We need to download an internal table to the Presentation Server(local workstation). Whenever we run theprogram, the same file has to be saved as a separate file in sequential order. Ex: 0001.txt, 0002.txt etc. Where canwe store the last filenumber?A: SAP has a table TVARV for storing the variants.A record may be created in TVARV for all the programs that require this kind of incremental records.For Ex: the record could be 100Zmm10001 MM sequence rec where first part consists of client code and theprogram being run. Client code is required because TVARV does not has a field for client code. The second part isthe description indicating the purpose what the record is created. This entire string may be posted in the Name field(char - 30).The Type field ( char- 1) may be populated with P or S (Parameter or Selection)Low field (char- 45) may be populated with 0001 when run first time and increment it by one in your program fordownloading of the internal table.Batch input / Direct inputQ: We are calling transaction VL01 in batch input to create deliveries using a program for delivery due list. However we are unable to create deliveries for transport stock orders. Why?A: Batch-inputs can not be used to fill the "delivery due list" screen because it is not a dynpro. This is a standardSAP report. A SAP report (check with "System -> Status") may be called using SUBMIT sentence with the appropriateoptions . It is preferred to call a report than create a Batch-input program.Q: What are some sample Direct input data transfer programs?A: In MM for Material Master data - RMDATIND FI - for Accounting Documents - RFBIBL00 PP - for Independent requirements - RM06IN00 CA - for Classification data - RCCLBI03ABAP/4E D I / IDOC
Q:1 We created an EDI Vendor and created all required output conditions. However no IDOC is generated whenPO 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 thetiming. If the status is 2 , go to GOTO->Processing Log and the explanation for non-generation of IDOC can beseen.Q: How can we create / upload IDOCs from legacy system to SAP?A: Third party tool Mercator may be used to convert Legacy files to Idoc format. Mercator provides an IDOC treeimport facility, SAP provides the export facility. You can transfer the Idoc layouts from SAP to Mercatorautomatically and then map.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 anEDP20 coming in.# Issue an error status 51 with suitable message for whichever condition you dont 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 fieldsare updated and what should be my procedure?A: Execute Program: IDOC_INPUT_ORDRSPProcess code: ORDRMessage type: ORDRSPIDOC: ORDERS01The confirmation process allows the supplier to return an acknowledgment. Only Dates and quantities can bechanged The information is stored in the PO and can be viewed via Item->Confirmation->Overview. The PO can beflagged as confirmation required so that Pos without acknowledgement receipt can be monitored. Control keysand tolerances (days and quantities) have to be customized.ALEQ: Our IDOC remains in status 51 ( not posted) while testing ALE setup by passing DEBMAS02 Idocs. Themessage 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. Changethe option to Optional Entry.Check OSS 5599. You may have to update view V_T078D also.1. How data is stored in cluster table?Each field of cluster table behaves as tables which contains the no. of entries.2. What are client dependant objects in abap/sap?SAP Script layout, text element, and some DDIC objects.3. On which event we can validate the input fields in module progams?In PAI (Write field statement on field you want to validate, if you want to validate group of fields put in chain andEnd chain statement.)4. In selection screen I have three fields plant, mat no and material group. If I input plant how do I get themat 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 respectivesegments.
6. When top of the page event is triggered?After excuteing first write statement in start-of-selection event.7. Can we create field without data element and how?In SE11 one option is available above the fields strip. Data element/ direct type.8. How do we debug sapscript?Go to SE71 give layoutset name , go to utilities select debugger mode on.9. Which transaction code can I used to analyze the performance of ABAP program.TCode AL21.10. How can I copy a standard table to make my own z_table.Go to transaction SE11. Then there is one option to copy table. Press that button. Enter the name of the standardtable and in the Target table enter Z table name and press enter.What is User Exits?The following document is about exits in SAP :-The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applicationswithout having to modify the original applications.SAP creates user exits for specific programs, screens, and menus within standard R/3 applications. These exits donot contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionalityonto these hooks.Types of ExitsThere 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 ExitsMenu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to callup 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 functioncodes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-onproject.Screen ExitsScreen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areason a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.Function Module ExitsFunction module exits add functions to R/3 applications. Function module exits play a role in both menu and screenexits.When you add a new menu item to a standard pull down menu, you use a function module exit to define theactions that should take place once your menu is activated.Function module exits also control the data flow between standard programs and screen exit fields. SAPapplication developers create function module exits by writing calls to customer functions into the source code ofstandard R/3 programs.These calls have the following syntax:CALL CUSTOMER-FUNCTION ‘001’.Field ExitsField exits allow you to create your own programming logic for any data element in the Dictionary. You can use thislogic to carry out checks, conversions, or business-related processing for any screen field. Example: The dataelement BBBNR identifies a company’s international location number. You might want to set up your R/3 Systemso 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 programsand screens in which users can add new international location numbers. When you activate your field exit, thesystem automatically triggers your special routine whenever a user enters a company location number.In 4.6c, you can use "RSMODPRF" program to create field exits.An example of a user exits :-MODULE user_exit_0001 INPUT CASE okcode. WHEN BACK OR EXIT. CASE sy-dynnr. WHEN 100. SET SCREEN 0. LEAVE SCREEN. WHEN 200.********************************************************************************** Note that you can write any code that satisfy your needs. ******** But in this case, this was wrote as a sample code for reference sake. ******** And you can test it. ********************************************************************************** SET SCREEN 100. LEAVE SCREEN. ENDCASE. ENDCASE.Field exits (SMOD/CMOD) Questions and Answers1. Field exit was created with CMOD, but is not processed when calling the screen. 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.2. How is performance affected by setting abap/fieldexit? • 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 hencemake 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 whichthe field exits will be called in the future.4. How does the field exit behave on step loop fields ? 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 inthe module between LOOP and ENDLOOP. This module is also called once for each visible step loop line.5. Can field exits be debugged ? o No. Field exits must be tested separately in the ABAP/4 Development Workbench. For errors which only occurin the screen environment, it is helpful to write interesting variable to the file system using TRANSFER... . Thesecan then be analysed there.6. What can you do if the field contents are no longer transported to to ABAP/4. o Check whether a value is assigned to the field OUTPUT.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 sameformat 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 exampleFIELD_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 assigna program and a screen which do not exist to the field exit and then activate the field exit.9. Field exit is not visible in CMOD, although created. o If you want to create a field exit for a data element, a function module is proposed with the nameFIELD_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.10.Field exit is not executed although it is active. o Fields which do not have the Input field attribute usually do not trigger a field exit. The field exit is designed toallow an extended input check. It is therefore only called for input fields - even if they are not ready for input atruntime of the application by LOOP AT SCREEN. This rule does not apply, however, if the field is located within asteploop. 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.11.Field exits on check buttons do not work o Field exits are only intended for input fields. As check buttons count as graphical elements, you cannot installfield exits on them.12.Field exits do not work on selection screensSAP Printer commands in SAPScriptsThe command line in the editor must be as follows:/: PRINT-CONTROL xxxxxor/: PRINT-CONTROL xxxxxwhere xxxxx stands for the five-character name of the print control.
Example:/: PRINT-CONTROL ZM100The complete printer command normally resides in the print control.If characters belonging to the print command follow after the print control in the text (only useful for the HPL2printer driver for PCL-5 printers), the text line following after the PRINT-CONTROL command should begin with anequals sign (=) in the format column.Example:/: PRINT-CONTROL SESCP = *c5GIf you do not use the equals sign, a space character is inserted between the print control SESCP and the character*c5G.When u use Protect & End-ProtectWhile using Scripts, if u dont want to break a paragraph text which aparts to another page i.e. if u wanna displaythe paragraph with out breaking in between two pages, u have to use protect...endprotect.How do I debug a program that runs in the background?Go to SM51. Choose the server in which your background program is running. Place the cursor on the line whichshows your program. Choose the menu option Debugging. Depending on your version the menu option is indifferent 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 keyfrom SAP to do a user exit?Strictly speaking a user exit is any place within standard SAP, where SAP have added a mechanism for clientspecific code to be executed.Customer exits are maintained with transaction CMOD. They are constructed in such a way that all development isin 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 intostandard SAP. For example, in Sales Order Processing, SAPMV45A, a number of user exits can be found ininclude MV45AFZZ. To modify this, however, you would need an access key from SAP for this include. If youwanted to utilize the screen exits available in Sales Order Processing, you would need an access key forSAPMV45A.VOFM transaction manages many user exits. When a VOFM exit is created, two access keys are required. One forthe 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, aglobal search for userexit or user_exit usually identifies the user exit forms.Is there a way capture report output into one internal table?Use SUBMIT ... EXPORTING LIST TO MEMORY. It saves the output of a report into memory. Use the functionmodules LIST_FROM_MEMORY, WRITE_LIST and DISPLAY_LIST.Does not display the output list of the called report, but saves it in ABAP memory and leaves the called reportimmediately. Since the calling program can read the list from memory and process it further, you need to use theaddition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. You can read the saved list from SAP memory with the function moduleLIST_FROM_MEMORY and then (for example) store it in the database with EXPORT. You can process this listfurther with the function modules WRITE_LIST, DISPLAY_LIST ... of the function group "SLST".I am trying to change a screen field from output only to input capable, and vice versa, depending upon thevalue in another screen field. For example, if the user changes the plant number to a specified value, allowthem to input into the Region field. But if they change the plant to a different value, change the Regioncode back to Output only. Is there a way to do this?
In a module in the PBO of the flow logic of your screen, you need to use a LOOP AT SCREEN. For example:LOOP AT SCREEN. IF SCREEN-NAME EQ "REGION". IF PLANT EQ ????. SCREEN-INPUT = 1. ELSE. SCREEN-INPUT = 0. ENDIF. MODIFY SCREEN. ENDIF.ENDIF.What is the difference between user exits and customer exits?A customer exit is a type of user exit. A user exit is a handle that SAP put into their code, allowing a customer toadd their own routines. There are many types of user exit, and often they differ between modules, so I cant give astep by step guide to finding them. Some tips are:Use CMODSearch the major module pools of the applications for forms beginning userexitCheck 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 onthe screen? The problem that I have to deal with is defaulting a G/L account number based on the type ofsales posting that the user selects (external, intercompany, etc.)Use the INITIALIZE event to set the initial defaults. Use the AT SELECTION-SCREEN OUTPUT event todetermine the defaults for the G/L account numbers, according to the setting of your radio button.