Re:BDC,ALV,SCRIPTS and SMARTFORMS

Hi,
         i need a complete BDC programming example codes with different methods, suppose if it is a material master mm01, i need the screen shots, what to fill in that transaction , the flat file  data snapshot and program, so that i will do that example, otherwise iam so much confused
    I also need ALV ,SAPSCRIPTS and smartforms realtime sample codes with screenshots so tht i will try directly .
   Iam very thankful to all of them who helps me
  Thanks & Regards,
  Sravanthigopal
  [email protected]

** Program ID              :              ZMAT_CREATE
** Program Desc          :              Material Master Creation
** Process Overview    
** Created Date           :               22/08/2006
** Company Name        :              
REPORT ZMAT_CREATE
       NO STANDARD PAGE HEADING LINE-SIZE 132 MESSAGE-ID ZBDCMSG.
       Internal table definition        *
DATA: BEGIN OF ITAB OCCURS 0,
          MATNR LIKE RMMG1-MATNR,                 " Material Number
          MBRSH LIKE RMMG1-MBRSH,                 " Industry Sector
          MTART LIKE RMMG1-MTART,                  " Material Type
          WERKS LIKE RMMG1-WERKS,                  " Plant
          LGORT LIKE RMMG1-LGORT,                  " Storage Location
          VKORG LIKE RMMG1-VKORG,                  " Sales Organization
          VTWEG LIKE RMMG1-VTWEG,                  " Distribution Channel
          LGNUM LIKE RMMG1-LGNUM,                 " Warehouse Number
          LGTYP LIKE RMMG1-LGTYP,                   " Storage Type
          MAKTX LIKE MAKT-MAKTX,                    " Material Description
          MEINS LIKE MARA-MEINS,                      " Base Unit of Measure
         MATKL LIKE MARA-MATKL,                    " Material Group
          SPART LIKE MARA-SPART,                     " Division
          MTPOS_MARA LIKE MARA-MTPOS_MARA,  "General item category group
          GEWEI LIKE MARA-GEWEI,                      " Weight Unit
          TAXKM1 LIKE MG03STEUER-TAXKM,        " Tax classification material
          TAXKM2 LIKE MG03STEUER-TAXKM,        " Tax classification material
          KONDM  LIKE MVKE-KONDM,                  " Material Pricing Group
          MTPOS LIKE MVKE-MTPOS ,                  "ItemCategoryGroupFromMaterialMaster
          MTVFP LIKE MARC-MTVFP,                    " Checking Group for AvailabilityCheck
          TRAGR LIKE MARA-TRAGR,                    " Transportation group
          LADGR LIKE MARC-LADGR,                    " Loading group
          TDLINE LIKE RSTXT-TXLINE,                  " Text editor text line
          EKGRP LIKE MARC-EKGRP,                    " Purchasing Group
          DISMM LIKE MARC-DISMM,                    " MRP Type
          BESKZ LIKE MARC-BESKZ,                     " Procurement Type
          SOBSL LIKE MARC-SOBSL,                    " Special procurement type
          PERKZ LIKE MARC-PERKZ,                     " Period indicator
          PRMOD LIKE MPOP-PRMOD,                  " Forecast model
          KZINI LIKE MPOP-KZINI,                        " Initialization indicator
          AUTRU LIKE MARC-AUTRU,                    " Reset Forecast Model Automatically
          MODAV LIKE MPOP-MODAV,                   " Model selection procedure
          IPRKZ LIKE MARA-IPRKZ,                   " Period indicator for shelf life expiration date
          BWTTY LIKE MBEW-BWTTY,                    " Valuation Category
          BKLAS LIKE MBEW-BKLAS,                     " Valuation Class
          EKLAS LIKE MBEW-EKLAS,                      " Valuation Class for Sales OrderStock
          VPRSV LIKE MBEW-VPRSV,                     " Price Control Indicator
          EKALR LIKE MBEW-EKALR,                      "MaterialIsCostedWithQuantityStructure
       END OF ITAB,
*// TEXT HEADER
       GT_HEAD LIKE THEAD,
*//  Text lines
       GT_TEXT  LIKE  STANDARD TABLE OF TLINE,
       GW_TEXT LIKE TLINE,
       Data definition        *
        WS_REP_CNT(6) TYPE C,
        SESSION(12) TYPE C.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
PARAMETERS:
            PA_GROUP LIKE  APQI-GROUPID OBLIGATORY DEFAULT 'MMupload',
            PA_FNAME LIKE IBIPPARMS-PATH OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
       Include statements        *
INCLUDE ZBDCREX.
     At Selection Screen definition      *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_FNAME.
*//GETTING FLAT FILE PATH
  PERFORM FILE_PATH USING PA_FNAME.
     Start of Selection definition      *
START-OF-SELECTION.
*//UPLOADING THE FLAT FILE
  PERFORM DATA_UPLOAD TABLES ITAB USING PA_FNAME.
*// BDC OPEN GROUP
  PERFORM OPEN_GROUP USING PA_GROUP.
  SKIP 3.
  FORMAT COLOR COL_HEADING INVERSE ON.
    WRITE 40 TEXT-001.
  FORMAT COLOR COL_HEADING INVERSE OFF.
  SKIP 1.
  FORMAT COLOR COL_NEGATIVE INVERSE ON.
    WRITE :/3 TEXT-002, 13 SY-MANDT, 104 TEXT-003, 113 SY-UNAME,
              /3 TEXT-004, 13 SY-DATUM, 104 TEXT-005, 113 SY-UZEIT.
  FORMAT COLOR COL_NEGATIVE INVERSE OFF.
  LOOP AT ITAB.
    WS_REP_CNT = WS_REP_CNT + 1.   "To Count no. of Records Processed
    PERFORM MM_UPLOAD.
  ENDLOOP.
*//STATUS INDICATION
  IF SY-SUBRC = 0.
    SESSION = PA_GROUP.
    SKIP 1.
    FORMAT COLOR COL_TOTAL INVERSE ON.
      WRITE: /38 TEXT-006 , WS_REP_CNT.
    FORMAT COLOR COL_TOTAL INVERSE OFF.
    MESSAGE S000 WITH SESSION.
  ENDIF.
*// BDC CLOSE GROUP
  PERFORM CLOSE_GROUP.
SET PF-STATUS 'ZMM01PF'.
AT USER-COMMAND.
  CASE SY-UCOMM.
    WHEN 'SESSION'.
      CALL TRANSACTION 'SM35'.
    WHEN 'EXIT'.
      LEAVE PROGRAM.
    WHEN 'CANCEL'.
      LEAVE SCREEN.
  ENDCASE .
     FORM MM_UPLOAD      *
FORM MM_UPLOAD.
  REFRESH BDCDATA.
*// Create Material: Initial Screen
  perform bdc_dynpro      using 'SAPLMGMM' '0060'.
  perform bdc_field       using 'BDC_CURSOR'
                                'RMMG1-MATNR'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=ENTR'.
  perform bdc_field       using 'RMMG1-MATNR'
                                ITAB-MATNR.
  perform bdc_field       using 'RMMG1-MBRSH'
                                ITAB-MBRSH.
  perform bdc_field       using 'RMMG1-MTART'
                                ITAB-MTART.
*// Selection Views
  perform bdc_dynpro      using 'SAPLMGMM' '0070'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MSICHTAUSW-DYTXT(01)'.
  perform bdc_field       using 'BDC_OKCODE'
                                'SELA'.
  perform bdc_dynpro      using 'SAPLMGMM' '0070'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MSICHTAUSW-DYTXT(01)'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=ENTR'.
*// Organization Levels
  perform bdc_dynpro      using 'SAPLMGMM' '0080'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=ENTR'.
  perform bdc_field       using 'RMMG1-WERKS'
                                ITAB-WERKS.
  perform bdc_field       using 'RMMG1-LGORT'
                                ITAB-LGORT.
  perform bdc_field       using 'RMMG1-VKORG'
                                ITAB-VKORG.
  perform bdc_field       using 'RMMG1-VTWEG'
                                ITAB-VTWEG.
  perform bdc_field       using 'RMMG1-LGNUM'
                                ITAB-LGNUM.
  perform bdc_field       using 'RMMG1-LGTYP'
                                ITAB-LGTYP.
*// Basic Data 1: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4004'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP04'.
  perform bdc_field       using 'MAKT-MAKTX'
                                ITAB-MAKTX.
  perform bdc_field       using 'MARA-MEINS'
                                ITAB-MEINS.
  perform bdc_field       using 'MARA-SPART'
                                ITAB-SPART.
  perform bdc_field       using 'MARA-MTPOS_MARA'
                                ITAB-MTPOS_MARA.
  perform bdc_field       using 'BDC_CURSOR'
                                'MARA-GEWEI'.
  perform bdc_field       using 'MARA-BRGEW'
                                '9000'.
  perform bdc_field       using 'MARA-GEWEI'
                                ITAB-GEWEI.
  perform bdc_field       using 'MARA-NTGEW'
                                '8000'.
