Reg. Output in smartform

Dear Experts
Can anyone give example for "  Input throgh script and output in smartform ". Pls help urgently.
Thanks
Rajakumar.K

Dear Experts
The below  is my script,the output should come in smartform.
Pls help,
Report ZPR.
TABLES:mara,makt.
DATA:BEGIN OF pr OCCURS 0,
matnr LIKE mara-matnr,
ersda LIKE mara-ersda,
ernam LIKE mara-ernam,
laeda LIKE mara-laeda,
aenam LIKE mara-aenam,
lvorm LIKE mara-lvorm,
END OF pr.
DATA:pr1 LIKE pr OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS:mat FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK b1.
SELECT maramatnr maraersda maraernam maralaeda mara~aenam
mara~lvorm INTO TABLE pr1 FROM mara
WHERE mara~matnr IN mat.
write :/'Material',
      'Material Desc'.
LOOP AT pr1.
  WRITE:/ pr1-matnr,
  pr1-ersda,
  pr1-ernam,
  pr1-laeda,
  pr1-aenam,
  pr1-lvorm.
ENDLOOP.
Thanks
Rajakumar.K

Similar Messages

  • Problem during output of smartform in PDF

    Hi All,
    I am using Function module for output of smartform in PDF Format.But it is giving following informatio -OTF end command // missing in OTF data.
    and then no data in pdf format.
    Could you please help me whar shoul I do for that?
    MY code is like that :
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    Search the error in the first call to smartforms. ([Function documentation Checking and Testing a Smart Form|http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/83fb5bdf8f11d3969700a0c930660b/frameset.htm])
    Regards,
    Raymond

  • How to send output of smartform in pdf format as an attachment to email

    how to send output of smartform in pdf format as an attachment to email
    search before posting further and follow Forum rules
    Edited by: Vijay Babu Dudla on Jan 15, 2009 4:50 AM

    Did u check on sdn?
    i dont think so or else there are many posts on this topic and good wikis too.
    look at one of these code tutorial wiki
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/mail%2bsend%2bthrough%2boutput%2bcontrols
    So next time do use the search functionality.
    кu03B1ятu03B9к
    Edited by: kartik tarla on Jan 15, 2009 12:33 PM

  • Send output of smartforms by mail to a specified e-mail adress.

    Dear all ,
            How can I send output of smartforms to purchase order pdf format and send this pdf file to a specified e-mail address.
    Best regards,
    Merry

    zhang for the pdf you need to put the code as given below..........:-) .This include the complete sequence.
    Converting the Smartform into PDF Format
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = C_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
       ERR_BAD_OTF                 = 4
       OTHERS                      = 5
    IF SY-SUBRC <> 0.
      MESSAGE 'Error in CONVERT_OTF'(049) TYPE C_MSGTYPE_I.
    ENDIF.
    Convert PDF from 132 to 255.
    LOOP AT I_TLINE INTO W_TLINE.
    TRANSLATE W_TLINE USING ' ~'.
    CONCATENATE W_BUFFER W_TLINE INTO W_BUFFER.
    APPEND W_BUFFER TO I_BUFFER.
    ENDLOOP.
    LOOP AT I_BUFFER INTO W_BUFFER.
    TRANSLATE W_BUFFER USING '~'.
        DO.
          W_RECORDS = W_BUFFER.
          APPEND W_RECORDS TO I_RECORD.
          SHIFT W_BUFFER LEFT BY 255 PLACES.
          IF W_BUFFER IS INITIAL.
            EXIT.
          ENDIF.
        ENDDO.
    ENDLOOP.
    Object with PDF.
    I_OBJBIN[] = I_RECORD[].
    Content of the email.
      W_OBJTXT-LINE         = 'Smartform_output is attched'(020).
      APPEND W_OBJTXT TO I_OBJTXT.
    *I_OBJTXT[] = I_RECORDS[].
    DESCRIBE TABLE I_OBJTXT LINES V_LINES_BIN.
    Document Data
        CLEAR W_DOC_CHNG.
        W_DOC_CHNG-OBJ_NAME  = 'ZSAS_TRAVAGREE'.
        W_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
        W_DOC_CHNG-OBJ_DESCR = 'Form for Travel Agreement'(021).
        W_DOC_CHNG-PRIORITY  = C_HIGH_1.
        W_DOC_CHNG-DOC_SIZE  = V_LINES_BIN * 255.
    Pack to main body as RAW.
    Obj. to be transported not in binary form
    Start line of object header in transport packet
    CLEAR W_OBJPACK.
    REFRESH I_OBJPACK.
    I_OBJPACK-HEAD_START = 1.
    Number of lines of an object header in object packet
    I_OBJPACK-HEAD_NUM = 0.
    Start line of object contents in an object packet
    I_OBJPACK-BODY_START = 1.
    Number of lines of the object contents in an object packet
    I_OBJPACK-BODY_NUM = V_LINES_TXT.
    Code for document class
    I_OBJPACK-DOC_TYPE = 'RAW'.
    CLEAR I_OBJPACK-TRANSF_BIN.
    APPEND I_OBJPACK.
    To specify the mail content and subject.
      DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
    Packing as PDF.
    I_OBJPACK-TRANSF_BIN = 'X'.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    I_OBJPACK-BODY_NUM = V_LINES_BIN.
    I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    I_OBJPACK-DOC_TYPE = 'PDF'.
    I_OBJPACK-OBJ_NAME = 'ZSAS_TRAVAGREE'.
    I_OBJPACK-OBJ_DESCR = 'Form for Travel Agreement'(021).
    APPEND I_OBJPACK.
    Document information.
    REFRESH I_RECLIST.
    e-mail receivers.
    W_RECVLIST-RECEIVER = G_MAIL_ID.
    W_RECVLIST-EXPRESS = C_X.
    W_RECVLIST-REC_TYPE = C_EXTERNAL_EMAIL. "Internet address
    APPEND W_RECVLIST TO I_RECLIST.
    REFRESH I_OBJHEAD.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA                    = W_DOC_CHNG
        PUT_IN_OUTBOX                    = C_X
        COMMIT_WORK                      = C_X
      TABLES
        PACKING_LIST                     = I_OBJPACK
        OBJECT_HEADER                    = W_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.
    ENDIF.
    let me know if you wanna any help ....
    Edited by: varghese oommen on Apr 29, 2009 10:16 AM

  • How to convert the output of smartforms into doc format

    Hi friends,
    I want the output of smartform to be saved in doc format. I don't want to view the printpreview screen and then save it. The way we save the output in pdf format I want it to be done in doc format. Please don't suggest this option
    After the print preview, Select the menu Goto->List Display.
    Now select the menu System->List->Save->Local File.
    Now you can select the radio buttion Rich Text Format.
    Now you save the document as a .doc file (say test.doc)
    Regards,
    Satabdi

    Hi friends,
    I want the output of smartform to be saved in doc format. I don't want to view the printpreview screen and then save it. The way we save the output in pdf format I want it to be done in doc format. Please don't suggest this option
    After the print preview, Select the menu Goto->List Display.
    Now select the menu System->List->Save->Local File.
    Now you can select the radio buttion Rich Text Format.
    Now you save the document as a .doc file (say test.doc)
    Regards,
    Satabdi

  • The text which is in text node is not displaying in output in smartforms

    Hi,
      In smartforms i created a text node and entered some text like following.
         Target Quantity               60000001     60000002          
         Scheduled Quantity               60000003     60000004               
         So far delivered Quantity          60000005     60000006
         Last delivered Quantity          60000007     60000008
          Delivery Schedule Details
    the text which i entered as above in the text node is not displaying.It is in main area.

    Hi
    if u are using table or template inside the main window
    then just mention the position of the text element
    goto text element - output options- output structure tab----give line and column no.
    Thanks
    krushna

  • Reg- windows in smartforms

    Hi,
    1) What is the difference between the copy and final window in smartforms?
    2) What is the difference between at-selection screen output and initialization in reports?
    Points will be rewarded for correct answer.
    Regards
    sathish

    <i>Copies window:</i>
    You use the copies window to define an output area for the print output, whose content you want to appear either only on the copy or only on the original. This allows you to flag copies as copies when the form is printed.
    <i>Final window:</i>
    You may want to display or query values on the first page that are determined only during processing. For example, you may want to name the grand total in the letter text of an invoice. However, this amount is determined only after listing all individual items. Or you may want to query on the first page within a condition the total number of pages, which the system calculates only after processing all pages.
    Check this link:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b1/243fe0beee11d4b633006094192fe3/frameset.htm
    <i>AT SELECTION-SCREEN OUTPUT</i>
    This is used to dynamically set the screen field attributes
    <i>initialization</i>
    this is used to set the default values to the scree fields.
    Regards,
    Naimesh Patel

  • Report output in smartform example

    Hello,
    Can anyone tell me if there are available sample reports in SAP with output in a smartform? I have a report which fills an internal table. I would like to pass this internal table to a smartform and display the form.
    Thank you!

    Hi Marian,
    Check this info.
    <b>Calling SMARTFORMS from your ABAP program</b>
    Check this sample program.
    REPORT ZSMARTFORM. 
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    TABLES: MKPF. 
    DATA: FM_NAME TYPE RS38L_FNAM. 
    DATA: BEGIN OF INT_MKPF OCCURS 0.
            INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF. 
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001. 
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
       MOVE-CORRESPONDING MKPF TO INT_MKPF.
       APPEND INT_MKPF. 
    ENDSELECT. 
    At the end of your program.
    Passing data to SMARTFORMS 
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZSMARTFORM'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
      IMPORTING
        FM_NAME                  = FM_NAME
      EXCEPTIONS
        NO_FORM                  = 1
        NO_FUNCTION_MODULE       = 2
        OTHERS                   = 3. 
    if sy-subrc <> 0.
       WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif. 
    call function FM_NAME
    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         =
      TABLES
        GS_MKPF                    = INT_MKPF
      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.
    Hope this resolves your query.
    <b>Reward all the helpful answers.</b>
    Regards

  • Word output from smartform

    Moved to correct forum
    Hi,
    Is there any way to convert a smartform output to a word document? The document contains some graphics, lines and table objects in it. Do you have any suggestions about it?
    Edited by: Matt on Apr 15, 2009 8:45 AM

    Hi,
    It can only be done to a certain level.
    You cannot transfer the formatting etc. Only the text.....
    So don't bother. Use a PDF. They can be change/edited easily and they look fantastic.
    See the [link |http://help.sap.com/saphelp_nw70/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm]
    Let me know if you need any further help...
    Thank you,
    Anupama.

  • Error in print output of smartform

    Hii
    i have designed a smartform for packilist...In the output if a material has 1 batch number then the output is coming...but if a material has multiple batch numbers not getting the output....and the same error for proforma invoice also...if it has multiple line items the output is not coming....i want all the line items to be printed in same form....can anyone help me regarding this....

    Hello Venkat,
    First of all check whether all batch numbers for that material are coming in the code or not.
    To do this,put a break point in the code and execute.
    If batch numbers are not coming then retreive them first and allot space to print those batch numbers in the form.
    Hope its useful.
    Regards
    Kota.

  • XML output in smartform

    Hello,
    My requirement is to create xml file from a smartform and iam able to do that fine but iam not sure how to create XSL file to view the xml output.
    Thanks for your help.

    H Friend,
    In Smartform, from Form Attributes -> Output Options -> Output Format you can choose either XSF format or XSD formt.
    Please press F1 and read documentation.
    Hope it will help you.
    Regards
    Krishnendu

  • Download the output of smartform into excell sheet

    Hi Experts,
    We have one smartform for list out the  Shipment  packing list.
    Now the requirement is we need to download  into excel file output of the samrtform when we issue the output.
    Please help on this issue to resolved.
    Thanks and regards,
    Amjad Hussain,

    Hi,
    As per my knowledge, it is not possible to download into Excel , but we can store as PDF or faxing or mail with PDF attachement is possible.
    Bye

  • Hi all, i didn't get my output using smartform?

    Hi,
    Can i copy standard program sapfm06p to zprogram.where can i write my code for smartform(my zprogram).in that program.plz help me urgent.

    Hi,
    1.For PO ,the smartform driver program is not sapmf06p.The form name is /smb40/mmpo_A or _l.
    2.Copy this form and write code in program lines of smart layout.
    3.For help :
    http://www.****************/Tutorials/Smartforms/SFMain.htm
    4.Driver program is :
    PUCHASE ORDER
    Output type : NEU
    ScriptForm Name : MEDRUCK
    Driver Program Name : SAPMF06P
    smartform name : /SMB40/MMPO_L
    smartform driver program : /SMB40/FM06P
    Regards,
    Shiva Kumar

  • Output in smartform

    I dont want print preview screen in the smartform output.
    so i used control_parameters = 'X' in the my functional module.
    but my question is how i make sure i am getting the output screen
    or how can i get the output screen by supressing print preview.

    We had a similar scenario...
    Well here is the solution...
    For ONLY PREVIEW
    ST_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
    ST_CONTROL_PARAMETERS-PREVIEW = 'X'.
    For PRINTING DIRECTLY
    ST_CONTROL_PARAMETERS-PREVIEW = ' '.
    ST_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
    ST_OUTPUT_OPTIONS-TDIMMED = 'X'.
    CALL FUNCTION v_fm_name
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS = st_control_parameters
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS = st_output_options
    USER_SETTINGS = 'X'   default it to space
    IMPORTING
    DOCUMENT_OUTPUT_INFO = st_document_output_info
    JOB_OUTPUT_INFO = st_job_output_info
    JOB_OUTPUT_OPTIONS = st_job_output_options
    TABLES
    IS_LABELS = IS_LABELS
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    also
    IF sy-subrc = 0.
          CALL FUNCTION 'CONVERSION_EXIT_SPDEV_INPUT'
            EXPORTING
              input  = l_pdest
            IMPORTING
              output = l_output_option-tddest.
        ENDIF.
    SELECT SINGLE patype
    FROM tsp03
    INTO l_output_option-tdprinter
    WHERE padest = l_output_option-tddest.
    IF sy-subrc = 0.
    Do nothing
    ENDIF.
    Populate output options
    l_output_option-tdimmed = 'X'.
    l_control-no_dialog = 'X'.
    CALL FUNCTION v_form_fm
    EXPORTING
    control_parameters = l_control
    output_options = l_output_option
    user_settings = ''
    p_first = p_first
    p_title = v_title
    p_prog = v_prog
    p_system = v_system
    p_date = v_date
    p_time = v_time
    p_user = v_user
    p_plant = v_plant
    TABLES
    i_report = i_report
    i_mat_zfg = i_mat_zfg
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.

  • Check output with Smartforms?

    Greetings, everyone.
    Is it at all possible to use Smartforms to create check (payment advice) output?
    All the documentation I've found says to basically use RFFOUS_C and a SAP Script layout (F110_PRENUM_CHCK or a customized version), but I'd much rather use Smartforms if I can to format and output checks.
    The relevant SAP version is 4.7.
    Thanks for your assistance!!
    Chad

    Dear Chad,
    As you have the script F110_PRENUM_CHCK - download the script first onto your desktop.
    Open the Tcode SMARTFORMS.
    Go to Menu- Utilities->Migrate SAPScript Form.
    You need to create a Custom Smartform and Name it as SF_F110_PRENUM_CHCK.
    Then in there is a option of giving the Source form(SAP Script) as the SAP Script Name = F110_PRENUM_CHCK.
    Target Form(Smartform) = SF_F110_PRENUM_CHCK.
    Then the SAP Script would have transfferred its layout into a smartform.
    Now take this Smartform and use it to customise accordingly the layout according to you requirements. This will ease your efforts a lot.
    Hope this helps you out. Please do reward accordingly.
    Thanks
    Venugopal

Maybe you are looking for

  • My embedded form is being reported as a Web Forgery

    Hi, Google has decided that my new form is a web forgery, and Phising attempt. The form is now useless and the client is not happy. I've submitted a report to Google to try and get this sorted out, but hope you can offer some advice to avoid this in

  • How to get the project path ?

    In my servlet, how do I get the project path ? I have the following dir structure : Web_App   + build     lib   + nbproject   + src     test   + web ( index.jsp , my.jsp , my.html )     + Dir_Docs ( my file : ABC.txt ) My Servlet is : public class My

  • APD / Open Hub Reports Execution Steps

    Hi Friends,                  Can anybody let me know how can I execute the APD and Open hub rerports .. and direct it to logical file names...and where do we configure the logical file names being directed to physical directory locations ? thks, Suba

  • Data loss -- managed photos mis-badged as missing referenced photos

    I always import all photos as managed photos, and never use referenced photos. Yesterday, I noticed that the last 29 photos from a group of 96 photos imported Feb 18 were badged as "The referenced image's master file has not been found." Indeed, alth

  • Retail:how do we create site coding for site catogeries (in IMG)

    Hi experts,                   I just want to know how and where do we "create site coding".I know there are standard" site categories" are there in "site profile" those are "Distribution center (DC)" and "siore".I want the path and procedure where we