SlideShare a Scribd company logo
1 of 10
REPORT ZBDC_004 NO STANDARD PAGE HEADING LINE-SIZE 255.

*INCLUDE BDCRECX1.

TYPES: BEGIN OF T_TAB,
PERNR TYPE ZTAB_001-PERNR,
ENAME TYPE ZTAB_001-ENAME,
CITY TYPE ZTAB_001-CITY,
END OF T_TAB.

DATA: D_FILE TYPE STRING,

BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE,

IT_DATA TYPE TABLE OF T_TAB,
WA_DATA TYPE T_TAB.

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

= 'X'

*

HEADER_LENGTH

=0

*

READ_BY_LINE

*

DAT_MODE

=''

*

CODEPAGE

=''

*

IGNORE_CERR

= ABAP_TRUE

*

REPLACEMENT

= '#'

*

CHECK_BOM

*

VIRUS_SCAN_PROFILE

*

NO_AUTH_CHECK

= 'X'

=''
=
=''

* IMPORTING
*

FILELENGTH

*

HEADER

=
=

TABLES
DATA_TAB

= IT_DATA

EXCEPTIONS
FILE_OPEN_ERROR

=1

FILE_READ_ERROR

=2

NO_BATCH

=3

GUI_REFUSE_FILETRANSFER

=4
INVALID_TYPE

=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
ACCESS_DENIED

= 12
= 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_DATA INTO WA_DATA.

PERFORM BDC_DYNPRO
PERFORM BDC_FIELD

USING 'SAPMSVMA' '0100'.
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
PERFORM BDC_FIELD

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

'ZTAB_001-PERNR(01)'.
PERFORM BDC_FIELD

USING 'BDC_OKCODE'

'=NEWL'.
PERFORM BDC_DYNPRO
PERFORM BDC_FIELD

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

'ZTAB_001-CITY(01)'.
PERFORM BDC_FIELD

USING 'BDC_OKCODE'

'=SAVE'.
PERFORM BDC_FIELD

USING 'ZTAB_001-PERNR(01)'

WA_DATA-PERNR.
PERFORM BDC_FIELD

USING 'ZTAB_001-ENAME(01)'

WA_DATA-ENAME.
PERFORM BDC_FIELD

USING 'ZTAB_001-CITY(01)'

WA_DATA-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
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 OPEN_GROUP

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

text

*----------------------------------------------------------------------*
* --> p1

text
* <-- p2

text

*----------------------------------------------------------------------*
FORM OPEN_GROUP .

CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT
* DEST

= SY-MANDT
= FILLER8

GROUP

= 'MAYUR'

HOLDDATE

= SY-DATUM

KEEP

= 'X'

USER

= SY-UNAME

* RECORD

= FILLER1

* PROG

= SY-CPROG

* DCPFM

= '%'

* DATFM

= '%'

* IMPORTING
* QID

=

EXCEPTIONS
CLIENT_INVALID

=1

DESTINATION_INVALID
GROUP_INVALID

=2
=3

GROUP_IS_LOCKED

=4

HOLDDATE_INVALID

=5

INTERNAL_ERROR

=6
QUEUE_ERROR
RUNNING

=7
=8

SYSTEM_LOCK_ERROR
USER_INVALID
OTHERS

=9

= 10
= 11.

IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM.

" OPEN_GROUP

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

Form BDC_DYNPRO

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

text

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

-->P_0167 text

*

-->P_0168 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_0172 text

*

-->P_0173 text

*----------------------------------------------------------------------*
FORM BDC_FIELD USING FNAM FVAL.

CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.

ENDFORM.

" BDC_FIELD

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

Form BDC_TRANSACTION

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

text

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

-->P_0282 text

*----------------------------------------------------------------------*
FORM BDC_TRANSACTION USING TCODE.

CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE

= TCODE

*

POST_LOCAL

= NOVBLOCAL

*

PRINTING

*

SIMUBATCH

=''

*

CTUPARAMS

=''

= NOPRINT

TABLES
DYNPROTAB

= BDCDATA

EXCEPTIONS
INTERNAL_ERROR
NOT_OPEN

=1
=2

QUEUE_ERROR

=3

TCODE_INVALID

=4

PRINTING_INVALID

=5

POSTING_INVALID

=6

OTHERS

= 7.

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

