SlideShare a Scribd company logo
1 of 7
REPORT ZBDC_003 NO STANDARD PAGE HEADING LINE-SIZE 255.
TYPES: BEGIN OF TAB,
PERNR TYPE ZTAB_001-PERNR,
ENAME TYPE ZTAB_001-ENAME,
CITY TYPE ZTAB_001-CITY,
END OF TAB.
DATA: IT_TAB TYPE TABLE OF TAB,
WA_TAB TYPE TAB,
D_FILE TYPE STRING,
BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
PARAMETERS: P_FILE TYPE IBIPPARMS-PATH OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

CALL FUNCTION 'F4_FILENAME'
IMPORTING
FILE_NAME = P_FILE.
D_FILE = P_FILE.

CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME
FILETYPE

= D_FILE
= 'ASC'

HAS_FIELD_SEPARATOR
* HEADER_LENGTH

= 'X'
=0
* READ_BY_LINE

= 'X'

* DAT_MODE

=''

* CODEPAGE

=''

* IGNORE_CERR

= ABAP_TRUE

* REPLACEMENT

= '#'

* CHECK_BOM

=''

* VIRUS_SCAN_PROFILE

=

* NO_AUTH_CHECK

=''

* IMPORTING
* FILELENGTH
* HEADER

=
=

TABLES
DATA_TAB

= IT_TAB

EXCEPTIONS
FILE_OPEN_ERROR

=1

FILE_READ_ERROR

=2

NO_BATCH

=3

GUI_REFUSE_FILETRANSFER
INVALID_TYPE

=4

=5

NO_AUTHORITY

=6

UNKNOWN_ERROR

=7

BAD_DATA_FORMAT

=8

HEADER_NOT_ALLOWED

=9

SEPARATOR_NOT_ALLOWED
HEADER_TOO_LONG

= 10
= 11
UNKNOWN_DP_ERROR

= 12

ACCESS_DENIED

= 13

DP_OUT_OF_MEMORY
DISK_FULL

= 15

DP_TIMEOUT
OTHERS

= 14

= 16
= 17

.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

START-OF-SELECTION.
*perform open_group.
*
LOOP AT IT_TAB INTO WA_TAB.
PERFORM BDC_DYNPRO

USING 'SAPMSVMA' '0100'.

PERFORM BDC_FIELD

USING 'BDC_CURSOR' 'VIEWNAME'.

PERFORM BDC_FIELD

USING 'BDC_OKCODE' '=UPD'.

PERFORM BDC_FIELD

USING 'VIEWNAME' 'ZTAB_001'.

PERFORM BDC_FIELD

USING 'VIMDYNFLDS-LTD_DTA_NO' 'X'.

PERFORM BDC_DYNPRO

USING 'SAPLZTAB_001' '0100'.

PERFORM BDC_FIELD

USING 'BDC_CURSOR' 'ZTAB_001-PERNR(01)'.

PERFORM BDC_FIELD

USING 'BDC_OKCODE'’=ANZG'.

PERFORM BDC_DYNPRO

USING 'SAPLZTAB_001' '0100'.
PERFORM BDC_FIELD

USING 'BDC_CURSOR' 'ZTAB_001-PERNR(01)'.

PERFORM BDC_FIELD

USING 'BDC_OKCODE' '=AEND'.

PERFORM BDC_DYNPRO

USING 'SAPLZTAB_001' '0100'.

PERFORM BDC_FIELD

USING 'BDC_CURSOR' 'ZTAB_001-PERNR(01)'.

PERFORM BDC_FIELD

USING 'BDC_OKCODE' '=NEWL'.

PERFORM BDC_DYNPRO

USING 'SAPLZTAB_001' '0100'.

PERFORM BDC_FIELD

USING 'BDC_CURSOR' 'ZTAB_001-CITY(01)'.

PERFORM BDC_FIELD

USING 'BDC_OKCODE' '/00'.

PERFORM BDC_FIELD

USING 'ZTAB_001-PERNR(01)'

