DirectorySoftwareBlog Details for "Let US ABAP"

Let US ABAP

Let US ABAP
This blog has information on SAP ABAP. Will contain short tutorials on the following topics Basics of ABAP, Reports, Interfaces, conversions, Enhancements, Sapscripts, ALE, EDI. Some of the functional topics will also be covered which are relevant fo
Articles: 1, 2

Articles

SAP ABAP Tutorial: Module Pool Programming. Part 3
2008-03-17 17:28:00
SAP ABAP Tutorial : Module Pool Programming . Part 3We will now proceed further and see the code that needs to be put in place to actually create the sales order.Code for the PBO Module*&----------------------------- ----------------------------------------* *& Module pool       ZSALESORDSCREEN    &n bsp;      & nbsp;               ;      &nbs p;   **&     &nbs p;      &nb sp;      &n bsp;      & nbsp;               ;      &nbs p;      &nb sp;      &n bsp;      & nbsp; **&---------------------------------- ------...
More About: Part 3
SAP ABAP Tutorial: Module Pool Programming. Part 2
2008-03-17 10:59:00
SAP ABAP Tutorial : Module Pool Programming . Part 2Once the program 'ZSALESORDSCREEN' is created Saved and Activated, run Transaction SE51.Enter screen number '9000'Screen numbers can be up to 4 characters long, all of which must be digits. Screen numbers from 9000 are reserved for customer-specific screens.In the Screen Painter enter a short Description and Activate the screen.Once this is done you will be presented with a screen that will have three tabs, namely Attributes/Element List/Flow LogicClick on Element List and type Ok_Code and Activate. Now click on Flow Logic.You should see the following code in the Flow Logic.PROCESS BEFORE OUTPUT. MODULE STATUS_9000.PROCESS AFTER INPUT. MODULE USER_COMMAND_9000.Create MODULE STATUS_9000 by double clicking on it.  The following code will be automatically created.INCLUDE ZSALESORDERTOP    &nb sp;      &n bsp;      & nbsp;   &n...
SAP ABAP Module Pool Programming Tutorial Part 1
2008-03-17 10:12:00
SAP ABAP Tutorial : Module Pool Programming . Part 1Related Transaction Codes:SE51: Screen Painter Initial ScreenSE41: Menu Painter Initial ScreenSE38: ABAP Editor Initial ScreenSE80: Object NavigatorIn this tutorial we will explore module pool programming. We will create a sales order. We will combine the Initial screen and the Overview Screen of Transaction VA01 Create Standard Order into one screen.We will use the following BAPI to create the Sales OrderBAPI_SALESORDER_CREATEFROMDAT1The following fields will be updated.Order Type                              ORSales Org                                1000Dsitribution Channel                10Division         &nbs...
Important tables and Transactions associated with SAPSCRIPTS
2008-03-14 12:47:00
Important tables and Transactions associated with SAPSCRIPTS TNAPR Processing programs for outputTTXFP Selection list of print programs SAPScript Transaction codes SE71 - Form painter SE72 - Style maintenance SE78 - SapScript Graphics Management SO10 - Create standard text module NACE ? Conditions for output control SAPSCRIPTS to SMARTFORMS Run transaction SMARTFORMS Utilities -> Migrate SAPscript form. Function Module used to migrate SAPSCRIPTS to SMARTFORMS. FB_MIGRATE_FORM
More About: Tables
Imortant Programs related to SAP SAPSCRIPTS
2008-03-14 07:16:00
SAP SAPSCRIPT Related Programs Please find below a list of SAP SCRIPT Programs. The following programs will prove helpful to ABAPers. The following programs are given in the list with description.RSTXCDM1,RSTXCNVR,RSTXCPDF,RS TXDBUG,RSTXFCAT,RSTXFCPY,RSTXFCOM,RSTXFCO N,RSTXFINF,RSTXHTML,RSTXICON,RSTXSYMB,RST XR3TR,RSTXSCAT,RTXSF01,RSTXTCAT
SAPSCRIPT and SMARTFORMS Bar Codes and SWIN
2008-03-13 17:23:00
Printing BARCODEs for SAPSCRIPTS and SMARTFORMSBar Codes and SWIN Locate the document in its SAP Library structureBar code can be printed from any Microsoft WIndows Printer. To do so please follow the steps given below.Define the printer in the SAP spool system with device type SWINs.Select the access method S in the printer definition in the spool systemInstall a.DLL file for bar codes on your Microsoft Windows PC.Barcode dll does not come with SAP. Hence you should make arrangement for the .dll file yourself.No special font cartridge is required as the .dll converts the barcode into graphics. Hence any printer that prints graphics can print the barcode.The bar code .DLL must meet the following requirements:It must be compatible with your Microsoft Windows printers and with the SAPSprint Service that is running on the Microsoft Windows PC.The bar code.DLL must offer a programming interface is compatible with SAPSprint. For details about this interface and about compatible products,...
More About: Printing
Creating A New Transaction Code In ABAP
2008-03-12 09:14:00
Creating A New Transaction Code In ABAPAs shown in the figure below run Transaction SE80 and click on the drop down.Select Program from the list.Enter the name of the program as shown.Right click on the program name under Object Name and you will see a drop down as shown below.Select Transaction. You will then see the following dialog box. Give the desired transaction code name. Give a short description. Click on OK.On the right hand pane enter the Program name. Click on SAVE.Enter $tmp as development class. And SAVE.Once the above mentioned steps are carried out test the Transaction.
More About: Creating
Function Modules GUI_UPLOAD / GUI_DOWNLOAD
2008-03-07 16:01:00
Function Modules Used In BDC (Data Upload)GUI_UPLOAD To upload file from the presentation server GUI_DOWNLOAD To download file to the presentation server Note that the above mentioned function modules are recommended by SAP. The following function modules are obsolete and should not be used.WS_UPLOAD >>>>> DO NOT USEWS_DOWNLOAD >>>>> DO NOT USEGUI_UPLOAD Functionality File transfer from frontend PC to an internal backend table. A format conversion is possible. The functions are similar to the module WS_UPLOAD CALL FUNCTION 'GUI_UPLOAD'CALL FUNCTION 'GUI_UPLOAD' EXPORTING FILENAME =* FILETYPE = 'ASC'* HAS_FIELD_SEPARATOR = ' '* HEADER_LENGTH = 0* READ_BY_LINE = 'X'* DAT_MODE = ' '* IMPORTING* FILELENGTH =* HEADER = TABLES D...
More About: Function
Call Transaction VS Session Method
2008-03-07 15:46:00
CALL TRANSACTION USING statementExampleCALL TRANSACTION TCODE USING BDCDATAMODE CTUMODEUPDATE CUPDATEMESSAGES INTO MESSTAB.CALL TRANSACTION USING, faster than with batch input sessions. In CALL TRANSACTION USING there is no automatic support of interactive correction or logging functions.The program prepares the data to be transferred once the data is prepared the desired transaction is called and then the data is immediately transferred to SAP database.CALL TRANSACTION USING supportsSynchronous processingTransfer of data from an individual transaction each time the statement CALL TRANSACTION USING is calledYou can update the database both synchronously and asynchronouslyThe program specifies the update typeSeparate LUW (logical units of work) for the transactionThe system executes a database commit immediately before and after the CALL TRANSACTION USING statementNo batch input processing logSession Method In this method sessions are created in a queue and they are managed. There is ...
More About: Call
Creating a BDC session
2008-03-07 07:40:00
In the earlier post Recording BDC we had seen how to do a BDC recording using transaction SHDB. We had also created an ABAP program from the BDC recording. In this post we will create a BDC session and run it in foreground. We will also see the log to see if there are any errors.Once the program is generated from the BDC recording, execute the program and the following screen will appear.Since we are interested in creating a BDC session will will not select the option 'Call Transaction'Select 'Generate Session' and execute. The following screen appears. Now we need to go to transaction SM35.Here we can see the session that we have generated.We will now process the session.Click on extended log and process the session in foreground.The first screen will appearSecond screenWe see message on the following screen that say customer found with the same address. we will later check the log if this messaged has been logged.linking the vendorThe vendor has also been linked previously to ...
More About: Creating
Create Customer SD_CUSTOMER_MAINTAIN_ALL
2008-03-06 17:21:00
Create Customer using Function Module SD_CUSTOMER_MAINTAIN_ALLThis function module has most of the fileds required for data migration.Please find below the values to be entered in the fields of the function module. SD_CUSTOMER_MAINTAIN_ALL
More About: Create
Customer Master BAPIs Function Modules and Direct Input Programs
2008-03-06 13:12:00
Please find below some of the BAPIs, Function Modules and Direct Input Programs for Customer Master . RFBIDE00 BAPI_CUSTOMER_CREATEFROMDATA1 SD_CUSTOMER_MAINTAIN_ALLBAPI_CUSTOMER_CRE ATEFROMDATA1 The following fileds need to be entered.The following are the mandetory fields.A ref customer is required.
Customer Master Transactions
2008-03-06 10:17:00
Important Transactions For Customer Master
More About: Accounting
Customer Create Transaction XD01
2008-03-06 08:12:00
Here we will see the different ways of creating a customer in SAP. Once the process of creating the customer manually is shown then we will see how to create a BDC and the different methods of BDC. We will also explore LSMW.Create Customer Part 1Run transaction XD01Enter the account groupSales OrgDistribution ChannelDivisionas per your system.Enter the address Data.Enter the Control DataEnter the contact person details.Click on the Company Code TabEnter the account Management InformationEnter Terms of Payment in Payment TransactionClick on Sales Area TabEnter Sales DistEnter Shipping DataSave the TransactionSee the customer number created at the bottom of the screen.
Tables in SAP MM
2008-03-05 12:18:00
Important tables in MM
More About: Tables
Standard Reports/SAPSCRIPTS and SMARTFORMS in SAP
2008-03-04 14:47:00
If you are looking for some standard reports in SAP or searching SAPSCRIPTS/SMART FORMS please check the following.Transaction CodesSD01SARPNACECheck out the contents of the table TNAPR --------------Processing programs for outputSome Transaction code for reports in SD are as follows.
More About: Standard
Calling a Browser from ABAP
2008-02-29 12:46:00
Calling a Browser from ABAPThe following function modules can be used to call a browse from ABAP.WS_EXECUTEcl_gui_frontend_services=> executeCALL_BROWSERPlease see the cod below.REPORT ZBROWSER1 .DATA: BEGIN OF URL_TABLE OCCURS 10,d(50),END OF URL_TABLE.data: d_url1(100),d_url2(100).move: 'http://www.sap.com' to d_url1,'http://abaplovers.blogspot.com' to d_url2.URL_TABLE-d = 'http://www.abaplovers.blogspot.com'.APPE ND URL_TABLE.URL_TABLE-d = d_url1.APPEND URL_TABLE.URL_TABLE-d = d_url2.APPEND URL_TABLE.LOOP AT URL_TABLE.SKIP. FORMAT INTENSIFIED OFF.WRITE: / 'Single click on '.FORMAT HOTSPOT ON.FORMAT INTENSIFIED ON.WRITE: URL_TABLE. HIDE URL_TABLE.FORMAT HOTSPOT OFF.FORMAT INTENSIFIED OFF.WRITE: 'to go to', URL_TABLE.ENDLOOP.CLEAR URL_TABLE.AT LINE-SELECTION.IF NOT URL_TABLE IS INITIAL.CALL FUNCTION 'WS_EXECUTE'EXPORTINGprogram = 'C:Program FilesInternet ExplorerIEXPLORE.EXE'commandline = URL_TABLEINFORM = ''EXCEPTIONSPROG_NOT_FOUND = 1.IF SY-SUBRC 0.WRITE:/ 'Can...
More About: Calling
OLE AUTOMATION IN ABAP PART 3
2008-02-28 13:23:00
OLE AUTOMATION PART 3 DownLoad PDF In this post we will see the Color code for Excel Cells .Color code for ABAP is shown below, please use the numeric value as given in the figure below. For example if you want the interior color of the Excel cell to be of the color Cyan then use the code 8.
More About: Part , Part 3 , Automation
OLE AUTOMATION IN ABAP PART 2
2008-02-28 09:26:00
OLE AUTOMATION IN ABAP PART 2DownLoad PDF The following ABAP key words control the applications:CREATE OBJECTSET PROPERTYGET PROPERTYCALL METHODFREE OBJECTThe Desktop application serves as the OLE server to the calling ABAP program. For example when the ABAP program makes calls to the OLE application the SAPGUI servers as the client.The create statement generates the object of this class. The following return code values can be encountered.SY-SUBRC = 0:Object successfully generated.SY-SUBRC = 1:SAPGUI communication error.SY-SUBRC = 2:SAPGUI function call error. The frontend ports of SAP?s OLE implementation modulesare implemented only under Windows and Apple Macintosh.SY-SUBRC = 3:The OLE-API call resulted in an error - possibly a storage space problem.SY-SUBRC = 4:The object is not registered with SAP.Note that for each OLE object there has to be a variable holding handle data for that object. The type-pool ?ole2? defines the handle variable data of the type ole2_object. For all th...
More About: Part , Automation
OLE AUTOMATION IN ABAP PART 1
2008-02-28 08:07:00
OLE AUTOMATION IN ABAP PART1>DownLoad PDF Transactions associated with OLE in SAPOLESOLERun Transaction OLE the following screen will be displayed.In the above transaction you can start and stop each application to check if it has been registered.Run transaction SOLE to get a list of all the OLE applications registered in your system. You can maintain these applications here.The above applications are stored in the table TOLE.The following SAP tables are associated with OLE.TOLE OLE ApplicationsOLELOAD OLE type Information loadSWOTOLE Workflow Object Types OLE ApplicationsSWOTTOLE Workflow Object Types Texts OLE ApplicationsTOLET Workflow Object Types Texts OLE ApplicationsSee Part - 2
More About: Automation
OLE Automation
2008-02-27 17:53:00
OLE Automation an ExamplePlease see the report shown below. We will see more of OLE automation tomorrow. The following report shows how to send the output of ABAP report to EXCEL. It shows the various formatting options for excel sheet like borders of cells, font, bold, Cell color, using ABAP OLE automation.http://abaplovers.blogspot.com /2008/02/ole-automation-in-abap-part-3.ht mlRelated topics OLE Automation Part 1OLE Automation Part 2OLE Automation Part 2
Function Module POP UP TO CONFIRM
2008-02-26 16:58:00
Function Module 'POPUP_TO_CONFIRM'.Another function module that is used frequently is 'POPUP_TO_CONFIRM' it is used as follows. REPORT ZEX_POPUPTOCONFIRM . *-------------------------Data Declaration-----------------------------* Data: d_response(1). " Response from popup CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING TITLEBAR = 'Create Sales Order ' * DIAGNOSE_OBJECT = ' ' TEXT_QUESTION = 'Create sales order?' TEXT_BUTTON_1 = 'YES'(001) * ICON_BUTTON_1 = ' ' TEXT_BUTTON_2 = 'NO'(002) * ICON_BUTTON_2 = ' ' * DEFAULT_BUTTON = '1' DISPLAY_CANCEL_BUTTON = 'X' * USERDEFINED_F1_HELP = ' ' * START_COLUMN = 25 * START_ROW = 6 * POPUP_TYPE = IMPORTING ANSWER = d_response * TABLES * PARAMETER ...
More About: Function
Write Statement
2008-02-26 11:31:00
The Write Statement . REPORT ZEXWRITEDEMO . DATA: number TYPE p VALUE '-1234567.89' DECIMALS 2, len TYPE i, pos TYPE i, text(10) TYPE c VALUE '1234567890', integer TYPE i VALUE 1234567890, g(5) TYPE c VALUE 'Hello', f(5) TYPE c VALUE 'Dolly', time TYPE t VALUE '154633', float TYPE f VALUE '123456789.0', pack TYPE p VALUE '123.456' DECIMALS 3, flag1 TYPE c VALUE ' ', flag2 TYPE c VALUE 'X', flag3(5) TYPE c VALUE 'Xenon'. * simple WRITE statement WRITE 'Hello, here I am!'. SKIP 2. * standard output format WRITE: 'Number', number, 'is packed'. SKIP 2. * positioning WRITE 'First line.'. WRITE 'Still first line.'. WRITE /'Second line.'. WRITE /13 'Third line.'. SKIP 2. len = 10. pos = 13. WRITE 'The string ------------ appears in the text.'. WRITE AT pos(len) text. SKIP 2. * cutting WRITE: (5) integer, /(5) text. SKIP 2. * no empty lines in lists WRITE: 'One'...
Displaying Messages in ABAP
2008-02-25 15:22:00
Displaying Messages in ABAPDownLoad PDF In ABAP you need to display a message on various occasions, for example if the user has input erroneous data then a message needs to be displayed, instructing the user to rectify the error, or after a certain task is accomplished, you may need to display a message. A message class is used to display messages from the program and the transaction used for this purpose is SE91. The messages are stored in the table T100. Examples of calling a message are shown below.You may need to create a message class for displaying your message. You need to check if a message class has already been created by other ABAP colleagues. Note that messages classes would already exist in your system, but you may have to create a new class for your programs.To create a new message class type the name following the naming standards and type the name as shown in the figure below. Alternatively you can goto transaction SE91 to create a new message class.In this example ...
SALES ORDER RELATED BAPIs
2008-02-23 07:30:00
SALES ORDER RELATED BAPIsDownLoad PDFThe following BAPI can be used to copy an existing Sales Order into a new Sales Order. BAPI_SALESDOCUMENT_COPY.We will see how to test this BAPI. You will find instructions on how to insert the BAPI in an ABAP program/report at CODE FOR BAPIAs we need to run 2 BAPIs in sequence, please follow the menu path as shown below.Function module-------->Test---------->Test SequencesEnter the BAPI names as shown below.Enter the Sales order number and order type specific to your system. And execute the BAPI.Sales order number as shown below is generated.Press F3 or the back buttonSave the sequence nameCheck the copied Sales Order.
More About: Related
BAPI Sales Order Create Code
2008-02-21 11:10:00
Bapi Sales Order Create Code We saw in the earlier example as to how to create a sales order from the SE37 interface. Now we need to create a program and call the BAPI to create sales orders. Later we will discuss ways to call a BAPI from a non-sap system.Given an appropriate name to the program. Please follow the naming conventions as per your company. ABAP programs should always start with a 'Z' or a 'Y'.Enter suitable description.Create a $tmp objects or create a transport request. Transport requests would be covered in the later tutorials.Follow the menu path EDIT----->PatternEnter the name of the BAPI as shown below.The inserted BAPI is shown below.We now need to get the import parameters, export parameters and the tables.Note: Take care that the data declaration in the program for the above mentioned parameters matches exactly as given in the BAPI. To ensure that please open the BAPI using transaction SE37 and copy the exact names of the parameters from the BAPI structure.I...
BAPI Sales Order Create
2008-02-20 13:39:00
BAPI to Create Sales Order . DownLoad PDFWe will see the functionality of BAPI_SALESORDER_CREATEFROMDAT1.As shown below, run transaction SE37.and enter the name of the BAPI BAPI_SALESORDER_CREATEFROMDAT1.Press F8 or click on execute. First we need to enter the header data.Click on the single entry Icon as shown below.Enter doc type and purchase order number. This will depend on your requirement and the data will vary from system to system.Order type ---------- 'OR'Once the header data is entered we need to enter the line item data. Please note that in this example we would be entering minimum data required just to create a sample sales order. In real life scenario you need to enter all the fields as per the companies requirement.Enter the following fields.Item Number ---- 000010Material----------y-351Plant------- ------1100Required quantity 1Purchase Order number 15393Please not that all the above data is system specific and you need to enter the values available in your system. Yo...
Function Modules Create Text and Read Text
2008-02-19 17:09:00
Function Modules Create Text and Read TextMany a times it is required to Read text from SAP Objects like Sales Order or Purchase Order from an ABAP program. Similarly it may also be required to write text in Sales Order or other SAP objects through ABAP Code.The following Function Modules can be used to do the needful.1) Create_Text2) Read-TextTo read text from sales order Header Text we first need to create some text. Open an existing Sales order using transaction VA02 as shown in the figure below.In the header text type some text for example 'This is Header Text' and double click in the text area.Once this is done the text gets saved and the following screen appears. Here you can type some more text.Go back to the previous screenSee the change in the Icon as shown in the figure below. It now has some lines.Now we need to run execute the function module to read the text that we have just typed. But before that we need to find the following1) Text Object to read2) Text ID to read....
More About: Function
Processing Blocks in ABAP
2008-02-18 17:50:00
Processing Blocks in ABAPDownLoad PDF CLASSICAL EVENTSInitalizationAt selection-screen outputAt seelction-screen on fieldAt selection-screen on blockAt selection-screenStart-of-selectionEnd-of- selectionINTERACTIVE EVENTSAt line-selectionAt user-commandAt pfnnTop-of-page during line selectionLIST EVENTSTop-of-pageEnd-of-pageCONTROL BREAK EVENTSAt firstAt lastAt newAt end of On change ofINITIALIZATION Before the standard selection screen is displayedAT SELECTION-SCREENAfter user input on a selection screen has been processed, but while the selection screen is still active START-OF-SELECTION After the standard selection screen has been processed, before data is read from the logical databaseGET node After the logical database has read a data record from the node node GET node LATE After all of the nodes of the logical database have been processed that are hierarchically subordinate to the node node in the structure of the logical database END-OF-SELECTION After all data has been read b...
Finding User Exits in SAP
2008-02-18 10:56:00
Finding User Exits. DownLoad PDFTo find User Exits in SAP please follow the steps given below.1) Run Transaction SE812) Select SD3) From the Menu Click on Edit4) Select the option ?Select Subtreee +/-?5) From the Menu bar click on Information system6) From the R/3 Repository information System open the Envir option7) Select Exit Techniques8) Select Customer Exits9) Double click on Enhancements10) Press F8See the screen shots given below.Run Transaction SE81.Select SD and then from the Edit menu click on Select SubtreeClick on Information System or press Shift+F4Menu for 'R/3 Repository Information Sys' opens upFollow the menu path Envir-----> Exit Techniques----> Customer Exits----> EnhancementsClick on the Execute button or press 'F8'The following list is displayed. Follow the above mentioned steps to find user exits for other modules.
More articles from this author:
1, 2
40579 blogs in the directory.
Statistics resets every week.


Contact | About
© Blog Toplist 2008 - SEO by FeWorks
eXTReMe Tracker