*// Sales: Sales Organization 1: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP05'.
  perform bdc_field       using 'MG03STEUER-TAXKM(01)'
                                ITAB-TAXKM1.
  perform bdc_field       using 'MG03STEUER-TAXKM(02)'
                                ITAB-TAXKM2.
  perform bdc_dynpro      using 'SAPLMGMM' '4200'.
  perform bdc_field       using 'BDC_OKCODE'
                                '/00'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP05'.
*// Sales: Sales Organization 2: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP06'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MVKE-KONDM'.
  perform bdc_field       using 'MVKE-KONDM'
                                ITAB-KONDM.
  perform bdc_field       using 'MARA-MTPOS_MARA'
                                ITAB-MTPOS_MARA.
  perform bdc_field       using 'MVKE-MTPOS'
                                ITAB-MTPOS.
*// Sales: General / Plant Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP12'.
  perform bdc_field       using 'MARA-MEINS'
                                ITAB-MEINS.
  perform bdc_field       using 'MARA-BRGEW'
                                '9000'.
  perform bdc_field       using 'MARA-GEWEI'
                                ITAB-GEWEI.
  perform bdc_field       using 'MARA-XCHPF'
  perform bdc_field       using 'MARA-NTGEW'
                                '8000'.
  perform bdc_field       using 'MARC-MTVFP'
                                ITAB-MTVFP.
  perform bdc_field       using 'BDC_CURSOR'
                                'MARC-LADGR'.
  perform bdc_field       using 'MARA-TRAGR'
                                ITAB-TRAGR.
  perform bdc_field       using 'MARC-LADGR'
                                ITAB-LADGR.
*// MRP 1: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP13'.
  perform bdc_field       using 'MARA-MEINS'
                                ITAB-MEINS.
  perform bdc_field       using 'MARC-EKGRP'
                                ITAB-EKGRP.
  perform bdc_field       using 'BDC_CURSOR'
                                'MARC-DISMM'.
  perform bdc_field       using 'MARC-DISMM'
                                ITAB-DISMM.
*// MRP 2: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP14'.
  perform bdc_field       using 'BDC_CURSOR'
                                'RMMG1_BEZ-WERKS_BEZ'.
  perform bdc_field       using 'MARC-BESKZ'
                                ITAB-BESKZ.
  perform bdc_field       using 'MARC-SOBSL'
                                ITAB-SOBSL .
*// MRP 3: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP16'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MARC-PERKZ'.
  perform bdc_field       using 'MARC-PERKZ'
                                ITAB-PERKZ.
  perform bdc_field       using 'MARC-MTVFP'
                                ITAB-MTVFP.
*// Forecasting Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP17'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MPOP-PRMOD'.
  perform bdc_field       using 'MARA-MEINS'
                                ITAB-MEINS.
  perform bdc_field       using 'MPOP-PRMOD'
                                ITAB-PRMOD.
  perform bdc_field       using 'MARC-PERKZ'
                                ITAB-PERKZ.
  perform bdc_field       using 'MPOP-PERAN'
                                '60'.
  perform bdc_field       using 'MPOP-ANZPR'
                                '12'.
  perform bdc_field       using 'MPOP-KZINI'
                                ITAB-KZINI.
  perform bdc_field       using 'MPOP-SIGGR'
                                '4.000'.
  perform bdc_field       using 'MARC-AUTRU'
                                ITAB-AUTRU.
  perform bdc_field       using 'MPOP-MODAV'
                                ITAB-MODAV.
*// Work Scheduling Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP19'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MARC-FRTME'.
  perform bdc_field       using 'MARA-MEINS'
                                ITAB-MEINS.
*// Plant data / Stor. 1: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP20'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MAKT-MAKTX'.
  perform bdc_field       using 'MARA-MEINS'
                                ITAB-MEINS.
  perform bdc_field       using 'MARA-IPRKZ'
                                ITAB-IPRKZ.
*// Plant data / Stor. 2: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP21'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MAKT-MAKTX'.
  perform bdc_field       using 'MARA-BRGEW'
                                '9000'.
  perform bdc_field       using 'MARA-GEWEI'
                                ITAB-GEWEI.
  perform bdc_field       using 'MARA-NTGEW'
                                 '8000'.
*// Warehouse Management 1: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP23'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MAKT-MAKTX'.
  perform bdc_field       using 'MARA-MEINS'
                                ITAB-MEINS.
  perform bdc_field       using 'MARA-BRGEW'
                                 '9000'.
  perform bdc_field       using 'MARA-GEWEI'
                                ITAB-GEWEI.
*// Quality Management Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP24'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MAKT-MAKTX'.
  perform bdc_field       using 'MARA-MEINS'
                                ITAB-MEINS.
*// Accounting 1: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP26'.
  perform bdc_field       using 'MARA-MEINS'
                                ITAB-MEINS.
  perform bdc_field       using 'MBEW-BWTTY'
                                ITAB-BWTTY.
  perform bdc_field       using 'MARA-SPART'
                                ITAB-SPART.
  perform bdc_field       using 'BDC_CURSOR'
                                'MBEW-STPRS'.
  perform bdc_field       using 'MBEW-BKLAS'
                                ITAB-BKLAS.
  perform bdc_field       using 'MBEW-EKLAS'
                                ITAB-EKLAS.
  perform bdc_field       using 'MBEW-VPRSV'
                                ITAB-VPRSV.
  perform bdc_field       using 'MBEW-PEINH'
                                '1'.
  perform bdc_field       using 'MBEW-VERPR'
                                '800'.
  perform bdc_field       using 'MBEW-STPRS'
                                '800'.
*// Costing 1: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=SP27'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MAKT-MAKTX'.
  perform bdc_field       using 'MARA-MEINS'
                                ITAB-MEINS.
  perform bdc_field       using 'MBEW-EKALR'
                                ITAB-EKALR.
  perform bdc_field       using 'MARC-LOSGR'
                                '1'.
*// Costing 2: Screen
  perform bdc_dynpro      using 'SAPLMGMM' '4000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=BABA'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MAKT-MAKTX'.
  perform bdc_field       using 'MBEW-BKLAS'
                                ITAB-BKLAS.
  perform bdc_field       using 'MBEW-BWTTY'
                                ITAB-BWTTY.
  perform bdc_field       using 'MBEW-EKLAS'
                                ITAB-EKLAS.
  perform bdc_field       using 'MBEW-VPRSV'
                                ITAB-VPRSV.
  perform bdc_field       using 'MBEW-PEINH'
                                '1'.
  perform bdc_field       using 'MBEW-VERPR'
                                '800.00'.
  perform bdc_field       using 'MBEW-STPRS'
                                '800.00'.
  perform bdc_dynpro      using 'SAPLSPO1' '0300'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=YES'.
*//BDC INSERT
  PERFORM BDC_TRANSACTION TABLES BDCDATA
                      USING 'MM01'. " MESSAGES INTO GT_MSG.
*// Text Header Data
  CONCATENATE ITAB-MATNR '             000101'
                          INTO GT_HEAD-TDNAME .
  GT_HEAD-TDOBJECT = 'MVKE' .
  GT_HEAD-TDID     = '0001' .
  GT_HEAD-TDSPRAS  = SY-LANGU.
*// Sales Text
  GW_TEXT-TDFORMAT  =  '00'.
  GW_TEXT-TDLINE    =  ITAB-TDLINE .
  APPEND GW_TEXT TO  GT_TEXT.
  CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
      CLIENT          = SY-MANDT
      HEADER          = GT_HEAD
      INSERT          = 'X'
      SAVEMODE_DIRECT = 'X'
      OWNER_SPECIFIED = ' '
    TABLES
      LINES           = GT_TEXT
    EXCEPTIONS
      ID              = 1
      LANGUAGE        = 2
      NAME            = 3
      OBJECT          = 4
      OTHERS          = 5.
  IF SY-SUBRC <> 0.
    SKIP 2.
    FORMAT COLOR COL_NEGATIVE INVERSE ON.
      WRITE: / 'Unable to Insert Salestext for Material : ', ITAB-MATNR .
    FORMAT COLOR COL_NEGATIVE INVERSE OFF.
  ENDIF.
  CLEAR: GT_HEAD, GT_TEXT, GW_TEXT.
