SlideShare a Scribd company logo
Call Transaction Method
Dec-2008 Data Interfaces |
Objectives
• The participants will be able to:
– Describe the Call Transaction Method for Batch
Input.
– Differentiate the different batch input methods.
Dec-2008 Data Interfaces | 2
Overview
Dec-2008 Data Interfaces | 3
PROGRAM DYNPRO DYNBEGIN FNAM FVAL
SAPMF02K 0106 X
RF02K-LIFNR TEST1
RF02K-D0110 X
SAPMF02K 0110 X
LFA1-STRAS 123 Main St.
BDC_OKCODE =UPDA
BDC Table
Create Batch Input
Session
(BDC Program)
Create Batch Input
Session
(BDC Program)
Use in “CALL
TRANSACTION”
statement
Use in “CALL
TRANSACTION”
statement
Use in “CALL DIALOG”
statement
Use in “CALL DIALOG”
statement
Differences in Batch Input
Methods
Dec-2008 Data Interfaces | 4
When is the SAP
database updated?
How are errors
handled?
Create batch
input session
(BDC Program):
During the processing of
the batch input session
Automatically by the
system during the
processing of the batch
input session
CALL TRANSACTION:
CALL DIALOG:
During the execution of
the batch input program
Must be handled in the
batch input program
Example - Change Vendors
Dec-2008 Data Interfaces | 5
Name
Street
Computers, Inc.
123 Main St.
City Philadelphia
Vendor
Company Code
TEST1
AddressX
Vendor
Company Code
TEST2
AddressX
Name
Street
Computer Land
10 Walnut St.
City Boston
To illustrate the “CALL TRANSACTION” and “CALL DIALOG”
methods, we will use the example to change vendors coming
from a sequential file.
“CALL TRANSACTION USING”
Statement
Dec-2008 Data Interfaces | 6
CALL TRANSACTION <transaction code>
USING <bdc internal table>
MODE <display mode>
UPDATE <update mode>
MESSAGES INTO <msg int. table>.
<display mode>
A: display all
E: display errors only
N: no display
<update mode>
S: synchronous
A: asynchronous
“CALL TRANSACTION USING”
Statement (Contd.)
Dec-2008 Data Interfaces | 7
CALL TRANSACTION <transaction code>
USING <bdc internal table>
MODE <display mode>
UPDATE <update mode>
MESSAGES INTO <msg int. table>.
<display mode>
A: display all
E: display errors only
N: no display
<update mode>
S: synchronous
A: asynchronous
L: local update
Example #1 - Declaration Section
Dec-2008 Data Interfaces | 8
REPORT YDI00007.
DATA: BDC_TAB TYPE STANDARD TABLE OF BDCDATA
INITIAL SIZE 6,
WA_BDC_TAB TYPE BDCDATA.
INFILE(20) VALUE ‘./bc180_file4’.
DATA: BEGIN OF INREC,
VENDNUM TYPE LIFNR,
STREET TYPE STRAS_GP,
END OF INREC.
PARAMETERS: DISPMODE DEFAULT ‘A’,
UPDAMODE DEFAULT ‘S’.
** This program is continued on the next slide **
Step #1
Step #2
Example #1 - Main Program
Dec-2008 Data Interfaces | 9
START-OF-SELECTION.
OPEN DATASET INFILE
FOR INPUT IN TEXT MODE.
DO.
READ DATASET INFILE INTO INREC.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
PERFORM FILL_BDC_TAB.
CALL TRANSACTION ‘FK02’
USING BDC_TAB
MODE DISPMODE
UPDATE UPDAMODE.
IF SY-SUBRC <> 0.
WRITE: / ‘Error’.
ENDIF.
ENDDO.
CLOSE DATASET INFILE.
** This program is continued on the next slide **
Step #3
Step #4
Step #5
Step #6
Step #7
Step #8
Step #9
Example #1 - Main Program (Contd.)
Dec-2008 Data Interfaces | 10
START-OF-SELECTION.
OPEN DATASET INFILE
FOR INPUT IN TEXT MODE.
DO.
READ DATASET INFILE INTO INREC.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
PERFORM FILL_BDC_TAB.
CALL TRANSACTION ‘FK02’
USING BDC_TAB
MODE DISPMODE
UPDATE UPDAMODE.
IF SY-SUBRC <> 0.
WRITE: / ‘Error’.
ENDIF.
ENDDO.
CLOSE DATASET INFILE.
** This program is continued on the next slide **
Step #3
Step #4
Step #5
Step #6
Step #7
Step #8
Step #9
Example #1 - Subroutines
Dec-2008 Data Interfaces | 11
FORM FILL_BDC_TAB.
REFRESH BDC_TAB.
PERFORM POPULATE_BDC_TAB
USING:
‘1’ ‘SAPMF02K’ ‘0106’,
‘ ’ ‘RF02K-LIFNR’ INREC-
VENDNUM,
‘ ’ ‘RF02K-D0110’ ‘X’,
‘1’ ‘SAPMF02K’ ‘0110’,
‘ ’ ‘LFA1-STRAS’ INREC-STREET,
‘ ’ ‘BDC_OKCODE’ ‘=UPDA’.
ENDFORM.
FORM POPULATE_BDC_TAB USING
FLAG TYPE C
VAR1 TYPE C
VAR2 TYPE C.
CLEAR WA_BDC_TAB.
IF FLAG = ‘1’.
WA_BDC_TAB-PROGRAM = VAR1.
WA_BDC_TAB-DYNPRO = VAR2.
WA_BDC_TAB-DYNBEGIN = ‘X’.
ELSE.
WA_BDC_TAB-FNAM = VAR1.
WA_BDC_TAB-FVAL = VAR2.
ENDIF.
APPEND WA_BDC_TAB TO
BDC_TAB.
ENDFORM.
Notice that the vendor number and street values are coming from the
file’s records read into the “INREC” structure.
Error Handling
Dec-2008 Data Interfaces | 12
Write an error report.
Send the record(s) in error to
an error file.
Create a batch input session
with the record(s) in error.
BDC Program Flow
Dec-2008 Data Interfaces | 13
Declare BDC Table Fill BDC Table
Collect Transaction InformationCreate & Record Program
Process Batch Input Methods
Batch Input Sessions
Call Transaction
Synchronous versus Asynchronous
Dec-2008 Data Interfaces | 14
DO.
. . .
PERFORM FILL_BDC_TAB.
CALL TRANSACTION ‘FK02’
USING BDC_TAB
MODE ‘N’
UPDATE ‘S’.
IF SY-SUBRC <> 0.
WRITE: / ‘Error’.
ENDIF.
ENDDO.
DO.
. . .
PERFORM FILL_BDC_TAB.
CALL TRANSACTION ‘FK02’
USING BDC_TAB
MODE ‘N’
UPDATE ‘A’.
IF SY-SUBRC <> 0.
WRITE: / ‘Transaction error’.
ENDIF.
ENDDO.
With synchronous updating, we can
check SY-SUBRC to determine the
success of the transaction and the
actual update to the database.
With asynchronous updating, we
can check SY-SUBRC to determine
the success of the transaction only,
not the actual update to the
database.
Demonstration
• Creation of a custom BDC program and
changing customer address with transaction
XD02 (Change Customer) using the Call
transaction method.
Dec-2008 Data Interfaces | 15
Practice
• Creation of a custom BDC program and
changing customer address with transaction
XD02 (Change Customer) using the Call
transaction method.
Dec-2008 Data Interfaces | 16
Summary
• If you use the “CALL TRANSACTION” or “CALL
DIALOG” statement, errors are not handled
automatically by the system. Errors must be
handled in the batch input program.
• The “CALL TRANSACTION” statement executes
an online program. When this transaction is
completed, processing returns to the “calling”
program.
Dec-2008 Data Interfaces | 17
Questions
• What are the different batch input methods
present in SAP for data upload?
• What is the difference between synchronous
and asynchronous update?
Dec-2008 Data Interfaces | 18

