How to convert report into alvgrid please hepl

how to convert report into alvgrid please hepl

BALVSD01 check this program u will know r see below code
sample prog
REPORT  ZMAT11                                  .
TYPE-POOLS : slis.
TABLES : mkpf,
         mseg,
         t001w,
         t001l.
TYPES : BEGIN OF ty_t001w,
          werks TYPE t001w-werks,
          name1 TYPE t001w-name1,
        END OF ty_t001w,
        BEGIN OF ty_makt,
          matnr TYPE makt-matnr,
          maktx TYPE makt-maktx,
        END OF ty_makt,
        BEGIN OF ty_t001l,
          lgort TYPE t001l-lgort,
          lgobe TYPE t001l-lgobe,
        END OF ty_t001l.
DATA :  BEGIN OF it_mat OCCURS 0,
        mblnr LIKE mseg-mblnr,
        zeile LIKE mseg-zeile,
        mjahr LIKE mseg-mjahr,
        bldat LIKE mkpf-bldat,
        budat LIKE mkpf-budat,
        bwart LIKE mseg-bwart,
        matnr LIKE mseg-matnr,
        maktx LIKE makt-maktx,
        erfmg LIKE mseg-erfmg,
        erfme LIKE mseg-erfme,
        werks LIKE mseg-werks,
        name1 LIKE t001w-name1,
        lgort LIKE mseg-lgort,
        lgobe LIKE t001l-lgobe,
        umwrk LIKE mseg-umwrk,
        name2 LIKE t001w-name1,
        umlgo LIKE mseg-umlgo,
        lgobe1 LIKE t001l-lgobe,
        END OF it_mat.
DATA : it_t001w TYPE TABLE OF ty_t001w
                 WITH HEADER LINE,
       it_makt TYPE TABLE OF ty_makt
               WITH HEADER LINE,
       it_t001l TYPE TABLE OF ty_t001l
                WITH HEADER LINE.
DATA : ls_layout TYPE slis_layout_alv,
       it_fcat TYPE slis_t_fieldcat_alv ,
       wa_fcat TYPE slis_fieldcat_alv,
       lh TYPE slis_t_listheader,
       ls TYPE slis_listheader,
       it_events TYPE slis_t_event  ,
       ls_event TYPE slis_alv_event ,
       w_var TYPE i.
DATA : l_date(10).
DATA : l_date1(20),
       ztabix LIKE sy-tabix.
DATA : l_repid LIKE trdir-name.
l_repid = 'ZMAT11'.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_werks FOR mseg-werks,
                 s_lgort FOR mseg-lgort,
                 s_umwrk FOR mseg-umwrk,
                 s_umlgo FOR mseg-umlgo,
                 s_bwart FOR mseg-bwart,
                 s_budat FOR mkpf-budat,
                 s_mjahr FOR mkpf-mjahr.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
  SELECT SINGLE * FROM t001w INTO t001w
                          WHERE werks IN s_werks.
  IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH 'Enter a Valid Supplying Plant'.
  ENDIF.
  SELECT SINGLE * FROM t001w INTO t001w
                          WHERE werks IN s_umwrk.
  IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH 'Enter a Valid Receiving Plant'.
  ENDIF.
  SELECT SINGLE * FROM t001l INTO t001l
                          WHERE lgort IN s_lgort.
  IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH 'Enter a Valid Supplying St.Loc'.
  ENDIF.
  SELECT SINGLE * FROM t001l INTO t001l
                          WHERE lgort IN s_umlgo.
  IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH 'Enter a Valid Receiving St.Loc'.
  ENDIF.
START-OF-SELECTION.
  ls-typ = 'H'.
  ls-info = 'Material Document List'.
  APPEND ls TO lh.
  ls-typ = 'S'.
  WRITE: sy-datum TO l_date USING EDIT MASK '__/__/____'.
  CONCATENATE 'DATE :' l_date INTO l_date1 SEPARATED BY space.
  ls-info = l_date1.
  APPEND ls TO lh.
  PERFORM field_cat.
  PERFORM f001_get_data.
END-OF-SELECTION.
  IF it_mat[] IS INITIAL.
    MESSAGE i000(8i) WITH 'No data Found'(m01).
    EXIT.
  ENDIF.
  PERFORM process_data.
  PERFORM display_data.
*&      Form  f001_get_data
      text
