You are on page 1of 5

*&---------------------------------------------------------------------* *& Report ZMM_VENDOR_MAST_EXP *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT ZMM_VENDOR_MAST_EXP no standard page heading line-size

255. include bdcrecx1. data: begin of record occurs 0, * data element: LIF16 LIFNR_001(016), * data element: BUKRS BUKRS_002(004), * data element: EKORG EKORG_003(004), * data element: KTOKK KTOKK_004(004), * data element: ANRED ANRED_005(015), * data element: NAME1_GP NAME1_006(035), * data element: SORTL SORTL_007(010), * data element: NAME2_GP NAME2_008(035), * data element: NAME3_GP NAME3_009(035), * data element: NAME4_GP NAME4_010(035), * data element: STRAS_GP STRAS_011(035), * data element: PFACH PFACH_012(010), * data element: ORT01_GP ORT01_013(035), * data element: ORT02_GP ORT02_014(035), * data element: PFORT_GP PFORT_015(035), * data element: LAND1_GP PSTL2_035(010), LAND1_016(003), * data element: REGIO REGIO(002), * data element: SPRAS SPRAS_017(002), * data element: TELF1 TELF1_018(016), * data element: TELFX TELFX_019(031), * data element: URL LFURL_020(132), ** data element: J_1ICSTNO * J_1ICSTNO_021(040), ** data element: J_1ILSTNO * J_1ILSTNO_022(040),

** data element: J_1IEXCD * J_1IEXCD_023(040), ** data element: J_1IEXRG * J_1IEXRG_024(060), ** data element: J_1IEXDI * J_1IEXDI_025(060), ** data element: J_1IPANNO * J_1IPANNO_026(040), ** data element: J_1IPANNO * J_1IPANNO_027(040), * data element: AKONT AKONT_028(010), FDGRV_040(002), * data element: BSTWA WAERS_029(005), * data element: DZTERM ZTERM_030(004), * data element: INCO1 INCO1_031(003), * data element: INCO2 INCO2_032(028), * data element: KALSK KALSK_033(002), * data element: WEBRE * WEBRE_034(001), end of record. *** End generated data section *** SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001. PARAMETERS: P_FNAME1 TYPE RLGRAP-FILENAME. *PARAMETERS: P_FNAME2 TYPE RLGRAP-FILENAME. *PARAMETERS: P_DISPM TYPE CTU_MODE. SELECTION-SCREEN END OF BLOCK BLK1. *DATA: BDCDATA TYPE TABLE OF BDCDATA. *DATA: IT_MESSTAB TYPE STANDARD TABLE OF BDCMSGCOLL, * WA_OPT TYPE CTU_PARAMS, * WA_BDCDATA TYPE BDCDATA, * WA_BDCMSGCOLL TYPE BDCMSGCOLL, * W_FNAME TYPE STRING, * W_NODATA TYPE C. DATA : FILE TYPE STRING. AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME1. CALL FUNCTION 'F4_FILENAME' EXPORTING PROGRAM_NAME = SYST-CPROG DYNPRO_NUMBER = SYST-DYNNR * FIELD_NAME = ' ' IMPORTING FILE_NAME = P_FNAME1. start-of-selection. file = p_fname1. CALL FUNCTION 'GUI_UPLOAD' EXPORTING FILENAME = FILE FILETYPE = 'DAT' * HAS_FIELD_SEPARATOR = ' ' * HEADER_LENGTH = 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 = RECORD * 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 = 10 * HEADER_TOO_LONG = 11 * UNKNOWN_DP_ERROR = 12 * ACCESS_DENIED = 13 * DP_OUT_OF_MEMORY = 14 * DISK_FULL = 15 * DP_TIMEOUT = 16 * OTHERS = 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 LOOP AT perform perform open_group. RECORD. bdc_dynpro bdc_field

perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_dynpro perform bdc_field perform bdc_field perform bdc_field perform bdc_field