WA_TAB-PERNR.
PERFORM BDC_FIELD

USING 'ZTAB_001-ENAME(01)'

WA_TAB-ENAME.
PERFORM BDC_FIELD

USING 'ZTAB_001-CITY(01)'

WA_TAB-CITY.
PERFORM BDC_DYNPRO
PERFORM BDC_FIELD

USING 'SAPLZTAB_001' '0100'.
USING 'BDC_CURSOR'

'ZTAB_001-PERNR(02)'.
PERFORM BDC_FIELD

USING 'BDC_OKCODE'

'=BACK'.
PERFORM BDC_DYNPRO
PERFORM BDC_FIELD

USING 'SAPLZTAB_001' '0100'.
USING 'BDC_CURSOR'

'ZTAB_001-PERNR(02)'.
PERFORM BDC_FIELD

USING 'BDC_OKCODE'

'=BACK'.
PERFORM BDC_DYNPRO

USING 'SAPLSPO1' '0100'.
PERFORM BDC_FIELD

USING 'BDC_OKCODE'

'=YES'.
PERFORM BDC_DYNPRO
PERFORM BDC_FIELD

USING 'SAPMSVMA' '0100'.
USING 'BDC_OKCODE'

'/EBACK'.
PERFORM BDC_FIELD

USING 'BDC_CURSOR'

'VIEWNAME'.
PERFORM BDC_TRANSACTION USING 'SM30'.
CLEAR: BDCDATA, BDCDATA[].
ENDLOOP.

*perform close_group.
*&---------------------------------------------------------------------*
*&

Form bdc_dynpro

*&---------------------------------------------------------------------*
*

text

*----------------------------------------------------------------------*
*

-->P_0154 text

*

-->P_0155 text

*----------------------------------------------------------------------*
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.

ENDFORM.

" bdc_dynpro

*&---------------------------------------------------------------------*
*&

Form bdc_field

*&---------------------------------------------------------------------*
*

text

*----------------------------------------------------------------------*
*

-->P_0304 text

*

-->P_0305 text

*----------------------------------------------------------------------*
FORM BDC_FIELD USING FNAM FVAL.
* IF FVAL <> NODATA.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.

ENDFORM.

" bdc_field

*&---------------------------------------------------------------------*
*&

Form bdc_transaction

*&---------------------------------------------------------------------*
*

text

*----------------------------------------------------------------------*
*

-->P_0309 text
*----------------------------------------------------------------------*
FORM BDC_TRANSACTION USING TCODE.
REFRESH MESSTAB.
CALL TRANSACTION TCODE USING BDCDATA
MODE 'E'"CTUMODE
UPDATE 'S' "CUPDATE
MESSAGES INTO MESSTAB.
ENDFORM.

*include bdcrecx1.

" bdc_transaction

More Related Content

Viewers also liked

z/OS Small Enhancements - Episode 2015A
z/OS Small Enhancements - Episode 2015Az/OS Small Enhancements - Episode 2015A
z/OS Small Enhancements - Episode 2015AMarna Walle
 
【再放送】バスキュール発!UXデザイン学
【再放送】バスキュール発!UXデザイン学 【再放送】バスキュール発!UXデザイン学
【再放送】バスキュール発!UXデザイン学 schoowebcampus
 
Jash mehta process modelling
Jash mehta process modellingJash mehta process modelling
Jash mehta process modellingJash Mehta
 
Eitc team 2 tech talk-final
Eitc team 2  tech talk-finalEitc team 2  tech talk-final
Eitc team 2 tech talk-finalJash Mehta
 
Actualog presentation for mrsk
Actualog presentation for mrskActualog presentation for mrsk
Actualog presentation for mrskActualog
 
1. hungarian club abc
1. hungarian club   abc1. hungarian club   abc
1. hungarian club abckistoff
 
Muerte por powerpoint y como diseñar presentaciones efectivas
Muerte por powerpoint y como diseñar presentaciones efectivasMuerte por powerpoint y como diseñar presentaciones efectivas
Muerte por powerpoint y como diseñar presentaciones efectivasGustavo Parolin
 