More Related Content

What's hot

Dialog Programming Overview
Dialog Programming OverviewDialog Programming Overview
Dialog Programming Overview
sapdocs. info
 
Open SQL & Internal Table
Open SQL & Internal TableOpen SQL & Internal Table
Open SQL & Internal Table
sapdocs. info
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script formsKranthi Kumar
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)Kranthi Kumar
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONKranthi Kumar
 
Abap Questions
Abap QuestionsAbap Questions
Abap Questions
Kaustav Pyne
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricksKranthi Kumar
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programming
Satheesh Kanna
 
SAP Adobe forms
SAP Adobe formsSAP Adobe forms
SAP Adobe forms
Jugul Crasta
 
SAP Smart forms
SAP Smart formsSAP Smart forms
SAP Smart forms
Jugul Crasta
 
Enhancement framework the new way to enhance your abap systems
Enhancement framework   the new way to enhance your abap systemsEnhancement framework   the new way to enhance your abap systems
Enhancement framework the new way to enhance your abap systemsKranthi Kumar
 
Abap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorialsAbap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorials
cesarmendez78
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programsKranthi Kumar
 
Bapi step-by-step
Bapi step-by-stepBapi step-by-step
Bapi step-by-step
mateenjambagi
 
Beginner's Guide: Programming with ABAP on HANA
Beginner's Guide: Programming with ABAP on HANABeginner's Guide: Programming with ABAP on HANA
Beginner's Guide: Programming with ABAP on HANA
Ashish Saxena
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questionskssr99
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
Uttam Agrawal
 

What's hot (20)

Dialog Programming Overview
Dialog Programming OverviewDialog Programming Overview
Dialog Programming Overview
 
Badi document
Badi documentBadi document
Badi document
 
Open SQL & Internal Table
Open SQL & Internal TableOpen SQL & Internal Table
Open SQL & Internal Table
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
 
Module pool programming
Module pool programmingModule pool programming
Module pool programming
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
 
Abap Questions
Abap QuestionsAbap Questions
Abap Questions
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricks
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programming
 
SAP Adobe forms
SAP Adobe formsSAP Adobe forms
SAP Adobe forms
 
SAP Smart forms
SAP Smart formsSAP Smart forms
SAP Smart forms
 
Enhancement framework the new way to enhance your abap systems
Enhancement framework   the new way to enhance your abap systemsEnhancement framework   the new way to enhance your abap systems
Enhancement framework the new way to enhance your abap systems
 