-->  p1        text
<--  p2        text
FORM f001_get_data .
  SELECT amblnr azeile amjahr abwart a~matnr
           aerfmg aerfme awerks algort aumwrk aumlgo
           b~budat
           b~bldat INTO CORRESPONDING FIELDS OF TABLE it_mat
                   FROM mseg AS a
             INNER JOIN mkpf AS b
                ON amblnr = bmblnr
               AND amjahr = bmjahr
             CLIENT SPECIFIED
          WHERE a~mandt EQ sy-mandt
            AND a~werks IN s_werks
            AND a~lgort IN s_lgort
            AND a~umwrk IN s_umwrk
            AND a~umlgo IN s_umlgo
            AND a~bwart IN s_bwart
            AND b~budat IN s_budat
            AND b~mjahr IN s_mjahr.
  IF sy-subrc = 0.
    SELECT matnr maktx INTO TABLE it_makt FROM makt
    CLIENT SPECIFIED
    FOR ALL ENTRIES IN it_mat
    WHERE mandt EQ sy-mandt
      AND matnr = it_mat-matnr.
  ENDIF.
  SELECT werks name1 INTO TABLE it_t001w FROM t001w
  CLIENT SPECIFIED
  WHERE mandt EQ sy-mandt.
  IF sy-subrc <> 0.
    MESSAGE i000(8i) WITH 'No Plant Found'(m02).
  ENDIF.
  SELECT lgort lgobe INTO TABLE it_t001l FROM t001l
  CLIENT SPECIFIED
  WHERE mandt EQ sy-mandt.
  IF sy-subrc <> 0.
    MESSAGE i000(8i) WITH 'No Storage Location Found'(m03).
  ENDIF.
ENDFORM.                    " f001_get_data
*&      Form  field_cat
      text
-->  p1        text
<--  p2        text
FORM field_cat .
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'MBLNR'.
  wa_fcat-key = 'X'.
  wa_fcat-hotspot = 'X'.
  wa_fcat-ref_fieldname = 'MBLNR'.
  wa_fcat-ref_tabname = 'MSEG'.
  wa_fcat-seltext_m = 'Material Doc'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'ZEILE'.
  wa_fcat-ref_fieldname = 'ZEILE'.
  wa_fcat-ref_tabname = 'MSEG'.
  wa_fcat-seltext_m = 'Item No'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'MJAHR'.
  wa_fcat-ref_fieldname = 'MJAHR'.
  wa_fcat-ref_tabname = 'MSEG'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'BWART'.
  wa_fcat-ref_fieldname = 'BWART'.
  wa_fcat-ref_tabname = 'MSEG'.
  wa_fcat-seltext_m = 'Mvmt Type'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'BLDAT'.
  wa_fcat-ref_fieldname = 'BLDAT'.
  wa_fcat-ref_tabname = 'MKPF'.
  wa_fcat-seltext_m = 'Document Date'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'BUDAT'.
  wa_fcat-ref_fieldname = 'BUDAT'.
  wa_fcat-ref_tabname = 'MKPF'.
  wa_fcat-seltext_m = 'Posting Date'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'MATNR'.
  wa_fcat-ref_fieldname = 'MATNR'.
  wa_fcat-ref_tabname = 'MSEG'.
  wa_fcat-seltext_m = 'Material No'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'MAKTX'.
  wa_fcat-ref_fieldname = 'MAKTX'.
  wa_fcat-ref_tabname = 'MAKT'.
  wa_fcat-seltext_m = 'Material Description'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'ERFMG'.
  wa_fcat-ref_fieldname = 'ERFMG'.
  wa_fcat-ref_tabname = 'MSEG'.
  wa_fcat-seltext_m = 'Quantity'.
  wa_fcat-do_sum = 'X'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'ERFME'.
  wa_fcat-ref_fieldname = 'ERFME'.
  wa_fcat-ref_tabname = 'MSEG'.
  wa_fcat-seltext_m = 'Uom'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'WERKS'.
  wa_fcat-seltext_m = 'Supplying Plant'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'NAME1'.
  wa_fcat-seltext_m = 'S.Plnt Desc.'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'LGORT'.
  wa_fcat-seltext_m = 'Supplying St.Loc'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'LGOBE'.
  wa_fcat-seltext_m = 'Su.St.Loc Desc.'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'UMWRK'.
  wa_fcat-seltext_m = 'Receiving Plant'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'NAME2'.
  wa_fcat-seltext_m = 'R.Plnt Desc.'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'UMLGO'.
  wa_fcat-seltext_m = 'Receiving St.Loc'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
  wa_fcat-col_pos = w_var.
  wa_fcat-tabname = 'IT_MAT'.
  wa_fcat-fieldname = 'LGOBE1'.
  wa_fcat-seltext_m = 'Re.St.Loc Desc.'.
  APPEND wa_fcat TO it_fcat.
  CLEAR wa_fcat.
  ADD 1 TO w_var.
