SlideShare a Scribd company logo
ABAP Chapter 6 Message Debugging File Transfer Type Group
Message in ABAP
User Messages If user has entered inconsistent values,you output a dialog message with  MESSAGE statement Dialog messages are stored in table T100 (Transaction : SE91)  r eport  ztest . … . AT SELECTION-SCREEN. … m essage  e 000 (38) with ‘----’   ‘---’ ‘---’ ‘---’ .  …
Message Type Syntax Message  [  A < nnn > ] ( message class )   with  < field1 >  < field2 > … E, W, I, S
Messages Type - A(Abend) Message  A000(38)... Program Start Selection Screen A Message Exit
Messages Type - E(Error) Message  E 000(38) .. . Program Start Selection Screen E Message New input Require
Messages Type - W(Warning) Message  W 000(38).. . Program Start Selection Screen W Message New input possible List Enter
Messages Type - I(Information) Message I 000(38).. . Program Start Selection Screen I  Message List Enter
Messages Type - S(Success) Message  S 000(38).. . Program Start Selection Screen List (Next Screen)
Dynamic Message Report  ztest1. Parameters  today   like  sy-datum . At  s election-screen. if  today  <>  sy-datum. m essage  e000(38)  with ‘ Please enter today : ’  sy-datum . endif. Start-of-selection. Write: / ‘ Today is  :’, t oday .
Debugging
Debugging Mode
Debugging Mode : Internal Table
Debugging Mode : Internal Table
Debugging Mode : Watchpoint
Watchpoint : SAP ECC 6.0
How to Set Debugging Mode If you want to test  transaction,enter /h in the command field,press ENTER and execute the transaction Set breakpoints in the program Utilities->Breakpoints->Set  Uses BREAK-POINT statement
ABAP Practice
File Transfer
File Transfer (Application Server) There are  3  steps for file transfer Open File Read/Write File Close File
File Transfer * Prepare Internal Table Data all_customers like customers occurs 0 with header line. Data  msg_txt(50). Parameters filename(128) default ‘cust omersdata .t xt ’ lower case. Start-of-selection. Select * from customers into table all_customers.
File Transfer * Opening a file Open dataset  filename  for  output in text mode encoding default  message  msg_txt.  If  sy-subrc  <>  0.  Write: ‘File cannot be opened .Reason :’,msg_txt. else.
File Transfer * Transferring data to a file Loop at all_customers. Transfer  all_customers  to  filename. Endloop.  * Closing a file Close dataset filename.  Endif.
Transaction : AL11
File Transfer (Appending Data) * Opening a file Open dataset  filename  for  appending  in text mode encoding default  message  msg_txt.  If  sy-subrc  <>  0.  Write: ‘File cannot be opened .Reason :’,msg_txt. else . ...
Reading Data from OS File * Reading data from a file Parameters filename(128) default ‘cust omersdata .t xt ’ lower case. Data  msg_txt(50). Data  all_customers like customers occurs 0  with header line. Start-of-selection. Open dataset  filename  for  input in text mode encoding default  message  msg_txt.  If  sy-subrc  <>  0.  Write: ‘File cannot be opened .Reason :’,msg_txt. else .
Reading Data from OS File Do. Read dataset filename into all_customers. if  sy-subrc  <>  0. Exit. endif. Append all_customers. Enddo.  Close dataset filename.  Endif.
Deleting OS File  Parameters filename(128) default ‘cust omersdata . txt ’ lower case. START-OF-SELECTION. Delete dataset filename. If sy-subrc = 0. write: / ‘Delete OK’. Endif.
Working with File on Presentation Server
Download Data to PC * Download data from PC parameters   filename  like  rlgrap-filename default  ‘c:\cust omers .txt’.  Data  all_customers like customers occurs 0 with header line. START-OF-SELECTION. Select * from customers into table all_customres.
Download Data to PC C ALL   FUNCTION  ‘DOWNLOAD’ Exporting filename  =  filename Tables data_tab  =  all_customers Exceptions file_open_error  =  1 … others  =  5 .
Download Data to PC Case  sy-subrc. When  1. Write:  ‘Error when file opened’. When  2. Write:  ‘Error during data transfer’. … When 0. Write: / ‘Data Download Finish’. Endcase.
Upload Data from PC * Upload data to PC parameters   filename  like  rlgrap-filename default  ‘c:\cust omers .txt’.  Data  all_customers like customers occurs 0 with header line. START-OF-SELECTION.
Upload Data from PC CALL FUNCTION  ‘UPLOAD’ Exporting filename  =  filename Tables data_tab  =  all_customers Exceptions file_open_error  =  1 … others  =  5 .
Upload Data from PC Case  sy-subrc. When  1. Write:  ‘Error when file opened’. When  2. Write:  ‘Error during data transfer’. … When 0. Insert  customers  from  table  all_customers. … Endcase.
Upload/Download Data in Background Call  function  ‘WS_ DOWNLOAD’ Exporting filename  =  filename ... and   Call  function  ‘ WS_UP LOAD’ Exporting filename  =  filename ...
Type Group   : SE11
Type Group ABAP Program
Exercise IV
Exercise III : User Master usr02-bname usr02-trdat adcp-tel_number
Exercise IV : Drill-Down Report