Abap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorialsAbap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorials
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
 
Field symbols
Field symbolsField symbols
Field symbols
 
Bapi step-by-step
Bapi step-by-stepBapi step-by-step
Bapi step-by-step
 
Beginner's Guide: Programming with ABAP on HANA
Beginner's Guide: Programming with ABAP on HANABeginner's Guide: Programming with ABAP on HANA
Beginner's Guide: Programming with ABAP on HANA
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
 

Viewers also liked

50. transacciones por módulos
50. transacciones por módulos50. transacciones por módulos
50. transacciones por módulos
Emagister
 
Breakfast with Pierre Cléroux, Vice President, Research and Chief Economist a...
Breakfast with Pierre Cléroux, Vice President, Research and Chief Economist a...Breakfast with Pierre Cléroux, Vice President, Research and Chief Economist a...
Breakfast with Pierre Cléroux, Vice President, Research and Chief Economist a...
Milton Chamber of Commerce
 
Ralph Paglia ILM Implementation For General Motors Dealers
Ralph Paglia ILM Implementation For General Motors DealersRalph Paglia ILM Implementation For General Motors Dealers
Ralph Paglia ILM Implementation For General Motors Dealers
Ralph Paglia
 
Ralph Paglia A D P Feature Auto Dealer Digest
Ralph  Paglia  A D P  Feature  Auto Dealer DigestRalph  Paglia  A D P  Feature  Auto Dealer Digest
Ralph Paglia A D P Feature Auto Dealer DigestRalph Paglia
 
BDC Call Script
BDC Call ScriptBDC Call Script
BDC Call Script
Berman_Infiniti_Chicago
 
RFCD 2011: BDC: Developing a Competitive Business
RFCD 2011: BDC: Developing a Competitive BusinessRFCD 2011: BDC: Developing a Competitive Business
Will The Real BDC Manager, Please Stand Up
Will The Real BDC Manager,  Please Stand UpWill The Real BDC Manager,  Please Stand Up
Will The Real BDC Manager, Please Stand Up
karinabradley
 
Badis
Badis Badis
Badis
Rajesh Kumar
 
SAP Batch data communication
SAP Batch data communicationSAP Batch data communication
SAP Batch data communication
Jugul Crasta
 
Bdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATIONBdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATION
Hitesh Gulani
 
Interfacing sap - BDC
Interfacing sap - BDC Interfacing sap - BDC
Interfacing sap - BDC
Syam Sasi
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
scribid.download
 
Bdc details
Bdc detailsBdc details
Bdc details
Syam Sasi
 
Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1Kranthi Kumar
 
Automotive BDC Workshop; IGPA
Automotive BDC Workshop; IGPAAutomotive BDC Workshop; IGPA
Automotive BDC Workshop; IGPA
Social Media Marketing
 
Automotive BDC Coordinator Conference
Automotive BDC Coordinator ConferenceAutomotive BDC Coordinator Conference
Automotive BDC Coordinator Conference
Social Media Marketing
 
Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP Performance
PeterHBrown
 
Sap abap
Sap abapSap abap
Sap abap
Jugul Crasta
 
Sap script made easy
Sap script made easySap script made easy
Sap script made easyKranthi Kumar
 

Viewers also liked (20)

50. transacciones por módulos
50. transacciones por módulos50. transacciones por módulos
50. transacciones por módulos
 
Breakfast with Pierre Cléroux, Vice President, Research and Chief Economist a...
Breakfast with Pierre Cléroux, Vice President, Research and Chief Economist a...Breakfast with Pierre Cléroux, Vice President, Research and Chief Economist a...
Breakfast with Pierre Cléroux, Vice President, Research and Chief Economist a...
 
Ralph Paglia ILM Implementation For General Motors Dealers
Ralph Paglia ILM Implementation For General Motors DealersRalph Paglia ILM Implementation For General Motors Dealers
Ralph Paglia ILM Implementation For General Motors Dealers
 
Ralph Paglia A D P Feature Auto Dealer Digest
Ralph  Paglia  A D P  Feature  Auto Dealer DigestRalph  Paglia  A D P  Feature  Auto Dealer Digest
Ralph Paglia A D P Feature Auto Dealer Digest
 
BDC Call Script
BDC Call ScriptBDC Call Script
BDC Call Script
 
RFCD 2011: BDC: Developing a Competitive Business
RFCD 2011: BDC: Developing a Competitive BusinessRFCD 2011: BDC: Developing a Competitive Business
RFCD 2011: BDC: Developing a Competitive Business
 
Will The Real BDC Manager, Please Stand Up
Will The Real BDC Manager,  Please Stand UpWill The Real BDC Manager,  Please Stand Up
Will The Real BDC Manager, Please Stand Up
 
Batch input session
Batch input sessionBatch input session
Batch input session
 
Badis
Badis Badis
Badis
 
SAP Batch data communication
SAP Batch data communicationSAP Batch data communication
SAP Batch data communication
 
Bdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATIONBdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATION
 
Interfacing sap - BDC
Interfacing sap - BDC Interfacing sap - BDC
Interfacing sap - BDC
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
 