ENDFORM.                    "MM_UPLOAD
**&#12288;Program ID              &#65306;              ZMAT_CREATE
**&#12288;Program Desc            &#65306;              Material Master Creation Using BAPI
**&#12288;Process Overview        &#65306;
**&#12288;Created By              &#65306;              P.KARTHIKEYAN
**&#12288;Created Date            &#65306;              17/08/2006
**&#12288;Company Name            &#65306;              Infoview Technologies Limited
REPORT  ZBAPI_MATERIAL_SAVETEXT LINE-SIZE 132 MESSAGE-ID ZMMBAPI.
*<<<DATA DECLEA FOR HEADER>>>>>>>>>>>>>>>>>>>>>>>>>>>>
****<<<<<Header segment with control information>>>>>>
DATA: HEADER LIKE BAPIMATHEAD.
*<<CLIENT DATA>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
*<<<<<<<<Client-specific material data>>>>>>>>>>>>>>>>
DATA: GT_CLIENTDATA  LIKE BAPI_MARA.
**<<<<<<<<CLIENT DATA INITIAL>>>>>>>>>>>>>
**<<<<<<<<Information on update for CLIENTDATA>>>>>>>>
DATA: GT_CLIENTDATAX LIKE BAPI_MARAX.
***<<<<<PLANTDATA>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
**<<<<<<<Plant-specific material data>>>>>>>>>>>>>>>>>
DATA: GT_PLANTDATA LIKE BAPI_MARC.
**<<<<<<<<PLANT DATA INITIAL>>>>>>>>>>>>>>>
**<<<<<<<<Information on update for PLANTDATA>>>>>>>>
DATA:GT_PLANTDATAX LIKE BAPI_MARCX.
*<<<<<<<<<<<<<<<FORECASTPARAMETERS>>>>>>>>>>>>>>>>>>>
DATA: GT_FORECASTPARAMETERS LIKE BAPI_MPOP.
*<<<<<<<<<<<<<Information on update for FORECASTDATA>
*<<<<<<<<<<<<<<<FORECASTPARAMETERS DATA INTIAL>>>>>>>
DATA:GT_FORECASTPARAMETERSX LIKE BAPI_MPOPX.
*<<<<<<<<<<<<<<<PLANNING DATA  >>>>>>>>>>>>>>>>>>>>>>
*<<<<<<<<<<<Information on update for PLANNINGDATA>>>
DATA:GT_PLANNINGDATA LIKE BAPI_MPGD.
*<<<<<<<<<<<<<<<PLANNING INITIAL  >>>>>>>>>>>>>>>>>>>
DATA:GT_PLANNINGDATAX LIKE BAPI_MPGDX.
*<<<<<<<<<<<<<<<STORAGELOCATIONDATA>>>>>>>>>>
*<<<<<<<<<<<<Storage-location-specific material data>>
DATA: GT_STORAGELOCATIONDATA LIKE BAPI_MARD.
*<<<<<<Information on update for STORAGELOCATIONDATA>>
*<<<<<<<<<<<<<<<STORAGELOCATIONDATA INITIAL>>>>>>>>>>>
DATA:GT_STORAGELOCATIONDATAX LIKE BAPI_MARDX.
*<<<<<<<<<<<<<<<SALESDATA DATA   >>>>>>>>>>>>>>>>>>>>>
DATA: GT_SALESDATA LIKE BAPI_MVKE.
*<<<<<<<<<<<<<<<Information on update for SALESDATA>>>
*<<<<<<<<<<<<<<<SALESDATA DATA INITIAL  >>>>>>>>>>>>>>
DATA: GT_SALESDATAX LIKE BAPI_MVKEX.
****<<<<<<<<<<<<Units of measure>>>>>>>>>>>>>>>>>>>>>>>
*****<<<<<<<<<<<<<<<GT_UNITSOFMEASURE>>>>>>>>>>>>>>>>>>
DATA: GT_UNITSOFMEASURE LIKE BAPI_MARM OCCURS 0 WITH HEADER LINE.
*****<<<<<<<<<<<<<<<GT_UNITSOFMEASUREX>>>>>>>>>>>>>>>>>
DATA: GT_UNITSOFMEASUREX LIKE BAPI_MARMX OCCURS 0 WITH HEADER LINE.
*****<<<<<<<<<<<<<<<SALES TEXT>>>>>>>>>>>>>>>>>>>>>>>>>>
DATA: GT_MATERIALLONGTEXT LIKE BAPI_MLTX OCCURS 0 WITH HEADER LINE.
*****<<<<<<<<<<<<<<<MATERIAL_DESC>>>>>>>>>>>>>>>>>>>>>>>>>>
DATA: MATERIAL_DESC LIKE BAPI_MAKT OCCURS 0 WITH HEADER LINE.
*******<<<<<<<RETURN PARAMETERS>>>>>>>>
DATA: ITAB_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.  "#EC NEEDED
******<<<<<<<WAREHOUSENUMBERDATA>>>>>>>>>>>>>>
DATA: GT_WAREHOUSENUMBERDATA LIKE     BAPI_MLGN.
******<<<<<<<WAREHOUSENUMBERDATA>>>>>>>>>>>>>>
DATA: GT_WAREHOUSENUMBERDATX LIKE     BAPI_MLGNX.
******<<<<<<<STORAGETYPEDATA>>>>>>>>>>>>>>>>>>
DATA: GT_STORAGETYPEDATA     LIKE     BAPI_MLGT.
******<<<<<<<STORAGETYPEDATAX>>>>>>>>
DATA: GT_STORAGETYPEDATAX     LIKE     BAPI_MLGTX.
***<<<BAPI_TRANSCATION COMMIT>>>>>>>>>>>>>>>>>
DATA: GT_RETURN TYPE BAPIRET2.                              "#EC NEEDED
***<<<<<<<<Valuation data>>>>>>>>>>>>>>>>>>>>>
DATA: GT_VALUATIONDATA like BAPI_MBEW. "Valuation data
***<<<<<<<<Valuation data>>>>>>>>>>>>>>>>>>>>>
DATA: GT_VALUATIONDATAX like  BAPI_MBEWX. "Valuation data
data: gt_PRTDATA like  BAPI_MFHM OCCURS 0 WITH HEADER LINE.
data: gt_PRTDATAX like  BAPI_MFHM OCCURS 0 WITH HEADER LINE.
**<<<<International Article Numbers (EANs)>>>>
DATA: GT_INTERNATIONALARTNOS    LIKE    BAPI_MEAN  OCCURS 0 WITH HEADER LINE,
**<<<<Tax classifications>>>>>>>>>>>>>>>>>>>>>>
      GT_TAXCLASSIFICATIONS          LIKE  BAPI_MLAN  OCCURS 0 WITH HEADER LINE,
      GT_RETURNMESSAGES              LIKE BAPI_MATRETURN2  OCCURS 0 WITH HEADER LINE.
**<<<<<<<<<<<<<<FLAT FILE INTERNAL TABLE USED FOR DOWNLOAD EXCEL FILE>>>>>>
DATA: BEGIN OF GT_FT_ITAB OCCURS 0,
      MATERIAL TYPE BAPIMATHEAD-MATERIAL , "Material Number
      IND_SECTOR TYPE BAPIMATHEAD-IND_SECTOR, "Industry Sector
      MATL_TYPE TYPE BAPIMATHEAD-MATL_TYPE  , "Material Type
      BASIC_VIEW TYPE BAPIMATHEAD-BASIC_VIEW,  "Basic Data View
      SALES_VIEW TYPE BAPIMATHEAD-SALES_VIEW  , "Sales View
      PURCHASE_VIEW TYPE BAPIMATHEAD-PURCHASE_VIEW, "Purchasing View
      MRP_VIEW  TYPE BAPIMATHEAD-MRP_VIEW ,"Material Requirements Planning (MRP) View
      FORECAST_VIEW TYPE BAPIMATHEAD-FORECAST_VIEW  , "Forecasting View
      WORK_SCHED_VIEW TYPE BAPIMATHEAD-WORK_SCHED_VIEW ,"Work Scheduling View
      PRT_VIEW TYPE BAPIMATHEAD-PRT_VIEW  , "Production Resources/Tools (PRT) View
      STORAGE_VIEW TYPE BAPIMATHEAD-STORAGE_VIEW  , "Storage View
      WAREHOUSE_VIEW  TYPE BAPIMATHEAD-WAREHOUSE_VIEW , "Warehouse Management View
      QUALITY_VIEW  TYPE BAPIMATHEAD-QUALITY_VIEW, "Quality Management View
      ACCOUNT_VIEW TYPE BAPIMATHEAD-ACCOUNT_VIEW , "Accounting View
      COST_VIEW TYPE BAPIMATHEAD-COST_VIEW  , "Costing View