More Related Content

What's hot (20)

PDF
Ooabap notes with_programs
Kranthi Kumar
 
PPT
Call transaction method
Kranthi Kumar
 
PPT
ABAP Programming Overview
sapdocs. info
 
PPT
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
Garuda Trainings
 
PPT
Alv theory
Phani Kumar
 
PDF
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
IICT Chromepet
 
PPT
0104 abap dictionary
vkyecc1
 
PPTX
Reports
Jugul Crasta
 
PPT
ABAP Message, Debugging, File Transfer and Type Group
sapdocs. info
 
PDF
Sap Abap Reports
vbpc
 
PPT
Ab1011 module pool programming
Satheesh Kanna
 
PPT
List Processing in ABAP
sapdocs. info
 
PPT
07.Advanced Abap
sapdocs. info
 
PPTX
Sap scripts
Jugul Crasta
 
DOC
Complete list of all sap abap keywords
Prakash Thirumoorthy
 
DOC
Badi document
hamisha_malik
 
DOCX
Sap abap real time questions
techie_gautam
 
PDF
SAP ABAP data dictionary
Revanth Nagaraju
 
PPTX
Sap abap
Jugul Crasta
 
PPTX
Abap package concept
Tobias Trapp
 
Ooabap notes with_programs
Kranthi Kumar
 
Call transaction method
Kranthi Kumar
 
ABAP Programming Overview
sapdocs. info
 
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
Garuda Trainings
 
Alv theory
Phani Kumar
 
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
IICT Chromepet
 
0104 abap dictionary
vkyecc1
 
Reports
Jugul Crasta
 
ABAP Message, Debugging, File Transfer and Type Group
sapdocs. info
 
Sap Abap Reports
vbpc
 
Ab1011 module pool programming
Satheesh Kanna
 
List Processing in ABAP
sapdocs. info
 
07.Advanced Abap
sapdocs. info
 
Sap scripts
Jugul Crasta
 
Complete list of all sap abap keywords
Prakash Thirumoorthy
 
Badi document
hamisha_malik
 
Sap abap real time questions
techie_gautam
 
SAP ABAP data dictionary
Revanth Nagaraju
 
Sap abap
Jugul Crasta
 
Abap package concept
Tobias Trapp
 

Viewers also liked (10)

PPT
SAP Accounts Reveivable Functions | http://sapdocs.info
sapdocs. info
 
PPT
SAP Accounts Reveivable Customer Master | http://sapdocs.info
sapdocs. info
 
PPT
SAP Accounts Reveivable Introduction | http://sapdocs.info
sapdocs. info
 
PPT
HR ABAP Technical Overview | http://sapdocs.info/
sapdocs. info
 
PPT
08.Abap Dialog Programming Overview
sapdocs. info
 
PDF
ABAP for Beginners - www.sapdocs.info
sapdocs. info
 
PDF
HR ABAP Programming Training Material | http://sapdocs.info
sapdocs. info
 
PPT
SAP Accounts Payable Payment | http://sapdocs.info
sapdocs. info
 
PPT
Introduction to ABAP
sapdocs. info
 
