How to call a Smartform in Report to print Production Order

Hi all,
Can any one tell me how to develop a smartforms when the user selects the print button in ALV report.
i.e, The requirement is when  the user presses the print button in ALV report, at that time it has call the smartform and it has to print the Report.
Can any one shed some light on this.
Regards
Yathish

Hi Yathish
do it this way.
in the ALV function call
give in
exporting
  I_CALLBACK_USER_COMMAND           = 'user_command '
write a subroutine
FORM user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
slis_selfield.
case whatcomm.
   when 'print'.
      call 2 function modules here
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
       EXPORTING  FORMNAME           = P_FORM    "Your form name
                variant            = ' '
                direct_call        = ' '
       IMPORTING  FM_NAME            = FM_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.
    EXIT.
  ENDIF.
calling the generated function module
CALL FUNCTION FM_NAME
EXPORTING
  ARCHIVE_INDEX              =
  ARCHIVE_INDEX_TAB          =
  ARCHIVE_PARAMETERS         =
CONTROL_PARAMETERS   = CPARAM
   OUTPUT_OPTIONS       =  OUTOP
  USER_SETTINGS        = SPACE
  MAIL_APPL_OBJ              =
  MAIL_RECIPIENT             =
  MAIL_SENDER                =
IMPORTING
  JOB_OUTPUT_INFO      = TAB_OTF_DATA
  DOCUMENT_OUTPUT_INFO       =
  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.
endcase.
endform.
This is an example in the function gereated call give you own importing and exporting parameters.
Kindly reward points if helpful.
Regards
Zarina