презентация готовности
презентация готовностипрезентация готовности
презентация готовностиSokol194
 
Why Your Public Company Doesn't Need Capital Markets Visibility 365
Why Your Public Company Doesn't Need Capital Markets Visibility 365Why Your Public Company Doesn't Need Capital Markets Visibility 365
Why Your Public Company Doesn't Need Capital Markets Visibility 365IR Smartt Inc.
 
Gestor de proyectos docent tic kattia
Gestor de proyectos docent tic kattiaGestor de proyectos docent tic kattia
Gestor de proyectos docent tic kattiaErika Montes
 
Direct and Online marketing
Direct and Online marketingDirect and Online marketing
Direct and Online marketingSyeda Javeria
 

Viewers also liked (20)

Gn the first 24
Gn the first 24Gn the first 24
Gn the first 24
 
z/OS Small Enhancements - Episode 2015A
z/OS Small Enhancements - Episode 2015Az/OS Small Enhancements - Episode 2015A
z/OS Small Enhancements - Episode 2015A
 
Untitleddocument
UntitleddocumentUntitleddocument
Untitleddocument
 
【再放送】バスキュール発!UXデザイン学
【再放送】バスキュール発!UXデザイン学 【再放送】バスキュール発!UXデザイン学
【再放送】バスキュール発!UXデザイン学
 
Jash mehta process modelling
Jash mehta process modellingJash mehta process modelling
Jash mehta process modelling
 
Eitc team 2 tech talk-final
Eitc team 2  tech talk-finalEitc team 2  tech talk-final
Eitc team 2 tech talk-final
 
Digital Video#1
Digital Video#1Digital Video#1
Digital Video#1
 
Actualog presentation for mrsk
Actualog presentation for mrskActualog presentation for mrsk
Actualog presentation for mrsk
 
Vintage music rien Zubaedah
Vintage music rien ZubaedahVintage music rien Zubaedah
Vintage music rien Zubaedah
 
Republikang romano
Republikang romanoRepublikang romano
Republikang romano
 
1. hungarian club abc
1. hungarian club   abc1. hungarian club   abc
1. hungarian club abc
 
Parshal verbs
Parshal verbsParshal verbs
Parshal verbs
 
Muerte por powerpoint y como diseñar presentaciones efectivas
Muerte por powerpoint y como diseñar presentaciones efectivasMuerte por powerpoint y como diseñar presentaciones efectivas
Muerte por powerpoint y como diseñar presentaciones efectivas
 
презентация готовности
презентация готовностипрезентация готовности
презентация готовности
 
Cerveza programa
Cerveza programaCerveza programa
Cerveza programa
 
Why Your Public Company Doesn't Need Capital Markets Visibility 365
Why Your Public Company Doesn't Need Capital Markets Visibility 365Why Your Public Company Doesn't Need Capital Markets Visibility 365
Why Your Public Company Doesn't Need Capital Markets Visibility 365
 
Mechtrix- 2K14
Mechtrix- 2K14Mechtrix- 2K14
Mechtrix- 2K14
 
Gestor de proyectos docent tic kattia
Gestor de proyectos docent tic kattiaGestor de proyectos docent tic kattia
Gestor de proyectos docent tic kattia
 
Rock Alternativo
Rock AlternativoRock Alternativo
Rock Alternativo
 
Direct and Online marketing
Direct and Online marketingDirect and Online marketing
Direct and Online marketing
 

Similar to Call transaction method of BDC

Call session Method of BDC
Call session Method of BDCCall session Method of BDC
Call session Method of BDCRavi Kanudawala
 
SAP Batch data communication
SAP Batch data communicationSAP Batch data communication
SAP Batch data communicationJugul Crasta
 
Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)Aleksandr Kuzminsky
 
Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)guest808c167
 
Example syntax alv grid list
Example syntax alv grid listExample syntax alv grid list
Example syntax alv grid listNur Khoiri
 

Similar to Call transaction method of BDC (7)