using 'SAPMF02K' '0100'. using 'BDC_CURSOR' 'RF02K-KTOKK'. using 'BDC_OKCODE' '/00'. using 'RF02K-LIFNR' record-LIFNR_001." '100087'. using 'RF02K-BUKRS' record-BUKRS_002."'lptl'. using 'RF02K-EKORG' record-EKORG_003."'PU01'. using 'RF02K-KTOKK' record-KTOKK_004." 'DOMR'. using 'SAPMF02K' '0110'. using 'BDC_CURSOR' 'LFA1-SPRAS'. using 'BDC_OKCODE' '/00'. using 'LFA1-ANRED' record-ANRED_005."'Mr'. using 'LFA1-NAME1'

perform bdc_field perform bdc_field perform bdc_field BAR'. perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_dynpro perform bdc_field perform bdc_field perform bdc_field perform bdc_dynpro perform bdc_field perform bdc_field perform bdc_dynpro perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_dynpro perform bdc_field perform bdc_field

record-NAME1_006."'DELTA AUTOMATION'. using 'LFA1-SORTL' record-SORTL_007." 'DGMDEA061'. using 'LFA1-NAME2' record-NAME2_008." 'EPITOME COMPONENTS LTD-ex'. using 'LFA1-NAME3' record-NAME3_009."'958,INDUSTRIAL AREA-II RAM DAR using 'LFA1-NAME4' record-NAME4_010." 'NULL'. using 'LFA1-STRAS' record-STRAS_011."'CHANDIGARH'. using 'LFA1-PFACH' record-PFACH_012." '173205'. using 'LFA1-ORT01' record-ORT01_013."'PATIALA'. using 'LFA1-ORT02' record-ORT02_014." 'CHANDIGARH'. using 'LFA1-PFORT' record-PFORT_015."'173205'. using 'LFA1-PSTL2' record-PSTL2_035."'173205'. using 'LFA1-LAND1' record-LAND1_016." 'in'. using 'LFA1-REGIO' record-REGIO."'19'. using 'LFA1-SPRAS' record-SPRAS_017."'en'. using 'LFA1-TELF1' record-TELF1_018. using 'LFA1-TELFX' record-TELFX_019. using 'LFA1-LFURL' record-LFURL_020. using 'SAPMF02K' '0120'. using 'BDC_CURSOR' 'LFA1-KUNNR'. using 'BDC_OKCODE' '/00'. using 'LFA1-KUNNR' ''. using 'SAPMF02K' '0130'. using 'BDC_CURSOR' 'LFBK-BANKS(01)'. using 'BDC_OKCODE' '=ENTR'. using 'SAPMF02K' '0210'. using 'BDC_CURSOR' 'LFB1-AKONT'. using 'BDC_OKCODE' '/00'. using 'LFB1-AKONT' record-AKONT_028."'16128541'. using 'LFB1-FDGRV' record-FDGRV_040. "A1'. using 'SAPMF02K' '0215'. using 'BDC_CURSOR' 'LFB1-ZTERM'. using 'BDC_OKCODE'

*perform bdc_dynpro *perform bdc_field * *perform bdc_field * perform bdc_dynpro perform bdc_field perform bdc_field perform bdc_dynpro perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field * 'X'. perform bdc_dynpro perform bdc_field

'/00'. using 'SAPMF02K' '0220'. using 'BDC_CURSOR' 'LFB5-MAHNA'. using 'BDC_OKCODE' '/00'. using 'SAPMF02K' '0610'. using 'BDC_OKCODE' '/00'. using 'BDC_CURSOR' 'LFB1-QLAND'. using 'SAPMF02K' '0310'. using 'BDC_CURSOR' 'LFM1-WEBRE'. using 'BDC_OKCODE' '/00'. using 'LFM1-WAERS' record-WAERS_029." 'inr'. using 'LFM1-ZTERM' record-ZTERM_030."'pt90'. using 'LFM1-INCO1' record-INCO1_031." 'EXW'. using 'LFM1-INCO2' record-INCO2_032." 'New Delhi'. using 'LFM1-KALSK' record-KALSK_033." 'ZD'. using 'LFM1-WEBRE' record-WEBRE_034.

using 'SAPMF02K' '0320'. using 'BDC_CURSOR' 'RF02K-LIFNR'. perform bdc_field using 'BDC_OKCODE' '=ENTR'. perform bdc_transaction using 'XK01'. ENDLOOP. perform close_group.