*****<<<<<<<<CLIENT DATA>>>>>>>>>>>>>>>>>>>>
      MATL_GROUP  TYPE BAPI_MARA-MATL_GROUP,   "Materialgroup
      OLD_MAT_NO TYPE BAPI_MARA-OLD_MAT_NO,  "Old material number
      BASE_UOM  TYPE BAPI_MARA-BASE_UOM,     "Base Unit of Measure
      BASE_UOM_ISO TYPE BAPI_MARA-BASE_UOM_ISO ,"Base unit of measure in ISO code
      DOCUMENT TYPE BAPI_MARA-DOCUMENT, "Document number
      DOC_TYPE TYPE BAPI_MARA-DOC_TYPE, "Document type
      DOC_VERS TYPE BAPI_MARA-DOC_VERS, "Document version
      DOC_FORMAT TYPE BAPI_MARA-DOC_FORMAT,"Page format of document
      DOC_CHG_NO TYPE BAPI_MARA-DOC_CHG_NO, "Document change number
      PAGE_NO TYPE BAPI_MARA-PAGE_NO, "Page number of document
      PROD_MEMO  TYPE BAPI_MARA-PROD_MEMO , "Production/Inspection Memo
      PAGEFORMAT TYPE BAPI_MARA-PAGEFORMAT, "Page Format of Production Memo
      SIZE_DIM TYPE BAPI_MARA-SIZE_DIM, "Size/dimensions
      BASIC_MATL TYPE BAPI_MARA-BASIC_MATL, "Basic Material
      STD_DESCR TYPE BAPI_MARA-STD_DESCR, "Industry Standard Description
      DSN_OFFICE TYPE BAPI_MARA-DSN_OFFICE, "Laboratory/design office
      NET_WEIGHT TYPE BAPI_MARA-NET_WEIGHT, " "Net weight
      UNIT_OF_WT TYPE BAPI_MARA-UNIT_OF_WT, "Weight Unit
      DIVISION TYPE BAPI_MARA-DIVISION, "Division
      CAD_ID TYPE BAPI_MARA-CAD_ID, "Competitor
      PROD_ALLOC TYPE BAPI_MARA-PROD_ALLOC,  "Procurement rule
      HAZMATPROF TYPE BAPI_MARA-HAZMATPROF, "Source of Supply
      HIGH_VISC TYPE BAPI_MARA-HIGH_VISC, "Allowed packaging weight
      LOOSEORLIQ TYPE BAPI_MARA-LOOSEORLIQ, "Long material number
      PERIOD_IND_EXPIRATION_DATE TYPE BAPI_MARA-PERIOD_IND_EXPIRATION_DATE,"Expiration Dat
      ITEM_CAT  TYPE BAPI_MARA-ITEM_CAT, "General item category group
      EXTMATLGRP TYPE BAPI_MARA-EXTMATLGRP, "External Material Group
*****CLIENT DATA INITIAL>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      MATL_GROUPX  TYPE BAPI_MARAX-MATL_GROUP, "Materialgroup
      OLD_MAT_NOX TYPE BAPI_MARAX-OLD_MAT_NO, "Old material number
      BASE_UOMX TYPE BAPI_MARAX-BASE_UOM, "Base Unit of Measure
      BASE_UOM_ISOX TYPE BAPI_MARAX-BASE_UOM_ISO, "Base unit of measure in ISO code
      DOCUMENTX TYPE BAPI_MARAX-DOCUMENT, "Document number
      DOC_TYPEX TYPE BAPI_MARAX-DOC_TYPE, "Document type
      DOC_VERSX TYPE BAPI_MARAX-DOC_VERS,  "Document version
      DOC_FORMATX TYPE BAPI_MARAX-DOC_FORMAT,"Page format of document
      DOC_CHG_NOX TYPE BAPI_MARAX-DOC_CHG_NO, "Document change number
      PAGE_NOX TYPE BAPI_MARAX-PAGE_NO, "Production/Inspection Memo
      PROD_MEMOX TYPE BAPI_MARAX-PROD_MEMO, "Page Format of Production Memo
      SIZE_DIMX  TYPE BAPI_MARAX-SIZE_DIM, "Size/dimensions
      BASIC_MATLX TYPE BAPI_MARAX-BASIC_MATL, "Basic Material
      STD_DESCRX TYPE BAPI_MARAX-STD_DESCR, "Industry Standard Description
      DSN_OFFICEX TYPE BAPI_MARAX-DSN_OFFICE, "Laboratory/design office
      NET_WEIGHTX TYPE BAPI_MARAX-NET_WEIGHT, " "Net weight
      UNIT_OF_WTX TYPE BAPI_MARAX-UNIT_OF_WT, "Weight Unit
      DIVISIONX  TYPE BAPI_MARAX-DIVISION, "Division
      PROD_HIERX TYPE BAPI_MARA, "Competitor
      CAD_IDX TYPE BAPI_MARAX-PROD_HIER,  "Procurement rule
      ALLWD_VOLX TYPE BAPI_MARAX-ALLWD_VOL, "Allowed packaging
      PVALIDFROMX  TYPE BAPI_MARAX-PVALIDFROM, "Date from which the cross-plant material status
      SVALIDFROMX   TYPE BAPI_MARAX-SVALIDFROM, "Date from which the X-distr.-chain material stat
      PROD_ALLOCX TYPE BAPI_MARAX-PROD_ALLOC,
      HIGH_VISCX  TYPE BAPI_MARAX-HIGH_VISC,"Indicator: Highly Viscous
      LOOSEORLIQX  TYPE BAPI_MARAX-LOOSEORLIQ, "Indicator: In Bulk/Liquid
      INV_MAT_NO_EXTERNALX  TYPE BAPI_MARAX-INV_MAT_NO_EXTERNAL,
      EXTMATLGRPX TYPE BAPI_MARAX-EXTMATLGRP, " External Material Group
****<<<<<<<<<<<<<<PLANTDATA>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      PLANT  TYPE BAPI_MARC-PLANT, " Plant
      MRP_TYPE  TYPE BAPI_MARC-MRP_TYPE, "MRP Type
      REORDER_PT  TYPE BAPI_MARC-REORDER_PT, "Reorder Point
      SAFETY_STK  TYPE BAPI_MARC-SAFETY_STK, "Safety stock
      MINLOTSIZE  TYPE BAPI_MARC-MINLOTSIZE, "Minimum lot size
****<<<<<<<<<<<<<<PLANTDATA INITIAL>>>>>>>>>>>>>>>>>>>>>>
      PLANTX  TYPE BAPI_MARCX-PLANT, " Plant
      MRP_TYPEX  TYPE BAPI_MARCX-MRP_TYPE,  "MRP Type
      REORDER_PTX  TYPE BAPI_MARCX-REORDER_PT, "Reorder Point
      SAFETY_STKX  TYPE BAPI_MARCX-SAFETY_STK, "Safety stock
      MINLOTSIZEX  TYPE BAPI_MARCX-MINLOTSIZE, "Minimum lot size
*<<<<<<<<<<<<<<<FORECASTPARAMETERS>>>>>>>>>>
      F_PLANT  TYPE BAPI_MPOPX-PLANT, " Plant
*<<<<<<<<<<<<<<<FORECASTPARAMETERS DATA INTIAL>>>>>>>>>>
      F_PLANTX TYPE BAPI_MPOPX-PLANT, " Plant
*<<<<<<<<<<<<<<<PLANNING DATA  >>>>>>>>>>>>>>>>>>>>>>>>>
      P_PLANT TYPE BAPI_MPGD-PLANT, " Plant
*<<<<<<<<<<<<<<<PLANNING DATA INITAIAL  >>>>>>>>>>>>>>>
      P_PLANTX TYPE BAPI_MPGDX-PLANT, " Plant
*<<<<<<<<<<<<<<<STORAGELOCATIONDATA>>>>>>>>>>>>>>>>>>>>
      S_PLANT   TYPE BAPI_MARD-PLANT, " Plant
      S_STGE_LOC  TYPE BAPI_MARD-STGE_LOC,
*<<<<<<<<<<<<<<<STORAGELOCATIONDATA INITIAL>>>>>>>>>>
      S_PLANTX   TYPE BAPI_MARDX-PLANT, " Plant
      S_STGE_LOCX TYPE BAPI_MARDX-STGE_LOC, "Storage Location
*<<<<<<<<<<<<<<<SALESDATA DATA   >>>>>>>>>>
      SALES_ORG TYPE  BAPI_MVKE-SALES_ORG, "Sales Organization
      DISTR_CHAN  TYPE  BAPI_MVKE-DISTR_CHAN, "Distribution Channel
*<<<<<<<<<<<<<<<SALESDATA DATA INITIAL  >>>>>>>>>>
      SALES_ORGX TYPE  BAPI_MVKEX-SALES_ORG, "Sales Organization
      DISTR_CHANX  TYPE  BAPI_MVKEX-DISTR_CHAN, "Distribution Channel