Bdc details
Bdc detailsBdc details
Bdc details
 
Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1
 
Automotive BDC Workshop; IGPA
Automotive BDC Workshop; IGPAAutomotive BDC Workshop; IGPA
Automotive BDC Workshop; IGPA
 
Automotive BDC Coordinator Conference
Automotive BDC Coordinator ConferenceAutomotive BDC Coordinator Conference
Automotive BDC Coordinator Conference
 
Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP Performance
 
Sap abap
Sap abapSap abap
Sap abap
 
Sap script made easy
Sap script made easySap script made easy
Sap script made easy
 

Similar to Call transaction method

BIN-ITPD-2100.04c User Reference Manual FI Module Banking
BIN-ITPD-2100.04c User Reference Manual FI Module BankingBIN-ITPD-2100.04c User Reference Manual FI Module Banking
BIN-ITPD-2100.04c User Reference Manual FI Module BankingSheila Andaya
 
BIN-ITPD-2600 04c User Reference Manual Accounts Payables v0
BIN-ITPD-2600 04c User Reference Manual Accounts Payables v0BIN-ITPD-2600 04c User Reference Manual Accounts Payables v0
BIN-ITPD-2600 04c User Reference Manual Accounts Payables v0Sheila Andaya
 
Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)Srinivas Dukka
 
5078977 abap-tips
5078977 abap-tips5078977 abap-tips
5078977 abap-tipsjmts1000
 
BSG-ITPD-2700 04c User Reference Manual FI Closing Activities
BSG-ITPD-2700 04c User Reference Manual FI Closing ActivitiesBSG-ITPD-2700 04c User Reference Manual FI Closing Activities
BSG-ITPD-2700 04c User Reference Manual FI Closing ActivitiesSheila Andaya
 
Info plc net_dcs800_controlbuilder_basic_exercises
Info plc net_dcs800_controlbuilder_basic_exercisesInfo plc net_dcs800_controlbuilder_basic_exercises
Info plc net_dcs800_controlbuilder_basic_exercises
Mahmoud Hassan
 
Basic Handover of Bill of Material(2).docx
Basic Handover of Bill of Material(2).docxBasic Handover of Bill of Material(2).docx
Basic Handover of Bill of Material(2).docx
Dipak Banerjee
 
Scm lsmw steps_onweb
Scm lsmw steps_onwebScm lsmw steps_onweb
Scm lsmw steps_onwebHarsha Reddy
 
Mm inv-differences list
Mm inv-differences listMm inv-differences list
Mm inv-differences list
Farhat Kiani
 
B2B add on implementation scenarios po. part I inbound edi
B2B add on implementation scenarios po. part I inbound ediB2B add on implementation scenarios po. part I inbound edi
B2B add on implementation scenarios po. part I inbound edi
Roberto Cantero Segovia
 
InstructionsManagement Tools Assignment Part 1 and Part 2Additiona.docx
InstructionsManagement Tools Assignment Part 1 and Part 2Additiona.docxInstructionsManagement Tools Assignment Part 1 and Part 2Additiona.docx
InstructionsManagement Tools Assignment Part 1 and Part 2Additiona.docx
normanibarber20063
 
1BM_S4CLD2302_BPD_EN_US.docx
1BM_S4CLD2302_BPD_EN_US.docx1BM_S4CLD2302_BPD_EN_US.docx
1BM_S4CLD2302_BPD_EN_US.docx
navinsurya3
 
Programming with PIC microcontroller
Programming with PIC microcontroller Programming with PIC microcontroller
Programming with PIC microcontroller
Raghav Shetty
 
Microcontroladores: Programación con microcontrolador PIC
Microcontroladores: Programación con microcontrolador PICMicrocontroladores: Programación con microcontrolador PIC
Microcontroladores: Programación con microcontrolador PIC
SANTIAGO PABLO ALBERTO
 
Real Time Embedded System
Real Time Embedded SystemReal Time Embedded System
Real Time Embedded System
Vrushali Lanjewar
 
PT1420 Modules in Flowchart and Visual Basic .docx
PT1420 Modules in Flowchart and Visual Basic             .docxPT1420 Modules in Flowchart and Visual Basic             .docx
PT1420 Modules in Flowchart and Visual Basic .docx
amrit47
 
A step by-step guide on i doc-ale between two sap servers
A step by-step guide on i doc-ale between two sap serversA step by-step guide on i doc-ale between two sap servers
A step by-step guide on i doc-ale between two sap servers
krishna RK
 
LSMW-STEP-BY-STEP-RECORD.pdf
LSMW-STEP-BY-STEP-RECORD.pdfLSMW-STEP-BY-STEP-RECORD.pdf
LSMW-STEP-BY-STEP-RECORD.pdf
KaveriBangar1
 
F073 – Transfer of CENVAT on hold to CENVAT Credit – for Capital Goods
F073 – Transfer of CENVAT on hold to CENVAT Credit – for Capital GoodsF073 – Transfer of CENVAT on hold to CENVAT Credit – for Capital Goods
F073 – Transfer of CENVAT on hold to CENVAT Credit – for Capital GoodsFIROZ KHAN
 

Similar to Call transaction method (20)