Call session Method of BDC
Call session Method of BDCCall session Method of BDC
Call session Method of BDC
 
SAP Batch data communication
SAP Batch data communicationSAP Batch data communication
SAP Batch data communication
 
Sap scripts
Sap scriptsSap scripts
Sap scripts
 
Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)
 
Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)Recovery of lost or corrupted inno db tables(mysql uc 2010)
Recovery of lost or corrupted inno db tables(mysql uc 2010)
 
Example syntax alv grid list
Example syntax alv grid listExample syntax alv grid list
Example syntax alv grid list
 
Zmalv output type_v1.1
Zmalv output type_v1.1Zmalv output type_v1.1
Zmalv output type_v1.1
 

More from Ravi Kanudawala

More from Ravi Kanudawala (6)

Interview Preparation
Interview PreparationInterview Preparation
Interview Preparation
 
Classical ABAP interactive report
Classical ABAP interactive reportClassical ABAP interactive report
Classical ABAP interactive report
 
Classical report
Classical reportClassical report
Classical report
 
Forecasting Presentation
Forecasting PresentationForecasting Presentation
Forecasting Presentation
 
Alv interactive ABAPreport
Alv interactive ABAPreportAlv interactive ABAPreport
Alv interactive ABAPreport
 
Sap abap report program
Sap abap report programSap abap report program
Sap abap report program
 

Recently uploaded

Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 

Recently uploaded (20)

YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 