" BDC_TRANSACTION

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

Form CLOSE_GROUP

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

text

*----------------------------------------------------------------------*
* --> p1

text

* <-- p2

text

*----------------------------------------------------------------------*
FORM CLOSE_GROUP .

CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS

= 3.

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

ENDFORM.

" CLOSE_GROUP

More Related Content

Viewers also liked

Excelを使って学ぶ、統計の基礎 先生:米谷 学
Excelを使って学ぶ、統計の基礎 先生:米谷 学Excelを使って学ぶ、統計の基礎 先生:米谷 学
Excelを使って学ぶ、統計の基礎 先生:米谷 学schoowebcampus
 
Conversion of Jatropha Curcas Oil into BioDiesel
Conversion of Jatropha Curcas Oil into BioDiesel Conversion of Jatropha Curcas Oil into BioDiesel
Conversion of Jatropha Curcas Oil into BioDiesel ZX7
 
Internal components non tchnical
Internal components non tchnicalInternal components non tchnical
Internal components non tchnicalharrison96
 
iPads in the Common Core Classroom
iPads in the Common Core ClassroomiPads in the Common Core Classroom
iPads in the Common Core ClassroomKdeethomas1
 
Wishpond 取締役が語る!グローバルキャリア、チャンスの掴み方 〜 新卒の僕がカナダIT企業のCOOになったワケ 先生:赤津慧先生
Wishpond 取締役が語る!グローバルキャリア、チャンスの掴み方 〜 新卒の僕がカナダIT企業のCOOになったワケ 先生:赤津慧先生Wishpond 取締役が語る!グローバルキャリア、チャンスの掴み方 〜 新卒の僕がカナダIT企業のCOOになったワケ 先生:赤津慧先生
Wishpond 取締役が語る!グローバルキャリア、チャンスの掴み方 〜 新卒の僕がカナダIT企業のCOOになったワケ 先生:赤津慧先生schoowebcampus
 
모션 중간 과제
모션 중간 과제모션 중간 과제
모션 중간 과제zzangokgi
 
Elps 429 marquette project
Elps 429 marquette projectElps 429 marquette project
Elps 429 marquette projectkodegard
 
Food and drink
Food and drinkFood and drink
Food and drinkchris1885
 
Cristiano zarecki stone age achievement
Cristiano zarecki stone age achievementCristiano zarecki stone age achievement
Cristiano zarecki stone age achievementSephin99
 
Costs Analysis and Toxicity of Jatropha Curcas Oil on the Maize Weevil Pest
Costs Analysis and Toxicity of Jatropha Curcas Oil on the Maize Weevil PestCosts Analysis and Toxicity of Jatropha Curcas Oil on the Maize Weevil Pest
Costs Analysis and Toxicity of Jatropha Curcas Oil on the Maize Weevil PestZX7
 
Silos et usines de stockage (French)
Silos et usines de stockage (French)Silos et usines de stockage (French)
Silos et usines de stockage (French)Silos Cordoba
 
Decimal powerpoint presentation(1)
Decimal powerpoint presentation(1)Decimal powerpoint presentation(1)
Decimal powerpoint presentation(1)g2desai
 
Presentation1
Presentation1Presentation1
Presentation1btfreda
 
June Newsletter
June NewsletterJune Newsletter
June Newslettermjcunny
 
IE Brochure-General_May2016
IE Brochure-General_May2016IE Brochure-General_May2016
IE Brochure-General_May2016Thomas Garvin
 

Viewers also liked (18)

Global hr
Global hrGlobal hr
Global hr
 
Ejerciciogoogledocumentovanessacastillo
EjerciciogoogledocumentovanessacastilloEjerciciogoogledocumentovanessacastillo
Ejerciciogoogledocumentovanessacastillo
 
Excelを使って学ぶ、統計の基礎 先生:米谷 学
Excelを使って学ぶ、統計の基礎 先生:米谷 学Excelを使って学ぶ、統計の基礎 先生:米谷 学
Excelを使って学ぶ、統計の基礎 先生:米谷 学
 
Conversion of Jatropha Curcas Oil into BioDiesel
Conversion of Jatropha Curcas Oil into BioDiesel Conversion of Jatropha Curcas Oil into BioDiesel
Conversion of Jatropha Curcas Oil into BioDiesel
 