*****<<<<<<<<<<<<<<<MATERIAL_DESC>>>>>>>>>>>>>>>>>>>>>>>>>>
      LANGU   TYPE BAPI_MAKT-LANGU , "Language Key
      LANGU_ISO TYPE BAPI_MAKT-LANGU_ISO , "Language according to ISO 639
      MATL_DESC TYPE BAPI_MAKT-MATL_DESC ,  "Material Description
*****<<<<<<<<<<<<<<<GT_UNITSOFMEASURE>>>>>>>>>>>>>>>>>>>>>>>>>>
      ALT_UNIT  TYPE BAPI_MARM-ALT_UNIT,
                 "Alternative Unit of Measure for Stockkeeping Unit
      ALT_UNIT_ISO  TYPE BAPI_MARM-ALT_UNIT,
                 "Alternative Unit of Measure for Stockkeeping Unit
******<<<<<<<<<<<<<<<GT_UNITSOFMEASUREX>>>>>>>>>>>>>>>>>>>>>>>>>>
      UNIT TYPE BAPI_MARMX-ALT_UNIT,
                 "Alternative Unit of Measure for Stockkeeping Unit
      UNIT_ISO  TYPE BAPI_MARMX-ALT_UNIT_ISO,
        "Alternative unit of measure to stockkeeping unit in ISO code
*****<<<<<<<<<<<<<<<SALES TEXT>>>>>>>>>>>>>>>>>>>>>>>>>>
      APPLOBJECT TYPE BAPI_MLTX-APPLOBJECT, "Texts: application object
      TEXT_NAME  TYPE BAPI_MLTX-TEXT_NAME, "Name
      TEXT_ID  TYPE BAPI_MLTX-TEXT_ID, "Text ID
      S_LANGU  TYPE BAPI_MLTX-LANGU, "Language key
      TEXT_LINE TYPE BAPI_MLTX-TEXT_LINE, "Text line
END OF GT_FT_ITAB,
TEXT(243), " Return Message
WA_HEAD LIKE THEAD, " SalesText Header Info
ITAB_TLINE LIKE STANDARD TABLE OF TLINE WITH HEADER LINE, " SalesText
ERROR_REC TYPE I, " Error Records Counter
SUCCESS_REC TYPE I, " Successful Records Counter
TOT_REC TYPE I. " Total Records Counter
selection block for EXCEL UPLOAD FILE>>>>>>>>>>>>>>>>>>>>>>>>
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
PARAMETERS FILE TYPE  IBIPPARMS-PATH OBLIGATORY .
SELECTION-SCREEN END OF BLOCK B1.
*<<<<AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .>>>>>>>>>>>>
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME  = SYST-CPROG
      DYNPRO_NUMBER = SYST-DYNNR
    IMPORTING
      FILE_NAME     = FILE.
**<<<<<<<<<<<<<<<<<START-OF-SELECTION.>>>>>>>>>>>>>>>>>>>>>>>>>>>
START-OF-SELECTION.
  CALL FUNCTION 'WS_UPLOAD'                                 "#EC *
    EXPORTING
      FILENAME                = FILE
      FILETYPE                = 'DAT'
    TABLES
      DATA_TAB                = GT_FT_ITAB
    EXCEPTIONS
      CONVERSION_ERROR        = 1
      FILE_OPEN_ERROR         = 2
      FILE_READ_ERROR         = 3
      INVALID_TYPE            = 4
      NO_BATCH                = 5
      UNKNOWN_ERROR           = 6
      INVALID_TABLE_WIDTH     = 7
      GUI_REFUSE_FILETRANSFER = 8
      CUSTOMER_ERROR          = 9
      NO_AUTHORITY            = 10
      OTHERS                  = 11.
  IF  SY-SUBRC <> 0  .
    MESSAGE E000.
  ENDIF.
  SKIP 3.
  FORMAT COLOR COL_HEADING INVERSE ON.
  WRITE 40 TEXT-001.
  FORMAT COLOR COL_HEADING INVERSE OFF.
  SKIP 1.
  FORMAT COLOR COL_NEGATIVE INVERSE ON.
  WRITE :/3 TEXT-002, 13 SY-MANDT , 104 TEXT-003, 111 SY-UNAME,
            /3 TEXT-004, 13 SY-DATUM , 104 TEXT-005, 111 SY-UZEIT.
  FORMAT COLOR COL_NEGATIVE INVERSE OFF.
  SKIP 3.
  LOOP AT GT_FT_ITAB.
    HEADER-MATERIAL = GT_FT_ITAB-MATERIAL .                 " 'M-32'.
    HEADER-IND_SECTOR = GT_FT_ITAB-IND_SECTOR .          " 'C'.
    HEADER-MATL_TYPE = GT_FT_ITAB-MATL_TYPE .             " 'FERT'.
    HEADER-BASIC_VIEW = GT_FT_ITAB-BASIC_VIEW .            " 'X'.
    HEADER-SALES_VIEW = GT_FT_ITAB-SALES_VIEW.             " 'X'.
    HEADER-PURCHASE_VIEW = GT_FT_ITAB-PURCHASE_VIEW .    " 'X'.
    HEADER-MRP_VIEW = GT_FT_ITAB-MRP_VIEW .                      " 'X'.
    HEADER-FORECAST_VIEW = GT_FT_ITAB-FORECAST_VIEW .    " 'X'.
    HEADER-WORK_SCHED_VIEW = GT_FT_ITAB-WORK_SCHED_VIEW ." 'X'.
    HEADER-PRT_VIEW = GT_FT_ITAB-PRT_VIEW .                          " 'X'.
    HEADER-STORAGE_VIEW = GT_FT_ITAB-STORAGE_VIEW .           " 'X'.
    HEADER-WAREHOUSE_VIEW = GT_FT_ITAB-WAREHOUSE_VIEW .   " 'X'.
    HEADER-QUALITY_VIEW = GT_FT_ITAB-QUALITY_VIEW .             " 'X'.
    HEADER-ACCOUNT_VIEW =  GT_FT_ITAB-ACCOUNT_VIEW .        " 'X'.
    HEADER-COST_VIEW = GT_FT_ITAB-COST_VIEW .                     " 'X'.
*<<CLIENT DATA>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    GT_CLIENTDATA-MATL_GROUP = GT_FT_ITAB-MATL_GROUP .      " '01'.
    GT_CLIENTDATA-OLD_MAT_NO = GT_FT_ITAB-OLD_MAT_NO .      " '1000'.
    GT_CLIENTDATA-BASE_UOM  = GT_FT_ITAB-BASE_UOM  .         " 'EA'.
    GT_CLIENTDATA-BASE_UOM_ISO = GT_FT_ITAB-BASE_UOM_ISO ." 'EA'.
    GT_CLIENTDATA-DOCUMENT = GT_FT_ITAB-DOCUMENT .         "'MATERIAL'.
    GT_CLIENTDATA-DOC_TYPE = GT_FT_ITAB-DOC_TYPE .            " 'A'.
    GT_CLIENTDATA-DOC_VERS = GT_FT_ITAB-DOC_VERS .          " '5'.
    GT_CLIENTDATA-DOC_FORMAT = GT_FT_ITAB-DOC_FORMAT .      " '5'.
    GT_CLIENTDATA-DOC_CHG_NO = GT_FT_ITAB-DOC_CHG_NO .      " 'A4'.
    GT_CLIENTDATA-PAGE_NO =  GT_FT_ITAB-PAGE_NO    .        " '1'.
    GT_CLIENTDATA-PROD_MEMO = GT_FT_ITAB-PROD_MEMO .      " 'MEMO'.
    GT_CLIENTDATA-PAGEFORMAT = GT_FT_ITAB-PAGEFORMAT .      " '1'.
    GT_CLIENTDATA-SIZE_DIM = GT_FT_ITAB-SIZE_DIM .          " '50/50'.
    GT_CLIENTDATA-BASIC_MATL = GT_FT_ITAB-BASIC_MATL .       " 'BASIS MATERIAL1'.
    GT_CLIENTDATA-STD_DESCR = GT_FT_ITAB-STD_DESCR .         " 'MATERIAL DESC'.
    GT_CLIENTDATA-DSN_OFFICE = GT_FT_ITAB-DSN_OFFICE .      " '001'.
    GT_CLIENTDATA-NET_WEIGHT = GT_FT_ITAB-NET_WEIGHT .      " 1000.
    GT_CLIENTDATA-UNIT_OF_WT = GT_FT_ITAB-UNIT_OF_WT .         " 'KG'.
    GT_CLIENTDATA-TRANS_GRP =  '0001'.
    GT_CLIENTDATA-DIVISION =         GT_FT_ITAB-DIVISION .  " '01'.
    GT_CLIENTDATA-QTY_GR_GI = '9000'.
    GT_CLIENTDATA-CAD_ID = GT_FT_ITAB-CAD_ID .                      " 'X'.
    GT_CLIENTDATA-ALLWD_VOL = '9000'.
    GT_CLIENTDATA-PROD_ALLOC = GT_FT_ITAB-PROD_ALLOC .      " 'PA01'.
    GT_CLIENTDATA-HAZMATPROF = GT_FT_ITAB-HAZMATPROF .      " '001'.
    GT_CLIENTDATA-HIGH_VISC = GT_FT_ITAB-HIGH_VISC .             " 'X'.
    GT_CLIENTDATA-LOOSEORLIQ = GT_FT_ITAB-LOOSEORLIQ .     " 'X'.
    GT_CLIENTDATA-PERIOD_IND_EXPIRATION_DATE = GT_FT_ITAB-PERIOD_IND_EXPIRATION_DATE . " 'D'.
    GT_CLIENTDATA-ITEM_CAT = 'NORM' . "GT_FT_ITAB-ITEM_CAT .   " 'NORM'.
    GT_CLIENTDATA-EXTMATLGRP = GT_FT_ITAB-EXTMATLGRP .      " '01'.