Call transaction method of BDC

  • 1. REPORT ZBDC_003 NO STANDARD PAGE HEADING LINE-SIZE 255. TYPES: BEGIN OF TAB, PERNR TYPE ZTAB_001-PERNR, ENAME TYPE ZTAB_001-ENAME, CITY TYPE ZTAB_001-CITY, END OF TAB. DATA: IT_TAB TYPE TABLE OF TAB, WA_TAB TYPE TAB, D_FILE TYPE STRING, BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE, MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE. PARAMETERS: P_FILE TYPE IBIPPARMS-PATH OBLIGATORY. AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE. CALL FUNCTION 'F4_FILENAME' IMPORTING FILE_NAME = P_FILE. D_FILE = P_FILE. CALL FUNCTION 'GUI_UPLOAD' EXPORTING FILENAME FILETYPE = D_FILE = 'ASC' HAS_FIELD_SEPARATOR * HEADER_LENGTH = 'X' =0
  • 2. * READ_BY_LINE = 'X' * DAT_MODE ='' * CODEPAGE ='' * IGNORE_CERR = ABAP_TRUE * REPLACEMENT = '#' * CHECK_BOM ='' * VIRUS_SCAN_PROFILE = * NO_AUTH_CHECK ='' * IMPORTING * FILELENGTH * HEADER = = TABLES DATA_TAB = IT_TAB EXCEPTIONS FILE_OPEN_ERROR =1 FILE_READ_ERROR =2 NO_BATCH =3 GUI_REFUSE_FILETRANSFER INVALID_TYPE =4 =5 NO_AUTHORITY =6 UNKNOWN_ERROR =7 BAD_DATA_FORMAT =8 HEADER_NOT_ALLOWED =9 SEPARATOR_NOT_ALLOWED HEADER_TOO_LONG = 10 = 11
  • 3. UNKNOWN_DP_ERROR = 12 ACCESS_DENIED = 13 DP_OUT_OF_MEMORY DISK_FULL = 15 DP_TIMEOUT OTHERS = 14 = 16 = 17 . IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. START-OF-SELECTION. *perform open_group. * LOOP AT IT_TAB INTO WA_TAB. PERFORM BDC_DYNPRO USING 'SAPMSVMA' '0100'. PERFORM BDC_FIELD USING 'BDC_CURSOR' 'VIEWNAME'. PERFORM BDC_FIELD USING 'BDC_OKCODE' '=UPD'. PERFORM BDC_FIELD USING 'VIEWNAME' 'ZTAB_001'. PERFORM BDC_FIELD USING 'VIMDYNFLDS-LTD_DTA_NO' 'X'. PERFORM BDC_DYNPRO USING 'SAPLZTAB_001' '0100'. PERFORM BDC_FIELD USING 'BDC_CURSOR' 'ZTAB_001-PERNR(01)'. PERFORM BDC_FIELD USING 'BDC_OKCODE'’=ANZG'. PERFORM BDC_DYNPRO USING 'SAPLZTAB_001' '0100'.
  • 4. PERFORM BDC_FIELD USING 'BDC_CURSOR' 'ZTAB_001-PERNR(01)'. PERFORM BDC_FIELD USING 'BDC_OKCODE' '=AEND'. PERFORM BDC_DYNPRO USING 'SAPLZTAB_001' '0100'. PERFORM BDC_FIELD USING 'BDC_CURSOR' 'ZTAB_001-PERNR(01)'. PERFORM BDC_FIELD USING 'BDC_OKCODE' '=NEWL'. PERFORM BDC_DYNPRO USING 'SAPLZTAB_001' '0100'. PERFORM BDC_FIELD USING 'BDC_CURSOR' 'ZTAB_001-CITY(01)'. PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'. PERFORM BDC_FIELD USING 'ZTAB_001-PERNR(01)' WA_TAB-PERNR. PERFORM BDC_FIELD USING 'ZTAB_001-ENAME(01)' WA_TAB-ENAME. PERFORM BDC_FIELD USING 'ZTAB_001-CITY(01)' WA_TAB-CITY. PERFORM BDC_DYNPRO PERFORM BDC_FIELD USING 'SAPLZTAB_001' '0100'. USING 'BDC_CURSOR' 'ZTAB_001-PERNR(02)'. PERFORM BDC_FIELD USING 'BDC_OKCODE' '=BACK'. PERFORM BDC_DYNPRO PERFORM BDC_FIELD USING 'SAPLZTAB_001' '0100'. USING 'BDC_CURSOR' 'ZTAB_001-PERNR(02)'. PERFORM BDC_FIELD USING 'BDC_OKCODE' '=BACK'. PERFORM BDC_DYNPRO USING 'SAPLSPO1' '0100'.
  • 5. PERFORM BDC_FIELD USING 'BDC_OKCODE' '=YES'. PERFORM BDC_DYNPRO PERFORM BDC_FIELD USING 'SAPMSVMA' '0100'. USING 'BDC_OKCODE' '/EBACK'. PERFORM BDC_FIELD USING 'BDC_CURSOR' 'VIEWNAME'. PERFORM BDC_TRANSACTION USING 'SM30'. CLEAR: BDCDATA, BDCDATA[]. ENDLOOP. *perform close_group. *&---------------------------------------------------------------------* *& Form bdc_dynpro *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_0154 text * -->P_0155 text *----------------------------------------------------------------------* FORM BDC_DYNPRO USING PROGRAM DYNPRO. CLEAR BDCDATA. BDCDATA-PROGRAM = PROGRAM. BDCDATA-DYNPRO = DYNPRO. BDCDATA-DYNBEGIN = 'X'.
  • 6. APPEND BDCDATA. ENDFORM. " bdc_dynpro *&---------------------------------------------------------------------* *& Form bdc_field *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_0304 text * -->P_0305 text *----------------------------------------------------------------------* FORM BDC_FIELD USING FNAM FVAL. * IF FVAL <> NODATA. CLEAR BDCDATA. BDCDATA-FNAM = FNAM. BDCDATA-FVAL = FVAL. APPEND BDCDATA. ENDFORM. " bdc_field *&---------------------------------------------------------------------* *& Form bdc_transaction *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_0309 text
  • 7. *----------------------------------------------------------------------* FORM BDC_TRANSACTION USING TCODE. REFRESH MESSTAB. CALL TRANSACTION TCODE USING BDCDATA MODE 'E'"CTUMODE UPDATE 'S' "CUPDATE MESSAGES INTO MESSTAB. ENDFORM. *include bdcrecx1. " bdc_transaction