Similar Messages

  • How to call our smartform in standard report

    Hi friends,
    How to call Zee smartform from standard report without affecting stadard flow.
    Thanks,
    Yogesh

    Hi,
      do it this way.
    in the ALV function call
    give in
    exporting
    I_CALLBACK_USER_COMMAND = 'user_command '
    write a subroutine
    FORM user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
    slis_selfield.
    case whatcomm.
    when 'print'.
    call 2 function modules here
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING FORMNAME = P_FORM "Your form name
    variant = ' '
    direct_call = ' '
    IMPORTING FM_NAME = FM_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.
    EXIT.
    ENDIF.
    calling the generated function module
    CALL FUNCTION FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS = CPARAM
    OUTPUT_OPTIONS = OUTOP
    USER_SETTINGS = SPACE
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    IMPORTING
    JOB_OUTPUT_INFO = TAB_OTF_DATA
    DOCUMENT_OUTPUT_INFO =
    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.
    endcase.
    endform.
    This is an example in the function gereated call give you own importing and exporting parameters.
    Regards
    Kiran Sure

  • How to call a form from report? in 6i

    How to call a Form from Report? In Developer 6i of oracle. Plz tell me tex.

    try this
    declare
       AppID PLS_INTEGER;
    begin
         AppID := DDE.App_Begin('ifrun60 module=myform.fmx userid=scott/tiger@mydb maximize=no', DDE.App_Mode_Maximized);
    exception when others then
          srw.message(1,'Errror');
    end;Baig
    [My Oracle Blog|http://baigsorcl.blogspot.com/]

  • How to call two smartforms with using a single print program

    Hi,
       I have a requirement wherein I need to call two smartforms using a single print program.
       The interface parameters are different in two smartforms.
       I presently solved the issue using the smartform names as the reference.
       Can anyone let me know if there is any other way to solve it.
       I heard something about global params. But not sure.
       Please let me know the best possible way to solve this issue.
    Thanks and Regards,
       Debabrata

    Hi Debabrata,
    Based on the condition in your print program you can call the below code
    fname1 TYPE rs38l_fnam.
    IF -
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZSMARTFORMS'
    importing
       fm_name                  = fname1
    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 FNAME
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB      =
      ARCHIVE_PARAMETERS =
      CONTROL_PARAMETERS=
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT              =
      MAIL_SENDER                 =
      OUTPUT_OPTIONS           =
      USER_SETTINGS             = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO =
      JOB_OUTPUT_INFO             =
      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.
    ELSE.
    fname2 TYPE rs38l_fnam.
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZSMARTFORMS'
    importing
       fm_name                  = fname2
    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 FNAME
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB      =
      ARCHIVE_PARAMETERS =
      CONTROL_PARAMETERS=
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT              =
      MAIL_SENDER                 =
      OUTPUT_OPTIONS           =
      USER_SETTINGS             = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO =
      JOB_OUTPUT_INFO             =
      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.
    ENDIF.

  • How to devolped an Interactive ALV Report to display sales orders

    hi,
             how to devolped an Interactive ALV Report to display sales orders pertaining to the selected Customers and item details in the secondary list.For this report what are the tables and fields wehave to used give with example.
    thank you
    radhakrishna

    Hi,
    look via se38 for BCALV* and SALV*.
    Try ABAPDOCU.
    Regards, Dieter

  • Report to delet production orders

    Hi guys,
    help needed!
    Does anybody of you know a report to delete production orders completely?
    Such on as the RMMMDE00, which deletes all material of the current client.
    Hoping for an answer,
    Barbara

    Hi,
      I guess the below link will help you to some extent....
    http://www.sap-img.com/production/how-to-delete-old-production-orders.htm

  • How can I add a new line item for production order?

    HI all,
    How can I add a new line item for production order through BAPI/FM? Thanks in advance.

    Hi Mil,
      Unfortunetly SAP is not in front of me.
    But if possible go to BAPI transaction , check for any production order's bapi for CHANGE purpose. Where you will be able to add your new line.
    Reward if useful!

  • FI Report against to Production order

    Dear all,
    Is thr any report FI reports againest to Production order?
    Thanks in advance
    Regards
    raj.

    Hi
    Also refer  KKBC_ORD , KKBC_ HOE
    Regards
    Dev

  • How to call LSMW from a Report program

    Hi,
    I have a requirment of extending vendor master data (Companycode data and Purchasing Organization data ) through Tcode XK02 using LSMW.Also I need to generate an error log file for validating the data from flat file and  must have an export option of the error log file.
    Can you help me how to proceed on this in steps.
    Also pls let me know how to call LSMW transaction through a Report.
    Based on the selection criteria I need to maintain two source structues,one for companycode data and the other for Purchasing Orgnization data for uploading  data thru LSMW.How to do this?
    pls respond ASAP,
    Thanks,
    Nagendra

    Hi,
    create 2 LSMW object (under same project and subproject)..
    one for extended vendor master data for company code data and other for  extended purchase organization data for company code data.
    Now check the radio buttons and based on that populate ur LSMW object.
    Store project
      project = < >.
    Store subproject
      subproj = < >.
    Store object
      object  = '6GSC022_TS3'.
    if r_ccode = 'X'.
    Store object
      object  = < >.
    else.
    Store object
      object  = < >.
    endif.
    Call the function module to display object (LSMW) maintenance screen
      CALL FUNCTION '/SAPDMC/LSM_OBJ_STARTER'
        EXPORTING
          project        = project
          subproj        = subproj
          object         = object
        EXCEPTIONS
          no_such_object = 1
          OTHERS         = 2.
    Generating error log:
    After the checking the field if u think for this u need to generate error message then In the Maintain Field Mapping and Conversion Rules option under the required field write the following code:
    data: v_msgtxt(100) type c.
    message  <msg ID>    <message type>   <message no>
                     with   <var1>  <var2>
                     into v_msgtxt.
    write v_msgtxt.
    Follow the next step in LSMW object till you reach the option  Convert Data.
    After you execute this option you will get the desired message here.
    Regards,
    Joy.

  • How to call Reportwriter in another report

    Hi All,
            Can we call report writer in another custom program
    using submit statement.
    How can i achive this?
    We can call using Call transaction, but i require the output in my called report for comparison of data.
    How to call the report writer and get the output generated by this into my report.

    Hi,
    Using se93 i got name got the name of the report for a given report writer.
    I used report name of report writer in submit statement.
    I am getting short dump as report name does not exists.
    Is there any function module that calls transaction and returns the result.

  • HOW TO CALL A FORM FROM REPORTS?

    How to call a FORM6i form from Oracle Reports6i? Is it at all possible?
    Regards.
    Satyaki De.

    Hi Jakub,
    I don't mean to say that you cannot do what you said in your response above.
    But what I want to say that Oracle does not support forms to be called from reports.
    DDE package is meant for different purpose.
    Dynamic Data Exchange (DDE) is a mechanism by which applications can communicate and exchange data in Windows. DDE client support is added as a procedural extension to Reports Builder. The PL/SQL package for DDE support provides application developers with an Application Programming Interface (API) for accessing DDE functionality from within PL/SQL procedures and triggers.
    Thanks,
    Raj
    http://www.oraclebrains.com

  • How I call procedure  in interactive report??

    Hi
    Is possible that call procedure in interactive report on APEX?
    Because
    in region source it asked only sql statement so I am confused and I dont know how call procedure in interactive report ?
    Edited by: esra aktas on 12.May.2011 11:04
    Edited by: esra aktas on 12.May.2011 12:05

    I am confused... Now, acoording to my senior porject in school my advisor want to that lots of procedures' name and arguments that I have collect them in a table. I collected procedures in table then I wrote a procedure that call wanted procedure by using dynamic sql and run that procedure..I select procedure name on selectlist on apex then that procedure run.
    So I want to my procedure's results must be as dataset in report . But report's source want to sql statement but I want to call the procedure as I mentioned.
    If you have any idea about my situations , I want to get your adviced.
    I have a this procedure.
    create or replace
    PROCEDURE CALLSPFROMTABLE(id number,arg1 varchar2,arg2 varchar2)  as
    table_name varchar2(30):='procedures';
    procname varchar2(1000);
    begin
    EXECUTE IMMEDIATE 'select procname from ' || table_name || ' where id='||id into procname;
    EXECUTE IMMEDIATE 'BEGIN '||procname||'('||arg1||','||arg2||'); END;';
    END;id=>:p1_SP , arg1=>:P1_YIL arg2=>:P1_BIRIM from selectlists
    Edited by: esra aktas on 12.May.2011 13:08
    Edited by: esra aktas on 12.May.2011 13:17

  • How to call a smartform in a bsp application

    Hi,
    I would like to have an example or code for calling a Smartform in a BSP program.Can anyone suggest me in this ?
    Thanks in Advance,
    shwetha

    Hi,
       Also chek the BSP application sf_webform_01 and page form.htm in it.
      Go through the event OnInitialization of the events of form.htm too.
      Hope this will be useful.
    Rgds,
    Vijayalakshmi

  • How to call a drill down report using hyperlink ?

    Can anyone please give an example to call a drill down report using hyper link in Reports 10g ?
    Regards
    Capri !!!

    Hi,
    I've been using this approach in a couple of reports and it works great with one problem. Even if I include the srw.set_hyperlink_attr('target=_new") it still launches the drill report in the current window. When the user hits the back button it doesn't take them back to the main report it takes them back to the reports/rwservlet? page. Can you see if there is anything I'm doing wrong...would be a really cool report if I could force it to open a new window.
    Here is what my code looks like:
    srw.set_hyperlink(:P_SERVER || 'dwn&report=transaction2_v8.rdf' ||
    '&PARAM_COMP_NUM=1' || '&PARAM_ACTV1=' || TRIM(:actvty_cd) || '&PARAM_ACTV2=&PARAM_ACTV3=&PARAM_ACTV4=&PARAM_ACTV5=&PARAM_ACTV6=' ||
    '&PARAM_START_DATE=&PARAM_END_DATE=' || '&PARAM_FY_NUM=' || vYear || '&PARAM_PERIOD=0' || '&PARAM_ACTVTY_GRP=%20' ||
    '&PARAM_LIST=%20' || '&PARAM_START_ACCT_CAT=' || TRIM(vCat) || '&PARAM_END_ACCT_CAT=' || trim(vCat2)|| '&PARAM_SYS_CODE=%20' ||
    '&PARAM_SRC_CODE=%20' || '&PARAM_DATA_TYPE_CD=P' || '&PARAM_ACT_STATUS=%20');
    SRW.SET_TEXT_COLOR('blue');
    srw.set_hyperlink_attrs('target=_new');
    Also I get different behavior if the user saves the PDF and opens the report through their pdf reader.
    Thanks for your help

  • How do you set the Crystal Report Viewer Printer to Duplex

    Using the code below I can print in duplex mode, but this does not let me view a report before printing
    How do I set the Printer in the Viewer Control Bar of the Crystal Report Viewer to Duplex Printing programmatically rather than having to manually select Duplex through the preferences option?
    I have searched but the only example code I found produces errors in the code and will not run
    Private myReport As ReportDocument
    myReport = New ReportDocument()
    myReport.PrintOptions.PaperSize = PaperSize.PaperA4
    myReport.PrintOptions.PaperOrientation = PaperOrientation.Portrait
    myReport.PrintOptions.PrinterDuplex = PrinterDuplex. Vertical
    myReport.PrintToPrinter(3, False, 0, 0)
    In my VB6 Project that I am converting to VB.NET when I added Report.PrinterDuplex = crPRDPVertical, this allowed me to view the report and then print with Duplex without having to set the Print Preferences manualy
    I found 1386475 - How to set printer name and print job title at runtime using Report Application Server SDK for Visual Studio .NET
    But this causes errors
    Imports CrystalDecisions.ReportAppServer.ClientDoc
    Imports CrystalDecisions.ReportAppServer.Controllers
    Dim boReportClientDocument As ISCDReportClientDocument
    Dim boPrintOutputController As PrintOutputController
    Dim boPrintReportOptions As New PrintReportOptions
    Edited by: DavidMills on Feb 18, 2011 11:58 AM

    Hi David,
    You can mix both engines, just declare them both with different report object names. Here's all of my references:
    using System;
    using System.IO;
    using System.Xml;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Data;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.ReportDefModel;
    using CrystalDecisions.ReportAppServer.CommonControls;
    using CrystalDecisions.ReportAppServer.CommLayer;
    using CrystalDecisions.ReportAppServer.CommonObjectModel;
    using CrystalDecisions.ReportAppServer.ObjectFactory;
    using System.Data.OleDb;
    using CrystalDecisions.ReportAppServer.DataSetConversion;
    using CrystalDecisions.ReportAppServer.DataDefModel;
    using CrystalDecisions.ReportSource;
    using CrystalDecisions.Windows.Forms;
    using System.Data.SqlClient;
    using System.Runtime.InteropServices;
        public class frmMain : System.Windows.Forms.Form
            CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rptClientDoc;
    My file open dialog:
            private void btnOpenReport_Click(object sender, System.EventArgs e)
                rptClientDoc = new CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument();
                openFileDialog.Filter = "Crystal Reports (*.rpt)|*.rpt|Crystal Reports Secure (*.rptr)|*.rptr";
                openFileDialog.FilterIndex = 1;
                 if (openFileDialog.ShowDialog() == DialogResult.OK)
                      btnOpenReport.Enabled = false;
                      btnSaveRptAs.Enabled = false;
                      object rptName = openFileDialog.FileName;
                    try
                        rpt.Load(rptName.ToString());
                        rptClientDoc = rpt.ReportClientDocument;
                    catch (Exception ex)
                        MessageBox.Show("ERROR: " + ex.Message);
                        return;
                    MessageBox.Show(rptClientDoc.MajorVersion.ToString() + "." + rptClientDoc.MinorVersion.ToString());
                        MessageBox.Show("Report opened.","RAS",MessageBoxButtons.OK,MessageBoxIcon.Information );
                        btnOpenReport.Enabled = true;
                        btnSaveRptAs.Enabled = true;
                    //MessageBox.Show(rpt.RecordSelectionFormula, "my record: ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    MessageBox.Show(rpt.ReportRequestStatus.NumberOfPages.ToString(), "Number of Pages: ", MessageBoxButtons.OK, MessageBoxIcon.Information);
    As for the page number I use it off the Engine report object:
    MessageBox.Show(rpt.ReportRequestStatus.NumberOfPages.ToString(), "Number of Pages: ", MessageBoxButtons.OK, MessageBoxIcon.Information);
    And it works for me...
    Thank you
    Don

Maybe you are looking for

  • It works on the computer but not on the iPad/iPhone.

    Hello, I am working on a site that I used Dreamweaver and Wordpress to create and I have an odd issue.  The home page here: http://electronic-lifestyle.com It works perfectly on all browsers including iOS.  The blog post below the rotating image is w

  • CALL_FUNCTION_NOT_FOUND runtime error with SXMS_GET_METERING_RECORDS

    Hi, we are facing this dump , past  one month, any one can please suggest us.. please find error details.. we checked communication between solman and CRP is seems tobe fine.. Runtime Errors         CALL_FUNCTION_NOT_FOUND Date and Time          15.0

  • Transfer User Folder from Archive and Install

    I installed Leopard today and did an Archive and Install. It preserved my old user folder, but I can't seem to make it a user. I tried copying it into the user folder and it is now in two places, but does not show up on my login page. All the informa

  • Question RE: eap-tls

    So I have an AP configured to use a radius server for eap-tls the CA and Radius server are MS CA and MS IAS clients are XPpro. Everything is working fine. So where my question is the cracking of a WEP(128bit encryption). Could someone be in the area

  • Wireless keyboard for Palm TX and Adobe reader update?

    I am considering purchasing a wireless keyboard for a Palm TX. Will the 3169WW work? If purchased new, what driver will it come with ( what driver do I need?). How universal is this keyboard? I have Adobe Reader 3.05 on the TX. Should I be looking fo