ENDFORM.                    " field_cat
*&      Form  process_data
      text
-->  p1        text
<--  p2        text
FORM process_data .
  LOOP AT it_mat.
    ztabix = sy-tabix.
    READ TABLE it_makt WITH KEY matnr = it_mat-matnr.
    IF sy-subrc = 0.
      it_mat-maktx = it_makt-maktx.
    ENDIF.
    IF it_mat-bwart+2(1) = '2'.
      it_mat-erfmg = - ( it_mat-erfmg ).
    ENDIF.
    READ TABLE it_t001w WITH KEY werks = it_mat-werks.
    IF sy-subrc = 0.
      it_mat-name1 = it_t001w-name1.
    ENDIF.
    READ TABLE it_t001w WITH KEY werks = it_mat-umwrk.
    IF sy-subrc = 0.
      it_mat-name2 = it_t001w-name1.
    ENDIF.
    READ TABLE it_t001l WITH KEY lgort = it_mat-lgort.
    IF sy-subrc = 0.
      it_mat-lgobe = it_t001l-lgobe.
    ENDIF.
    READ TABLE it_t001l WITH KEY lgort = it_mat-umlgo.
    IF sy-subrc = 0.
      it_mat-lgobe1 = it_t001l-lgobe.
    ENDIF.
    MODIFY it_mat INDEX ztabix .
  ENDLOOP.
ENDFORM.                    " process_data
*&      Form  display_data
      text
-->  p1        text
<--  p2        text
FORM display_data .
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
          I_INTERFACE_CHECK                 = ' '
          I_BYPASSING_BUFFER                = ' '
          I_BUFFER_ACTIVE                   = ' '
           i_callback_program                = l_repid
          I_CALLBACK_PF_STATUS_SET          = ' '
           i_callback_user_command           = 'LINE'
           i_callback_top_of_page            = 'TOP'
          I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
          I_CALLBACK_HTML_END_OF_LIST       = ' '
          I_STRUCTURE_NAME                  =
          I_BACKGROUND_ID                   = ' '
          I_GRID_TITLE                      =
          I_GRID_SETTINGS                   =
          IS_LAYOUT                         =
           it_fieldcat                       = it_fcat
          IT_EXCLUDING                      =
          IT_SPECIAL_GROUPS                 =
          IT_SORT                           =
          IT_FILTER                         =
          IS_SEL_HIDE                       =
          I_DEFAULT                         = 'X'
          I_SAVE                            = ' '
          IS_VARIANT                        =
          it_events                         =
          IT_EVENT_EXIT                     =
          IS_PRINT                          =
          IS_REPREP_ID                      =
          I_SCREEN_START_COLUMN             = 0
          I_SCREEN_START_LINE               = 0
          I_SCREEN_END_COLUMN               = 0
          I_SCREEN_END_LINE                 = 0
          IT_ALV_GRAPHICS                   =
          IT_HYPERLINK                      =
          IT_ADD_FIELDCAT                   =
          IT_EXCEPT_QINFO                   =
          I_HTML_HEIGHT_TOP                 =
          I_HTML_HEIGHT_END                 =
        IMPORTING
          E_EXIT_CAUSED_BY_CALLER           =
          ES_EXIT_CAUSED_BY_USER            =
          TABLES
            t_outtab                          = it_mat
        EXCEPTIONS
          PROGRAM_ERROR                     = 1
          OTHERS                            = 2
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " display_data
*&      Form  TOP
      text
FORM top.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary       = lh
  I_LOGO                   =
  I_END_OF_LIST_GRID       =
ENDFORM.                    "TOP