BIN-ITPD-2100.04c User Reference Manual FI Module Banking
BIN-ITPD-2100.04c User Reference Manual FI Module BankingBIN-ITPD-2100.04c User Reference Manual FI Module Banking
BIN-ITPD-2100.04c User Reference Manual FI Module Banking
 
BIN-ITPD-2600 04c User Reference Manual Accounts Payables v0
BIN-ITPD-2600 04c User Reference Manual Accounts Payables v0BIN-ITPD-2600 04c User Reference Manual Accounts Payables v0
BIN-ITPD-2600 04c User Reference Manual Accounts Payables v0
 
Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)
 
Abap tips
Abap tipsAbap tips
Abap tips
 
5078977 abap-tips
5078977 abap-tips5078977 abap-tips
5078977 abap-tips
 
BSG-ITPD-2700 04c User Reference Manual FI Closing Activities
BSG-ITPD-2700 04c User Reference Manual FI Closing ActivitiesBSG-ITPD-2700 04c User Reference Manual FI Closing Activities
BSG-ITPD-2700 04c User Reference Manual FI Closing Activities
 
Info plc net_dcs800_controlbuilder_basic_exercises
Info plc net_dcs800_controlbuilder_basic_exercisesInfo plc net_dcs800_controlbuilder_basic_exercises
Info plc net_dcs800_controlbuilder_basic_exercises
 
Basic Handover of Bill of Material(2).docx
Basic Handover of Bill of Material(2).docxBasic Handover of Bill of Material(2).docx
Basic Handover of Bill of Material(2).docx
 
Scm lsmw steps_onweb
Scm lsmw steps_onwebScm lsmw steps_onweb
Scm lsmw steps_onweb
 
Mm inv-differences list
Mm inv-differences listMm inv-differences list
Mm inv-differences list
 
B2B add on implementation scenarios po. part I inbound edi
B2B add on implementation scenarios po. part I inbound ediB2B add on implementation scenarios po. part I inbound edi
B2B add on implementation scenarios po. part I inbound edi
 
InstructionsManagement Tools Assignment Part 1 and Part 2Additiona.docx
InstructionsManagement Tools Assignment Part 1 and Part 2Additiona.docxInstructionsManagement Tools Assignment Part 1 and Part 2Additiona.docx
InstructionsManagement Tools Assignment Part 1 and Part 2Additiona.docx
 
1BM_S4CLD2302_BPD_EN_US.docx
1BM_S4CLD2302_BPD_EN_US.docx1BM_S4CLD2302_BPD_EN_US.docx
1BM_S4CLD2302_BPD_EN_US.docx
 
Programming with PIC microcontroller
Programming with PIC microcontroller Programming with PIC microcontroller
Programming with PIC microcontroller
 
Microcontroladores: Programación con microcontrolador PIC
Microcontroladores: Programación con microcontrolador PICMicrocontroladores: Programación con microcontrolador PIC
Microcontroladores: Programación con microcontrolador PIC
 
Real Time Embedded System
Real Time Embedded SystemReal Time Embedded System
Real Time Embedded System
 
PT1420 Modules in Flowchart and Visual Basic .docx
PT1420 Modules in Flowchart and Visual Basic             .docxPT1420 Modules in Flowchart and Visual Basic             .docx
PT1420 Modules in Flowchart and Visual Basic .docx
 
A step by-step guide on i doc-ale between two sap servers
A step by-step guide on i doc-ale between two sap serversA step by-step guide on i doc-ale between two sap servers
A step by-step guide on i doc-ale between two sap servers
 
LSMW-STEP-BY-STEP-RECORD.pdf
LSMW-STEP-BY-STEP-RECORD.pdfLSMW-STEP-BY-STEP-RECORD.pdf
LSMW-STEP-BY-STEP-RECORD.pdf
 
F073 – Transfer of CENVAT on hold to CENVAT Credit – for Capital Goods
F073 – Transfer of CENVAT on hold to CENVAT Credit – for Capital GoodsF073 – Transfer of CENVAT on hold to CENVAT Credit – for Capital Goods
F073 – Transfer of CENVAT on hold to CENVAT Credit – for Capital Goods
 

More from Kranthi Kumar

Creating simple comp
Creating simple compCreating simple comp
Creating simple compKranthi Kumar
 
Controllers and context programming
Controllers and context programmingControllers and context programming
Controllers and context programmingKranthi Kumar
 
Binding,context mapping,navigation exercise
Binding,context mapping,navigation exerciseBinding,context mapping,navigation exercise
Binding,context mapping,navigation exerciseKranthi Kumar
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)Kranthi Kumar
 
Chapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsChapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsKranthi Kumar
 
Chapter 06 printing sap script forms
Chapter 06 printing sap script formsChapter 06 printing sap script forms
Chapter 06 printing sap script formsKranthi Kumar
 
Chapter 05 sap script - configuration
Chapter 05 sap script - configurationChapter 05 sap script - configuration
Chapter 05 sap script - configurationKranthi Kumar
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output programKranthi Kumar
 

More from Kranthi Kumar (20)

Exercise in alv
Exercise in alvExercise in alv
Exercise in alv
 
Dynamic binding
Dynamic bindingDynamic binding
Dynamic binding
 
Data binding
Data bindingData binding
Data binding
 