PDF
SAP FICO BBP Sample Document PDF NEW!
sapdocs. info
 
SAP Accounts Reveivable Functions | http://sapdocs.info
sapdocs. info
 
SAP Accounts Reveivable Customer Master | http://sapdocs.info
sapdocs. info
 
SAP Accounts Reveivable Introduction | http://sapdocs.info
sapdocs. info
 
HR ABAP Technical Overview | http://sapdocs.info/
sapdocs. info
 
08.Abap Dialog Programming Overview
sapdocs. info
 
ABAP for Beginners - www.sapdocs.info
sapdocs. info
 
HR ABAP Programming Training Material | http://sapdocs.info
sapdocs. info
 
SAP Accounts Payable Payment | http://sapdocs.info
sapdocs. info
 
Introduction to ABAP
sapdocs. info
 
SAP FICO BBP Sample Document PDF NEW!
sapdocs. info
 
Ad

Similar to Message, Debugging, File Transfer and Type Group (20)

DOC
Cis 170 c ilab 7 of 7 sequential files
CIS321
 
DOCX
Student Lab Activity CIS170 Week 6 Lab Instructions.docx
florriezhamphrey3065
 
PDF
OS Lab 04.pdfgsxdfxxxxxxxxgddfsfgxgfxfxcgfxgf
SamraNawabi
 
PPT
Devry cis-170-c-i lab-7-of-7-sequential-files
cskvsmi44
 
PPT
Devry cis-170-c-i lab-7-of-7-sequential-files
noahjamessss
 
DOC
Apps1
Sultan Sharif
 
DOCX
Data export in matlab alvian zainuddin
Alvianzainuddin
 
DOC
Pl sql using_xml
Nayana Arewar
 
PPTX
Introduction to files management systems
araba8
 
PPT
File in cpp 2016
Dr .Ahmed Tawwab
 
PPTX
SAP Batch data communication
Jugul Crasta
 
DOCX
data.txtInternational Business Management l2 Cons.docx
theodorelove43763
 
PPT
Prog1 chap1 and chap 2
rowensCap
 
PPTX
file handling final3333.pptx
radhushri
 
DOCX
The program reads data from two files, itemsList-0x.txt and .docx
oscars29
 
DOCX
please code in c#- please note that im a complete beginner- northwind.docx
AustinaGRPaigey
 
PDF
zMSC Lab.pdf
Marna Walle
 
PDF
INET for Starters
Fayruz Rahma
 
PPTX
Stream classes in C++
Shyam Gupta
 
PDF
Web2py Code Lab
Colin Su
 
Cis 170 c ilab 7 of 7 sequential files
CIS321
 
Student Lab Activity CIS170 Week 6 Lab Instructions.docx
florriezhamphrey3065
 
OS Lab 04.pdfgsxdfxxxxxxxxgddfsfgxgfxfxcgfxgf
SamraNawabi
 
Devry cis-170-c-i lab-7-of-7-sequential-files
cskvsmi44
 
Devry cis-170-c-i lab-7-of-7-sequential-files
noahjamessss
 
Data export in matlab alvian zainuddin
Alvianzainuddin
 
Pl sql using_xml
Nayana Arewar
 
Introduction to files management systems
araba8
 
File in cpp 2016
Dr .Ahmed Tawwab
 
SAP Batch data communication
Jugul Crasta
 
data.txtInternational Business Management l2 Cons.docx
theodorelove43763
 
Prog1 chap1 and chap 2
rowensCap
 
file handling final3333.pptx
radhushri
 
The program reads data from two files, itemsList-0x.txt and .docx
oscars29
 
please code in c#- please note that im a complete beginner- northwind.docx
AustinaGRPaigey
 
zMSC Lab.pdf
Marna Walle
 
INET for Starters
Fayruz Rahma
 
Stream classes in C++
Shyam Gupta
 
Web2py Code Lab
Colin Su
 
Ad

More from sapdocs. info (20)

PDF
SAP PM Master Data Training Guide
sapdocs. info
 
DOCX
SAP SD Certification (C_TSCM62_66) Preparation Training Notes
sapdocs. info
 