**<<<<<<<<CLIENT DATA INITIAL>>>>>>>>>>>>>
    GT_CLIENTDATAX-MATL_GROUP =  'X'.
    GT_CLIENTDATAX-OLD_MAT_NO = GT_FT_ITAB-OLD_MAT_NO .        "  'X'.
    GT_CLIENTDATAX-BASE_UOM = GT_FT_ITAB-BASE_UOM .              " 'X'.
    GT_CLIENTDATAX-BASE_UOM_ISO = GT_FT_ITAB-BASE_UOM_ISO .   "'X'.
    GT_CLIENTDATAX-DOCUMENT = GT_FT_ITAB-DOCUMENT .            "'X'.
    GT_CLIENTDATAX-DOC_TYPE = GT_FT_ITAB-DOC_TYPE .               "'X'.
    GT_CLIENTDATAX-DOC_VERS = GT_FT_ITAB-DOC_VERS .               "'X'.
    GT_CLIENTDATAX-DOC_FORMAT = GT_FT_ITAB-DOC_FORMAT .      "'X'.
    GT_CLIENTDATAX-DOC_CHG_NO = GT_FT_ITAB-DOC_CHG_NO .      "'X'.
    GT_CLIENTDATAX-PAGE_NO = GT_FT_ITAB-PAGE_NO .                  "'X'.
    GT_CLIENTDATAX-PROD_MEMO  = GT_FT_ITAB-PROD_MEMO .        "'X'.
    GT_CLIENTDATAX-PAGEFORMAT = 'X'.
    GT_CLIENTDATAX-SIZE_DIM = GT_FT_ITAB-SIZE_DIM .                    "'X'
    GT_CLIENTDATAX-BASIC_MATL = GT_FT_ITAB-BASIC_MATL.           "'X'.
    GT_CLIENTDATAX-STD_DESCR = GT_FT_ITAB-STD_DESCR .            "'X'.
    GT_CLIENTDATAX-DSN_OFFICE = GT_FT_ITAB-DSN_OFFICE .           "'X'.
    GT_CLIENTDATAX-NET_WEIGHT = GT_FT_ITAB-NET_WEIGHT .           "'X'.
    GT_CLIENTDATAX-UNIT_OF_WT = GT_FT_ITAB-UNIT_OF_WT .            "'X'.
    GT_CLIENTDATAX-DIVISION  = GT_FT_ITAB-DIVISION .                    "'X'.
    GT_CLIENTDATAX-PROD_HIER = GT_FT_ITAB-PROD_HIERX .              "'X'.
    GT_CLIENTDATAX-CAD_ID = GT_FT_ITAB-CAD_ID .                           "'X'.
    GT_CLIENTDATAX-ALLWD_VOL = GT_FT_ITAB-ALLWD_VOLX .             "'X'.
    GT_CLIENTDATAX-PROD_ALLOC = GT_FT_ITAB-PROD_ALLOCX .         "'X'.
    GT_CLIENTDATAX-HAZMATPROF = 'X'.
    GT_CLIENTDATAX-HIGH_VISC  = GT_FT_ITAB-HIGH_VISCX .                "'X'.
    GT_CLIENTDATAX-LOOSEORLIQ  = GT_FT_ITAB-LOOSEORLIQX .        "'X'.
    GT_CLIENTDATAX-ITEM_CAT = 'X'.
    GT_CLIENTDATAX-INV_MAT_NO_EXTERNAL  = GT_FT_ITAB-INV_MAT_NO_EXTERNALX  .      "'X'.
    GT_CLIENTDATAX-EXTMATLGRP = GT_FT_ITAB-EXTMATLGRPX .         " 'X'.
    GT_CLIENTDATAX-TRANS_GRP =  'X'.
    GT_CLIENTDATAX-QTY_GR_GI = 'X'.
    GT_CLIENTDATAX-ALLWD_VOL = 'X'.
***<<<<<PLANTDATA>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    GT_PLANTDATA-PLANT = GT_FT_ITAB-PLANT .                 " '0001'.
    GT_PLANTDATA-MRP_TYPE = GT_FT_ITAB-MRP_TYPE .       "'ND'.
    GT_PLANTDATA-PUR_GROUP = '001'.                              "Purchasing Group
    GT_PLANTDATA-PROC_TYPE = 'F'.                                  "Procurement Type
    GT_PLANTDATA-SPPROCTYPE = '10'.                              "Special procurement type
   GT_PLANTDATA-REORDER_PT = GT_FT_ITAB-REORDER_PT .       "8000.
    GT_PLANTDATA-SAFETY_STK =  2.
    GT_PLANTDATA-LOADINGGRP = '0001'.                           "Loading group
    GT_PLANTDATA-MINLOTSIZE = GT_FT_ITAB-MINLOTSIZE .       "6000.
**<<<<<<<<PLANT DATA INITIAL>>>>>>>>>>>>>
    GT_PLANTDATAX-PLANT = GT_FT_ITAB-PLANTX.                " '0001'.
    GT_PLANTDATAX-MRP_TYPE = GT_FT_ITAB-MRP_TYPEX.      " 'X'.
    GT_PLANTDATAX-PUR_GROUP = 'X'.                                 "Purchasing Group
    GT_PLANTDATAX-PROC_TYPE = 'X'.                                  "Procurement Type
    GT_PLANTDATAX-SPPROCTYPE = 'X'.                               "Special procurement type
    GT_PLANTDATAX-LOADINGGRP = 'X'.                               "Loading group
   GT_PLANTDATAX-REORDER_PT = GT_FT_ITAB-REORDER_PTX.   " 'X'.
    GT_PLANTDATAX-SAFETY_STK = GT_FT_ITAB-SAFETY_STKX.      "'X'.
    GT_PLANTDATAX-MINLOTSIZE = GT_FT_ITAB-MINLOTSIZEX.       "'X'.
*<<<<<<<<<<<<<<<FORECASTPARAMETERS>>>>>>>>>>
    GT_FORECASTPARAMETERS-PLANT =  GT_FT_ITAB-F_PLANT.      " '0001'.
*<<<<<<<<<<<<<<<FORECASTPARAMETERS DATA INTIAL>>>>>>>>>>
    GT_FORECASTPARAMETERSX = '0001'.
    GT_FORECASTPARAMETERSX-PLANT =  GT_FT_ITAB-F_PLANTX.    " '0001'.
*<<<<<<<<<<<<<<<PLANNING DATA  >>>>>>>>>>
*GT_PLANNINGDATA-PLANT = GT_FT_ITAB-P_PLANT.                    " '0001'.
    GT_PLANNINGDATA-PLANT =   '0001'.
*<<<<<<<<<<<<<<<PLAN

