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

Similar Messages

  • HOW TO SEND THE REPORTS AND  THROUGH XI TO NON -SAP SYSTEM

    Hi Experts,
                 I want to know how to send the reports and  smartform through xi to another system. All the post blogs are   just explaning only about the FILE-TO-FILE, FILE-TO-IDOCS scenarios only.

    Hi,
    XI is the middleware that to be used to transfer the data between various systems and even you could design the Business Processes with it.
    In R/3 the smartforms, are generally converted to PDF and then  have to send it across to Non SAP systems. Similarly you can convert the smartforms to pdf format and keep it on application server. XI will pick up that pdf and will send it to Non SAP system either as mail or as an attachments.
    ABAP reports are normally used to re-present the data. If you need to transfer this data across the Non SAP systems then you have the IDOCs to be generated, RFC or ABAP Proxy to integrate this data with Non SAP system.
    XI is not restricted only upto file to file or file to IDOC scenarios. It have enormous capabilities to involve various Business Processes as well integrate various SAP or Non SAP systems.
    If need anymore  specific details, please let us know.
    Thanks
    Swarup

  • Call tcode from alv report and passing  group of values

    hi all .
    i want to call tcode from alv report and passing an internal table or group of values to a selection option of that t code ? how
    ex. passing group of GL to fbl3n and display the detials of all .
    thank you

    Dear,
    You have done a small mistake
    --> rspar_line-option = 'EQ'.
         rspar_line-HIGH = PDATE-HIGH.
    u r passing "high" value and in "option u r passing "EQ" so how it will work!!!
    So if u r passing only 1 date or more dates like 01.01.2010 , 15.02.2010 , 10.03.2010 then pass
    rspar_line-selname = 'SO_BUDAT'.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'EQ'.
    rspar_line-LOW = PDATE-HIGH.
    APPEND rspar_line TO rspar_tab.
    or if u r passing low & high date means in range like 01.01.2010 to 30.01.2010, then pass
    rspar_line-selname = 'SO_BUDAT'.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'BT''.
    rspar_line-LOW = PDATE-LOW.
    rspar_line-HIGH = PDATE-HIGH.
    APPEND rspar_line TO rspar_tab.
    try above code , hope it helps...
    i think u cannot use "call transaction using bdcdata" in ur case bcoz as u said in ur 1st post u want to display the details of all but still if u want to use then u should pass all parameters in  loop.
    PROGRAM
    DYNPRO
    DYNBEGIN
    FNAM
    FVAL
    ex:-
    LOOP AT GT_TEMP INTO GS_TEMP.
    CLEAR bdcdata_wa.
    bdcdata_PROGRAM = 'SAPXXXX'.
    bdcdata_DYNPRO = '1000'.
    bdcdata_DYNBEGIN = 'X'.
    bdcdata_wa-fnam = '''.
    bdcdata_wa-fval = ''.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_PROGRAM = ''.
    bdcdata_DYNPRO = ''.
    bdcdata_DYNBEGIN = ''.
    bdcdata_wa-fnam = 'SD_SAKNR'.
    bdcdata_wa-fval = GS_TEMP-GLACCOUNT.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_PROGRAM = ''.
    bdcdata_DYNPRO = ''.
    bdcdata_DYNBEGIN = ''.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = 'XXX'.
    APPEND bdcdata_wa TO bdcdata_tab.
    ENDLOOP.
    try above code if u r using call transaction...
    Edited by: mihir6666 on Jul 9, 2011 3:10 PM
    Edited by: mihir6666 on Jul 9, 2011 3:11 PM
    Edited by: mihir6666 on Jul 9, 2011 3:13 PM

  • What are events in ALV report and explain how sorting is done  alv report

    events in alv report and sorting in alv report
    Moderator Message: Search before posting.
    Edited by: kishan P on Dec 21, 2011 11:13 AM

    Hi Raja,
    <<content and links removed by moderator>>
    PavanKumar.G
    Edited by: kishan P on Dec 21, 2011 11:12 AM

  • How to call BI report  from web dynpro

    Hi ,
    How to call  BI report from webdynpro application  and what are the prerequisites for that .
    Please provide an example to work with BI application frame UI element
    Thanks

    Hi Rajpal,
    Please go through this..
    calling BI report
    Cheers,
    Kris.

  • 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]

    **&#12288;Program ID              &#65306;              ZMAT_CREATE
    **&#12288;Program Desc          &#65306;              Material Master Creation
    **&#12288;Process Overview    
    **&#12288;Created Date           &#65306;               22/08/2006
    **&#12288;Company Name        &#65306;              
    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

  • How to call PDF Report with parameters in jdeveloper 10.1.3

    Hi all,
    how to call PDF Report with parameters in jdeveloper 10.1.3
    for example I have Report name is repdept.pdf with parameter as deptno
    and I want call this Report from JSP page ?
    thanks
    frank

    Hi all,
    how to call PDF Report with parameters in jdeveloper 10.1.3
    for example I have Report name is repdept.pdf with parameter as deptno
    and I want call this Report from JSP page ?
    thanks
    frank

  • How to call standard report with in zprogram?

    Hi Sap experts,
    How to call standard report with in zprogram.
    For example if country is 'US' then call Zprogram(zprog_US).Inside zprogram call standard report(rhecm_change_proc_status).If country is 'CA' then call zprogram.Inside zprogram call standard report.For same othercountres like 'PR','GB','ES'.Actually HR_ECM_READ_FEATURE_CARGP will having the input as employee id and will return the CAREA(County like 'US','PR'......).Kindly help me what is the procedure?
    Regards,
    Sujan

    >
    sujan T wrote:
    > Thanks for your reply.
    >
    >    What is the logic to call the standard report from zprogram?Inside the zpogram how to call standard report?
    >
    > Regards,
    > Sujan
    no special logic is required
    If u want to use
    RPUAUDOO IN THE ZREPORT.
    Put the submit button where ever required
    ex: In zreport after certain process reacedu want to call then use
    submit rpuaudoo and return.
    Regards
    Sas

  • How to send ALV report by Email

    Hi.
    we have developed a block ALV report which has 3 reports i.e Detail report , summary report and Error report. Currently user run the report in background.However there is need to send this report by Email . I can use FM:SO_OBJECT_SEND . I want how to pass this report to FM and how to handle if there are multiple email ids. I think we can create a group of the user with email id in business workplace and pass the group to FM.
    I need help in how to assign the report and user group to this FM

    Hi,
    You may use the code given by Amit in this link -
    MAil Attachment.
    It is perfect to handle any type of email requirement.
    Regards,
    Amit
    Reward all helpful replies.

  • In Oracle 10g, How to call a report since an option of a menu (*.mmb)

    Hello
    In Oracle 10g, working since the browser, how to call a report since an option of a menu (*.mmb)? I know to call it in a form (*.fmb), therefore uses the fields bean area and the objects reports, but in a menu there is not neither canvas, neither fields, neither reports. Someone would be able to help me with that?
    Kisses. Thanks.
    Annie

    I understand that you had sent me everything,
    I sent for example to you that, no to insert it in your item's menu code,
    then,You have to modify it.
    ... but
    a menu (mmb) doesn't have to define him reports
    objects... then, what parameter I send to the
    function FIND_REPORT_OBJECT:
    This is not true
    Try out this, and then let me know
    You do not need to have a report object defined in the menu. It is enough to have it in forms.
    I tried to call a report from the menu in the folowing way:
    I created a menu and wrote the following code in one item:
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    BEGIN
    repid := find_report_object('report2');
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, RUNTIME);
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_COMM_MODE, SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'reportserver1');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,'C:\p.pdf');
    v_rep := RUN_REPORT_OBJECT(repid);
    END;Then I created a form with a report object called report2.
    I attached the menu to this form and while running this form, I was able to successfully run the report.
    In your case, you have to make sure that you have the dummy report object in each form that will have this attached menu.
    You can replace by the actual report name as you have written in the code.
    Regards

  • Calling ALV report in BAPI

    Hi All There ,
    I am calling ALV report in my bapi but it is not gettin called it is not giving screen of parameter selection derectly selectin all parameter
    coding is as below
    points assured.
    Data: MTAB_REPORT_HTML type standard table of W3HTML WITH HEADER LINE.
    Submit ZSDRUSHORDERSRPT with SELECTION-TABLE SELTAB
            exporting list to Memory and return.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
    EXPORTING
       TEMPLATE_NAME       = 'WEBREPORTING_REPORT'
      CHARSET             = 'UTF8'
      TABLES
        html                = MTAB_REPORT_HTML
        listobject          = list_tab.
    FREE MEMORY.
    CLEAR LIST_TAB[].
    loop at MTAB_REPORT_HTML.
      concatenate htmlstring
                 MTAB_REPORT_HTML-LINE into htmlstring.
    endloop.

    No, It is not specific to ALV. If you can give the example of that SUBMIT then it can be analyzed. It can be for other additions that is used in the submit statement.
    Like:
    1. ... USING SELECTION-SCREEN dynnr
    2. ... VIA SELECTION-SCREEN
    Effect
    The addition USING SELECTION-SCREEN specifies the selection screen, VIA SELECTION-SCREEN specifies whether it is displayed. The additions selscreen_parameters provide values for the parameters, selection criteria, and the free selection of the called selection screen.
    The values are transferred to the selection screen between the events INITIALIZATION and AT SELECTION-SCREEN OUTPUT The following hierarchy applies for transferring values:
    1.     First, the variant of the addition USING SELECTION-SET is transferred, which sets all parameters and selection criteria to the values of the variant. The values previously set in the called program are overwritten.
    2.     The values of the table of the addition WITH SELECTION-TABLE are then transferred. All parameters and selection criteria specified there are overwritten accordingly.
    3.     Finally, the values of the additions WITH sel value are transferred. All parameters and selection criteria are overwritten accordingly. If the addition WITH sel value is used more than once for the same parameter, this is overwritten with the last specified value. If the addition WITH sel value is used more than once for the same selection criterion, a selection table with the corresponding number of lines is transferred.
    Providing values for free selections is independent of this hierarchy.
    Notes
    •     The options for parameter transfer enable a selection screen to be viewed as a parameter interface of an executable program. This applies particularly for background selection screen processing and for parameters and selection criteria that are defined without screen elements using the addition NO-DISPLAY
    •     When transferring data, note that any adjustments made to the screen format, such as abbreviations or the execution of conversion routines, are not executed for fields for which there are no screen elements on the selection screen. This applies for all parameters and selection criteria defined with NO DISPLAY. It also applies for all lines of a selection table with the exception of the first line.
    •     The additions selscreen_parameters only work the first time the called program is executed. If a selection screen is displayed in the called program, the runtime environment calls the program again after it is finished, thereby replacing the values specified in selscreen_parameters with the previous input values.
    Addition 1
    ... USING SELECTION-SCREEN dynnr
    Effect
    This addition specifies which selection screen is called. dynnr is a data object that must contain the screen number of a selection screen defined in the called program when the SUBMIT statement is called.
    •     If the addition USING SELECTION-SCREEN is omitted or the screen number 1000 is entered, the standard selection screen is called. If no standard selection screen is defined in the called program, no selection screen is called.
    •     If a screen number that is not 1000 is entered in the addition USING SELECTION-SCREEN, the corresponding independent selection screen is called. If no selection screen with this screen number is defined in the called program, this leads to an untreatable exception.
    Addition 2
    ... VIA SELECTION-SCREEN
    Effect
    If this addition is specified, the selection screen is displayed on the screen. Otherwise, background selection screen processing takes place. In background selection screen processing, the selection screen events are triggered without the selection screen being displayed.
    SUBMIT - selscreen_parameters
    Syntax
    ... [USING SELECTION-SET variant]
        [USING SELECTION-SETS OF PROGRAM prog]
        [WITH SELECTION-TABLE rspar]
        [WITH expr_syntax1 WITH expr_syntax2 ...]
        [WITH FREE SELECTIONS texpr] ... .
    Extras:
    1. ... USING SELECTION-SET variant
    2. ... USING SELECTION-SETS OF PROGRAM prog
    3. ... WITH SELECTION-TABLE rspar
    4. ... WITH expr_syntax1 WITH expr_syntax2 ...
    5. ... WITH FREE SELECTIONS texpr
    Effect
    USING-SELECTION-SET supplies all the selection screen components by means of a Variant variant. If you specify USING-SELECTION-SETS OF PROGRAM, you can use a variant from a different program; if you specify WITH SELECTION-TABLE, values for several selection screen components are transferred as the content of an internal table rspar; WITH expr_syntax supplies individual selection screen components with values. The addition WITH FREE SELECTIONS allows you to transfer free selections to the selection screen for alogical database.
    Addition 1
    ... USING SELECTION-SET variant
    Effect
    If you specify this edition, the parameters and selection criteria for the selection screen are supplied with values from a variant. For variant, you must specify a character-like data object that contains the name of a variant for the program accessed when the statement is executed. If the variant does not exist, the system sends an error message. If the variant belongs to a different selection screen, it is ignored.
    Note
    You can create and manage variants for every program in which selection screens are defined, either in the ABAP Workbench or during execution of the program by choosing Goto - Variants on a selection screen.
    Addition 2
    ... USING SELECTION-SETS OF PROGRAM prog
    Effect
    If you specify this addition, the variants of the program prog are used in the program accessed. For prog, you must specify a character-like data object that contains the name of a program when the statement is executed. The addition has the following effect:
    •     If a variant variant is specified with USING SELECTION-SET, the system searches for this variant in the program prog.
    •     If the selection screen is displayed with VIA SELECTION-SCREEN, all the functions that can be accessed by means of the menu path Goto - Variants affect the variants of the program prog. However, these functions are only active if prog is an executable program.
    Note
    The program prog should contain a selection screen that has the same parameters and selection criteria as the selection screen used in the program accessed.
    Addition 3
    ... WITH SELECTION-TABLE rspar
    Effect
    If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
    •     SELNAME (length 8),
    •     KIND (length 1),
    •     SIGN (length 1),
    •     OPTION (length 2),
    •     LOW (length 45),
    •     HIGH (length 45).
    To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
    •     SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
    •     KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
    •     SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
    If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
    The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
    Notes
    In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
    •     When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
    Addition 4
    ... WITH expr_syntax1 WITH expr_syntax2 ...
    Effect
    This addition supplies values to individual parameters or selection criteria for the selection screen. Parameters are supplied with single values and selection criteria with selection tables that overwrite values already specified in the program accessed. The selection table to be transferred is compiled from all the expr_syntax additions that address the same selection criterion sel. You can specify the following statements for expr_syntax, where you have to specify the name of a parameter or a selection criterion directly for sel:
    •     sel {EQ|NE|CP|NP|GT|GE|LT|LE} dobj [SIGN sign]
    Transfer of a single value.
    The operators before dobj correspond to the values specified for column OPTION for selection tables. For dobj, you must specify a data object whose data type can be converted to the data type of the selection screen component sel. For sign, you can specify a character-like field that must contain 'I' or 'E'. The standard value is 'I'.
    If sel is a selection criterion, the system appends a line in the selection table to be transferred, placing the operator in column OPTION, the content of dobj in column LOW, and the content of sign in column SIGN.
    If sel is a parameter, it is set to the value of dobj in the program accessed. The operator and the value of sign are not taken into account.
    •     sel [NOT] BETWEEN dobj1 AND dobj2 [SIGN sign]
    Transfer of an interval.
    In this case, sel must be a selection criterion. For dobj, you must specify data objects whose data type can be converted to that of the columns LOW and HIGH for the selection criterion sel. For sign, you can specify a character-like field that must contain 'I' or 'E'. The standard value is 'I'.
    A line is appended in the selection table to be transferred. If NOT is specified, the value 'NB' is placed in column OPTION; otherwise, the value entered is 'BT'. The content of the data objects dobj and sign is placed in the columns LOW, HIGH, and SIGN.
    •     sel IN rtab
    Transfer of a ranges table.
    In this case, sel must be a selection criterion. For rtab, you must specify an internal table that has the same structure as the selection table for selection criterion sel. A table of this type can be created using the addition RANGE OF to the statements TYPES and DATA.
    The lines in table rtab are appended to the selection table to be transferred.
    You can specify the addition expr_syntax more than once, and you can also specify the same selection screen component more than once.
    Notes:
    •     = or INCL can also be used instead of the operator EQ.
    •     When entering values, you must ensure that these have the internal format of the ABAP values, and not the output format of the screen display.
    Example
    The program report1 has a stand-alone selection screen with the screen number 1100. In the program report2, an internal table with row type RSPARAMS and a ranges table are filled for this selection screen. These are transferred at SUBMIT together with a single condition.
    Program accessed
    REPORT report1.
    DATA text TYPE c LENGTH 10.
    SELECTION-SCREEN BEGIN OF SCREEN 1100.
      SELECT-OPTIONS: selcrit1 FOR text,
                      selcrit2 FOR text.
    SELECTION-SCREEN END OF SCREEN 1100.
    Calling program
    REPORT report2.
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    Result
    After report1 has been accessed by report2, the selection tables for the selection criteria selcrit1 and selcrit2 in the program accessed contain the following entries:
    Addition 5
    ... WITH FREE SELECTIONS texpr
    Effect
    This addition supplies values to the dynamic selections for the selection screen for a logical database. The program accessed must be linked to a logical database that supports dynamic selections. texpr must be an internal table of the type RSDS_TEXPR from type group RSDS.
    In texpr, the selections for the dynamic selections are specified in an internal format (Reverse Polish Notation). You can use function modules FREE_SELECTIONS_INIT, FREE_SELECTIONS_DIALOG, and FREE_SELECTIONS_RANGE_2_EX from the function group SSEL to fill texpr in the calling program. While the first two function modules execute a user dialog, you can transfer ranges tables to FREE_SELECTIONS_RANGE_2_EX for each node in the dynamic selection in an internal table of the type RSDS_TRANGE. These are then converted to a table of the row type RSDS_TEXPR. If the calling program contains a selection screen with the same dynamic selections, you can transfer its content beforehand to a table of the type RSDS_TRANGE using the function module RS_REFRESH_FROM_DYNAMICAL_SEL.
    The lines in the internal table type RSDS_TRANGE contain a flat component TABLENAME for each node and a table-like component FRANGE_T of the type RSDS_FRANGE_T for the fields in the node. The lines in RSDS_FRANGE_T contain a flat component FIELDNAME for each field and a table-like component SELOPT_T of the row type RSDSSELOPT from the ABAP Dictionary. RSDSSELOPT contains the four components SIGN, OPTION, LOW, and HIGH and can include the ranges table.
    Example
    Program report1 is linked to the logical database F1S, which supports dynamic selections for the node SPFLI. Program report2 enters conditions in a nested internal table of the type rsds_trange with selection conditions for field CONNID in node SPFLI; this is then converted to a table of the type rsds_texpr, which is transferred at SUBMIT.
    Program accessed
    REPORT report1.
    NODES: spfli, sflight, sbook.
    Calling program
    REPORT report2.
    TYPE-POOLS rsds.
    DATA: trange TYPE rsds_trange,
          trange_line
            LIKE LINE OF trange,
          trange_frange_t_line
            LIKE LINE OF trange_line-frange_t,
          trange_frange_t_selopt_t_line
            LIKE LINE OF trange_frange_t_line-selopt_t,
          texpr TYPE rsds_texpr.
    trange_line-tablename = 'SPFLI'.
    trange_frange_t_line-fieldname = 'CONNID'.
    trange_frange_t_selopt_t_line-sign   = 'I'.
    trange_frange_t_selopt_t_line-option = 'BT'.
    trange_frange_t_selopt_t_line-low    = '0200'.
    trange_frange_t_selopt_t_line-high   = '0800'.
    APPEND trange_frange_t_selopt_t_line
      TO trange_frange_t_line-selopt_t.
    trange_frange_t_selopt_t_line-sign   = 'I'.
    trange_frange_t_selopt_t_line-option = 'NE'.
    trange_frange_t_selopt_t_line-low    = '0400'.
    APPEND trange_frange_t_selopt_t_line
      TO trange_frange_t_line-selopt_t.
    APPEND trange_frange_t_line TO trange_line-frange_t.
    APPEND trange_line TO trange.
    CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
      EXPORTING
        field_ranges = trange
      IMPORTING
        expressions  = texpr.
    SUBMIT report1 VIA SELECTION-SCREEN
                   WITH FREE SELECTIONS texpr.

  • HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM

    PLEASE ANYONE TELL ME, ABOUT  HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM. IT IS VERY URGENT!!!!!!!!!1

    Hi,
      Under Global Definitions, we have 'Form Routines' tab. Under this tab, u can have a dynamic subroutine call. With in FORM and ENDFORM, you can call the Function Module.With in the Program Lines editor, u can define the subroutine........PERFORM. 
    If helpful, reward points.
    Rgds,
    CK

  • How to call a report in another report?reply plz

    how to call a report in another report?

    hi,
    chk this.
    *Code used to populate 'select-options' & execute report 
    DATA: seltab type table of rsparams,
          seltab_wa like line of seltab.
      seltab_wa-selname = 'PNPPERNR'.
      seltab_wa-sign    = 'I'.
      seltab_wa-option  = 'EQ'.
    * load each personnel number accessed from the structure into
    * parameters to be used in the report
      loop at pnppernr.
        seltab_wa-low = pnppernr-low.
        append seltab_wa to seltab.
      endloop.
      SUBMIT zreport with selection-table seltab
                                    via selection-screen.
    *Code used to populate 'parameters' & execute report 
    SUBMIT zreport with p_param1 = 'value'
                    with p_param2 = 'value'.
    Other additions for SUBMIT
    *Submit report and return to current program afterwards
    SUBMIT zreport AND RETURN.
    *Submit report via its own selection screen
    SUBMIT zreport VIA SELECTION-SCREEN.
    *Submit report using selection screen variant
    SUBMIT zreport USING SELECTION-SET 'VARIANT1'.
    *Submit report but export resultant list to memory, rather than
    *it being displayed on screen
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    *  Once report has finished and control has returned to calling
    *  program, use function modules LIST_FROM_MEMORY, WRITE_LIST and
    *  DISPLAY_LIST to retrieve and display report.
    Regards
    Anver

  • Can you read Reports and Tables through RFCs and BAPIS?

    Is there any way to read established reports and tables through RFC or BAPI function calls?  We have a middleware that can execute various BAPIs and RFCs.  I see a few promising ones: RFC_READ_REPORT, but no examples anywhere what the parameters needed are for the inputs. 

    Hello Scott,
    Check below FMs for reading tables and programs.
    Tables : RFC_READ_TABLE
    Program : RFC_READ_DEVELOPMENT_OBJECT
    Please note that for reading program using RFC_READ_DEVELOPMENT_OBJECT , lines in program should not exceed 72 chars else FM will throw dump(READ_REPORT_LINE_TOO_LONG).
    Program code will appear in table QTAB which is 72 chars wide.

  • How to call a Report 10g from a parameter form..?

    Hello,
    pls i wanna know the procedure of :
    How to call a Report 10g from a parameter form..?
    regards,
    Abdetu..

    hopes it work for you.
    procedure get_report is
    pl_id paramlist;
    p_year varchar2(4);
    param_name varchar2(10) :'param';
    begin
    pl_id := get_parameter_list(param_name);
    if not id_null(pl_id_)then
    destroy_parameter_list(pl_id);
    end if;
    pl_id := create_parameter_list(param_name);
    p_year := year -- assign the value.
    add_parameter(pl_id,'p_year',text_parameter,p_year);
    execute_report('report_name',pl_id);
    end;

Maybe you are looking for

  • Advice on installing 4.4 trial version, on laptop currently running 3.6

    I have a laptop running LR 3.6 and want to try 4.4 to determine whether the laptop is man enough for the job. It's a Core 2 Duo T6400 2.0Ghz with 4Gb RAM and Vista Home Premium 32 bit. If I install the trial version of 4.4 how do I make sure it doesn

  • Language Chosen but can't get any further

    I am running on a G5 Dual 2GHZ but I am unable to install leopard. I have restart the disk like it tells me too, but then after I choose the language for install process, it says it can't install 10.5 Leopard on this computer. Any suggestions on how

  • HP update on "all programs" wont work anymore!!!

    Hi ya all, I have a HP desktop pavilion a610t, Vista,2.4G CPU, 3G RAM, and when I go to "all programs" click on "HP" then on "HP updates" (which is supposed to keep you updated w/the latest upgrades) I get a message "cannot access program" when I try

  • Getting photos off iPad onto disc (with new camera connection kit)

    I bought the camera connection kit and can't figure out how to get my pictures from iPad on to the 8 GB disk. Any suggestions? The disk is not showing up anywhere. Not in Photos, Settings or anywhere. IU searched here to no avail and online found Dro

  • IMovie '08 and subtitles

    I am using subtitles for the text to a music video. I have put them in and they look fine, but I want to raise them up a little bit on the screen. I try to do this by selecting the text and then going to "Text," then "Baseline," then "Raise," but thi