Internal components non tchnical
Internal components non tchnicalInternal components non tchnical
Internal components non tchnical
 
iPads in the Common Core Classroom
iPads in the Common Core ClassroomiPads in the Common Core Classroom
iPads in the Common Core Classroom
 
Wishpond 取締役が語る!グローバルキャリア、チャンスの掴み方 〜 新卒の僕がカナダIT企業のCOOになったワケ 先生:赤津慧先生
Wishpond 取締役が語る!グローバルキャリア、チャンスの掴み方 〜 新卒の僕がカナダIT企業のCOOになったワケ 先生:赤津慧先生Wishpond 取締役が語る!グローバルキャリア、チャンスの掴み方 〜 新卒の僕がカナダIT企業のCOOになったワケ 先生:赤津慧先生
Wishpond 取締役が語る!グローバルキャリア、チャンスの掴み方 〜 新卒の僕がカナダIT企業のCOOになったワケ 先生:赤津慧先生
 
모션 중간 과제
모션 중간 과제모션 중간 과제
모션 중간 과제
 
Informatica david.r
Informatica david.rInformatica david.r
Informatica david.r
 
Elps 429 marquette project
Elps 429 marquette projectElps 429 marquette project
Elps 429 marquette project
 
Food and drink
Food and drinkFood and drink
Food and drink
 
Cristiano zarecki stone age achievement
Cristiano zarecki stone age achievementCristiano zarecki stone age achievement
Cristiano zarecki stone age achievement
 
Costs Analysis and Toxicity of Jatropha Curcas Oil on the Maize Weevil Pest
Costs Analysis and Toxicity of Jatropha Curcas Oil on the Maize Weevil PestCosts Analysis and Toxicity of Jatropha Curcas Oil on the Maize Weevil Pest
Costs Analysis and Toxicity of Jatropha Curcas Oil on the Maize Weevil Pest
 
Silos et usines de stockage (French)
Silos et usines de stockage (French)Silos et usines de stockage (French)
Silos et usines de stockage (French)
 
Decimal powerpoint presentation(1)
Decimal powerpoint presentation(1)Decimal powerpoint presentation(1)
Decimal powerpoint presentation(1)
 
Presentation1
Presentation1Presentation1
Presentation1
 
June Newsletter
June NewsletterJune Newsletter
June Newsletter
 
IE Brochure-General_May2016
IE Brochure-General_May2016IE Brochure-General_May2016
IE Brochure-General_May2016
 

Similar to ZBDC_004 report

Call transaction method of BDC
Call transaction method of BDCCall transaction method of BDC
Call transaction method of BDCRavi Kanudawala
 
Alvedit programs
Alvedit programsAlvedit programs
Alvedit programsmcclintick
 
Open SQL & Internal Table
Open SQL & Internal TableOpen SQL & Internal Table
Open SQL & Internal Tablesapdocs. info
 
03 abap3-090715081232-phpapp01
03 abap3-090715081232-phpapp0103 abap3-090715081232-phpapp01
03 abap3-090715081232-phpapp01wingsrai
 
03 abap3-090715081232-phpapp01-100511101016-phpapp02
03 abap3-090715081232-phpapp01-100511101016-phpapp0203 abap3-090715081232-phpapp01-100511101016-phpapp02
03 abap3-090715081232-phpapp01-100511101016-phpapp02tabish
 
M|18 Understanding the Query Optimizer
M|18 Understanding the Query OptimizerM|18 Understanding the Query Optimizer
M|18 Understanding the Query OptimizerMariaDB plc
 
OpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersOpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersConnor McDonald
 
Most important "trick" of performance instrumentation
Most important "trick" of performance instrumentationMost important "trick" of performance instrumentation
Most important "trick" of performance instrumentationCary Millsap
 
Advanced MySQL Query Tuning
Advanced MySQL Query TuningAdvanced MySQL Query Tuning
Advanced MySQL Query TuningAlexander Rubin
 
Efficient Pagination Using MySQL
Efficient Pagination Using MySQLEfficient Pagination Using MySQL
Efficient Pagination Using MySQLSurat Singh Bhati
 
Please follow the cod eand comments for description CODE #incl.pdf
Please follow the cod eand comments for description CODE #incl.pdfPlease follow the cod eand comments for description CODE #incl.pdf
Please follow the cod eand comments for description CODE #incl.pdfannaielectronicsvill
 