Similar Messages

  • In which table scripts and smartforms are stored

    in which tables scripts and smartforms are stored
    eg scripts in tadir.

    Hi this may be of some help.
    SD
    SALES ORDER/ENQUIRY/QUOTATION
    Output type         : BA00
    ScriptForm Name     : RVORDER01
    Driver Program Name : RVADOR01
    smartform name
    DELIVERY NOTE
    Output type         : LD00
    ScriptForm Name     : RVDELNOTE
    Driver Program Name : RVADDN01
    smartform name      : LE_SHP_DELNOTE
    Smartform Driver Pgm: RLE_DELNOTE
    INVOICE
    Output type         : RD00
    ScriptForm Name     : RVINVOICE01
    Driver Program Name : RVADIN01
    smartform name      : LB_BIL_INVOICE
    Smartform Driver Pgm: RLB_INVOICE
    MM
    PUCHASE ORDER/RFQ/CONTRACT
    Output type         : NEU
    ScriptForm Name     : MEDRUCK
    Driver Program Name : SAPMF06P
    smartform name      : /SMB40/MMPO_L
    smartform driver program: /SMB40/FM06P
    GOODS RECEIPT
    Output type         : WE01
    ScriptForm Name     : WESCHEINVERS1
    smartform name      : /SMB40/MMGR1_A
    smartform driver program: /SMB40/M07DR
    GOODS ISSUE
    Output type         : WA01
    ScriptForm Name     : WA_SCHEINVERS1
    smartform name      : /SMB40/MMGI1_A
    smartform driver program: /SMB40/M07DR
    FI Forms
    Account Statement   : F140_ACC_STAT_01
    Cheque Printing     : F110_PRENUM_CHEK
    Balance Confirmation: F130_confirm_01
    Dunning Form:         F150_DUNN_01
    check the link below it provides steps to convert sap scripts to smartforms
    http://www.ficoexpertonline.com/downloads/Iyer_SmartForms.pdf
    SMARTFORMS -Driver Program
    PO: /SMB40/FM06P
    SO: /SMB40/RVADOR01
    GR: /SMB40/M07DR
    with regards,
    Hema Sundara.
    pls give points if u find this helpful.

  • String search in SAP Script and Smartforms

    Hi All,
    We have an urgent requirement where we need to search for a character string in all SAP Scripts and Smartforms in our system.
    It would also help if we can get the names of programs/function modules which are internally generated for the same.
    Any pointers on the same would be helpful.
    Regards,
    Saurabh

    You can create a variable window in the main window.
    You can restrict the last item of the main window by varying the size of main window. In your wite-form ,
    CALL FUNCTION 'WRITE_FORM'
          EXPORTING
             element                  = 'ITEM'
          function                 = 'SET'
          type                     = 'BODY'
          window                   = 'MAIN'
          EXCEPTIONS
            element                  = 1
            function                 = 2
            type                     = 3
            unopened                 = 4
            unstarted                = 5
            window                   = 6
            bad_pageformat_for_print = 7
            spool_error              = 8
            codepage                 = 9
            OTHERS                   = 10.
        IF sy-subrc <> 0.
    DO this. in the bottom of the main window, create a variable window.
    you can add your text in the variable window inside main window.
    it will be displayed just after the item ends.
    Reagrds,
    Pritha.
    Message was edited by:
            Pritha Agrawal

  • Unicode enabling for ABAP scripts and smartforms

    Hi All,
    Could any one please advice us how we can identify whether the script or smartform is unicode updated or not and how we can convert the non unicode scripts and smartforms to unicode scripts and smartforms.
    Thanks,
    Srikanth.

    Dear srikanth...This is an scripting forum...not a sap script forum...Please post your question on the abap forum. Thanx -:)
    Greetings,
    Blag.

  • How to call ALV Report and SMARTFORMS through Pushbutton

    hi,
    i have created a report.My task is to create two buttons:
    1)ALV Report.
    2)SMARTFROMS.
    Through these button i have to call ALV Report and SMARTFORMS. i have created both button and when i execute the program,
    it shows me the button but not working when i click on it.
    this is the coding i have used in my report for calling ALV Report.
    ''Tables sscrfields,
    DATA flag(1) Type c.
    selection-screen: begin of screen 500 AS WINDOW TITLE tit,
    BEGIN OF LINE,
    PUSHBUTTON 2(18) but1 USER-COMMAND cli1,
    end of line,
    BEGIN OF LINE,
    PUSHBUTTON 2(18) but2 USER-COMMAND cli2,
    end of line,
    end of screen 500.
    SET PF-STATUS 'STATUS_0100'.
    at selection-screen.
    case sscrfields.
    WHEN 'cli1'.
    flag = '1'.
    WHEN 'cli2'.
    flag = '2'.
    endcase.
    at USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'Detail'.
    select vbakkunnr VBakernam VBAkaudat vbakaufnr vbapKWMENG vbapmatnr vbap~ARKTX
    into but1
    from vbak inner join vbap
    on vbakvbeln = vbapvbeln.
    ENDSELECT.
    ENDCASE.
    START-OF-SELECTION.
    tit = 'Format'.
    but1 = 'ALV Report'.
    but2 = 'SMARTFORMS'.
    CALL SELECTION-SCREEN 500.
    and i also use in my report
    ''case sscrfields-ucomm'' and ''submit my_report'' but the still button doesn't show the result.
    Thanks & Regards,

    Hi,
             I  understood your requirement. What i found is,  you are creating screen 500 and call it after START-OF-SELECTION,
    at that time your AT USER-COMMAND doesn't work.
    So what i would suggest , u should create GUI STATUS named ' PFSTAT' 
    having one functional key 'EXIT'  that is standard u can just name it
    and
    other two u can assign in Freely assigned Function keys as 'BUT1' & 'BUT2'.  and than in Application Toolbar u jst have it in ITEM LIST by typing BUT1 and BUT2.
    For 'BUT1'  text would be 'ALV'  and 'BUT2' text would be 'SMARTFORMS'.
    Now in Program you can code,,,
    START-OF-SELECTION.
    SET PF-STATUS 'PFSTAT'.
    WRITE:/ 'TEST'.
    at user-command.
      case SY-UCOMM.
        WHEN 'BUT1'.
        WHEN 'BUT2'.
        WHEN 'EXIT'.
           LEAVE PROGRAM.
      endcase.
    In Program u set PF STATUS and use at user-command event, whcih gets triggered when u click on button . When u execute program you get two button in application tooldbar.
    Please do needful.
    Thanks,
    Saurin SHah

  • FI transaction code used in script and smartforms

    hiii  dudes,
                     i want the FI transaction codes which is used in the script and smartforms.......

    Hi Sonia,
    I re-loged, but in vain.
    Regards,
    rajesh

  • Urgent : Regarding Adobe Forms ,Scripts and Smartforms

    <i>
    Hi Floks
    Any body having Adobe Printing Forms ,Scripts and Smartforms documents Links can you send me to me . Its will be help full to me
    thanks
    suresh</i>

    Hi Suresh,
    SCRIPTS
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf
    http://www.thespot4sap.com/articles/SAPscript_Introduction.asp
    http://www.onestopsap.com/sap-miscellanous/sap-script/
    http://sap.niraj.tripod.com/id19.html
    http://help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm
    http://www.thespot4sap.com/Articles/SAPscript_commands.asp
    Smartforms
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm

  • What type of errors generally we wil get in script and smartform?

    what type of errors generally we wil get in script and smartform?

    Hi,
    Script and Smartforms are used to Output the outgoing Document print in any orgn.
    Mostly the problem is the allignment of windows on the page.
    Data problems are very little. printing of pages, ie. particular data should come in first page and other on second page,
    and the address should not come in 2 pages,
    displaying of currency related fields errors, texts related errors are the mostly occuring errors.
    reward if useful
    regards,
    Anji

  • Material for sap scripts and smartforms

    hi SDNs,
              can anyone send links to download SAP SCRIPTS and SMARTFORMS? thanks in advance.
                                regards,
                                 aravind.

    hi Aravind,
    check the below linkss for scripts
    SAP Scripts
    http://www.sap-img.com/sapscripts.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm
    http://www.sap-basis-abap.com/sapabap01.htm
    http://www.sap-img.com/sapscripts.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci943419,00.html
    http://sap.ittoolbox.com/topics/t.asp?t=303&p=452&h2=452&h1=303
    http://www.sapgenie.com/phpBB2/viewtopic.php?t=14007&sid=09eec5147a0dbeee1b5edd21af8ebc6a
    Other Links
    http://www.virtuosollc.com/PDF/Get_Reporter.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm
    http://www.virtuosollc.com/PDF/Get_Reporter.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm
    http://www.thespot4sap.com/Articles/Code_CostCentreReport.asp
    http://www.allsaplinks.com/dialog_programming.html
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/frameset.htm
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://www.geocities.com/ZSAPcHAT
    and for smartforms
    most imp link
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    Check these links.In this,I am explaining everything step-by-step.Kindly reward points by clikcing the star on the left of reply,if it is useful.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    Check these links also.
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://sap.niraj.tripod.com/id67.html
    http://myweb.dal.ca/hchinni/sap/smartforms_home.htm
    Step by StepGood one):
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    if u need more info on either of these topics shoot me a test mail to [email protected]
    If u find it useful plz mark the points
    Regards,
    Naveen

  • On scripts and smartforms

    hi
    can anyone give me some tricky questions on scripts and smartforms please....
    points will be rewarded.

    Hi venkat
    These are the answers for Smartforms:
    1. Create a loop around the table. Put a Command node before the table in the loop that forces a NEWPAGE on whatever condition you want. Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node. 
    2. The Difference is as follows. 
    To put it very simply: 
    Form Interface is where you declare what must be passed in and out of the smartform (in from the print program to the smartform and out from the smartform to the print program). 
    Global defs. is where you declare data to be used within the smartform on a global scope. 
    ie: anything you declare here can be used in any other node in the form. 
    These are for the scripts:
    1)  Use this Std program RSTXSCRP.
         1) First Export to Presentation file(.doc).
         2) Whenever you need that Export into SAP.
    2)  Normally we call them as Program symbols.  Those are defined in Driver program. We can use in Script as for exp. &itab-matnr&
    Other variables ---System symbols : ex  &page&
                            ---Std symbols :
                            ---Text symbols :We define them in script editor itself.
                                 Ex : /: Define &mysymbol&   =  'XX'
    3)  We can control the tab feed in a paragraph with tab positions. The tab stops us define in the paragraph format replace the tab spacing we defined in the header data of the form. However, this depends on the extent to which we have defined tab stops in the paragraph format. If there are fewer tabs in the paragraph formats than in the header data, the tab stops of the header data are used for the rest of the line.
    Regards
    Vachana

  • How to transport scripts and smartforms layouts

    Hi All,
              would you let me know how to trasport scripts and smartform along with layouts???
    thanks in advance for your replies.
    Regards,
    Riyaz

    SAP Script Form
    If you want to copy the forms between clients on the same system (between a client 100 and 150 on a DEV box for example) Use the copy between clients option available from the Utilities menu of SE71. If you want to transport the form between DEV & QA or QA & PRD then follow the normal transport
    procedure (ensuring that your BASIS team know to import your form into each client of the new box).
    Regarding the Print Program, follow the standard procedure for normal ABAP Objects. Do SCC1 for transfer between clients on same system and normal transport procedure to different system.
    SMART FORMS
    A Smartform is transported no differently than any other object. if it is assigned to a development class that is atteched to a transport layer, it will be transported. 
    The definition is transported, and when called, the function module is regenerated. 
    This leads to an interetsing situation. On the new machine, it is very likely the function module name will be different than the name on the source system. Make sure, before you call the function module, you resolve the external name to the internal name using the 'SSF_FUNCTION_MODULE_NAME' function module. 
    Typically, generate the SF, then use the pattern to being in the interface. Then change the call function to use the name you get back from the above function module. 
    Hope this helps.
    Vinodh Balakrishnan

  • Where can we find the standard program for scripts and smartform for vl02

    where can we find the standard program for scripts and smartform for vl02
    regard,
    anil

    If it is a standard Script Output see that all config in NACE tcode was done correctly and in the Application document the output type was properly defined and attached to a medium, partner and all communication related things like printer name, when to print the output and number of messages etc are entered in the document
    the go to the related application Tcode
    (for sales order goto VA02 or VA03)
    (delivery -VL02N or VL03N)
    for Invoice VF02 or VF03
    for PO -goto ME9F
    enter doc number, Issue Output to -> screen/printer
    then see the output
    step 1 : copy the z layout into testing client thru SCC1.
    step2 : go to se71 and check modified layout.
    step3 : if it is under logistics.. go to TCODE "NACE".
    u will see various applictions for each business process.
    there u have configure ur related layout according to requirments,
    for example u consider for Request fo Quatation..
    there is APPLICATION called "EA"
    click and enter into it. configure it with ur requirments, for help consult with ur functonal consaltant, and save it.
    step 4 : goto tcode ME9A for requst for quatation(RFQ).
    step 5 : enter test data avalable and check it with message display.
    it is same for other applications like Contract agreament --> ME9k
    invoice --> vl02n
    and goes on..
    Reward points for useful Answers

  • Debugging the scripts and smartforms

    Hi,
    Please Tell me How to debug the SAP SCRIPTS and SMARTFORMS.
    Thank in advance
    Ajay

    DEBUG Smartform:
    1) One way to debug smartform is to debug the Function Module of that smartforms.
    If you want to debug particular smartform node that the solution would be,
    insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint.
    So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.
    2) SFTRACE can be used for debugging SMARTFORMS.
    Read More here.
    http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    Re: How to Debug a Smartform
    Debug of smartform and sapscript.
    Debugging SmartForms
    LOGO on Smartform
    1) In Smart Forms Editor, In left pane, right Click any Page (say Page1) and select Create -> Window, Give it a name and Description (Say Window1)
    2) Right Click on Window (Window 1) and select Create -> Graphics, Give it a name and description
    3) In general Attributes, Select Name, get search help (F4) , you will find a list of pictures
    4) Select any picture and set its Resolution in DPI
    5) Press F9 to open Smart Forms Builder, Select window (Window1) and In Output options window set, size and position of the Logo
    6) Set any other parameters if required, save and activate.
    7) If there is only 1 Window in the forms, set it as Main Window in general attributes.
    8) Use TCode SE78 to upload new pictures and logos.
    look at Thread Dynamic Graph in smartforms
    Refer the links also -
    Re: Dinamic Graph in smartforms
    How to get file perperties in Unix server
    SMARTFORM-> execute->execute->pass values if require to import & table parameters ->execute-> on the pop up window give Printer name as LP01 and press print preview.
    For debugging -
    1. Write BREAK POINT in the code window.
    2. Put a break point on the call function in the driver program
    3. Put a break point in the generated Function module.
    OR
    1) DEBUG Smartform:
    1) One way to debug smartform is to debug the Function Module of that smartforms.
    If you want to debug particular smartform node that the solution would be,
    insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint.
    So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.
    2) SFTRACE can be used for debugging SMARTFORMS.
    Read More here.
    http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    OR
    Four ways you can debugging.....
    1.place SFTRACE inplace where we enter T_CODE and press ENTER.
    after that press F8.
    2 ./H
    3 /SH
    4.after generating the function module there is a button DEBUGGING
    Refer to these related threads
    smartforms debug
    Smartforms debug
    How to debug Smartforms?
    How to Debug the Smartforms
    Re: Smartforms Debug
    Smartforms
    In the Smartform, within the Code Node you can hardcode a normal abap Break Point ..
    Please set a break point in side the smartform:
    BREAK <USERNAME>.
    Then at the time of print/ preview the program stops there.
    Example : If you set the break point in initializationas
    BREAK <USERNAME>.
    Program stops at break point. After that use Serach and set more break points.
    >Search the program logic/Textelement/Address via search and set the break point at that code.
    Other way to debug smartform is to debug the Function Module of that smartforms. If you want to debug particular smartform node that the solution would be, insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint. So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.
    or
    SFTRACE can be used for debugging SMARTFORMS.
    http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    See the Below thread for how to debug the Smartforms
    How to Debug Smartform?
    Re: debug of smartfrom
    Smart forms
    They are two ways to debug the SAPScript.
    1). Use Tools - Word Processing - Layout Set (SE71). Enter name of layout set and then Utilities - Activate Debugger.
    It is of no consequence which layoutset you enter when selecting the SAPscript debugger. (Menu path: Tools-Wordprocessing - Forms, Utilities - Activate Debugger) The next layoutset called will invoke the debugger.
    2). Another way to set the SAPScript debugger is to run program RSTXDBUG.
    When you debug Print program it is same as you debug any other ABAP program.
    While when you debug SAPScript, you actually debug the code ( scripting) you have written SAPScript Form.

  • Converting the script and smartforms to OTF and RDI format.

    How to convert the script and smartforms to OTF and RDI format. Please suggest all possible ways.

    Please don't cross-post or duplicate-post.
    It increases the chances that both threads are deleted faster than what it increases the chances of getting "double-good" answers...
    I deleted the other thread.
    Thanks,
    Julius

  • Diffeerence between script and smartform

    what is the diffrence between script and  smartform pls explain briefly

    Hi Venu,
    The Following are the differences :-
    a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
    (like For the same form u can have one page with Landscape orientation and 2nd page with portrait orientation which is not available with scripts...)
    b) It is possible to have a smartform without a main window.
    c) Labels cannot be created in smartforms.
    d) Routines can be written in smartforms tool.
    e) Smartforms generates a function module when activated.
    ( Here u need to use the function module (thats been generated when u have activated the smart form) to call the smart form in your print program )
    f) Here u can give colors to windows , texts , window edges .... which is not possible with scripts !!!
    g) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
    It was said that it was provided in CRM 3.0 version, but not available in R/3. You can download smartforms into Local PC in a XML format. In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.
    In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
    In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file
    h) The most important one is these smart forms are CLIENT INDEPENDENT
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

Maybe you are looking for