Creating simple comp
Creating simple compCreating simple comp
Creating simple comp
 
Creating messages
Creating messagesCreating messages
Creating messages
 
Creating a comp
Creating a compCreating a comp
Creating a comp
 
Controllers and context programming
Controllers and context programmingControllers and context programming
Controllers and context programming
 
Context at design
Context at designContext at design
Context at design
 
Binding,context mapping,navigation exercise
Binding,context mapping,navigation exerciseBinding,context mapping,navigation exercise
Binding,context mapping,navigation exercise
 
Alv for web
Alv for webAlv for web
Alv for web
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)
 
Abap faq
Abap faqAbap faq
Abap faq
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
Crm technical
Crm technicalCrm technical
Crm technical
 
control techniques
control techniquescontrol techniques
control techniques
 
Chapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsChapter 07 debugging sap scripts
Chapter 07 debugging sap scripts
 
Chapter 06 printing sap script forms
Chapter 06 printing sap script formsChapter 06 printing sap script forms
Chapter 06 printing sap script forms
 
Chapter 05 sap script - configuration
Chapter 05 sap script - configurationChapter 05 sap script - configuration
Chapter 05 sap script - configuration
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output program
 
sap script overview
sap script overviewsap script overview
sap script overview
 

Call transaction method

  • 2. Objectives • The participants will be able to: – Describe the Call Transaction Method for Batch Input. – Differentiate the different batch input methods. Dec-2008 Data Interfaces | 2
  • 3. Overview Dec-2008 Data Interfaces | 3 PROGRAM DYNPRO DYNBEGIN FNAM FVAL SAPMF02K 0106 X RF02K-LIFNR TEST1 RF02K-D0110 X SAPMF02K 0110 X LFA1-STRAS 123 Main St. BDC_OKCODE =UPDA BDC Table Create Batch Input Session (BDC Program) Create Batch Input Session (BDC Program) Use in “CALL TRANSACTION” statement Use in “CALL TRANSACTION” statement Use in “CALL DIALOG” statement Use in “CALL DIALOG” statement
  • 4. Differences in Batch Input Methods Dec-2008 Data Interfaces | 4 When is the SAP database updated? How are errors handled? Create batch input session (BDC Program): During the processing of the batch input session Automatically by the system during the processing of the batch input session CALL TRANSACTION: CALL DIALOG: During the execution of the batch input program Must be handled in the batch input program
  • 5. Example - Change Vendors Dec-2008 Data Interfaces | 5 Name Street Computers, Inc. 123 Main St. City Philadelphia Vendor Company Code TEST1 AddressX Vendor Company Code TEST2 AddressX Name Street Computer Land 10 Walnut St. City Boston To illustrate the “CALL TRANSACTION” and “CALL DIALOG” methods, we will use the example to change vendors coming from a sequential file.
  • 6. “CALL TRANSACTION USING” Statement Dec-2008 Data Interfaces | 6 CALL TRANSACTION <transaction code> USING <bdc internal table> MODE <display mode> UPDATE <update mode> MESSAGES INTO <msg int. table>. <display mode> A: display all E: display errors only N: no display <update mode> S: synchronous A: asynchronous
  • 7. “CALL TRANSACTION USING” Statement (Contd.) Dec-2008 Data Interfaces | 7 CALL TRANSACTION <transaction code> USING <bdc internal table> MODE <display mode> UPDATE <update mode> MESSAGES INTO <msg int. table>. <display mode> A: display all E: display errors only N: no display <update mode> S: synchronous A: asynchronous L: local update
  • 8. Example #1 - Declaration Section Dec-2008 Data Interfaces | 8 REPORT YDI00007. DATA: BDC_TAB TYPE STANDARD TABLE OF BDCDATA INITIAL SIZE 6, WA_BDC_TAB TYPE BDCDATA. INFILE(20) VALUE ‘./bc180_file4’. DATA: BEGIN OF INREC, VENDNUM TYPE LIFNR, STREET TYPE STRAS_GP, END OF INREC. PARAMETERS: DISPMODE DEFAULT ‘A’, UPDAMODE DEFAULT ‘S’. ** This program is continued on the next slide ** Step #1 Step #2
  • 9. Example #1 - Main Program Dec-2008 Data Interfaces | 9 START-OF-SELECTION. OPEN DATASET INFILE FOR INPUT IN TEXT MODE. DO. READ DATASET INFILE INTO INREC. IF SY-SUBRC <> 0. EXIT. ENDIF. PERFORM FILL_BDC_TAB. CALL TRANSACTION ‘FK02’ USING BDC_TAB MODE DISPMODE UPDATE UPDAMODE. IF SY-SUBRC <> 0. WRITE: / ‘Error’. ENDIF. ENDDO. CLOSE DATASET INFILE. ** This program is continued on the next slide ** Step #3 Step #4 Step #5 Step #6 Step #7 Step #8 Step #9
  • 10. Example #1 - Main Program (Contd.) Dec-2008 Data Interfaces | 10 START-OF-SELECTION. OPEN DATASET INFILE FOR INPUT IN TEXT MODE. DO. READ DATASET INFILE INTO INREC. IF SY-SUBRC <> 0. EXIT. ENDIF. PERFORM FILL_BDC_TAB. CALL TRANSACTION ‘FK02’ USING BDC_TAB MODE DISPMODE UPDATE UPDAMODE. IF SY-SUBRC <> 0. WRITE: / ‘Error’. ENDIF. ENDDO. CLOSE DATASET INFILE. ** This program is continued on the next slide ** Step #3 Step #4 Step #5 Step #6 Step #7 Step #8 Step #9
  • 11. Example #1 - Subroutines Dec-2008 Data Interfaces | 11 FORM FILL_BDC_TAB. REFRESH BDC_TAB. PERFORM POPULATE_BDC_TAB USING: ‘1’ ‘SAPMF02K’ ‘0106’, ‘ ’ ‘RF02K-LIFNR’ INREC- VENDNUM, ‘ ’ ‘RF02K-D0110’ ‘X’, ‘1’ ‘SAPMF02K’ ‘0110’, ‘ ’ ‘LFA1-STRAS’ INREC-STREET, ‘ ’ ‘BDC_OKCODE’ ‘=UPDA’. ENDFORM. FORM POPULATE_BDC_TAB USING FLAG TYPE C VAR1 TYPE C VAR2 TYPE C. CLEAR WA_BDC_TAB. IF FLAG = ‘1’. WA_BDC_TAB-PROGRAM = VAR1. WA_BDC_TAB-DYNPRO = VAR2. WA_BDC_TAB-DYNBEGIN = ‘X’. ELSE. WA_BDC_TAB-FNAM = VAR1. WA_BDC_TAB-FVAL = VAR2. ENDIF. APPEND WA_BDC_TAB TO BDC_TAB. ENDFORM. Notice that the vendor number and street values are coming from the file’s records read into the “INREC” structure.
  • 12. Error Handling Dec-2008 Data Interfaces | 12 Write an error report. Send the record(s) in error to an error file. Create a batch input session with the record(s) in error.
  • 13. BDC Program Flow Dec-2008 Data Interfaces | 13 Declare BDC Table Fill BDC Table Collect Transaction InformationCreate & Record Program Process Batch Input Methods Batch Input Sessions Call Transaction
  • 14. Synchronous versus Asynchronous Dec-2008 Data Interfaces | 14 DO. . . . PERFORM FILL_BDC_TAB. CALL TRANSACTION ‘FK02’ USING BDC_TAB MODE ‘N’ UPDATE ‘S’. IF SY-SUBRC <> 0. WRITE: / ‘Error’. ENDIF. ENDDO. DO. . . . PERFORM FILL_BDC_TAB. CALL TRANSACTION ‘FK02’ USING BDC_TAB MODE ‘N’ UPDATE ‘A’. IF SY-SUBRC <> 0. WRITE: / ‘Transaction error’. ENDIF. ENDDO. With synchronous updating, we can check SY-SUBRC to determine the success of the transaction and the actual update to the database. With asynchronous updating, we can check SY-SUBRC to determine the success of the transaction only, not the actual update to the database.
  • 15. Demonstration • Creation of a custom BDC program and changing customer address with transaction XD02 (Change Customer) using the Call transaction method. Dec-2008 Data Interfaces | 15
  • 16. Practice • Creation of a custom BDC program and changing customer address with transaction XD02 (Change Customer) using the Call transaction method. Dec-2008 Data Interfaces | 16
  • 17. Summary • If you use the “CALL TRANSACTION” or “CALL DIALOG” statement, errors are not handled automatically by the system. Errors must be handled in the batch input program. • The “CALL TRANSACTION” statement executes an online program. When this transaction is completed, processing returns to the “calling” program. Dec-2008 Data Interfaces | 17
  • 18. Questions • What are the different batch input methods present in SAP for data upload? • What is the difference between synchronous and asynchronous update? Dec-2008 Data Interfaces | 18