Covering indexes
Covering indexesCovering indexes
Covering indexesMYXPLAIN
 

Similar to ZBDC_004 report (20)

Call transaction method of BDC
Call transaction method of BDCCall transaction method of BDC
Call transaction method of BDC
 
Zmalv output type_v1.1
Zmalv output type_v1.1Zmalv output type_v1.1
Zmalv output type_v1.1
 
ZFINDALLZPROGAM
ZFINDALLZPROGAMZFINDALLZPROGAM
ZFINDALLZPROGAM
 
Alvedit programs
Alvedit programsAlvedit programs
Alvedit programs
 
Sql queries
Sql queriesSql queries
Sql queries
 
Data Purge Algorithm
Data Purge AlgorithmData Purge Algorithm
Data Purge Algorithm
 
Report zalv
Report  zalvReport  zalv
Report zalv
 
Alv Block
Alv BlockAlv Block
Alv Block
 
Open SQL & Internal Table
Open SQL & Internal TableOpen SQL & Internal Table
Open SQL & Internal Table
 
03 abap3-090715081232-phpapp01
03 abap3-090715081232-phpapp0103 abap3-090715081232-phpapp01
03 abap3-090715081232-phpapp01
 
03 abap3-090715081232-phpapp01-100511101016-phpapp02
03 abap3-090715081232-phpapp01-100511101016-phpapp0203 abap3-090715081232-phpapp01-100511101016-phpapp02
03 abap3-090715081232-phpapp01-100511101016-phpapp02
 
M|18 Understanding the Query Optimizer
M|18 Understanding the Query OptimizerM|18 Understanding the Query Optimizer
M|18 Understanding the Query Optimizer
 
OpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersOpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developers
 
Zmd Constant
Zmd ConstantZmd Constant
Zmd Constant
 
Most important "trick" of performance instrumentation
Most important "trick" of performance instrumentationMost important "trick" of performance instrumentation
Most important "trick" of performance instrumentation
 
ABAP Advanced List
ABAP Advanced ListABAP Advanced List
ABAP Advanced List
 
Advanced MySQL Query Tuning
Advanced MySQL Query TuningAdvanced MySQL Query Tuning
Advanced MySQL Query Tuning
 
Efficient Pagination Using MySQL
Efficient Pagination Using MySQLEfficient Pagination Using MySQL
Efficient Pagination Using MySQL
 
Please follow the cod eand comments for description CODE #incl.pdf
Please follow the cod eand comments for description CODE #incl.pdfPlease follow the cod eand comments for description CODE #incl.pdf
Please follow the cod eand comments for description CODE #incl.pdf
 
Covering indexes
Covering indexesCovering indexes
Covering indexes
 

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

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 

Recently uploaded (20)

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 

