Passing control in Smart forms

Hi! Gurus,
As i was working with EKKO and EKPO and displaying amount for each order.
I wanted to display total amont due for all the open POs on page 1.
hw can i pass control from page 3 to page 1.
Regards,
Digvijay

Hi Digvijay,
There will be actual no need to pass the control from page 3 to 1.
As u need to display the total due amount,write the logic for the same in the driver program or in the smartform and take that amount into a variable ana pass that variable to the smartform.
Once this is done you can put that variable on Page 1 so that the amount will be printed.
Hope it helps you.If any queries you can get back.
Thanks,
Rashmi.

Similar Messages

  • Passing data to smart forms...

    Hi,
    I am learning smartforms and so far have done the following.
    1. Using transaction smartforms, created a Ztestsmartform with one page named "coverpage". the page contains two window elements named, vendorname and faxnum. saved and activated the form.
    2. wrote a zprogram to retrieve data from tables and pass on to the form. I have created an internal table to hold the data. i am  not clear on how to pass that data to my form ?? should i loop the itab and call the function "SSF_FUNCTION_MODULE_NAME" ?? how to pass my itab data then ??
    please explain !!
    whats the purpose of calling function FM_NAME ??
    i took the function module code from a sample available on the net.
    thanks
    REPORT  ZPROGFORSMARTFORMS.
    TABLES: LFA1, LFB1.
    DATA: BEGIN OF VENDOR_DATA OCCURS 0,
          VENDORNAME LIKE LFB1-LIFNR,
          FAXNUM LIKE LFA1-TELFX,
          END OF VENDOR_DATA.
    DATA: VENDOR_LIST LIKE VENDOR_DATA OCCURS 0 WITH HEADER LINE.
    SELECT ALIFNR BTELFX INTO TABLE VENDOR_LIST FROM LFB1 AS A INNER JOIN LFA1 AS B ON ALIFNR = BLIFNR.
    LOOP AT VENDOR_LIST.
    ENDLOOP.
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZTESTSMARTFORM'
      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.

    Hi Sha,
    1) As client dependency is one of the drawback in the scripts, we use smart forms.
    2) When you run a Smartform it gives you a function module, using tha you can run the smart form from your driver program by calling it in the same.
    3) You give the smartform name and the function module name in the SSF_FUNCTION_MODULE_NAME.
    4) While calling the function module in the driver program, first run the smart form and call it using PATTERN, then you change the Call function name as the below example.
    5) You can pass the tables to the table parameters which will come from the function module.
    Please see the below Driver program of a smartform.
    report  zsree_temp_smart                        .
    data: it_sree type standard table of zsree_marc.
    data: x_sree1 type zsree_temp.
    parameters: p_matnr type mara-matnr.
    start-of-selection.
      perform select_data.
    end-of-selection.
      perform smart_form.
    *&      Form  SELECT_DATA
          text
    form select_data .
      select single
             matnr
             ersda
             ernam
             mtart
       from  mara
       into  x_sree1 where matnr = p_matnr.
      if x_sree1 is not initial.
        select matnr
               werks
               pstat
               lvorm
         from  marc
         into  table it_sree
         where matnr = x_sree1-matnr.
      endif.
    endform.                    " SELECT_DATA
    *&      Form  SMART_FORM
          text
    form smart_form .
      data: l_p_form type tdsfname.
      call function 'SSF_FUNCTION_MODULE_NAME'
        exporting
          formname                 = 'ZSREE_TEMP'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
        importing
          fm_name                  = l_p_form
       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.
      call function l_p_form
        exporting
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
          x_sree                     = x_sree1
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
        tables
          it_zsree                   = it_sree
    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.
    endform.                    " SMART_FORM
    Please do not forget to give rewards if it can help you better.
    Thanks,
    Sreekanth

  • Passing structure to smart forms

    Hi experts,
    Can we pass more than one structure  to smart form .  If it is possible pls let me know the procedure...
    Thanks.

    you can pass any number of structure in smartform defined as importing parameter in function module.
    But you have to define that struture of similar type  in se11.
    then write in form interface like:;
    itab1 like ziitab1.
    where zitab1 structure which is similar type to itab1 defined using se11.

  • To pass data to smart forms

    i want to print a form which is developed in webdynpro fo rjava,here adobe is not working.So what iam trying is to use smart forms ,But  is it  possible to display that smartforms in portal...?
    or is there any other way to print the details which are in the webdynpro application.
    This is very urgent for me pls reply to me.
    Surely i'll give points,,,,,
    Warm regards
    shanto aloor

    Hi ,
    U can display a Smart form in portal.
    In RFC Export add a field of type Binary and populate smart form into that binary field.
    In Webdynpro view after Executing the RFC
    byte[] pdfContent =
    wdContext.current<output_node>.get<BinaryExport>();
    IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent,WDWebResourceType.PDF);
              try
             /* PdfUrl is of type String */          wdContext.currentContextElement.setPdfUrl(pdfResource.getURL());
              catch(Exception e)
                   wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);     
    Thanks,
    Sunitha

  • Print control in Smart forms?

    Dear All:
    I have a question in my SMARTFORM page development that i want to calling the smartform many times in my program.
    1.IN R/3 RELEASE VERSION: 4.7, it can call Function module--> SSF_OPEN and SSF_CLOSE using parameters of control_parameters  to control printing spool.
    2.But IN R/3 RELEASE VERSION: 4.6C, the Function module--> SSF_OPEN  is doesn't have parameters of control_parameters.
    Does anyone know how to control the printing spool in  VERSION:4.6C and show me an example?
    Any help whould be highly appreciated.
    Many thanks in advance.
    Regards,
    Elvis

    Dear All:
    I am glad to sloved this question by myself.
    IN R/3 RELEASE VERSION: 4.6C ,if you want to control the printing spool.You can doing by follow step:
    1. You can define parameter like this DATA: control_parameters TYPE ssfctrlop.
    2. Then set the schema for control_parameters-no_open and control_parameters-no_close.
       First form output:
            control_parameters-no_open  = ' '.
            control_parameters-no_close = 'X'.
       Additional output:
            control_parameters-no_open  = 'X'.
            control_parameters-no_close = 'X'.
       Last output:
            control_parameters-no_open  = 'X'.
            control_parameters-no_close = ' '.

  • Problem in page break of smart forms

    Hi Gurus,
    I am using smart forms for printing on cheque.  What is the problem i am facing is i have three entries in my internal table which i am passing to the smart forms from my driver program. But In the output i am getting four print outs last one having the details of the previous one.
    My logic flows like this,
    I have used one loop for main window and have added the command for page break, and then I have read the values for the other windows. I have tried in many ways like counting the number of values in internal table and added that in command but its not working.
    Anybody please help me to fix the problem.
    Thanks in advance

    Hello friend,
    If you have a problem of getting one page printed in addition to the other pages then handle the situation as follows,
    Try to create a folder and handle this problem or create alternatives and put the page break commands inside it so that you can handle the situation by giving condition in the alternatives.
    If your problem still exists please revert back to me i will help you.
    Thanks,
    Sri Hari

  • Smart forms print control pop box (no required) when run report

    Dear All Expert Guru,
             how to control printing pop box when execute transaction code ,Report are make in smart form format
             because while run our report then come printing pop box  select out put device the will come report
                                             . but our user required no should be come printing pop box they are required when run report direct come report
       Pls help me any one.
    Thanks & Regars.
    Sudhir Srivsatava

    Hi,
       Pass the parameter no_dialog = 'X' while calling the smartform.
    data: wa_ctrlop type ssfctrlop.
       wa_ctrlop-no_dialog = 'X'.
    CALL FUNCTION fm_name
      EXPORTING
    *   ARCHIVE_INDEX              = ARCHIVE_INDEX
    *   ARCHIVE_INDEX_TAB          = ARCHIVE_INDEX_TAB
    *   ARCHIVE_PARAMETERS         = ARCHIVE_PARAMETERS
        CONTROL_PARAMETERS         =  wa_ctrlop
    *   MAIL_APPL_OBJ              = MAIL_APPL_OBJ
    *   MAIL_RECIPIENT             = MAIL_RECIPIENT
    *   MAIL_SENDER                = MAIL_SENDER
    *    OUTPUT_OPTIONS             = OUTPUT_OPTIONS
    *    USER_SETTINGS              = 'X'
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       = DOCUMENT_OUTPUT_INFO
    *   JOB_OUTPUT_INFO            = JOB_OUTPUT_INFO
    *   JOB_OUTPUT_OPTIONS         = JOB_OUTPUT_OPTIONS
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5
    Regards,
    Srini.

  • How to Pass the Internal table of a report to Smart Form

    Hi Experts,
    I have one report in which from selection screen i am getting the values from the users, and upon that values i am filling data in to the internal table.
    Now i want to pass that internal table data to the smart form
    and print that data in the smart form.
    So could you pls give me some pseudo code or any steps to achieve it.
    Thanks & Regards,
    DS

    Hi DS,
    First of all you need to create a SF and then need to call the FM generated by the FM in your report.
    In the SF in the form interface>tables tab>mention the name of the table and its type structure.
    Pls note that a new structure has to be created as the same type of your internal table which holds the data.
    And the import and export parameters as just the same as in a FM.
    Now after you create and activate your SF a FM will be generated (wen u execute your SF you will be taken to this SE37 screen with the name of FM so no probs..)
    You can call this FM in your report. Hope this helps.
    Ex:
    say itab has your final data, and you also want to export a variable var1 to the SF.
    after your normal report operations end, call the FM and pass on these data.
    say your FM name is FM1.
    call function FM1
    exporting
    var1 = var1
    tables
    itab1 = itab1.
    pls note that in the SF also i gave the same names, it is not mandatory to give the same names.
    and as you want to print a table in the smartforms, you need to create a table in the smart forms and then display the data which is quite simple.
    Hope this helps...
    if you need any further explanations, pls revert...
    Regards,
    Narendra.
    Reward points if helpful!!!

  • Error in Control Framework in smart forms programms use GUI_DOWNLOAD

    IN VF02 smartforms ENTRY form , I add a function about save PDF at local PC. When I print the smartfomrs,There is ERROR message in update modules.
    IN SM13 can see the ERROR message.
    Function Module: RV_MESSAGE_UPDATE
    Status :Update was terminated
    Error details: FES 022: Error in Control Framework
    I USE GUI_DOWNLOAD FUNCTION  at my code. WHEN I mark it,no error message. I must use the Similar function.
    How do I solve this problem???

    Hello,
    Check the thread:
    Re: Error in Control Framework in smart forms programms
    Regards,
    David

  • Passing SELECT-OPTIONS to smart forms

    hi ,
       how can we pass select options from a program to a smart form.
    Regards
    Arun

    Hi,
    Just try to append the valid values in select options  to internal table from report.
    Then pass that internal table(ofcourse, you need to create user-defined struture if needed in SE11) from report to smart forms.
    Rgds,
    J.Jayanthi

  • Control break statements in smart forms

    Hi,
    Can we use control break statements(at new,at end of) in smart forms?
    if no why?
    if yes, how?
    Regards,
    Sonika

    you can use control block statements in smartforms by using the SORT events.
    In TABLES go to to the SORT section.Here you can give the field by which you want the table to be sorted.There are two radio buttons available for sort : SORT BEGIN and SORT end.
    On selecting any one sort event are generated automatically and event nodes are created in smartforms.Inside these event nodes you can add text nodes or code nodes and write your code.
    SORT BEGIN works like AT NEW
    SORT END works like AT END OF.

  • Passing printer name to smart form

    Hi,
    How to pass more than four characters printer name to smart form function  module name. Please  help me. I will give points.
    Thanks.

    Hi,
        Thanks for your reply but there I can pass maximum four character printer name but my case printer name contains 12 characters. If I pass 12 characters printer name it is considering first four characters and it is displaying printer name is not found. So please tell me how to pass more than four characters printer name.
    Thanks.

  • Why the control parameters changed when print smart form

    Hi experts:
      I set the control parrameters in my source code to print the smart form, I use the loop table for printing, but I found the print device changed automatically, only the frist page is ok. that means, the control paramenters lost when loop. how to solve it?
    this is my source:
    LOOP AT it_outtab INTO wa_outtab WHERE flag = 'X' .
        ssf_open ls_control_param outopt ls_composer_param.
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = lf_formname
          IMPORTING
            fm_name            = lf_fm_name
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
       IF sy-subrc <> 0.
         MESSAGE 'Call SSF_FUNCTION_MODULE_NAME Error' TYPE 'E'.
       ENDIF.
        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 lf_fm_name
          EXPORTING
            control_parameters = ls_control_param
            zgl_k_stru         = wa_outtab
          EXCEPTIONS
            formatting_error   = 1
            internal_error     = 2
            send_error         = 3
            user_canceled      = 4
            OTHERS             = 5.
       IF sy-subrc <> 0.
         MESSAGE 'Call LF_FM_NAME Error' TYPE 'E'.
       ENDIF.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        ssf_close .
        MOVE-CORRESPONDING outopt TO ls_composer_param.
        ls_composer_param-tdimmed = ' '.
        ls_control_param-no_dialog = 'X'.
        IF outopt-tdpreview = 'X'.
          EXIT.
        ENDIF.
      ENDLOOP.

    Hi Prabhat,
    Please check following point in your smartform design.
    1) In your smartform design, how many pages do you have? (Check the page format and margins, have a look at form painter
        as well)
    2) Check out the navigation from one page to another page.
    3) Debugg the form and check at what point the last page is been added.
    Regards,
    Amee.

  • Need Urgent help to control extra page (Last page) display in Smart forms

    Dear all,
    I have supplier data in Header and corresponding line item data in another internal table.
    I am passing both to my smart form. I am using loop in Main Window with both the internal tables linked with GUID field.
    I am having 2 problems with  smart form output.
    1. One more extra page is displaying at the end (With header and footer but without data).
    2. when Data in a particular page exceeds, Next page is not having Header and Footer..Only data is displaying without Header and Footer.
    Can any one help ...
    Regards,
    Srini

    Dear all,
    I have supplier data in Header and corresponding line item data in another internal table.
    I am passing both to my smart form. I am using loop in Main Window with both the internal tables linked with GUID field.
    I am having 2 problems with  smart form output.
    1. One more extra page is displaying at the end (With header and footer but without data).
    2. when Data in a particular page exceeds, Next page is not having Header and Footer..Only data is displaying without Header and Footer.
    Can any one help ...
    Regards,
    Srini

  • Smart form Passing DMBTR Value

    Hi,
    I have aproblem that while passing DMBTR value using structure to Smart Forms it is creating a DUMP as not fragmented.
    1. first it is giving error as reference field is not matching with the forms.
        when we change the structure.
    2. It is creating a dump while passing the value to forms and giving the message as not fragmented.
    Waiting for your help.
    Thanks and Regards.

    Are the data elements in the Print program / driver program for the DMBTR same as the data element of the parameter of the smart form.
    If NOT, make sure both of them are referring to the same data element.
    That should fix the issue.
    A work around could be to fetch that particular data inside the smart form using the program lines.
    Regards,
    Ravi
    Note - Please mark all the helpful answers

