Restricting Length of Output in Smartforms

Hi All,
I am trying to restrict the lenght of an output to just show nine numbers, decimal point and then two numbers.
I have tried &GV_VAL(9.2)& but I am getting an error back. Is there anyway I can do this??
Many thanks,
Points awarded,
Colm

Hi,
Before display GV_VAL, change the type whatever you want using code option. I mean create a new variable with data type of 9.2 length and move GV_VAL to this variable and display that variable &variable&.
Pranav

Similar Messages

  • Performance Issue-;How to restrict the total output of the report.

    Hi Experts
    I need your advise to resolve one performance issue in my BI Publisher report.
    My report query is extracting more than 80000 records at once. To load these records into the report template it is taking all most 14 to 15 hours. Unfortunately i cannot change my logic to put some more filter to restrict the query output, as this is the requirement from the client.
    Is there any way i can restrict my report so that it will extract the first 1000 record and on the event of pressing next it will extract the next 1000 record and so on from the point when it left in last time.
    Kindly let me know if you have any solution for this.
    Thanks in advance.
    Regards
    Srikant

    Hi experts...
    Any update on this...

  • 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

  • How to Create a Selection Variable for restricting the querry output

    Hi Gurus,
    I have created a query in query designer on a Multiprovider and the output of the query is a Formula in a structure which calculates a % value, the client is looking for entering a range of number during the query selection screen and the output should be restricted to the given selection values.
    Can any one tell me how i should create a selection variable that would take the input from the user during the query selection screen and then restrict the output to that value which user specified.
    Is there a need to write any customer exit or is there any alternative way to make the query work as the requirement is.
    I hope this explains my problem but if any questions please let me know so that i can give u specific information.
    Thanks,
    Nisha.

    Hi Nisha,
    Firstly, in order to restrict the query output by a key figure value, you will need to create a condition on that key figure. This is done in the query deisgner. Now when you are creating the condition you can also use user entry variables (formula variables with user entry) to let the users enter the value that they want to see.
    See here for more details:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/702e39074dc93de10000000a114084/content.htm
    Hope this helps...

  • 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

  • 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

  • Restrict Duplicate print of receipt smartform for specific users

    Hi Folks,
    I have a custom driver program to print Customer Receipt and everything is working fine. But now I have a requirement saying I have to restrict the print option to specific user in case of print of Customer Receipt more than once.
    I found a parameter TDAUTORITY in smartform control structure SSFCOMPOP but since there is no documentation for this structure, I have no idea what is this parameter for.
    So, request you if you could guide through how to meet my requirement of restricting duplicate print for userids.
    Thank you.
    Regards,
    Sud.

    Thank you Brad for your reply.
    Since mine is a custom driver program that is not linked to any Output type in NACE, I can not use the NAST table variable. the NAST table is never updated since my program is a complete Z developement with selection screen to input the values.
    So , I believe that I am left with the Authorisation object approach. I shall use the AUTHORITY-CHECK for the user and should proceed accordingly.
    Thanks again !
    Regards,
    Sud.

  • 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

  • How to restrict height of table  in smartform without using template

    Hi Gurus,
    I am facing a problem with table in smartform.I have 5 records in my table.If i print all 5 then table is fine.But if i get only one record in table then size of the table reduces to one row.Is there any way that i can keep my table height same as for 5 records,though i pass 1 record.I cannot use template here,because  page-breaks are used in the form .
    Your solutions are highly appreciated.
    Thanks and regards,
    Meenakshi

    Hi,
    As far my knowledge goes, If there is one record then table lines will take the height of only one row. You cannot Restrict it to take height of 5 rows.
    A temporary solution could be to add empty records in your internal table so that the table uses all the 5 rows in the table while printing in the smartform. Since they are empty records your smartform will not display any data but will only use the height.
    If you have 1 record add 4 empty records, Similarly if you have 2 records add 3 empty records...
    This way all time the table will take the height of 5 rows.
    As i said earlier this could be a temporary solution.
    Thanks,
    Hari Prasad.

  • 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

  • Restricting P.O output from ECC to  Sus component of SRM

    Hi,
    I do have a requirement of Restricting the output of P.O document created in ECC to SRM-Sus. When a P.O is created and saved in ecc system it mustnot be shared with
    SUS provided it has no indirect materials . I do have the logic with me . I created on routine in VOFM and customized it in "Define Message Schema for Purchase Order" in SPRO and the sy-subrc is set ne 0 if the condition fails . Then also the P.O is being shared with SRM-SUS . Are there any method for accomplishing this? Thanks in Advance,
    Pradeep.

    Hi ,
    Initially when I repliacted P of HR Org Struture it sucessfully craeted BP in SRM  and was CP in Org Structure.
    But suddenly , what happned don;t know, when I replicating Employees (P) in SRM , it is assigning  to respective Postion (S), but BP is not creating in SRM  and in the USERS_GEN  for this User, its postion and ORg Unit to whom it assigned is giving  below error
    Determination of connections to object 'BP' of 'CP' '00000015' failed
    Message no. BBP_UM_UI036
    I checked all this as per Note 550055, 934372..etc....checked respetcive setting in table T77S0...I checked address alos....but no any clue......IDoC in SRM posting sucessfully....
    Can anyone please suggest what should be the cause and solution of it ?
    Thanks
    NAP

  • Restricting the CSV Output

    Hi
    we want to restrict some of the columns in the csv output is there any way to do it other than using extext templates.
    Thanks in Advance,
    Have a Nice day

    Thanks for your reply .
    But i am having some idea will it can be implemented.
    as you said it will depend on the datamodel .
    Consider i am having 2 datasets in my datamodel for my report to get the pdf,html,excel.
    so i want to add one more data set in the same data model with llimited number of columns in the select query and i want to use that dataset in the datamodel in the report generation when i choose the csv ouput.
    Is it possible i am using bi publisher 11g.
    So if it is possbile i can restrict my output in csv format too.
    This is my idea i dont know whether it is possible or not.

  • 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.

Maybe you are looking for

  • Your search cannot be completed because no search service is available- SP2013

    Hi, We have an application page, in which we need to retrieve the search results in SP2013. However, the query always returns the error "your search cannot be completed because no search service is available". Please find the code below. using (SPSit

  • Desperately in need of help restoring my photos from iPhone 3G!

    Hello All, This is the first time I've ever posted a question on the Internet and I am desperate.  I would go to an Apple Genius bar tomorrow if there was one near me...I really need to know if there is any way to restore the photos, list of contacts

  • What happened to ACR

    When running the latest version of Lightroom (I reinstalled it today) and I use the "edit in Photoshop" command on a DNG file they are opening directly in Photoshop, bypassing ACR.  Yesterday they went to ACR first.  I've reinstalled Lightroom and Ph

  • Using OpenCV Library in Flex

    hello everyone. I am quite new to Alchemy. I have been trying to create a Video Recorder for Flex using proper encoding techniques. I tried out this code for Capturing and storing video: http://tdotblog.info/?q=node/1 It works fine but there is no co

  • Depreciation posting for a particular asset

    Hi, I have a requirement to post depreciation for a particular asset. When I run AFAB, System is showing document in test run mode, whereas in liverun mode, system is not posting the depreciation. Could anyone of you, help me what could be the proble