DOCX
Variant Configuration in SAP PP: Beginner's Guide
sapdocs. info
 
PDF
SAP PP MRP Guide for Beginners
sapdocs. info
 
PDF
SAP ECC 6.0 PM Configuration Manual - www.sapdocs.info
sapdocs. info
 
PDF
SAP PM Training Manual - www.sapdocs.info
sapdocs. info
 
PDF
ABAP Basico para Consultores Funcionales
sapdocs. info
 
PDF
SAP Configuration Guide for Functional Modules (Based on IDES)
sapdocs. info
 
PDF
SAP FI-AP TCODES & MENU PATHS
sapdocs. info
 
PDF
SAP FI-AR TCODES & MENU PATHS
sapdocs. info
 
DOC
SAP CO Configuration Guide - Exclusive Document
sapdocs. info
 
DOC
SAP PP End User Document - www.sapdocs.info
sapdocs. info
 
PDF
SAP MM Configuration - Real Project Documentation
sapdocs. info
 
PDF
SAP FI AP: Configuration & End User Guide
sapdocs. info
 
PDF
SAP FI AR: End User Guide for Beginners
sapdocs. info
 
PDF
SAP FI AP: End User Guide for Beginners
sapdocs. info
 
PDF
SAP FI Asset Accounting: End User Guide for Beginners
sapdocs. info
 
PDF
Variant Configurition in SAP: Beginners Guide | www.sapdocs.info
sapdocs. info
 
PDF
Exclusive SAP Basis Training Book | www.sapdocs.info
sapdocs. info
 
PDF
SAP Plant Maintenance Training Material | www.sapdocs.info
sapdocs. info
 
SAP PM Master Data Training Guide
sapdocs. info
 
SAP SD Certification (C_TSCM62_66) Preparation Training Notes
sapdocs. info
 
Variant Configuration in SAP PP: Beginner's Guide
sapdocs. info
 
SAP PP MRP Guide for Beginners
sapdocs. info
 
SAP ECC 6.0 PM Configuration Manual - www.sapdocs.info
sapdocs. info
 
SAP PM Training Manual - www.sapdocs.info
sapdocs. info
 
ABAP Basico para Consultores Funcionales
sapdocs. info
 
SAP Configuration Guide for Functional Modules (Based on IDES)
sapdocs. info
 
SAP FI-AP TCODES & MENU PATHS
sapdocs. info
 
SAP FI-AR TCODES & MENU PATHS
sapdocs. info
 
SAP CO Configuration Guide - Exclusive Document
sapdocs. info
 
SAP PP End User Document - www.sapdocs.info
sapdocs. info
 
SAP MM Configuration - Real Project Documentation
sapdocs. info
 
SAP FI AP: Configuration & End User Guide
sapdocs. info
 
SAP FI AR: End User Guide for Beginners
sapdocs. info
 
SAP FI AP: End User Guide for Beginners
sapdocs. info
 
SAP FI Asset Accounting: End User Guide for Beginners
sapdocs. info
 
Variant Configurition in SAP: Beginners Guide | www.sapdocs.info
sapdocs. info
 
Exclusive SAP Basis Training Book | www.sapdocs.info
sapdocs. info
 
SAP Plant Maintenance Training Material | www.sapdocs.info
sapdocs. info
 

Recently uploaded (20)

PPT
How Cybersecurity Training Can Protect Your Business from Costly Threats
Sam Vohra
 
PDF
Trends in Artificial Intelligence 2025 M Meeker
EricSabandal1
 
PPTX
Black life TeleHealth 3 (1).pptx Business Plan
mdthelackyboy
 
PDF
Albaik Franchise All Information Update.pdf
AL-Baik Franchise
 
PDF
Books on Display in the Library June 2025 - Matariki
NZSG
 
PPTX
SolarSquare PPT-inside_sales_2025_pilot.pptx
sumitj8
 
PDF
Deception Technology: The Cybersecurity Paradigm We Didn’t Know We Needed
GauriKale30
 
PPTX
Jessica Garza: At the Intersection of Technology and Humanity
Jessica Garza
 
PDF
Thane Stenner - A Leader In Extreme Wealth Management
Thane Stenner
 
