abap tips and tricksabap tips and tricks

Post on 15-Jul-2016

18 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

ABAP Tips and TricksABAP Tips and Tricks * How to print Apostrophe using the write statement * For e.g. You'll be there. * report zapostrophe message-id z1. DATA: LINE(20). CONCATENATE 'You''' 'll be there.' INTO LINE. WRITE:/ LINE. ********** Find the Table Name For a Field. I know couple of ways to find the table name for a field. like. 1. Part the cursor at the field and press F1 & F9. 2. se84 or se15 3. st05 (sql trace). 4. Setting Break point in ABAP. If you will tell other methods it will be appreciate. ********** Given a transaction code, how can I find the menu path? In 4.6c, you can used tcode search_sap_menu to find the SAP MENU tcode. Please note that there are no tcode available to find the path of the IMG transaction. ********** How to un-encrypt SAP user password? It is not possible to un-encrypt the SAP password, because a one-way encoding (with strong 1024 bit key) is used for this. The result is stored and each time one has entered the password the encoding result is checked. ********** When you delete an entry from an internal table in ABAP, the system has to re-generate the index for all entries after your delete, slowing the report if you have many records to eliminate. It is much quicker to do an insert of the correct records into a second table than to delete entries from the first. The reason for this is because the index is only generated for the newest element. ********** If you want to protect a program against debugging, you just have to set the STATUS = S in the attributes view of the main program. ********** BDC. When You use a call transaction ,and populate the BDCDATA table. Make sure you pass the "DATE FIELDS" of any transaction by formatting it

as "XX/XX/YYYY" cos if you pick this data from database it will be of the format 20030505 or something like that. Make sure You pass this value as character field. Same is true for the "Rate Fields". Make sure you pass them as "Character Fields" by formatting them. ********** If you need to find out the Okcodes for BDC sessions, look for program RSBDCCUA and run it for any platform say 'WN' for windows or MC for Mac and it will generate list of function codes ********** To save the contents of an internal table as a Microsoft Excel Worksheet when debugging code in SAP R/3 Enterprise: 1. Click on the "Table" button 2. Type in the name of your internal table in the "Internal table" field and hit Enter. 3. Hit CTRL + F11 or click on the "Save as Excel Worksheet" button. 4. Type in the record numbers that you want to save. (Ex. From Line: 1 To Line: 10) Hit Enter. 5. Save your file. ********** Starts with a Z is homegrown program You cannot be sure that anything which starts with a Z is a homegrown program. SAP provide a number of correction programs, especially within the archiving area, which start with a Z. For e.g. ZZSTOCKL from note 202345. ********** Can line-size of abap report large than 255? You can have line-size upto 1023. Along with Report statement pass the line-size as 1023. Ex. Report xyz line-size 1023. ********** How to find out the number of days between a given date, excluding Saturdays and Sundays and public holidays? Try functions, => DATE_CONVERT_TO_FACTORYDATE => HR_HK_DIFF_BT_2_DATES ********** Fast Links: 100 ABAP FAQ More than 100 ABAP Interview faq's Get help for your ABAP problems Do you have a ABAP Question? ABAP Books

ABAP Certification, BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference Books Best regards, SAP Basis, ABAP Programming and Other IMG Stuff http://www.sap-img.com All the site contents are Copyright © www.sap-img.com and the content authors. All rights reserved. All product names are trademarks of their respective companies. The site www.sap-img.com is in no way affiliated with SAP AG. Every effort is made to ensure the content integrity. Information used on this site is at your own risk. The content on this site may not be reproduced or redistributed without the express written permission of www.sap-img.com or the content authors. s

top related