Problem in Smartform report

Hi All,
we have developed a smartform report. This is a production report of various units/shops. In the report format, left most side are the fixed units/shops. There are some fixed heading parameters. For each unit/shop the values for each unit will appear.
User wants the format to be in blocks..like there are units in the left side...A,B.C,D,E..
Format will be..in the left side units A,B,C will be in a block...& D,E will be in a separate block. this two blocks will be separated by a line..values for units A,B,C,D etc will appear in rows.
Can anybody pls help....

The thread is closed

Similar Messages

  • Smartform report generation error

    Hi,
    I have a problem with a report calling a smartform. The report works perfectly on the 1 system but on the other system there is a generation error. I found that the problem lies with the following declaration:
    data: otf_info type SSFCRESCL. 
    I compared the structures on the different systems and they are identical. The only difference is the Support Package levels. The error occurs on the system with the higher support package - SAPKB64015 (basis and aba) whereas the other system is still at level 12 (SAPKB64012).
    Any ideas what is causing the generation error and what could be done to fix it?
    Regards
    Liza-Marie

    Hi ,
    I think there may be some errors in function group errors.
    Try the following :
    T/Code : SMARTFORMSEnter the name of the form> Test--> This will leads to function module --> Utilities(Menubar)-=-> Repair function group --> Repair.
    After repairing the function group --> Save and Activate.
    Then transport the Smartform to other system .
    Regards,
    Lanka

  • Problem in ALV report

    Hi Friends,
    I have the following 2 problems in ALV report
    1) Logo is not getting displayed in the report.
    2) When i click on the Purchase order number in the report  the interactive report is not working,i am not able to see report of First interactive level.
    can you help it out friends.
    Thanks and regards
    Dinesh
    REPORT  YSDBALV1
    tables: ekko , ekpo .
    type-pools: slis .
    Table for Display Header
    data:i_header type slis_t_listheader with header line.
    *Fieldcat Declaration
    data:fieldcatalog type slis_T_fieldcat_alv  WITH HEADER LINE.
    *Table of Events
    data:i_event type slis_t_event with header line .
    For Layout
    data:i_layout type slis_layout_alv .
    data: text(30) .
    *Internal Table Declaration
    data: begin of it_final occurs 0 ,
          ebeln like ekko-ebeln ,           "Purchasing Document No.
          bedat like ekko-bedat ,           "Purchasing Document Date
          matnr like ekpo-matnr ,           "Material No.
          netwr like ekpo-netwr ,         "Net Order Value in PO Currancy
          meins like ekpo-meins ,           "UOM
          chk(1) ,
          light(1) ,
          change like ekpo-menge ,
          end of it_final .
    **select option Declaration
    selection-screen begin of block block.
    select-options: s_ebeln for ekko-ebeln  .
    selection-screen end of block block .
    selection-screen begin of block block1 .
    parameters:grid radiobutton group r .
    parameters:list radiobutton group r .
    selection-screen end of block block1 .
    at selection screen
    at selection-screen .
    select single * from ekko where ebeln in s_ebeln .
    if sy-subrc <> 0 .
       message e000(8I) WITH 'No Data Exists' .
    endif .
    start-of-selection .
    if grid = 'X' .
    perform get_data .
    perform event using i_event[] .
    perform field using fieldcatalog[] .
    perform layout using i_layout .
    perform grid_display .
    endif .
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    form get_data .
    *DATA Retrieval from tables
    SELECT EKKO~EBELN
           EKKO~BEDAT
           EKPO~EBELP
           EKPO~MATNR
           EKPO~NETWR
           EKPO~MEINS
           EKPO~MENGE
           EKPO~BPRME
           INTO CORRESPONDING FIELDS OF  table IT_FINAL
           FROM EKKO INNER JOIN EKPO ON EKKOEBELN = EKPOEBELN
           WHERE EKKO~EBELN IN S_EBELN.
           APPEND IT_FINAL.
    endform.                    " get_data
    *Getting the Event for Top of Page display.
    *&      Form  event
          text
         -->P_I_event[]  text
    form event  using    p_i_event type slis_t_event.
      clear p_i_event .
      refresh p_i_event .
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = p_i_event
    EXCEPTIONS
       LIST_TYPE_WRONG       = 1
       OTHERS                = 2
    read table p_i_event with key name = slis_ev_top_of_page into i_event.
          if sy-subrc = 0.
                 move 'TOP_OF_PAGE_PO' to i_event-form.
                 modify p_i_event from i_event index sy-tabix transporting form.
          endif.
          clear i_event.
    endform.                    " event
    *Display Top-of –Page Details and Logo
    form top_of_page_po .
           clear i_header .
           refresh i_header .
           write sy-datum to text.
           i_header-typ = 'H'.
           i_header-info = 'PURCHASE OREDER DETAILS'.
           append i_header.
          *Logo Display
          CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
                 EXPORTING
                     it_list_commentary       = i_header[]
                     I_LOGO                   = 'ENJOYSAPLOGO'.
    endform .
    *Field Catalog Append
    *&      Form  field
          text
         -->P_fieldCATALOG[]  text
    form field using  p_fieldcatalog type slis_t_fieldcat_alv.
         clear fieldcatalog.
          fieldcatalog-fieldname   = 'EBELN'.
          fieldcatalog-seltext_m   = 'Purchase Order No'.
          fieldcatalog-col_pos     = 1.
          append fieldcatalog .
          clear fieldcatalog.
          fieldcatalog-fieldname   = 'BEDAT'.
          fieldcatalog-seltext_m   = 'PO Date'.
          fieldcatalog-col_pos     = 2.
          append fieldcatalog .
          clear fieldcatalog.
          fieldcatalog-fieldname   = 'MATNR'.
          fieldcatalog-seltext_m   = 'Material No'.
          fieldcatalog-col_pos     = 4.
          fieldcatalog-outputlen   = 20.
          append fieldcatalog .
          clear fieldcatalog.
          fieldcatalog-fieldname   = 'NETWR'.
          fieldcatalog-seltext_m   = 'Net Value '.
          fieldcatalog-col_pos     = 5.
          fieldcatalog-outputlen   = 20.
          fieldcatalog-do_sum = 'X'.
          append fieldcatalog .
          clear fieldcatalog.
          fieldcatalog-fieldname   = 'MEINS'.
          fieldcatalog-seltext_m   = 'Units'.
          fieldcatalog-col_pos     = 6.
          fieldcatalog-outputlen   = 4.
          append fieldcatalog .
          clear fieldcatalog.
    endform.                    " field
    *&      Form  layout
          text
    form layout  using    p_i_layout TYPE SLIS_LAYOUT_ALV .
    i_layout-zebra  = 'X'.
        i_layout-lights_fieldname = 'LIGHT'.
        i_layout-lights_tabname = 'IT_FINAL'.
        i_layout-box_fieldname = 'CHK'.
        i_layout-box_tabname  = 'IT_FINAL'.
        i_layout-edit = ' '.
    endform.
    *To display Buttons in the MENU BAR if needed
    FORM SET_PO_PF_STATUS USING  P_I_EXTAB TYPE
                     SLIS_T_EXTAB.
                     SET PF-STATUS 'MENUPO'.
      ENDFORM.
    *Event for Interactive display of ALV report
    form USER_COMMAND  using r_ucomm like sy-ucomm
                             rs_selfield type slis_selfield .
      if r_ucomm = '&IC1'.
      READ TABLE IT_FINAL  index   rs_selfield-tabindex.
      write:/ IT_FINAL-ebeln.
      endif.
    endform .
    *Parameters of FM  REUSE_ALV_GRID_DISPLAY
    *&      Form  grid_display
          text
    -->  p1        text
    <--  p2        text
    form grid_display .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        I_CALLBACK_PROGRAM                = SY-REPID
       I_CALLBACK_PF_STATUS_SET          = 'SET_PO_PF_STATUS'
        I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
        IS_LAYOUT                         = I_LAYOUT
        IT_FIELDCAT                       = FIELDCATALOG[]
        IT_EVENTS                         = I_EVENT[]
      TABLES
        t_outtab                          = IT_FINAL.
    endform.                    " grid_display

    *& Report  YSDBALV1
    REPORT  YSDBALV1.
    tables: ekko , ekpo .
    type-pools: slis .
    Table for Display Header
    data:i_header type slis_t_listheader with header line.
    *Fieldcat Declaration
    data:fieldcatalog type slis_T_fieldcat_alv WITH HEADER LINE.
    *Table of Events
    data:i_event type slis_t_event with header line ,
         wa_event type line of slis_t_event.
    For Layout
    data:i_layout type slis_layout_alv .
    data: text(30) .
    *Internal Table Declaration
    data: begin of it_final occurs 0 ,
    ebeln like ekko-ebeln , "Purchasing Document No.
    bedat like ekko-bedat , "Purchasing Document Date
    matnr like ekpo-matnr , "Material No.
    netwr like ekpo-netwr , "Net Order Value in PO Currancy
    meins like ekpo-meins , "UOM
    chk(1) ,
    light(1) ,
    change like ekpo-menge ,
    end of it_final .
    **select option Declaration
    selection-screen begin of block block.
    select-options: s_ebeln for ekko-ebeln .
    selection-screen end of block block .
    selection-screen begin of block block1 .
    parameters:grid radiobutton group r .
    parameters:list radiobutton group r .
    selection-screen end of block block1 .
    at selection screen
    at selection-screen .
    select single * from ekko where ebeln in s_ebeln .
    if sy-subrc <> 0 .
    message e000(8I) WITH 'No Data Exists' .
    endif .
    start-of-selection .
    if grid = 'X' .
    perform get_data .
    perform event using i_event[] .
    perform field using fieldcatalog[] .
    perform layout using i_layout .
    perform grid_display .
    endif .
    *& Form get_data
    text
    --> p1 text
    <-- p2 text
    form get_data .
    *DATA Retrieval from tables
    SELECT EKKO~EBELN
    EKKO~BEDAT
    EKPO~EBELP
    EKPO~MATNR
    EKPO~NETWR
    EKPO~MEINS
    EKPO~MENGE
    EKPO~BPRME
    INTO CORRESPONDING FIELDS OF table IT_FINAL
    FROM EKKO INNER JOIN EKPO ON EKKOEBELN = EKPOEBELN
    WHERE EKKO~EBELN IN S_EBELN.
    APPEND IT_FINAL.
    endform. " get_data
    *Getting the Event for Top of Page display.
    *& Form event
    text
    -->P_I_event[] text
    form event using p_i_event type slis_t_event.
    clear p_i_event .
    refresh p_i_event .
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    I_LIST_TYPE = 0
    IMPORTING
    ET_EVENTS = p_i_event.
    EXCEPTIONS
    LIST_TYPE_WRONG = 1
    OTHERS = 2.
    read table p_i_event with key name = slis_ev_top_of_page into wa_event.
    if sy-subrc = 0.
    move 'TOP_OF_PAGE_PO' to i_event-form.
    modify p_i_event from i_event index sy-tabix transporting form.
    endif.
    clear i_event.
    endform. " event
    *Display Top-of –Page Details and Logo
    form top_of_page_po .
    clear i_header .
    refresh i_header .
    write sy-datum to text.
    i_header-typ = 'H'.
    i_header-info = 'PURCHASE OREDER DETAILS'.
    append i_header.
    *Logo Display
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = i_header[]
    I_LOGO = 'ENJOYSAP_LOGO'.
    endform .
    *Field Catalog Append
    *& Form field
    text
    -->P_fieldCATALOG[] text
    form field using p_fieldcatalog type slis_t_fieldcat_alv.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'EBELN'.
    fieldcatalog-seltext_m = 'Purchase Order No'.
    fieldcatalog-col_pos = 1.
    append fieldcatalog .
    clear fieldcatalog.
    fieldcatalog-fieldname = 'BEDAT'.
    fieldcatalog-seltext_m = 'PO Date'.
    fieldcatalog-col_pos = 2.
    append fieldcatalog .
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'Material No'.
    fieldcatalog-col_pos = 4.
    fieldcatalog-outputlen = 20.
    append fieldcatalog .
    clear fieldcatalog.
    fieldcatalog-fieldname = 'NETWR'.
    fieldcatalog-seltext_m = 'Net Value '.
    fieldcatalog-col_pos = 5.
    fieldcatalog-outputlen = 20.
    fieldcatalog-do_sum = 'X'.
    append fieldcatalog .
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MEINS'.
    fieldcatalog-seltext_m = 'Units'.
    fieldcatalog-col_pos = 6.
    fieldcatalog-outputlen = 4.
    append fieldcatalog .
    clear fieldcatalog.
    endform. " field
    *& Form layout
    text
    form layout using p_i_layout TYPE SLIS_LAYOUT_ALV .
    i_layout-zebra = 'X'.
    i_layout-lights_fieldname = 'LIGHT'.
    i_layout-lights_tabname = 'IT_FINAL'.
    i_layout-box_fieldname = 'CHK'.
    i_layout-box_tabname = 'IT_FINAL'.
    i_layout-edit = ' '.
    endform.
    *To display Buttons in the MENU BAR if needed
    FORM SET_PO_PF_STATUS USING P_I_EXTAB TYPE
    SLIS_T_EXTAB.
    SET PF-STATUS 'MENUPO'.
    ENDFORM.
    *Event for Interactive display of ALV report
    form USER_COMMAND using r_ucomm like sy-ucomm
    rs_selfield type slis_selfield .
    if r_ucomm = '&IC1'.
    READ TABLE IT_FINAL index rs_selfield-tabindex.
    set parameter id 'VL1' field it_final-ebeln.
    call transaction 'ME23N'.
    endif.
    endform .
    *Parameters of FM REUSE_ALV_GRID_DISPLAY
    *& Form grid_display
    text
    --> p1 text
    <-- p2 text
    form grid_display .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = 'SET_PO_PF_STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    IS_LAYOUT = I_LAYOUT
    IT_FIELDCAT = FIELDCATALOG[]
    IT_EVENTS = I_EVENT[]
    TABLES
    t_outtab = IT_FINAL.
    endform. " grid_display
    Regards,
    Rusidar S.

  • Problems accessing BW Report from Portal

    Hello friends,
    I have a problem. I am trying to create a link in portal that should call a BW Report. To do this we should require the query string which I have. The problem is this report in turn is calling a separate transaction code from a different back end system. When the user tries to execute the report he is getting the following error code
    ICF-NF-http-c:000-u:SAPSYS-I:E-i:wwbsap06_DEV1_22-v:0-s:403-r:Forbidden
    Can anyone tell me how this can be achieved?
    Points guaranteed.
    Thank You
    Avik

    You can use SAP Web dispatcher for exposing the BW web reports to extranet. The SAP Web dispatcher is located between the Web client (browser) and your SAP system that is running the Web application.
    http://help.sap.com/saphelp_nw04/helpdata/en/42/5cfd3b0e59774ee10000000a114084/content.htm

  • Problem in exporting report in CSV format

    Hi All,
    I am using Crystal Reports. Following are details about it:
    CR Developer
    Product 8.5.0.217
    *_Problem that I am facing:__*_
    I can create report in .rpt format, it is working fine here. But while trying to export this report in CSV format, it gives report that doesn't contain any information.
    Is it because I am missing something or it is a known issue?
    Thanks and Regards,
    Anand

    Hi,
    I too am facing the same problem.
    The report was made in 8.5. I have exported the report & opened it in Crystal report 12.
    I can export to PDF, RTF, DOC & Tab separated Test.
    However when I export this report in .csv (legacy mode) I just get the header & when I export it in .csv (Standard) I get a blanck .csv file.
    I have  checked 'Isolate Report/Page sections' and 'Isolate Group sections'. Still no data in the report.
    refreshed it too.
    I contains sub reports, but not in the page header & footer (I think) & it does not seem to have cross tabs & OLAP grids.
    Any help is appreciated.
    Links to Screenshots:
    Main Report:
    http://picasaweb.google.com/lh/photo/yM9sBexKt5jW9soqaMmHjw?feat=directlink
    One of the Sub-Report:
    http://picasaweb.google.com/lh/photo/0ofa5sABakvZ-nFZp-JSMw?feat=directlink

  • Problem in Crystal Report 2008 selectionFormula

    Post Author: saro_j
    CA Forum: Crystal Reports
    Hi,
    I am having a strange problem in Crystal report 2008. Earlier I was using VS 2005 Crystal report. Then we purchased Crystal report 2008.
    When I open the VS 2005 projects it asks the reports to convert into Crystal report 2008. I did that.
    Earlier I was using the following syntax for passing the date as selectionFormula
    Dim selectionFormula As String = "{tblClient.Name} = '" & ddlClient.SelectedItem.Text & "' and {TBILL_File_Format.Week Ending Date} = #" _& Convert.ToDateTime(DtCtrlProDateFrom.DateTimeValue) & "#u201D WeeklyReportByClientNameReport.DataDefinition.RecordSelectionFormula = selectionFormula
    But now when I run this same it says
    This field name is not known. Details: errorkind Error in the file rptWeeklyReport.rpt: Error in formula Record_selection: 
    u2018{tblClient.Name} = 'ABC10' and "{TBILL_File_Format.Week Ending Date} = #04/20/2008#u2019 This field name is not known. Details: errorkind
    I have no idea about this
    Even If I tried to pass as follows
    selectionFormula = "{TBILL_File_Format.Week Ending Date} = DateTime (2008, 04, 25, 00, 00, 00) and {TBILL_File_Format.Client Code} = 'ABC10' "
    I couldnu2019t see any record on the report except Grouptree of the report. If I export the report it has all the data as I expected.
    Please help me out on this regards.
    Thanks in advance
    Saravanan

    Post Author: jehanzeb
    CA Forum: Crystal Reports
    Hello,
    I use CR2008 and VS2005, it never asked me to convert the file into VS2005. What do you mean by VS 2005 asked you to convert the file? Did you make the file in CR2008 and then imported it into VS2005 as a Report Document?
    I usually create a report on CR2008 and then move that report (copy) to the same folder as VS project folder, then from there I create a new Report Doc in VS and open the file.
    As you mentioned when you export the report it works fine but when you run it it gives errors. I think it is because of the import of the report. Look at the error message as it says the field name is not known, I suspect it is not connected/imported properly.
    "This field name is not known. Details: errorkind Error in the file rptWeeklyReport.rpt: Error in formula Record_selection: 
    u2018{tblClient.Name} = 'ABC10' and "{TBILL_File_Format.Week Ending Date} = #04/20/2008#u2019 This field name is not known. Details: errorkind"
    I think it is becasue of the import of the report or could be becasue you didnt save the report with an option of "save report data". Check your report and reimport it. might fix the problem:D

  • I've checked my current plugins and it still shows Adobe Acrobat Version 7 for Netscape (7.0.9.50) I tried to do the update but I got an error - "Please tell Microsoft about this problem" "Send Error Report/ Don't Send".

    I've checked my current plugins and it still shows Adobe Acrobat Version 7 for Netscape (7.0.9.50)
    I tried to do the update but I get the same error each time - "Please tell Microsoft about this problem" "Send Error Report/ Don't Send".
    Also, do I need to Disable or Uninstall the Extension: "SEO For Firefox 3.3.4 as this was highlighted?
    == This happened ==
    Every time Firefox opened
    == When I try to do the update

    http://www.microsoft.com/mac/support
    http://answers.microsoft.com/en-us/mac/forum/macword?auth=1
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macword/microsoft-wor d-for-mac-2011-will-not-open-error/ecc42616-6f49-40bb-b8f5-e21c711ea359

  • Problem showing BI report in SAP CRM 7.0

    Problem showing BI report in SAP CRM 7.0
    We are facing a problem in our SAP CRM, when we show a BI report in the fact sheet we can see the report correctly.
    But when we click on the match code of the query, (in order to choose a value from the help) the popup does not appear and we got the error u201Caccess denied     popup_ie6.jsu201D
    Any help?
    Thank you in advance.

    Hi,
    Please check the service patch for BW.
    In our S/m it is working Fine.
    SAP_BW     701     0003     SAPKW70103     SAP Business Warehouse
    BI_CONT     704     0003     SAPK-70403INBICONT     Business Intelligence Content
    Regards,
    Lokesh.

  • Problems in Z Reports in ECC 6.0

    Hi,
    We r upgrading the SAP from 4.7 E to ECC 6.0 and facing few problems in Z Reports in New Version..Like...
    1)..Incorrect value in the dynamic table..
    2)..Literals that take up more than one line not permitted.
    3)..Missing parameter with PERFORM.
    4)..Error in ASSIGN statement in program "SAPLSDSD".
    5)..Not Unicode Convertible.
    Please help me out of these problems..
    Regards,
    Anil

    Hi,
    regarding your problems the solution is that in ECC 6.0 the programs should be unicode compatible.the fields which are declared with type
    were no more allowed in 6.0.
    regarding unicode u can check the following threads..
    What is the Use of Unicode Check
    SDN Wiki - Standard Reference for Unicode Migration-Common ABAP Errors & Solution
    SDN Wiki - Standard Reference for UNICODE PROBLEMS and SOLUTIONS

  • Problem in absent report(ABAP-HR)

    Hi to all
    I am getting a problem in Absent report.(HR-ABAP)
    Absent report shows next day irregular punch in case of  'C' shift(Timing 10:30 PM to 6:30 AM)  at the end of month.
    It happens only at the end of month like 31/10/2007 because in selection we gave
    1/10/2007 to 31/10/2007.
    Plz tell me what to do.
    Regards
    Anubhav

    Hi,
    It is not possible to run RBDMIDOC Report in Insert mode, precisely the purpose of this report is to send only the delta changes recorded in change pointers (that is only the differences since the last replica) and it is used not just for HRMD_ABA Message Type, also for other Modules, like Cost Center, Materials, etc.
    I understand that PFAL is not useful as it requires the specification implied of the objects.
    According with the way HR structure Replica works, you replicate with PFAL all the objects you requiere as an initial replica, and then programs BD21 as a job to get the delta changes in the destination system.
    Regards,
    Edith

  • Convert SMARTFORM report to PDF and send as an email attachment

    Hi
    I am using the CONVERT_OTF function module to convert a SMARTFORM report in the "spool" to a PDF file. When I use the DOWNLOAD function module, the resulting file can be opened in acrobat.
    I would like to email the report in PDF format as an attachment. I am using the function module SO_NEW_DOCUMENT_ATT_SEND_API1 to create an attachment however the attached file is not being created correctly and When try to open, it gives 'File is damaged and could not be repaired' error message. I believe that somehow I am not using the SO_NEW_DOCUMENT_ATT_SEND_API1 function module correctly.
    Please help me to correct this
    Thanks
    Rohitha
    see my code below,
    I_OTF[] = W_RETURN-OTFDATA[].
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
          MAX_LINEWIDTH         = 132
        IMPORTING
          BIN_FILESIZE          = V_LEN_IN
        TABLES
          OTF                   = I_OTF
          LINES                 = I_TLINE
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.
      IF SY-SUBRC <> 0.
      ENDIF.
      LOOP AT I_TLINE.
        TRANSLATE I_TLINE USING '~'.
        CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
      ENDLOOP.
      TRANSLATE WA_BUFFER USING '~'.
      DO.
        I_RECORD = WA_BUFFER.
        APPEND I_RECORD.
        SHIFT WA_BUFFER LEFT BY 132 PLACES.
        IF WA_BUFFER IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
      REFRESH:  I_RECLIST,
                I_OBJTXT,
                I_OBJBIN,
                I_OBJPACK.
      CLEAR WA_OBJHEAD.
      I_OBJBIN[] = I_RECORD[].
      I_OBJTXT = 'PDF Attachment'.
      APPEND I_OBJTXT.
      DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
      READ TABLE I_OBJTXT INDEX V_LINES_TXT.
      WA_DOC_CHNG-OBJ_NAME = 'Smartform_to_PDF'.
      WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
      WA_DOC_CHNG-OBJ_DESCR = 'Smartform to PDF'.
      WA_DOC_CHNG-SENSITIVTY = 'F'.
      WA_DOC_CHNG-DOC_SIZE = STRLEN( I_OBJTXT ) + ( ( V_LINES_TXT - 1 ) * 255 ) .
      CLEAR  I_OBJPACK-TRANSF_BIN.
      I_OBJPACK-HEAD_START = 1.
      I_OBJPACK-HEAD_NUM = 0.
      I_OBJPACK-BODY_START = 1.
      I_OBJPACK-BODY_NUM = V_LINES_TXT.
      I_OBJPACK-DOC_TYPE = 'RAW'.
      APPEND I_OBJPACK.
      I_OBJPACK-TRANSF_BIN = 'X'.
      I_OBJPACK-HEAD_START = 1.
      I_OBJPACK-HEAD_NUM = 1.
      I_OBJPACK-BODY_START = 1.
      DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
      READ TABLE I_OBJBIN INDEX V_LINES_BIN.
      I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
      I_OBJPACK-BODY_NUM = V_LINES_BIN.
      I_OBJPACK-DOC_TYPE = 'PDF'.
      I_OBJPACK-OBJ_NAME = 'ATTACHMENT'.
      I_OBJPACK-OBJ_DESCR = 'test'.
      APPEND I_OBJPACK.
      CLEAR I_RECLIST.
      I_RECLIST-RECEIVER = 'my email address u2019.
      I_RECLIST-REC_TYPE = 'U'.
      APPEND I_RECLIST.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = WA_DOC_CHNG
          PUT_IN_OUTBOX              = 'X'
          COMMIT_WORK                = 'X'
        TABLES
          PACKING_LIST               = I_OBJPACK
          OBJECT_HEADER              = WA_OBJHEAD
          CONTENTS_BIN               = I_OBJBIN
          CONTENTS_TXT               = I_OBJTXT
          RECEIVERS                  = I_RECLIST
        EXCEPTIONS
          TOO_MANY_RECEIVERS         = 1
          DOCUMENT_NOT_SENT          = 2
          DOCUMENT_TYPE_NOT_EXIST    = 3
          OPERATION_NO_AUTHORIZATION = 4
          PARAMETER_ERROR            = 5
          X_ERROR                    = 6
          ENQUEUE_ERROR              = 7
          OTHERS                     = 8.
      IF SY-SUBRC <> 0.
        WRITE:/ 'Error ', SY-SUBRC.
      ELSE.
        WRITE:/ 'Mail sent'.
      ENDIF.

    Hi rohitha.wijewardena ,
    Please find the below code which i followed and succeed ,
    CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
        EXPORTING
          pi_nast       = nast
          pi_country    = lv_dlv-land
          pi_addr_key   = lv_addr_key
          pi_repid      = sy-repid
          pi_screen     = lc_x
        IMPORTING
          pe_returncode = gv_retcode
          pe_itcpo      = lv_itcpo
          pe_device     = lv_device
          pe_recipient  = lv_recipient
          pe_sender     = lv_sender.
      IF gv_retcode = 0.
    *moving the data to composer and control parameters for output
        MOVE-CORRESPONDING lv_itcpo TO lv_composer_param.
        lv_control_param-device      = lv_device.
        lv_control_param-no_dialog   = lc_x.
        lv_control_param-preview     = lc_x.
        lv_control_param-getotf      = lv_itcpo-tdgetotf.
        lv_control_param-langu       = nast-spras.
        lv_composer_param-tdnoprint = space.
      ENDIF.
    *Getting the Smartform Function module using Standard Function module
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = lv_formname           "Smartform Name
       IMPORTING
         fm_name                  = lv_fm_name
       EXCEPTIONS
         no_form                  = 1
         no_function_module       = 2
         OTHERS                   = 3
      IF sy-subrc <> 0.
        gv_retcode = sy-subrc.
        PERFORM protocol_update.
        PERFORM add_smfrm_prot.
      ENDIF.
    **Smartform function module to get the output
      CALL FUNCTION lv_fm_name
        EXPORTING
       control_parameters         = lv_control_param
       mail_recipient             = lv_recipient
       mail_sender                = lv_sender
         output_options             = lv_composer_param
         user_settings              = ' '
          is_bil_invoice             = lv_bil_invoice
          gt_header                  = gt_header
       IMPORTING
         job_output_info            = gv_job_output
        TABLES
          gt_item                    = gt_item
       EXCEPTIONS
         formatting_error           = 1
         internal_error             = 2
         send_error                 = 3
         user_canceled              = 4
         OTHERS                     = 5
      IF sy-subrc <> 0.
        gv_retcode = sy-subrc.
        PERFORM protocol_update.
        PERFORM add_smfrm_prot.
      ENDIF.
      IF nast-nacha = lc_mail.
        gt_otfdata[] = gv_job_output-otfdata[].
    *           Converting Smartform to PDF                          *
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = lc_pdf
            max_linewidth         = 10
          IMPORTING
            bin_filesize          = gv_binfilesize
            bin_file              = gv_pdf_xstring
          TABLES
            otf                   = gt_otfdata[]
            lines                 = gt_pdftab[]
          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.
    *           Sending PDF to Email  using Class                     *
        IF NOT lv_email IS INITIAL .
          TRY.
             gv_send_request = cl_bcs=>create_persistent( ).
              gv_pdf_content = cl_document_bcs=>xstring_to_solix( gv_pdf_xstring ).
              gv_document = cl_document_bcs=>create_document(
                    i_type    = lc_pdf
                    i_hex     = gv_pdf_content
                    i_length  = gv_pdf_size
                    i_subject = lc_subject ).            "Subject for Email
              gv_send_request->set_document( gv_document ).
             gv_recipient = cl_cam_address_bcs=>create_internet_address( lv_email ).
              gv_send_request->add_recipient( gv_recipient ).
              gv_sent_to_all = gv_send_request->send( i_with_error_screen = lc_x ).
              COMMIT WORK.
              IF gv_sent_to_all IS INITIAL.
                MESSAGE i500(sbcoms) WITH lv_email.
              ELSE.
                MESSAGE s022(so).
              ENDIF.
            CATCH cx_bcs INTO gv_bcs_exception.
              MESSAGE i865(so) WITH gv_bcs_exception->error_type.
          ENDTRY.
        ENDIF.

  • Character Problem For SmartForms to Pdf .

    Hi Experts ;
    my problem about smartforms . I have a custumer list. I use smartform for output. Customer list of smartform ok . Have any problem . But I convert this output to PDF . Some Characters  are overlapping . My main language Türkçe(Turkish) . Characters is incorrect for  struct of laguage .( smartform output has no problem but pdf output have problem )
    My Code :
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETER: p_date LIKE sy-datum.
    PARAMETER: p_rea TYPE char255.
    SELECTION-SCREEN: END OF BLOCK b1.
    DATA:      ws_ucomm LIKE sy-ucomm.
    DATA: gt_intab  TYPE ZSMRT_DNM_T WITH HEADER LINE.
    INITIALIZATION.
    SET PF-STATUS 'GUI'.
    PERFORM get_data.
    AT SELECTION-SCREEN.
      ws_ucomm = sy-ucomm.
      CASE ws_ucomm.
        WHEN '&PDF'.
          PERFORM f1000_download_form.
          EXIT.
        WHEN '&BACK'.
          LEAVE TO SCREEN 0.
          EXIT.
        WHEN '&EXIT'.
          SET SCREEN 0.
          EXIT.
        WHEN '&canc'.
          SET SCREEN 0.
          LEAVE TO SCREEN 0.
      ENDCASE.
       f1000_download_form
    FORM f1000_download_form.
      DATA: form_name TYPE rs38l_fnam.
      DATA: wa_ctrlop TYPE ssfctrlop,
            wa_outopt TYPE ssfcompop.
      DATA: t_otfdata  TYPE ssfcrescl,
            t_pdf_tab  LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
      DATA: w_filesize TYPE i.
      DATA: w_bin_filesize TYPE i.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = 'ZDNMSMRT'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
       IMPORTING
         fm_name                  = form_name
       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.
      wa_ctrlop-getotf = 'X'.
      wa_ctrlop-no_dialog = 'X'.
      wa_ctrlop-DEVICE = 'I9SWIN'.
      wa_outopt-tdnoprev = 'X'.
      CALL FUNCTION form_name
        EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
         control_parameters         = wa_ctrlop
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
         output_options             = wa_outopt
         user_settings              = 'X'
         mydate                     = p_date
         reason                     = p_rea
         ADRNR                      = '23713'
       IMPORTING
      DOCUMENT_OUTPUT_INFO       =
         job_output_info            = t_otfdata
      JOB_OUTPUT_OPTIONS         =
       TABLES
         RTAB                      = gt_intab[]
       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_otfdata-otfdata[].
      CALL FUNCTION 'CONVERT_OTF'
       EXPORTING
         format                      = 'PDF'
         max_linewidth               = 150 "132
      ARCHIVE_INDEX               = ' '
       IMPORTING
         bin_filesize                = w_bin_filesize
        TABLES
          otf                         = t_otf
          lines                       = t_pdf_tab
       EXCEPTIONS
         err_max_linewidth           = 1
         err_format                  = 2
         err_conv_not_possible       = 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.
      CALL FUNCTION 'WS_DOWNLOAD'
       EXPORTING
         bin_filesize                  = w_bin_filesize
      CODEPAGE                      = ' '
         filename                      = 'c:     est.PDF'
         filetype                      = 'BIN'
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
       IMPORTING
         filelength                    = w_filesize
        TABLES
          data_tab                      = t_pdf_tab
      FIELDNAMES                    =
       EXCEPTIONS
         file_open_error               = 1
         file_write_error              = 2
         invalid_filesize              = 3
         invalid_type                  = 4
         no_batch                      = 5
         unknown_error                 = 6
         invalid_table_width           = 7
         gui_refuse_filetransfer       = 8
         customer_error                = 9
         OTHERS                        = 10
      IF sy-subrc <> 0.
        MESSAGE i003(z00) WITH 'File not downloaded succesfully'.
      ELSE.
        MESSAGE i003(z00) WITH 'File Test.pdf downloaded succesfully '
                                                'under C drive'.
      ENDIF.
    ENDFORM.                    " F1000_DOWNLOAD_FORM
    *&      Form  GET_DATA
    FORM GET_DATA .
       SELECT kunnr belnr gjahr from bsid
             INTO CORRESPONDING FIELDS OF TABLE gt_intab
             WHERE bukrs = '4000' and gjahr = '2007'.
       LOOP AT gt_intab.
          SELECT SINGLE name1 from kna1
            INTO (gt_intab-name1)
            WHERE kunnr = gt_intab-kunnr.
          MODIFY gt_intab INDEX sy-tabix.
       ENDLOOP.
       SORT gt_intab by kunnr.
    ENDFORM.                  " GET_DATA
    Regards .

    Try following logic:
    DATA: lt_data TYPE TABLE OF tline,
          lt_data1 TYPE TABLE OF tline,
          lt_objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    Convert OTF to PDF
            REFRESH: lt_data.
            CALL FUNCTION 'CONVERT_OTF'
              EXPORTING
                format                = 'PDF'
                max_linewidth         = 132
              IMPORTING
                bin_filesize          = l_binfilesize
              TABLES
                otf                   = la_jobout-otfdata[]
                lines                 = lt_data[]
              EXCEPTIONS
                err_max_linewidth     = 1
                err_format            = 2
                err_conv_not_possible = 3
                err_bad_otf           = 4
                OTHERS                = 5.
            IF sy-subrc <> 0.
    Error during conversion from OTF to PDF.
            ELSE.
    Creation of the document attachment
              REFRESH: lt_data1.
              CALL FUNCTION 'TABLE_COMPRESS'                    "#EC *
                TABLES
                  in             = lt_data[]
                  out            = lt_data1[]
                EXCEPTIONS
                  compress_error = 1
                  OTHERS         = 2.
              IF sy-subrc <> 0.
    Error during compress operation of the data
              ELSE.
                REFRESH: lt_objbin.
                CALL FUNCTION 'TABLE_DECOMPRESS'                "#EC *
                  TABLES
                    in             = lt_data1[]
                    out            = lt_objbin[]
                  EXCEPTIONS
                    compress_error = 1
                    OTHERS         = 2.
                IF sy-subrc <> 0.
    Error during decompress operation of the data.
                ENDIF.
           ENDIF.
    ENDIF.
    Pass table lt_objbin[] to WS_DOWNLOAD function module. It should work.
    Thanks
    Amol Lohade

  • Start Workflow for Smartform report

    Hi
    My ABAP program creates a Smartform report that I am able to send to the SAP Business Workplace inbox documents folder.  In development, I'm sending it to myself, but in production the report will be sent to a particular user.
    I need to send the report as a pdf attachment to a workflow item so that the workflow log can track the fact that the user accepts (or rejects) the report details (audit requirement).
    What workflow object type and event should be used in the workflow, and how do I start the workflow after the report has been generated?
    Thanks for your help.
    Ron Knoll

    Answered the question myself.

  • Date format Problem in forms&reports Services 10g

    Hi Dears,
    I Faced a problem during running reports ( i am using forms& Reports Services 10g), when i pass the parameters via parameter form to the report (built in forms10g Rel 2.0) its appearing in arabic like (25-يناير-2010) as my Date Formate is (DD-YYYY-MON) and NLS_LANG parameter is defined as Arabic_Saudi arabia.AR8MSWIN1256 so as a result report is not running due to unknown Date formate, how can i change the Same Date format (DD-YYYY-MON) to appear in english like (25-2010-JAN)
    Thanks

    You could specify the parameter as type VARCHAR2, explicitly cast it (maybe to DD.MM.YYYY) when you pass it from forms and cast it back in your query, like TO_DATE(:P_PARAM, 'DD.MM.YYYY')

  • How to solve  problem :- rep-188-Report Server acccepts only Batch jobs

    How to solve problem :- rep-188-Report Server acccepts only Batch jobs
    Report server :- 10gR1

    Hello,
    Could you give us some details about the command line ?
    What is the value of DESTYPE ?
    Regards

Maybe you are looking for

  • Simple updates in EJB 3.0

    Hello, Is there an easy way to update an entity bean that wasn't fetched via a find by PK query, i.e. it's just marshalled from a remote payload in EJB 3.0? merge() does not seem to work with out you using the marshalled PK to fetch it and then manua

  • PDF links broken in SWF Flashpaper after conversion.

    I've been building a flash app to view documents that exist as PDF files currently. A recent demo of this app viewing the PDFs converted to SWF in Flashpaper viewer embedded in Flash player, we noticed that the embedded links (both interdocument link

  • Should Arch have a common input method ?

    Should Arch have a common input method ?   Arch is a really great distro,so I think there are a lots of arch users all over the world. And I believe that more and more people will know Arch,use Arch,Love to use Arch  But I am curious about that : eve

  • Where can I purchase new Mac Pro in RSA?

    Where can I purchase new Mac Pro in RSA?

  • Component and renderer can't share the same name in face-config.xml

    Hi All, I've noticed that a component and a renderer can't share the same name in <face-config.xml>. For instance, <component> <component-type>tree</component-type> <component-class>com.xxx.tree.component.Tree</component-class> </component> <render-k