PDF
Dr. Elie Metri-The Middle East's Rise in Global Tech
mayurisalunkhe2
 
PDF
Top 25 FinOps Tools to Watch in 2025.pdf
Amnic
 
PDF
Netflix Social Watchlists Business Proposal
lexarofficial222
 
PDF
Summary of Comments on Writing the House, Parts I & II.pdf
Brij Consulting, LLC
 
PPTX
Essar at IEW 2025, Leading the Way to India’s Green Energy Transition.
essarcase
 
PDF
Corporate Social Responsibility and Ethical Practices in the Readymade Garmen...
Samsul Alam
 
PPTX
Vedanta’s Pivotal Role in India’s Growth with Record Vedanta Tax Contribution...
Vedanta Cases
 
PPTX
Real Options Analysis in an Era of Market Volatility and Technological Disrup...
abakahmbeahvincent
 
PDF
Fueling Growth - Funding & Scaling Your Business - AI Amplified SB Summit 202...
Hector Del Castillo, CPM, CPMM
 
PPTX
Appreciations - June 25.pptxggggggghhhhhh
anushavnayak
 
PDF
CFG application - 2025 - Curtis Funding Group, LLC
Curt MacRae
 
How Cybersecurity Training Can Protect Your Business from Costly Threats
Sam Vohra
 
Trends in Artificial Intelligence 2025 M Meeker
EricSabandal1
 
Black life TeleHealth 3 (1).pptx Business Plan
mdthelackyboy
 
Albaik Franchise All Information Update.pdf
AL-Baik Franchise
 
Books on Display in the Library June 2025 - Matariki
NZSG
 
SolarSquare PPT-inside_sales_2025_pilot.pptx
sumitj8
 
Deception Technology: The Cybersecurity Paradigm We Didn’t Know We Needed
GauriKale30
 
Jessica Garza: At the Intersection of Technology and Humanity
Jessica Garza
 
Thane Stenner - A Leader In Extreme Wealth Management
Thane Stenner
 
Dr. Elie Metri-The Middle East's Rise in Global Tech
mayurisalunkhe2
 
Top 25 FinOps Tools to Watch in 2025.pdf
Amnic
 
Netflix Social Watchlists Business Proposal
lexarofficial222
 
Summary of Comments on Writing the House, Parts I & II.pdf
Brij Consulting, LLC
 
Essar at IEW 2025, Leading the Way to India’s Green Energy Transition.
essarcase
 
Corporate Social Responsibility and Ethical Practices in the Readymade Garmen...
Samsul Alam
 
Vedanta’s Pivotal Role in India’s Growth with Record Vedanta Tax Contribution...
Vedanta Cases
 
Real Options Analysis in an Era of Market Volatility and Technological Disrup...
abakahmbeahvincent
 
Fueling Growth - Funding & Scaling Your Business - AI Amplified SB Summit 202...
Hector Del Castillo, CPM, CPMM
 
Appreciations - June 25.pptxggggggghhhhhh
anushavnayak
 
CFG application - 2025 - Curtis Funding Group, LLC
Curt MacRae
 