Similar Messages

  • How to Convert Report into Excel Sheet when Sending Mail.

    Dear Friends,
    i want to send mail to HOD of Product with an Excel Sheet .
    i want to send Pending Issue details to HOD in Excel Sheet attachment .
    here i have pending issue report now i need to send it in Excel Sheet attachment .
    i have table where i have manage Product ID and HOD OF PRODUCT.
    CREATE TABLE  "MAP_USER_PRODUCT_DTL"
       (     "ID" NUMBER NOT NULL ENABLE,
         "PRODUCT_ID"NUMBER,
         "USER_ID" VARCHAR2(5) NOT NULL ENABLE,
         "HOD_PROD" VARCHAR2(100)========================================Value is Y OR N IF HOD then Y else N
         CONSTRAINT "MAP_USER_PRODUCT_DTL_PK" PRIMARY KEY ("ID") ENABLE
    /i have one more table where all complete issue detail insert.
    CREATE TABLE  "CRM_ISSUE_PROBLEM"
       (     "ID" NUMBER,
         "SUBJECT" VARCHAR2(255) NOT NULL ENABLE,
         "CLIENT_ID" NUMBER,
         "ASSIGNED_TO_ID" VARCHAR2(100),
         "ASSIGNED_ON" DATE,
         "DESCRIPTION" VARCHAR2(4000),
         "PRODUCT_ID" NUMBER NOT NULL ENABLE,
         "STATUS_ID" NUMBER NOT NULL ENABLE,
          CONSTRAINT "CRM_ISSUE_PROBLEM_PK" PRIMARY KEY ("ID") ENABLE
    Here STATUS_ID is Like Pending ISsue,Open Issue and Close Issue .i want to send mail to HOD with Pending Issue Report convert into Excel Sheet and send to HOD?
    How can i do this.
    Thanks
    Edited by: Vedant on Oct 12, 2011 12:36 AM
    Edited by: Vedant on Oct 12, 2011 2:22 AM

    Hello Vedant,
    Would it suffice if you send a CSV file?
    If yes, then see following code.. run the code under APEX > Home > SQL Workshop > SQL Commands
    DECLARE
            ln_id NUMBER;
            lc_clob CLOB;
         lb_blob BLOB;
         li_in PLS_INTEGER := 1;
         li_out PLS_INTEGER := 1;
         li_lang PLS_INTEGER := 0;
         li_warning PLS_INTEGER := 0;
         lv_mail_rcpts VARCHAR2(2000) := '[email protected]';
         lv_mail_from VARCHAR2(100) := '[email protected]';     
           lv_clmn_separator VARCHAR2(1) := ',';
    BEGIN
         -- Build file content as CLOB
      -- Replace with your query
         FOR i IN (select object_id A, object_name B, object_type C, status D, temporary E, generated F, secondary G,namespace H from user_objects where rownum < 10)               
         LOOP
        IF lc_clob IS NULL THEN
          lc_clob := i.A||lv_clmn_separator||i.B||lv_clmn_separator||i.C||lv_clmn_separator||i.D||lv_clmn_separator||i.E||lv_clmn_separator||i.F||lv_clmn_separator||i.G||lv_clmn_separator||i.H;
        ELSE
          lc_clob := lc_clob||CHR(10)||i.A||lv_clmn_separator||i.B||lv_clmn_separator||i.C||lv_clmn_separator||i.D||lv_clmn_separator||i.E||lv_clmn_separator||i.F||lv_clmn_separator||i.G||lv_clmn_separator||i.H;
        END IF;
         END LOOP; 
         -- Convert CLOB to BLOB
         DBMS_LOB.CREATETEMPORARY(lb_blob,TRUE);
         DBMS_LOB.convertToBlob(lb_blob,lc_clob,DBMS_LOB.LOBMAXSIZE,li_in,li_out,DBMS_LOB.DEFAULT_CSID,li_lang,li_warning);
         -- Send mail
         ln_id:= APEX_MAIL.SEND(
           p_to        => lv_mail_rcpts,
                 p_from      => lv_mail_from,
                 p_subj      => 'Subject Goes here',
                 p_body      => 'Body goes here'
           -- add CSV file as attachment
         APEX_MAIL.ADD_ATTACHMENT
           p_mail_id   => ln_id,
           p_attachment => lb_blob,
           p_filename   => 'filename.csv',
           p_mime_type  => 'application/csv'
      -- push mail queue
      APEX_MAIL.PUSH_QUEUE;
         -- empty temporary space
         DBMS_LOB.FREETEMPORARY ( lob_loc =>  lb_blob);       
         COMMIT;
    END;Regards,
    Hari

  • How to convert flv into mp3 -- please help!

    hi,
    i'm very new to using videos in flash. i uploaded a video into flash in order to add texts to it to upload later to web. my problem is converting the fla file to mp3. i tried the video encoder but i'm stuck. please help if you can..it'll be very much appreciated. thanks!

    i think i see where the problem lies. the file i worked on in flash (i inserted some texts into the video) are saving as .fla. how do i get it to change to flv in order to use the service you suggested? thanks a bunch!

  • How to convert smartforms into Adobe forms.

    Hi......
    How to convert smartforms into Adobe forms.
    Regards
    Anbu B

    Hi,
    You need to use the Function Module CONVERT_OTF.
    Please check the below code
    REPORT zsuresh_test.
    Variable declarations
    DATA:
    w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
    w_fmodule TYPE rs38l_fnam,
    w_cparam TYPE ssfctrlop,
    w_outoptions TYPE ssfcompop,
    W_bin_filesize TYPE i, " Binary File Size
    w_FILE_NAME type string,
    w_File_path type string,
    w_FULL_PATH type string.
    Internal tables declaration
    Internal table to hold the OTF data
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data recd from the SMARTFORM
    t_otf_from_fm TYPE ssfcrescl,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    This function module call is used to retrieve the name of the Function
    module generated when the SMARTFORM is activated
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = w_form_name
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = w_fmodule
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Calling the SMARTFORM using the function module retrieved above
    GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
    format of the output
    w_cparam-no_dialog = 'X'.
    w_cparam-preview = space. " Suppressing the dialog box
                                                        " for print preview
    w_cparam-getotf = 'X'.
    Printer name to be used is provided in the export parameter
    OUTPUT_OPTIONS
    w_outoptions-tddest = 'LP01'.
    CALL FUNCTION w_fmodule
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = w_cparam
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = w_outoptions
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otf_from_fm
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    t_otf[] = t_otf_from_fm-otfdata[].
    Function Module CONVERT_OTF is used to convert the OTF format to PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
    WINDOW_TITLE =
    DEFAULT_EXTENSION =
    DEFAULT_FILE_NAME =
    FILE_FILTER =
    INITIAL_DIRECTORY =
    WITH_ENCODING =
    PROMPT_ON_OVERWRITE = 'X'
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    USER_ACTION =
    FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    FILETYPE = 'BIN'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = T_pdf_tab
    FIELDNAMES =
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks,
    Ruthra

  • How to convert .class into .jar file

    Hi,
    How to convert .class into .jar file

    jsf_VWP5.5.1 wrote:
    Hi,
    How to convert .class into .jar fileFrom a command prompt, cd to the location of your .class file(s).
    If you want to create a simple jar, use: jar -cf Whatever.jar Whatever.class
    If you want to compile all .class files in a directory into a jar, use *.class instead.
    Now, I'm going to assume you want to create an executable jar... here's how to do that:
    1) Create a blank text file; for this example, lets call it main.txt.
    2) In the first line of main.txt, type: Main-class: Whatever ('Whatever' should be the name of the class in your program where the main() method is located)
    3) Press enter to go to the next line (someone please correct me if I'm wrong, but if you don't insert the line break/CR after the Main-class: statement, this will not work... in my experience, this is true)
    4) Make sure you save this file in the same directory as your .class file(s).
    5) Type: jar -cmf Whatever.jar main.txt Whatever.class
    ...and that's about it. For more information on the usage of the jar command and to understand the switches (such as -cmf), try jar --help.
    Hope that helps.

  • How to convert report to PDF format

    Hi,
    Please let me know the procedure to convert reports into PDF format.
    Thanks in Advance
    Irfan Hussain

    Refer these links
    http://www.sap-img.com/bc037.htm
    http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
    <b>CONVERT_ABAPSPOOLJOB_2_PDF</b> FM convert abap spool output to PDF

  • How to convert files into DAT?

    Does anyone know how to convert files into DAT? Not The other way around please.

    This might do it:
    http://www.videoconverterformac.com/dat-converter-for-mac.html
    but can't imagine why you would want to!

  • How to convert BLOB into a String

    Hi,
    I got a blob column from the database.
    It contains one XML File.
    How to convert it into String.
    I need the code for how to convert the blob into String
    Thanks in Advance.

    A blob would be a byte-array, which you can use in the String(byte[]) constructor

  • How to convert rows into columns with decode function

    Hi,
    How to convert rows into columns with the help of decode function in oracle.
    thanks and regards
    P Prakash

    say
    col1 col2
    1 10
    2 20
    3 30
    then use
    select col1,
    sum(decode(col2,10,10)) "new1"
    sum(decode(col2,20,20))"new2"
    sum(decode(col2,30,30))"new3"
    from table_name
    group by col1;
    we used sum u can use ny function if wont u have to give the column name i.e col2 name also
    so i think u got it nw
    regards

  • How to convert bytes[] into File object

    hi
    how to convert byte array into File object
    pls.. help me
    Regards
    srinu

    rrrr007 wrote:
    Hi,
    How to convert bytes[] into multipage File object?? ]There's no such thing as a "multipage File object." You ought to re-read this thread closely, and read the [API docs for File|http://java.sun.com/javase/6/docs/api/java/io/File.html] to clear up your confusion about what a File object is.
    I used the java.io.SequenceInputStream to concatenate two input streams (basically .pdf files) into a single input stream. I need to create a single multipage pdf file using this input stream. Then you need a pdf API, like iText or fop. You can't just concatenate pdf files, word docs, excel sheets, etc., like you can text files. Google for java pdf api.

  • How to convert mysql into bekerley db?

    i have a mysql database ,there is a table in it ,only have 7 fields:symbol,date,open,high,low,close,vol.
    would you mind to tell me how to convert it into bekerley db?

    Hello,
    You can build a drop-in replacement for SQLite by specifying the
    --enable-sql_compat flag to Berkeley DB's configure script.  This
    creates a binary, sqlite3 which has the same interface as SQLite.
    The "Getting Started with the Oracle Berkeley DB SQL API" and FAQ
    have the details:
    http://www.oracle.com/technology/products/berkeley-db/faq/db_faq.html
    http://www.oracle.com/technology/documentation/berkeley-db/db/bdb-sql/index.html
    Thanks,
    Sandra

  • How to convert idoc into xml/edifact

    hi everyone just now i have started to work on edi, i want to kno how to convert idoc into xml/edifact. plz  reply asap

    Firstly, I will reply when and if I choose to. I do not require the asap nonsense at the end of your sentence.
    EDIFACT - You will need a subsystem.
    XML - I am not 100%. It may also depend on what version of SAP you are on. As I do not know if later versions of SAP can convert IDoc to XML.

  • How to convert rows into column

    Hi,
    can any one help me how to convert rows into column by pl/sql procedure.
    Thanks and Regards

    http://www.oracle.com/technology/oramag/code/tips2004/050304.html
    -- dropping the sample table if exists
    drop table rowstocol
    -- create sample table
    create table rowstocol ( name varchar2(20));
    -- Inserting rows into sample table
    insert into rowstocol values('Amit Zhankar');
    insert into rowstocol values('Piyu Yawalkar');
    insert into rowstocol values('Piyu Yawalkar');
    insert into rowstocol values('Ashish Ghelani');
    insert into rowstocol values('Aditi Zhankar');
    insert into rowstocol values('Tom Kyte');
    insert into rowstocol values('Oracle');
    -- Following query should be run to create a sql. This result sql should be run to convert rows to column.
    -- The following query uses just the tablename (whose data is to be converted) and name of the column (which is to be converted).
    -- Example taken here is table rowstocol, column name.
    SELECT cc
    FROM (select decode(rn ,1 ,'Select ',null) ||' MAX (CASE WHEN dr = '|| rownum||' THEN DECODE (rn,1, col1) END) '||
    decode(rn,maxr,' col1 from ','||'||chr(39)||','||chr(39)||'|| ') cc,rn,maxr
    from (SELECT ROWNUM rn,count(0) over() maxr FROM rowstocol) order by rn) trows
    union all
    select '(SELECT tabs.col1, DENSE_RANK () OVER (ORDER BY col1,rowid) dr,dense_rank() OVER (order by 1) rn
    FROM (SELECT NAME col1 FROM rowstocol) tabs ) group by rn' cc from dual;
    -- The result of this query will do the reqd conversion from row to column.
    -- Replace table rowstocol by your table, column name by your column.
    CC
    Select MAX (CASE WHEN dr = 1 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 2 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 3 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 4 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 5 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 6 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 7 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 8 THEN DECODE (rn,1, col1) END) col1 from
    (SELECT tabs.col1, DENSE_RANK () OVER (ORDER BY col1,rowid) dr,dense_rank() OVER (order by 1) rn
    FROM (SELECT NAME col1 FROM rowstocol) tabs ) group by rn
    Select MAX (CASE WHEN dr = 1 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 2 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 3 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 4 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 5 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 6 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 7 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 8 THEN DECODE (rn,1, col1) END) col1 from
    (SELECT tabs.col1, DENSE_RANK () OVER (ORDER BY col1,rowid) dr,dense_rank() OVER (order by 1) rn
    FROM (SELECT NAME col1 FROM rowstocol) tabs ) group by rn;
    COL1
    Aditi Zhankar,Amit Zhankar,Ashish Ghelani,Oracle,Oracle,Piyu Yawalkar,Piyu Yawalkar,Tom Kyte
    Edited by: bhooma on Jan 20, 2009 2:44 AM

  • How to Convert frames into minutes and seconds

    Hi,
    does anyone know how to convert frames into time (minutes and
    seconds). I need the users to view the swf with current time being
    played and over time. I have 2152 frames in total and I want that
    to be converted to time. Can anyone help me on this. I would really
    appreciate it. It is very urgent!!!!
    Thanks

    Time Indicator,
    > does anyone know how to convert frames into time
    (minutes
    > and seconds).
    That depends entirely on the framerate of the movie. At the
    default
    12fps, 12 frames would be one second; 24 frames would be two.
    At 24fps, 24
    frames would be one second.
    > I need the users to view the swf with current time being
    played
    > and over time. I have 2152 frames in total and I want
    that to be
    > converted to time. Can anyone help me on this. I would
    really
    > appreciate it. It is very urgent!!!!
    Judging by your four exclamation points, I'd say it's
    definitely urgent!
    Well, again, if you're at 12fps, 2152 frames would take 179
    seconds, or 2
    minutes and 59 seconds. I arrived at that number by dividing
    2152 by 12.
    Keep in mind, though, framerate is actually more of a
    guideline than an
    exact figure. Framerate determines the rate at which Flash
    will *try* to
    display content. On an especially slow computer, the Flash
    Player may not
    be able to keep up, and the same number of frames might
    actually take more
    time.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • How to convert byte into string

    can any tell me how to convert byte into string
    when im an debugging thid code in eclipse it shows the result in integer format instead of string but in command prompt it is showing result in string format..........plz help
    package str;
    import java.io.*;
    public class Testfile {
    public static void main(String rags[])
    byte b[]=new byte[100];
    try{
    FileInputStream file=new FileInputStream("abc.txt");
    file.read(b,0,50);
    catch(Exception e)
         System.out.println("Exception is:"+e);
    System.out.println(b);
    String str=new String(b);
    System.out.println(str);
    }

    Namrata.Kakkar wrote:
    errors: count cannot be resolved and Unhandled exception type Unsupported Encoding Exception.
    If i write an integer value instead of "count" then Unhandled exception type Unsupported Encoding Exception error is left.This is elementary. You need to go back to [http://java.sun.com/docs/books/tutorial/|http://java.sun.com/docs/books/tutorial/] .

Maybe you are looking for

  • Search Item drop-down does not show any data for Advanced Search.

    Hi, I have a requirement to add a new criteria to the existing Advanced Search region of 'My Employee Information' in Manager Self Service responsibility. I substituted the AdvancedSearchVO to include the new column. Using personalization i did the b

  • Data Guard DB Broker configuration failed after adding Standby DB

    I am trying to set up DG Broker configuration between Primary and Physical Standby DB. I have added Standby db and enabled it. But when i try to show configuration it failed. Given below are the errors. Any help regarding this error is appreciated. G

  • How do you change the iOS 5 tabs back to the page of previews

    i recently updated my ipad 2 to ios 5 and dislike the new tabs bar at the top of the page and would like to change back to the old full page of previews

  • BUP004 not added to an Organisational Unit

    Hello there, I have an Organizational Structure which was created long time ago and it is linked to a business partner. My issue is that I can't add the BUP004 role to the BP (it doesn't have any role as you can see in the attached image). A few obse

  • Multiple tasks handling in change Correction

    Hi Gurus, Need your help on the following queries: 1. when we create a change request from a service desk request, how does the information flow happens. Also i have a scenario, wherein until my chnage request gets resolved and closed, i should not b