ZBDC_004 report

  • 1. REPORT ZBDC_004 NO STANDARD PAGE HEADING LINE-SIZE 255. *INCLUDE BDCRECX1. TYPES: BEGIN OF T_TAB, PERNR TYPE ZTAB_001-PERNR, ENAME TYPE ZTAB_001-ENAME, CITY TYPE ZTAB_001-CITY, END OF T_TAB. DATA: D_FILE TYPE STRING, BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE, MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE, IT_DATA TYPE TABLE OF T_TAB, WA_DATA TYPE T_TAB. 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.
  • 2. CALL FUNCTION 'GUI_UPLOAD' EXPORTING FILENAME FILETYPE = D_FILE = 'ASC' HAS_FIELD_SEPARATOR = 'X' * HEADER_LENGTH =0 * READ_BY_LINE * DAT_MODE ='' * CODEPAGE ='' * IGNORE_CERR = ABAP_TRUE * REPLACEMENT = '#' * CHECK_BOM * VIRUS_SCAN_PROFILE * NO_AUTH_CHECK = 'X' ='' = ='' * IMPORTING * FILELENGTH * HEADER = = TABLES DATA_TAB = IT_DATA EXCEPTIONS FILE_OPEN_ERROR =1 FILE_READ_ERROR =2 NO_BATCH =3 GUI_REFUSE_FILETRANSFER =4
  • 3. INVALID_TYPE =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 ACCESS_DENIED = 12 = 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_DATA INTO WA_DATA. PERFORM BDC_DYNPRO PERFORM BDC_FIELD USING 'SAPMSVMA' '0100'. USING 'BDC_CURSOR'
  • 4. '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 PERFORM BDC_FIELD USING 'SAPLZTAB_001' '0100'. USING 'BDC_CURSOR' 'ZTAB_001-PERNR(01)'. PERFORM BDC_FIELD USING 'BDC_OKCODE' '=NEWL'. PERFORM BDC_DYNPRO PERFORM BDC_FIELD USING 'SAPLZTAB_001' '0100'. USING 'BDC_CURSOR' 'ZTAB_001-CITY(01)'. PERFORM BDC_FIELD USING 'BDC_OKCODE' '=SAVE'. PERFORM BDC_FIELD USING 'ZTAB_001-PERNR(01)' WA_DATA-PERNR. PERFORM BDC_FIELD USING 'ZTAB_001-ENAME(01)' WA_DATA-ENAME. PERFORM BDC_FIELD USING 'ZTAB_001-CITY(01)' WA_DATA-CITY. PERFORM BDC_DYNPRO PERFORM BDC_FIELD USING 'SAPLZTAB_001' '0100'. USING 'BDC_CURSOR'
  • 5. '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 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 OPEN_GROUP *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text
  • 6. * <-- p2 text *----------------------------------------------------------------------* FORM OPEN_GROUP . CALL FUNCTION 'BDC_OPEN_GROUP' EXPORTING CLIENT * DEST = SY-MANDT = FILLER8 GROUP = 'MAYUR' HOLDDATE = SY-DATUM KEEP = 'X' USER = SY-UNAME * RECORD = FILLER1 * PROG = SY-CPROG * DCPFM = '%' * DATFM = '%' * IMPORTING * QID = EXCEPTIONS CLIENT_INVALID =1 DESTINATION_INVALID GROUP_INVALID =2 =3 GROUP_IS_LOCKED =4 HOLDDATE_INVALID =5 INTERNAL_ERROR =6
  • 7. QUEUE_ERROR RUNNING =7 =8 SYSTEM_LOCK_ERROR USER_INVALID OTHERS =9 = 10 = 11. IF SY-SUBRC <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. ENDFORM. " OPEN_GROUP *&---------------------------------------------------------------------* *& Form BDC_DYNPRO *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_0167 text * -->P_0168 text *----------------------------------------------------------------------* FORM BDC_DYNPRO USING PROGRAM DYNPRO. CLEAR BDCDATA. BDCDATA-PROGRAM = PROGRAM. BDCDATA-DYNPRO = DYNPRO.
  • 8. BDCDATA-DYNBEGIN = 'X'. APPEND BDCDATA. ENDFORM. " BDC_DYNPRO *&---------------------------------------------------------------------* *& Form BDC_FIELD *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_0172 text * -->P_0173 text *----------------------------------------------------------------------* FORM BDC_FIELD USING FNAM FVAL. CLEAR BDCDATA. BDCDATA-FNAM = FNAM. BDCDATA-FVAL = FVAL. APPEND BDCDATA. ENDFORM. " BDC_FIELD *&---------------------------------------------------------------------* *& Form BDC_TRANSACTION *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------*
  • 9. * -->P_0282 text *----------------------------------------------------------------------* FORM BDC_TRANSACTION USING TCODE. CALL FUNCTION 'BDC_INSERT' EXPORTING TCODE = TCODE * POST_LOCAL = NOVBLOCAL * PRINTING * SIMUBATCH ='' * CTUPARAMS ='' = NOPRINT TABLES DYNPROTAB = BDCDATA EXCEPTIONS INTERNAL_ERROR NOT_OPEN =1 =2 QUEUE_ERROR =3 TCODE_INVALID =4 PRINTING_INVALID =5 POSTING_INVALID =6 OTHERS = 7. IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.
  • 10. ENDFORM. " BDC_TRANSACTION *&---------------------------------------------------------------------* *& Form CLOSE_GROUP *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM CLOSE_GROUP . CALL FUNCTION 'BDC_CLOSE_GROUP' EXCEPTIONS NOT_OPEN = 1 QUEUE_ERROR = 2 OTHERS = 3. IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. ENDFORM. " CLOSE_GROUP