Creating the spool request for the internal table data

Hi..
I am little confused with the function module used for creating the spool request.
well...I am practicing the ALV report and sending the that report to the spool.
I  ve used the FM SLVC_TABLE_PS_TO_SPOOL.
this is the way i defined the internal table.
Data:
begin of imat occurs 0,
matnr like marav-matnr,
maktx like marav-maktx,
matkl like marav-matkl,                     
ntgew like marav-ntgew,
gewei like marav-gewei,
end of imat.
data i_lines type sy-tfill
and i declared..
describe table imat lines i_lines.
then i given the value for i_file_length as i_lines in the export paramet of the FM SLVC_TABLE_PS_TO_SPOOL.
CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
    EXPORTING
      i_file_length            = i_lines
   IMPORTING
     E_SPOOLID                = spoolid
    tables
      it_textdata              = imat
when i executed it shows the list and wen going back it shows the runtime error as
CALL_FUNCTION_CONFLICT_LENG  - Type conflict when calling a function module (field length).
please provide me some solutions.
thanks in advance.
etienne.

Hi satyajit,
Thanks for your response....but the fields in my internal table "IMAT" is not compatible with the structure LVC_S_1022 as it has it componenrt - LINE.
so how can i define my internal table IMAT as type lvc_s_1022 as you suggested.
thanks in advance.
etienne.