Editor's Notes

  1. In a batch input program, the contents of the BDC table can be used three ways to perform the data transfer to the SAP system: Use the BDC table to create a batch input session. In this case, the batch input program is often called a BDC program. Use the BDC table in a “CALL TRANSACTION USING” statement. Use the BDC table in a “CALL DIALOG” statement (outdated). In chapter 5, we covered the first method – creating a batch input session with the contents of the BDC table. In this chapter, we will cover the batch input method – using the BDC table in the “CALL TRANSACTION USING”. When you perform batch input, you will generally be deciding between the first two methods – creating a batch input session or using the “CALL TRANSACTION USING” statement.
  2. Two questions illustrate the main differences between creating a batch input session and using the “CALL TRANSACTION/DIALOG”: When is the SAP database updated? How are errors handled? When is the SAP database updated? If you create a batch input session in a BDC program, the SAP database is updated during the processing of the batch input session, not the execution of the BDC program. If you use the “CALL TRANSACTION” or “CALL DIALOG” statement, the SAP database is updated during the execution of the batch input program. In other words, the timing issue we covered in the previous chapter is not an issue with these two alternatives because the database is updated during the execution of the batch input program. How are errors handled? If you create a batch input session in a BDC program, errors are handled automatically by the system during the processing of the batch input session. Errors are recorded in a log and with the batch input session error is kept. If you use the “CALL TRANSACTION” or “CALL DIALOG” statement, errors are not handled automatically by the system. Errors must be handled in the batch input program.
  3. To illustrate the “CALL TRANSACTION” and “CALL DIALOG” methods, we will use the example to change vendors coming from a sequential file on the application server. In chapter 5, we used this example to create a batch input session. In this chapter, we will first use this example with the “CALL TRANSACTION” method. Then, we will use it with the “CALL DIALOG” method.
  4. The “CALL TRANSACTION” statement executes an online program. When this transaction is completed, processing returns to the “calling” program. To perform batch input with the “CALL TRANSACTION” statement, the “USING” addition is required to send the contents of the BDC table to the transaction: CALL TRANSACTION &amp;lt;transaction code&amp;gt; USING&amp;lt;bdc table&amp;gt; [MODE&amp;lt;display mode&amp;gt;] [UPDATE&amp;lt;update mode&amp;gt;] [MESSAGES INTO &amp;lt;mssg int. table&amp;gt;] . The &amp;lt;bdc table&amp;gt; must be declared “LIKE BDCDATA”. The only required addition for batch input is “USING”. The other additions are only valid in conjunction with the “USING” addition. The &amp;lt;display mode&amp;gt; determines how the transaction will be processed: ‘A’ (display all), ‘E’ (display errors only), or ‘N’ (no display). The default is ‘A’.
  5. The &amp;lt;update mode&amp;gt; determines how database update will occur: ‘S’ (synchronous) or ‘A’ (asynchronous) or L (local update). The default is ‘A’. Synchronous updating indicates that an update is completed for the transaction before processing returns to the “calling” program. Asynchronous updating indicates that processing returns to the “calling” program immediately after the transaction is completed, even before the update is completed. Local update indicates that updates of the called program are executed in such a way as if the SET UPDATE TASK LOCAL statement had been executed in it. System messages issued during the transaction can be stored in the &amp;lt;msg int. table&amp;gt;. This internal table must be declared “LIKE BDCMSGCOLL”.
  6. To perform batch input using the “CALL TRANSACTION USING” statement with multiple records from a sequential file on the application server, perform the following steps in a batch input program: Step #1: Create the BDC table. This internal table must be declared “TYPE BDCDATA”. Step #2: Define the structure in which the file’s records will be read. This structure should match the structure of the file’s records. The sequential file we are reading has the same format as the one from chapter 5 (see page 12 of chapter 5). It is structured in lines, so we will open it “IN TEXT MODE”. These steps are continued on the next page.
  7. Steps to perform batch input using the “CALL TRANSACTION USING” statement (continued from previous page): Step #3: Open the file “FOR INPUT”. Step #4: Read a record from the file into the structure. To read the complete file, you must code the “READ DATASET” statement in a DO loop. Step #5: Code a way out (EXIT) of the DO loop. If SY-SUBRC is not 0, the end of the file has already been reached. Step #6: Fill the BDC table with the appropriate data for the transaction (see next page). This step will be executed for each record in the sequential file. Step #7: Insert a transaction’s data (from the BDC table) into the transaction directly by using the “CALL TRANSACTION USING” statement. This step will be executed for each record in the sequential file. The display mode determines how this transaction is processed (i.e., will you see the transaction’s screens or not).
  8. Step #8: Check SY-SUBRC to determine if an error occurred during the transaction (SY-SUBRC &amp;lt;&amp;gt; 0). The system does not automatically handle these errors like it does during the processing of a batch input session. You must handle these errors in the program (see page 8). Step #9: Close the file.
  9. The two subroutines above are used to fill the BDC table. These two subroutines are executed just before the BDC table’s contents are passed to the transaction with the “CALL TRANSACTION USING” statement.
  10. With the “CALL TRANSACTION USING” statement (and the “CALL DIALOG” statement), errors are not handled automatically by the system. Therefore, you must handle these errors in the batch input program. After a “CALL TRANSACTION USING” statement (or a “CALL DIALOG” statement), the value of SY-SUBRC indicates the success or failure of the transaction: If SY-SUBRC is zero, the transaction (or dialog module) was successful. If SY-SUBRC is not zero, the transaction (or dialog module) was not successful. You can handle an error in many ways: Write an error report. Send the record(s) in error to an error file. Create a batch input session with the record(s) in error. This list of error handling methods is not complete. The exact method chosen will depend on your specific requirements. Also, these methods can be combined (i.e., you can create an error report and send the records in error to an error file).
  11. In the “CALL TRANSACTION USING” statement, you can specify the update mode as synchronous or asynchronous. To restate the difference: Synchronous updating indicates that an update is completed for the transaction before processing returns to the “calling” program. Asynchronous updating indicates that processing returns to the “calling” program immediately after the transaction is completed, even before the update is completed. The difference in these update modes creates a trade-off between the execution speed and the meaning of the return code. With respect to the execution speed: Synchronous updating is slower than asynchronous updating because processing does not return to the “calling” program until the update is complete. Remember that the update mode when processing batch input sessions is always synchronous. With respect to the meaning of the return code: The return code (SY-SUBRC) after synchronous updating indicates the success or failure of the actual update. The return code after asynchronous updating only indicates the success or failure of the transaction, not the update.