Maybe you are looking for

  • Remove movie

    I transferred a movie to my phone. To sync it I checked the box and it worked as planned. Now, I've watched the movie. Removed it from the play list. The question is it still show up under "video" on the sync setup for the phone. How do you delete it

  • Problem during transport of transaction variant.

    Hi Experts, Can any one tell me, the creation of transaction variant is client specific or not???? As because a new transaction variant created through transaction code 'SHD0' is not getting transported properly from one client to another client. Kin

  • Distubution of BDLS  run  between work process

    Hi all, We have the R/3  4.6c with 4.2 TB and BW  7.0 with 7.4 TB , during the refresh from   prod to quality  the BDLS steps takes  nealry 24 to 40 hrs . We have break down the tables  and kicking off mutliple BDLS jobs  like Z * tables  in BDLS run

  • Error displaying DocDef list in B2B 11g

    Hi, Iam using 11g B2B console.At some point of browsing the console, when i try to open the Docdef from the TPA, Iam getting a blank error popup.And in the back end log it is showing a null pointer exception. But I have n number of Doctype and Docdef

  • Upgrading from iTunes 4 to iTunes 6 (problem with windows)

    hi, im having trouble with installing the new itunes... The installation went to plan, but when you try to click on iTunes, windows popup saying "iTunes has encountered a problem and needs to close. We are sorry for the inconvenience." what do i do?