Similar Messages

  • How to genrate the spool request for the smart form.

    Hi Friends,
    I have a page to FAX to vendor for which i have made a smartform for the page to be send. For this purpose i have to genrate the spool request without displaying the output of the smartform. The program should give the spool number genrated.
    can you please suggest somthing.
    Regards,
    Vidya.

    hi
    for this when u r callin the form write some code in u r program
    IF RADIOBUTTON = 'X' .     "GET THE SPOOL
    CONTROL_PARAMETERS-NO_DIALOG = 'X'.
    ELSE.
    CONTROL_PARAMETERS-NO_DIALOG = ' '.
    ENDIF.
    and pass this to the calling form.
    Please Close this thread.. when u r problem is solved. Reward if Helpful
    Regards
    Naresh Reddy K

  • How to get the spool id or how to create a spool id for the report .

    hi,
    how to get the spool id or how to create a spool id for the report .
    this spool id i have to use it in CONVERT_ABAPSPOOLJOB_2_PDF fm to get the pdf download file.
    my requirement is to download a pdf file from the alv grid list.

    Hi Raghu,
    Execute this program.
    REPORT  ZTEST_3318                              .
    tables: usr01.
    perform send_report_to_spool.
    *&      Form  send_report_to_spool
          text
    form send_report_to_spool.
      data: loc_dest like pri_params-pdest,
            wf_listname type char12,
            wf_listtext like PRI_PARAMS-PRTXT,
            wf_copies type i,
            wf_days type i,
            wf_PARAMS LIKE PRI_PARAMS,     " achieving file PRI_PARAMS.
            wf_valid type c.
      clear : wf_listname , loc_dest , wf_listtext .
      move: 'AP interface' to   wf_listname .
      move: 'AP interface' to   wf_listtext .
    select single spld into usr01-spld from usr01 where bname eq sy-uname .
      if sy-subrc eq 0 .
        move: usr01-spld to loc_dest .
      endif .
      call function 'GET_PRINT_PARAMETERS'
        EXPORTING
          destination    = loc_dest
          copies         = 1
          list_name      = wf_listname
          list_text      = wf_listtext
          immediately    = ' '
          release        = ' '
          new_list_id    = 'X'
          expiration     = 1
          line_size      = 200
          line_count     = 65
          layout         = 'X_65_200'
          sap_cover_page = 'X'
          receiver       = 'SAP*'
          department     = ''
          no_dialog      = 'X'
        IMPORTING
          out_parameters = wf_params
          valid          = wf_valid.
      if wf_valid <> space.
        new-page print on parameters wf_params no dialog.
        perform write_summary .
        new-page print off.
      endif .
    endform.                    "send_report_to_spool
    *&      Form  write_summary
          text
    -->  p1        text
    <--  p2        text
    FORM write_summary .
    data: begin of itab occurs 0,
          matnr type matnr,
          end of itab.
    select matnr
           from mara
           into table itab
           up to 10 rows.
    loop at itab.
    write: / itab-matnr.
    endloop.
    ENDFORM.                    " write_summary
    This will create spool in SP01.What data you want to put in Spool write it in form write_summary.I have done coding for testing purpose
    After that use that spool for your purpose.
    If Useful award point

  • FM to release the spool  request for printing

    I have requirement one of my program generate the spool request.
    now i need to schedule the print job in background.
    can any one help in specifing the Funtion modulde that can be used to releasing the spool request for printing

    Hi ,
    Please can one specify what are the parameters to be populated to make it run in the back ground
    right know i'm populating these fields.
    In SP01 it showing status as "Frontend Unavaliable".
    if i schedule the program in back ground.
    CALL FUNCTION 'RSPO_OUTPUT_SPOOL_REQUEST'
      EXPORTING
       COPIES                         = 1
       DEVICE                         = 'LOCL'
      DIVISION                       = '*'
       ENDPAGE                        = 0
       PRIO                           = 1
      RECEIVER                       = '*'
      REQEST_TITLE                   = '*'
        spool_request_id               = '9817'
      STARTPAGE                      = 0
      TELELAN                        = '*'
      TELENUM                        = '*'
      POSNAME                        =
      ACTTIME                        =
    TABLES
      ATTRIBUTES                     =
    EXCEPTIONS
       ARCHIVE_DEST_INVALID           = 1
       ARCHIVE_DEST_NOT_FOUND         = 2
       ARCHIVE_DEST_NO_RIGHT          = 3
       CANNOT_ARCHIVE                 = 4
       CHANGE_ARCHDEST_NO_RIGHT       = 5
       CHANGE_COPIES_NO_RIGHT         = 6
       CHANGE_DEST_NO_RIGHT           = 7
       CHANGE_DEVTYPE_NO_RIGHT        = 8
       CHANGE_PRIO_NO_RIGHT           = 9
       CHANGE_TELENUM_NO_RIGHT        = 10
       CHANGE_TITLE_NO_RIGHT          = 11
       DEST_INVALID                   = 12
       DEST_NOT_FOUND                 = 13
       DEST_NO_RIGHT                  = 14
       INTERNAL_PROBLEM               = 15
       INVALID_FAX_ATTRIBUTE          = 16
       INVALID_PARAMETERS             = 17
       NON_OWNER_NO_RIGHT             = 18
       NO_LAYOUT                      = 19
       NO_SPOOL_REQUEST               = 20
       OUT_AGAIN_NO_RIGHT             = 21
       SPOOLER_PROBLEM                = 22
       OTHERS                         = 23

  • Creating single spool request for printing all shop floor papers

    Hello PP Gurus,
    We are printing shop floor papers at the time of releasing production order using txn CO02. It creates individual spool request for printing different shop floor papers in the same orders . eg Pick list, goods receipt list etc.
    Is it possible to do the cofiguration setting to create only one spool request for all the different SF papers belong to same order.? If yes, please let me know the steps for customising this.
    Thanks for your help in advance.
    Regards & Thanks
    Rajesh D.

    In transaction OPK8, in forms uncheck the 'New List' check box for the List.
    Regards
    Ramanujan

  • Splitting the Spool Request for Form Printing

    Hello,
    I have a requirement where I need to print data for 1500 employees (1 Page per employee) which makes 1500 pages per spool request. Now, there is a change in the printer due to which the printer only accepts only 300 pages in the buffer. So, after printing 300 pages, it stops. Is there any way I can split the spool request and generate 5 spool requests (1 request for every 300 pages) so that all the pages are printed at once? Please let me know.
    Regards,
    Venkata Phani Prasad Konduri

    i have created a program using which you can create multiple pdf from a single spool number
    first in the code below i have taken a spool number which has 2 pages in it.
    second you must use the FM : RSPO_RETURN_SPOOLJOB  in the program to get the content of the spool .  while to perform analysis on how to build logic to split the spool otf/pdf user the FM RSPO_DISPLAY_SPOOLJOB, here by passing the spool number you will get the content in display mode and then based on the keyword you will build logic for e.g in my case i have to perform segregation based on material number so it can be used to decide how many pages are reserved by a specific material number.
    another important point to kept in mind is that otf begins with "//"  and a page ends with "EP" and last page ends with  "//" along with "EP". It can be used to remove the number of lines to keep specific pages .
    program layout as with proper documentation has been provided.
    REPORT  zdk_spool_split.
    * DATA DECLARATION.
    TYPES : tbuf LIKE tline OCCURS 1.
    FIELD-SYMBOLS: <buf> TYPE tbuf.
    FIELD-SYMBOLS : <lit_otf> TYPE ANY TABLE.
    DATA : lit_otf TYPE STANDARD TABLE OF itcoo.
    DATA : objcont LIKE soli  OCCURS 0 WITH HEADER LINE.
    DATA : format(5) TYPE c, dummy TYPE i.
    DATA : buffer_pdf TYPE STANDARD TABLE OF tline.
    DATA : p_file LIKE rlgrap-filename VALUE 'C:\temp\file1.pdf'. "#EC NOTEXT
    DATA : numbytes TYPE i VALUE 255.
    DATA : cancel.
    DATA : otfcmd LIKE itcoo VALUE '//'.
    DATA : pdfcnv_archive_index LIKE toa_dara.
    DATA : bin_file TYPE xstring,
            pdf_username TYPE c.
    * GET THE SPOOL NUMBER FROM THE USER.
    PARAMETERS : p_sid TYPE tsp01-rqident OBLIGATORY.
    * GET THE CONTENT OF THE SPOOL NUMBER
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
       EXPORTING
         rqident              = p_sid
       TABLES
         buffer               = objcont
       EXCEPTIONS
         no_such_job          = 1
         job_contains_no_data = 2
         selection_empty      = 3
         no_permission        = 4
         can_not_access       = 5
         read_error           = 6
         type_no_match        = 7
         OTHERS               = 8.
    IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    * INCORPORATE YOUR LOGIC TO DELETE LINES WHICH ARE NOT REQUIRED.
    * IN MY CASE I HAVE REMOVED LINES FROM 351 TO 715 TO REMOVE THE SECOND PAGE FROM MY SPOOL
    * MY OBJCONT AFTER DELTED BEGINS WITH "//" AND ENDS WITH "EP" AND "//"
    DELETE objcont[] FROM 351 TO 715.
    * IT ONLY CONTAINS ONE PAGE OUT OF 2 PAGES FROM THE SPOOL NUMBER I HAVE PROVIDED.
    * CONVERT OTF TO PDF
    lit_otf = objcont[]. " GET THE OTF IN CORRECT OTF FORMAT
    ASSIGN buffer_pdf TO <buf>.
    format = 'PDF'. " CHOOSE THE CORRECT FORMAT IE PDF MUST FOR CONVERSION
    CALL FUNCTION 'CONVERT_OTF'
       EXPORTING
         format                = format
       IMPORTING
         bin_filesize          = dummy
       TABLES
         otf                   = lit_otf
         lines                 = <buf>
       EXCEPTIONS
         err_max_linewidth     = 1
         err_format            = 2
         err_conv_not_possible = 3
         OTHERS                = 4.
    IF sy-subrc IS NOT INITIAL.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    * GET THE NUMBYTES OF THE PDF CONTENT OBTAINED AFTER THE CONVERSION
    * CORRECT NUMBYTE IS VERY IMPORTANT OTHERWISE IT WILL NOT GENERATE
    * PDF IN CORRECT FORMAT.
    PERFORM convert_otf2pdf_end(rstxcpdf) TABLES <buf>
                                           USING otfcmd
                                                 numbytes
                                                 pdfcnv_archive_index
                                                 bin_file
                                                 pdf_username.
    * NOW DOWNLOAD THE PDF TO VIEW IN ACTUAL PDF AT DESIRED PATH
    PERFORM download_w_ext(rstxpdft) TABLES <buf>
                                      USING p_file
                                            '.pdf'
                                            'BIN'
                                            numbytes
                                            cancel.

  • 2 different  tables   in the main window with same internal table data

    Hi All,
    can we have 2 diffterent  tables with same internal table data into its work area in the main window.Is it possible or we will get any run time error.?
    is it like having 2 nested loop with same internal table ?
    ex : loop at itab1 into wa_itab.
           loop at itab1 into wa_itab.
    endloop.
    endloop.
    can we use like this?

    Hi,
    there will not be any error ...but what is the use of it...
    do you need to have a controlled way of display ...of the data...
    If so then you create another workarea in the global definitions of the same type and then use it...
    Regards,
    Ram

  • How do I AUTOMATICALLY generate Transport request for a Z table data?

    Hello friends,
    I would like to automatically create/generate a transport request for a Z table every time I change, add or delete data in that table.
    Currently, every time I modify data in the Z table, I need to go and manually create a transport request and then indicate keys for the row(s) which were modified. I find this a tedious, time consuming, and error prone process.
    So I would like to automate this process. That is to say, the transport request is generated for the rows that I modified. The same way as is done when you change a program. It automatically prompts you for a transport request thingy.
    Any ideas?
    Your help is greatly appreciated.

    You need to make the table contents transportable by creating a "table maintenance generator" in SE11 under Utilities -> Table maintenance generator.
    In that screen for the section "Dialog data transport Details" the "Standard Recording Routine" option should be selected.
    Then only will the system ask for Transport request when entering data through the generated maintenance view in SM30.
    Also change the "delivery class' in the table attributes to 'C' - Customizing table

  • Create a deep structure for dynamic internal table

    Hi All,
    I am creating a dynamic table using method cl_alv_table_create=>create_dynamic_table.
    The normal structure gets created. but now I want to creat a Deep structure for having information of colors also for each column. So I want to add a COLTAB type LVC_T_SCOL for colors information .
    How should I create this using above method?
    Rgds,
    Madhuri

    I created a zcelltab structure as below. But while creating dynamic internal table, I received the error  with
    'Type "ZCELLTAB" is unknown 68 ZCELLTAB-CELLTAB
    Here is the code.
    DATA: BEGIN OF ZCELLTAB,
             CELLTAB LIKE LVC_S_STYL,
         END OF ZCELLTAB.
    FIELD-SYMBOLS <T_CELLTAB> TYPE LVC_T_STYL.
    DATA : LT_CELLTAB TYPE LVC_T_STYL.
    DATA:  WA_CELLTAB TYPE LINE OF LVC_T_STYL.
    DATA: GT_FCAT1 TYPE LVC_T_FCAT,
               GW_FCAT1 TYPE LVC_S_FCAT,
                GT_FCAT2 TYPE LVC_T_FCAT,
                GW_FCAT2  TYPE LVC_S_FCAT.
    After filling the FCAT1, I added the field in FCAT2  like below
      GT_FCAT2[ ] = GT_FCAT1[ ].
      G_TABIX = G_TABIX + 1.
      GW_FCAT2-INTTYPE = 'C'.
      MOVE G_TABIX TO GW_FCAT2-COL_POS.
      GW_FCAT2-OUTPUTLEN = '10'.
      GW_FCAT2-FIELDNAME = 'T_CELLTAB'.
      GW_FCAT2-TABNAME = 'ZCELLTAB'.
      GW_FCAT2-REF_FIELD = 'CELLTAB'.
      GW_FCAT2-REF_TABLE = 'ZCELLTAB'.
      APPEND GW_FCAT2 TO GT_FCAT2
      CLEAR GW_FCAT2.
    While calling the below method, the error with
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
         EXPORTING
          IT_FIELDCATALOG = GT_FCAT2
        IMPORTING
          EP_TABLE        = GT_REQ.
      ASSIGN GT_REQ->* TO <F_TAB>.
      CREATE DATA GWA_REQ LIKE LINE OF <F_TAB>.
      ASSIGN GWA_REQ->* TO <F_WA>.
    LOOP AT ITAB.
    ASSIGN COMPONENT 'MATNR'  OF STRUCTURE <F_WA> TO <F_VAL>
    <F_VAL> = ITAB-MATNR.
    IF ITAB-MATNR IS INITIAL.
    ASSIGN COMPONENT 'T_CELLTAB' OF STRUCTURE <F_WA> TO <T_CELLTAB>
            CLEAR WA_CELLTAB.
            WA_CELLTAB-FIELDNAME = 'MATNR'.
            WA_CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
            INSERT WA_CELLTAB INTO TABLE <T_CELLTAB>.
    ENDIF.
    APPEND <F_WA> TO <F_TAB>
    ENDLOOP.
    CALL METHOD GR_GRID->SET_TABLE_FOR_FIRST_DISPLAY
            EXPORTING
              I_CONSISTENCY_CHECK  = G_CONSISTENCY_CHECK
              IT_TOOLBAR_EXCLUDING = G_EXCLUDE
              I_SAVE               = G_SAVE
           I_DEFAULT            = 'X'
              IS_LAYOUT            = G_LAYOUT
            CHANGING
              IT_OUTTAB            = <F_TAB>
              IT_FIELDCATALOG      = F_CAT1.
    Please let me know where I was wrong.
    Should I remove the T_CELLTAB as the field name is not mentioned in the structure 'ZCELLTAB'.
    Thanks,
    Kumar.
    Edited by: venn e on May 7, 2010 4:10 PM

  • To create a deep structure for dynamic internal table.

    Hello
    My ALV has fields which are defined dynamically during execution.
    so, i did it in the following way,
    Declared Field symbolds, DREF and fieldcatalog as,
    FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE,
                  <fs_dyntable>.
    DATA:   dref_dyntab    TYPE REF TO data,
            dref_dynwa     TYPE REF TO data.
    DATA: ts_fieldcatalog TYPE lvc_t_fcat.
    DATA: wa_fieldcatalog TYPE lvc_s_fcat.
    Updated Fieldcatalog dynamically as,
    *function module to read segment structure
        CALL FUNCTION 'SEGMENT_READ'
          EXPORTING
            segmenttyp           = v_segment_name
          TABLES
            segmentstructure     = ts_seg_structure
          EXCEPTIONS
            no_authority         = 1
            segment_not_existing = 2
            OTHERS               = 3.
        IF sy-subrc <> 0.
          CASE sy-subrc.
            WHEN '1'.
              MESSAGE e024.
              STOP.
            WHEN '2'.
              MESSAGE e025 WITH v_segment_name.
              STOP.
            WHEN OTHERS.
              MESSAGE e023.
          ENDCASE.
        ENDIF.
    *FETCH FIELDS FROM STRUCTURE OF SEGMENT AND CREATE FIELDCATALOG FOR
    EACH FIELD OF SEGMENT (DYNAMIC FIELD CATALOG)
        LOOP AT ts_seg_structure INTO wa_seg_structure.
          ADD 1 TO v_counter.
          wa_fieldcatalog-fieldname = wa_seg_structure-fieldname.
          wa_fieldcatalog-col_pos   = v_counter.
          wa_fieldcatalog-ref_table = wa_seg_structure-segtyp.
          APPEND wa_fieldcatalog TO ts_fieldcatalog.
          CLEAR wa_fieldcatalog.
        ENDLOOP.
    and generated dynamic internal table using fieldcatalog as,
    *--Method to get the structure of table using fieldcatalog.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ts_fieldcatalog
        IMPORTING
    *--Variable of type REF TO DATA.
          ep_table        = dref_dyntab.
      IF sy-subrc <> 0.
        MESSAGE e023.
      ENDIF.
    *--Dynamic internal tables required when show segments selected
      IF p_selseg IS NOT INITIAL.
        ASSIGN dref_dyntab->* TO <t_dyntable>.
    *--Create dynamic work area and assign to FS
      CREATE DATA dref_dynwa LIKE LINE OF <t_dyntable>.
        ASSIGN dref_dynwa->* TO <fs_dyntable>.
    And then i populated this <t_dyntable> which is being passed as data-table to method
    CL_GUI_ALV_GRID => SET_TABLE_FOR_FIRST_DISPLAY
    for ALV grid Display along with above used filedcatalog ts_fieldcatalog.
    Things are fine till here, but now i have the requirement to edit selected rows of the ALV display..
    As you might be aware, we need a field
            TS_STYLEROW  TYPE lvc_t_styl, (i.e, a field of type 'h' and we can say as an internal table inside an internal table or else as a deep structure)
    in the output internal table <t_dyntable> to meet our requirement.
    My issue is about declaring one such field of type 'h' in this dynamically created internal table ''<t_dyntable>".
    I tried in the following way by adding one such field to fieldcatalog :
    *Field for Styling
      ADD 1 TO v_counter.
      wa_fieldcatalog-fieldname   = 'TS_STYLEROW'.
      wa_fieldcatalog-tabname     = 'TS_STYLE'.
      wa_fieldcatalog-col_pos     = v_counter.
      wa_fieldcatalog-no_out      = 'X'.
      wa_fieldcatalog-inttype     = 'h'.      " I even mentioned this
      APPEND wa_fieldcatalog TO ts_fieldcatalog.
      CLEAR  wa_fieldcatalog.
    But this is creating a field of type 'C' in the table <t_dyntable> instead of what i was expecting
    Guyz and respected,
    Please advice me with the solution or ur ideas....
    Note : The overall requirement is create a deep structure for dynamically generated internal table.
    Your help is highly appreciated and unforgettable..!!!!!!!

    hi,
    Dynamic append
    Dynamic internal table
    Dynamic internal table
    dynamic columns in ALV
    Variant for dynamic selection
    thanks

  • How to get the soap request for the particular operations in CRM

    Hi friends,
    We got the wsdl files of different modules from the crm(Oracle CRM on demand). We converted the wsdl files to java classes using axis1.4 wsdl2java tool.Now all create,update,download,lookup operations are implemented in java using the generated classes and they are working properly with the client stub.Now the problem is how can we get the soap request and response of particular operations that we submitted to CRM .The request and response should get by using java code.We are looking no tool for the soap request/response. We are working in Eclipse IDE.
    thanks in advance...

    Refer the link. It might tellsa about attaching to transport request but using the way you can find also -
    Re: How To Transport STANDARD TEXTS??
    Regards,
    Amit
    Reward all helpful replies

  • Spitting the spool request by the system

    HI,
    The client is expecting only one spool. But the system is generating muttiple spool. We have tested this in the development We are getting only one spool. But in prod we are getting mutiple spool. I am not sure through which parameter, tt is happening or because of the more data, the system itsself is spitting the spool. Please provide more information if you have come across such a situation
    Thanks in advance.

    Moderator message - Welcome to SCN.
    But cross posting is not allowed. So this thread is locked. Please read Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!! and How to post code in SCN, and some things NOT to do... before posting again.
    Rob

  • SPOOL REQUEST FOR SMARTFORM

    HI experts,
    how to create the spool request for smartform. can anyone help me. give me the complete procedure.
    thanks in advance for ur responce.

    The user which send the smartform to the spool (probably wf-batch) needs an output device. You can maintain this in SU01.
    Just look at sample code:
    1.Send Smart Form output to spool using the FM <ws_formname> (FM name derived from the export parameters of SSF_FUNCTION_MODULE_NAME).
    //Start of Code Sample
    DATA : ws_formname TYPE rs38l_fnam.
    TYPES: BEGIN OF ty_script,
    trans_ref LIKE eanl-anlage,
    cont_ref TYPE e_edmideservprovcontractid,
    trans_code TYPE char05,
    trans_reason TYPE char05,
    market_sect LIKE eanl-zzmktscode,
    efffrm_date LIKE sy-datum,
    mprn LIKE iflot-zzmprn,
    mlc TYPE char01,
    subbuild_no(40) TYPE c,
    build_no LIKE adrc-str_suppl1,
    dep_fare LIKE adrc-str_suppl3,
    post_town LIKE adrc-city1,
    post_code LIKE adrc-post_code1,
    asset_code LIKE egerh-kombinat,
    paymnt_code(2) TYPE c,
    model_code LIKE equi-typbz,
    manuf_code LIKE equi-herst,
    year_manuf LIKE equi-baujj,
    serial_no LIKE equi-sernr,
    meter_code TYPE char01,
    meter_mech(2) TYPE c,
    meas_cap TYPE zmeasur_cap,
    role_code TYPE char03,
    market_name LIKE eservice-serviceid,
    status TYPE char01,
    END OF ty_script.
    DATA: i_scriptdata TYPE STANDARD TABLE OF ty_script
    WITH HEADER LINE.
    DATA: wa_output_options TYPE ssfcompop,
    wa_control_params TYPE ssfctrlop,
    wa_spoolnum TYPE rspoid,
    wa_printdata TYPE efg_strn_printdata.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'Your Form Name'
    IMPORTING
    fm_name = ws_formname
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    CALL FUNCTION ws_formname
    EXPORTING
    control_parameters = wa_control_params
    c = wa_printdata
    IMPORTING
    job_output_info = wa_job_output_info
    TABLES
    i_scriptdata_input = i_scriptdata(Your Script Data)
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    MOVE wa_job_output_info-spoolids] TO wa_spoolids[.
    READ TABLE wa_spoolids INTO wa_spoolnum INDEX 1.
    IF sy-subrc = 0.
    DATA :id LIKE tsp01-rqident.
    MOVE wa_spoolnum TO id.
    ENDIF. .
    Comments-Id Contains the Spool Request for the given smart form
    //End of Code Sample
    Convert Smart Form Output to Raw
    Format
    2.Convert the Spool Output to OTF using the FM RSPO_RETURN_SPOOLJOB.
    //Start of Code Sample
    data i_soli LIKE soli occurs 0 with header line.
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
    EXPORTING
    rqident = id
    desired_type = 'OTF'
    TABLES
    buffer = i_soli
    EXCEPTIONS
    no_such_job = 1
    job_contains_no_data = 2
    selection_empty = 3
    no_permission = 4
    can_not_access = 5
    read_error = 6
    type_no_match = 7
    OTHERS = 8.
    Comments- i_soli contains the OTF data
    //End of Code Sample
    3.Convert the OTF using FM
    SX_OBJECT_CONVERT_OTF_RAW.
    DATA content_bin TYPE solix_tab.
    DATA objhead TYPE soli_tab.
    DATA i_soli_tab TYPE soli_tab.
    DATA boolean TYPE sx_boolean.
    DATA length TYPE so_obj_len.
    LOOP AT i_soli.
    APPEND i_soli TO i_soli_tab[].
    ENDLOOP.
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_RAW'
    EXPORTING
    format_src = 'OTF'
    format_dst = 'RAW'
    CHANGING
    transfer_bin = boolean
    content_txt = i_soli_tab
    content_bin = content_bin
    objhead = objhead
    len = length
    Convert Smart Form Output to Raw
    Format
    EXCEPTIONS
    err_conv_failed = 1
    OTHERS = 2.
    REward points if useful.

  • How to create the multiple spool requests for a single report.

    Hi gurus,
                     I have one requirement to be completed , i need to send the out put of the report via mail in pdf format. for that what i did was, iam executing report in background and creating spool request and converting it to pdf and sending the file.
    now the problem is, its a customer ledger report, for each customer i need to create a new spool request and send mail to that particular customer, now my dought is how to create multiple spool requests for a single pro and how i need to go about it.
    And one more question is can we create a spool request for a report which is running in online.
    waiting for inputs frm gurus.

    Hello,
    As per my knowledge for creating new spool id you will have to set
    output_options-tdnewid = 'X'.
    and then using
    job_output_info-spoolids
    create a pdf using
    call function 'CONVERT_OTFSPOOLJOB_2_PDF'
    Rachana.

  • How to get the NameTab Structure(X031L) for Dynamic internal table?

    when we pass standard table to the FM 'DD_GET_NAMETAB' we will get the
    nametab structure(x031l), like this i want to get the same structure for
    dynamic internal  table . how can I achieve this
    please help me...

    Hi,
    try this method
    REPORT zmaschl_create_data_dynamic .
    TYPE-POOLS: slis.
    DATA: it_fcat TYPE slis_t_fieldcat_alv,
          is_fcat LIKE LINE OF it_fcat.
    DATA: it_fieldcat TYPE lvc_t_fcat,
          is_fieldcat LIKE LINE OF it_fieldcat.
    DATA: new_table TYPE REF TO data.
    DATA: new_line  TYPE REF TO data.
    FIELD-SYMBOLS: <l_table> TYPE ANY TABLE,
                   <l_line>  TYPE ANY,
                   <l_field> TYPE ANY.
    Build fieldcat
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'       EXPORTING           i_structure_name = 'SYST'       CHANGING           ct_fieldcat      = it_fcat[].   LOOP AT it_fcat INTO is_fcat WHERE NOT reptext_ddic IS initial.        MOVE-CORRESPONDING is_fcat TO is_fieldcat.        is_fieldcat-fieldname = is_fcat-fieldname.        is_fieldcat-ref_field = is_fcat-fieldname.        is_fieldcat-ref_table = is_fcat-ref_tabname.        APPEND is_fieldcat TO it_fieldcat.   ENDLOOP.
    Create a new Table
    CALL METHOD cl_alv_table_create=>create_dynamic_table       EXPORTING        it_fieldcatalog = it_fieldcat       IMPORTING        ep_table        = new_table.
    Create a new Line with the same structure of the table.
    ASSIGN new_table->* TO <l_table>.CREATE DATA new_line LIKE LINE OF <l_table>.ASSIGN new_line->* TO <l_line>.
    Test it...
       DO 30 TIMES.
          ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
          <l_field> = sy-index.
          INSERT <l_line> INTO TABLE <l_table>.
       ENDDO.
       LOOP AT <l_table> ASSIGNING <l_line>.
          ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
          WRITE <l_field>.
       ENDLOOP.

Maybe you are looking for

  • Pages 5.1 author color

    Can anybody explain when/how Pages 5.1 uses "author color?" No matter what I set as the author color, Pages picks a different color for the deletion/insertion text. Sometimes green, sometimes organge, etc.  It wouldn't matter except I have trouble se

  • How to use a button in a required field

    Hi, this is my scenario: 1) In a Form I have two Blocks 2) In the first, I use a text Item for the customer code, with the required property set to true and with a trigger WHEN-VALIDATE-ITEM 3) In the second block, I use a button that call the 'show_

  • Tables used for Devloping Customer Reports Of solution manager report

    Dear All, Kindkly Suggest Some Tables,which i can use in developing the solution manager report. key fields i m using From results of Tcode      CRM_DNO_MONITOR ID PERSON RESPONSIBLE TEAM SUPPORT POSTING DATE PRIORITY THANKS IN ADVANCE.

  • SOAP Adapter Metadata Missing

    Hello, The SOAP adapter metadata is missing from the http://sap.com/xi/XI/System namespace. All the others are present. How can we get the adapter ? Does it come as part of some patch. Regards, Durga

  • Code for consuming web services in ABAP

    *& Report  ZVM_GET_CITY_TIME REPORT  zvm_get_city_time. PARAMETERS:   p_city TYPE zget_city_time_soap_in-city. DATA:   cl_proxy TYPE REF TO zco_time_service_soap,   input    TYPE zget_city_time_soap_in,   output   TYPE zget_city_time_soap_out,   syst