Sample Bdc Program Using Call Transaction
Posted by admin- in Home -09/11/17var q samplebdcprogramusingcalltransactionSAPTECHNICAL. COM Lets share knowledge. Please send us your feedbacksuggestions at webmasterSAPTechnical. COM. When i use CATT to transfer material master data to the SAP system,the result show that S00348 Field MARAMFRPN. input value is longer than screen. The U. S. Green Building Council USGBC is transforming the way we design, build, maintain and operate our buildings, homes and communities. REPORT zbdccalltransactionmm01 NO STANDARD PAGE HEADING LINESIZE 255. TABLESmara. TYPESBEGIN OF tymara, matnr LIKE maramatnr, mbrsh LIKE marambrsh, mtart LIKE. Among beginners, using table control in BDC is always a puzzle. Following is a sample code of handling table control in BDC. REPORT Y730BDC5. Hi, I am using BDC for T code IE02 for Partner assignment Functional location assignment. I searched a lot for BAPI but none of them gave results as expected. So. Code Gallery. Registration. Dear SAP Community Member,In order to fully benefit from what the SAP Community has to offer, please register at http scn. Thank you,The SAP Community team. Skip to end of metadata. Go to start of metadata. REPORT zbdctest. NO STANDARD PAGE HEADING LINE SIZE 2. INCLUDE bdcrecx. 1. PARAMETERS dataset1. LOWER CASE. DO NOT CHANGE the generated data section DO NOT CHANGE. If it is nessesary to change the data section use the rules. Each definition of a field exists of two lines. The first line shows exactly the comment. If you dont have a data element use the. The second line shows the fieldname of the. Each field must be type C. Generated data section with specific formatting DO NOT CHANGE. DATA BEGIN OF record. VBELNVA. vbeln0. BSTDK. bstdk0. 020. RBAAUART. rbauart0. KETDAT. ketdat0. KPRGBZ. kprgbz0. PRSDT. prsdt0. 060. DZTERM. zterm0. 070. INCO1. inco. 10. INCO2. inco. 20. KWMENG. kwmeng0. BSTDK. bstdk0. 110. RBAAUART. rbauart0. KETDAT. ketdat0. KPRGBZ. kprgbz0. PRSDT. prsdt0. 150. DZTERM. zterm0. 160. INCO1. inco. 10. INCO2. inco. 20. AUDAT. audat0. 190. WAERK. waerk0. 200. PRSDT. prsdt0. 210. KONDA. konda0. 220. BSTDK. bstdk0. 230. RBAAUART. rbauart0. KETDAT. ketdat0. KPRGBZ. kprgbz0. PRSDT. prsdt0. 270. DZTERM. zterm0. 280. INCO1. inco. 10. INCO2. inco. 20. END OF record. End generated data section. START OF SELECTION. PERFORM opendataset USING dataset. PERFORM opengroup. READ DATASET dataset INTO record. IF sy subrc lt 0. EXIT. ENDIF. PERFORM bdcdynpro USING SAPMV4. A 0. 10. 2. PERFORM bdcfield USING BDCCURSOR. VBAK VBELN. PERFORM bdcfield USING BDCOKCODE. PERFORM bdcfield USING VBAK VBELN. PERFORM bdcdynpro USING SAPMV4. A 4. 00. 1. PERFORM bdcfield USING BDCOKCODE. ITEM. PERFORM bdcfield USING VBKD BSTDK. PERFORM bdcfield USING RV4. A RBAUART. record rbauart0. PERFORM bdcfield USING RV4. A KETDAT. record ketdat0. PERFORM bdcfield USING RV4. A KPRGBZ. record kprgbz0. PERFORM bdcfield USING VBKD PRSDT. PERFORM bdcfield USING VBKD ZTERM. PERFORM bdcfield USING VBKD INCO1. PERFORM bdcfield USING VBKD INCO2. PERFORM bdcfield USING BDCCURSOR. VBAP POSNR0. 1. PERFORM bdcdynpro USING SAPMV4. A 4. 00. 3. PERFORM bdcfield USING BDCOKCODE. EBACK. PERFORM bdcfield USING BDCCURSOR. RV4. 5A KWMENG. PERFORM bdcfield USING RV4. A KWMENG. record kwmeng0. PERFORM bdcdynpro USING SAPMV4. A 4. 00. 1. PERFORM bdcfield USING BDCOKCODE. ITEM. PERFORM bdcfield USING BDCCURSOR. VBAK VBELN. PERFORM bdcfield USING VBKD BSTDK. PERFORM bdcfield USING RV4. A RBAUART. record rbauart0. PERFORM bdcfield USING RV4. A KETDAT. record ketdat0. PERFORM bdcfield USING RV4. A KPRGBZ. record kprgbz0. PERFORM bdcfield USING VBKD PRSDT. PERFORM bdcfield USING VBKD ZTERM. PERFORM bdcfield USING VBKD INCO1. PERFORM bdcfield USING VBKD INCO2. PERFORM bdcdynpro USING SAPMV4. A 4. 00. 2. PERFORM bdcfield USING BDCOKCODE. EBACK. PERFORM bdcfield USING BDCCURSOR. VBAK AUDAT. PERFORM bdcfield USING VBAK AUDAT. PERFORM bdcfield USING VBAK WAERK. PERFORM bdcfield USING VBKD PRSDT. PERFORM bdcfield USING VBKD KONDA. PERFORM bdcdynpro USING SAPMV4. A 4. 00. 1. PERFORM bdcfield USING BDCOKCODE. SICH. PERFORM bdcfield USING VBKD BSTDK. PERFORM bdcfield USING RV4. A RBAUART. record rbauart0. PERFORM bdcfield USING RV4. A KETDAT. record ketdat0. PERFORM bdcfield USING RV4. A KPRGBZ. record kprgbz0. PERFORM bdcfield USING VBKD PRSDT. PERFORM bdcfield USING VBKD ZTERM. PERFORM bdcfield USING VBKD INCO1. PERFORM bdcfield USING VBKD INCO2. PERFORM bdcfield USING BDCCURSOR. RV4. 5A MABNR0. PERFORM bdctransaction USING VA0. PERFORM closegroup. PERFORM closedataset USING dataset. INCLUDE BDCRECX1. CALL TRANSACTION USING. SELECTION SCREEN BEGIN OF LINE. PARAMETERS session RADIOBUTTON GROUP ctu. SELECTION SCREEN COMMENT 32. FOR FIELD session. SELECTION SCREEN POSITION 4. PARAMETERS ctu RADIOBUTTON GROUP ctu. SELECTION SCREEN COMMENT 4. FOR FIELD ctu. SELECTION SCREEN END OF LINE. SELECTION SCREEN BEGIN OF LINE. SELECTION SCREEN COMMENT 32. FOR FIELD group. SELECTION SCREEN POSITION 2. PARAMETERS group1. SELECTION SCREEN COMMENT 4. FOR FIELD ctumode. SELECTION SCREEN POSITION 7. PARAMETERS ctumode LIKE ctuparams dismode DEFAULT N. A show all dynpros. E show dynpro on error only. N do not display dynpro. SELECTION SCREEN END OF LINE. SELECTION SCREEN BEGIN OF LINE. SELECTION SCREEN COMMENT 32. FOR FIELD user. SELECTION SCREEN POSITION 2. PARAMETERS user1. DEFAULT sy uname. SELECTION SCREEN COMMENT 4. FOR FIELD cupdate. SELECTION SCREEN POSITION 7. PARAMETERS cupdate LIKE ctuparams updmode DEFAULT L. S synchronously. A asynchronously. SELECTION SCREEN END OF LINE. SELECTION SCREEN BEGIN OF LINE. SELECTION SCREEN COMMENT 32. FOR FIELD keep. SELECTION SCREEN POSITION 2. PARAMETERS keep AS CHECKBOX. X keep session if finished. SELECTION SCREEN COMMENT 4. FOR FIELD egroup. SELECTION SCREEN POSITION 7. PARAMETERS egroup1. SELECTION SCREEN END OF LINE. SELECTION SCREEN BEGIN OF LINE. SELECTION SCREEN COMMENT 32. FOR FIELD holddate. SELECTION SCREEN POSITION 2. PARAMETERS holddate LIKE sy datum. SELECTION SCREEN COMMENT 5. FOR FIELD euser. SELECTION SCREEN POSITION 7. PARAMETERS euser1. DEFAULT sy uname. SELECTION SCREEN END OF LINE. SELECTION SCREEN BEGIN OF LINE. SELECTION SCREEN COMMENT 5. FOR FIELD ekeep. SELECTION SCREEN POSITION 7. PARAMETERS ekeep AS CHECKBOX. X keep session if finished. SELECTION SCREEN END OF LINE. SELECTION SCREEN BEGIN OF LINE. SELECTION SCREEN COMMENT 5. FOR FIELD ehdate. SELECTION SCREEN POSITION 7. PARAMETERS ehdate LIKE sy datum. SELECTION SCREEN END OF LINE. SELECTION SCREEN SKIP. SELECTION SCREEN BEGIN OF LINE. SELECTION SCREEN COMMENT 13. FOR FIELD nodata. PARAMETERS nodata DEFAULT LOWER CASE. SELECTION SCREEN END OF LINE. SELECTION SCREEN BEGIN OF LINE. SELECTION SCREEN COMMENT 13. FOR FIELD smalllog. PARAMETERS smalllog AS CHECKBOX. X no transaction logging. SELECTION SCREEN END OF LINE. Batchinputdata of single transaction. DATA bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE. DATA messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE. X. DATA egroupopened. TABLES t. 10. 0. AT SELECTION SCREEN. IF session X AND. OR user space. MESSAGE e. FORM opendataset USING pdataset. OPEN DATASET pdataset. FOR INPUT IN TEXT MODE. ENCODING DEFAULT. IF sy subrc lt 0. WRITE text e. ENDFORM. opendataset. FORM closedataset USING pdataset. CLOSE DATASET pdataset. ENDFORM. closedataset. FORM opengroup. IF session X. WRITE 2. 0 Create groupi. CALL FUNCTION BDCOPENGROUP. EXPORTING. client sy mandt. WRITE 3. 0 BDCOPENGROUPi. ENDFORM. opengroup. FORM closegroup. IF session X. CALL FUNCTION BDCCLOSEGROUP. WRITE 3. 0 BDCCLOSEGROUPi. IF egroupopened X. CALL FUNCTION BDCCLOSEGROUP. WRITE. WRITE 3. Fehlermappe wurde erzeugti. ENDFORM. closegroup. Start new transaction according to parameters FORM bdctransaction USING tcode. DATA lmstring4. DATA lsubrc LIKE sy subrc. IF session X. CALL FUNCTION BDCINSERT. EXPORTING. tcode tcode. IF smalllog lt X. WRITE BDCINSERTi.