Message, Debugging, File Transfer and Type Group

  • 1. ABAP Chapter 6 Message Debugging File Transfer Type Group
  • 3. User Messages If user has entered inconsistent values,you output a dialog message with MESSAGE statement Dialog messages are stored in table T100 (Transaction : SE91) r eport ztest . … . AT SELECTION-SCREEN. … m essage e 000 (38) with ‘----’ ‘---’ ‘---’ ‘---’ . …
  • 4. Message Type Syntax Message [ A < nnn > ] ( message class ) with < field1 > < field2 > … E, W, I, S
  • 5. Messages Type - A(Abend) Message A000(38)... Program Start Selection Screen A Message Exit
  • 6. Messages Type - E(Error) Message E 000(38) .. . Program Start Selection Screen E Message New input Require
  • 7. Messages Type - W(Warning) Message W 000(38).. . Program Start Selection Screen W Message New input possible List Enter
  • 8. Messages Type - I(Information) Message I 000(38).. . Program Start Selection Screen I Message List Enter
  • 9. Messages Type - S(Success) Message S 000(38).. . Program Start Selection Screen List (Next Screen)
  • 10. Dynamic Message Report ztest1. Parameters today like sy-datum . At s election-screen. if today <> sy-datum. m essage e000(38) with ‘ Please enter today : ’ sy-datum . endif. Start-of-selection. Write: / ‘ Today is :’, t oday .
  • 13. Debugging Mode : Internal Table
  • 14. Debugging Mode : Internal Table
  • 15. Debugging Mode : Watchpoint
  • 16. Watchpoint : SAP ECC 6.0
  • 17. How to Set Debugging Mode If you want to test transaction,enter /h in the command field,press ENTER and execute the transaction Set breakpoints in the program Utilities->Breakpoints->Set Uses BREAK-POINT statement
  • 20. File Transfer (Application Server) There are 3 steps for file transfer Open File Read/Write File Close File
  • 21. File Transfer * Prepare Internal Table Data all_customers like customers occurs 0 with header line. Data msg_txt(50). Parameters filename(128) default ‘cust omersdata .t xt ’ lower case. Start-of-selection. Select * from customers into table all_customers.
  • 22. File Transfer * Opening a file Open dataset filename for output in text mode encoding default message msg_txt. If sy-subrc <> 0. Write: ‘File cannot be opened .Reason :’,msg_txt. else.
  • 23. File Transfer * Transferring data to a file Loop at all_customers. Transfer all_customers to filename. Endloop. * Closing a file Close dataset filename. Endif.
  • 25. File Transfer (Appending Data) * Opening a file Open dataset filename for appending in text mode encoding default message msg_txt. If sy-subrc <> 0. Write: ‘File cannot be opened .Reason :’,msg_txt. else . ...
  • 26. Reading Data from OS File * Reading data from a file Parameters filename(128) default ‘cust omersdata .t xt ’ lower case. Data msg_txt(50). Data all_customers like customers occurs 0 with header line. Start-of-selection. Open dataset filename for input in text mode encoding default message msg_txt. If sy-subrc <> 0. Write: ‘File cannot be opened .Reason :’,msg_txt. else .
  • 27. Reading Data from OS File Do. Read dataset filename into all_customers. if sy-subrc <> 0. Exit. endif. Append all_customers. Enddo. Close dataset filename. Endif.
  • 28. Deleting OS File Parameters filename(128) default ‘cust omersdata . txt ’ lower case. START-OF-SELECTION. Delete dataset filename. If sy-subrc = 0. write: / ‘Delete OK’. Endif.
  • 29. Working with File on Presentation Server
  • 30. Download Data to PC * Download data from PC parameters filename like rlgrap-filename default ‘c:\cust omers .txt’. Data all_customers like customers occurs 0 with header line. START-OF-SELECTION. Select * from customers into table all_customres.
  • 31. Download Data to PC C ALL FUNCTION ‘DOWNLOAD’ Exporting filename = filename Tables data_tab = all_customers Exceptions file_open_error = 1 … others = 5 .
  • 32. Download Data to PC Case sy-subrc. When 1. Write: ‘Error when file opened’. When 2. Write: ‘Error during data transfer’. … When 0. Write: / ‘Data Download Finish’. Endcase.
  • 33. Upload Data from PC * Upload data to PC parameters filename like rlgrap-filename default ‘c:\cust omers .txt’. Data all_customers like customers occurs 0 with header line. START-OF-SELECTION.
  • 34. Upload Data from PC CALL FUNCTION ‘UPLOAD’ Exporting filename = filename Tables data_tab = all_customers Exceptions file_open_error = 1 … others = 5 .
  • 35. Upload Data from PC Case sy-subrc. When 1. Write: ‘Error when file opened’. When 2. Write: ‘Error during data transfer’. … When 0. Insert customers from table all_customers. … Endcase.
  • 36. Upload/Download Data in Background Call function ‘WS_ DOWNLOAD’ Exporting filename = filename ... and Call function ‘ WS_UP LOAD’ Exporting filename = filename ...
  • 37. Type Group : SE11
  • 38. Type Group ABAP Program
  • 40. Exercise III : User Master usr02-bname usr02-trdat adcp-tel_number
  • 41. Exercise IV : Drill-Down Report