Driver program problem

dear experts,
this is my driver program for the sap script.
but when  i execute this i am able to display the form. please tell me where i had gone wrong.
TABLES: BSEG,BKPF,SKAT.
DATA : BEGIN OF I_BKPF OCCURS 0,
       BSTAT LIKE BKPF-BSTAT,
       XREVERSAL LIKE BKPF-XREVERSAL,
       BELNR LIKE BKPF-BELNR,
       BLDAT LIKE BKPF-BLDAT,
       BUDAT LIKE BKPF-BUDAT,
       BKTXT LIKE BKPF-BKTXT,
       BVORG LIKE BKPF-BVORG,
       BLART LIKE BKPF-BLART,
       TCODE LIKE BKPF-TCODE,
       USNAM LIKE BKPF-USNAM,
       PPNAM LIKE BKPF-PPNAM,
       END OF I_BKPF.
DATA :BEGIN OF I_BSEG OCCURS 0,
       DOCLN LIKE BSEG-DOCLN,
       BUKRS LIKE BSEG-BUKRS,
       HKONT LIKE BSEG-HKONT,
       PRCTR LIKE BSEG-PRCTR,
       PROJK LIKE BSEG-PROJK,
       KOSTL LIKE BSEG-KOSTL,
       WRBTR LIKE BSEG-WRBTR,
       DMBTR LIKE BSEG-DMBTR,
       BSCHL LIKE BSEG-BSCHL,
       MWSKZ LIKE BSEG-MWSKZ,
       VBUND LIKE BSEG-VBUND,
       PSWSL LIKE BSEG-PSWSL,
       END OF I_BSEG.
DATA : BEGIN OF I_FINTAB OCCURS 0,
       DOCLN LIKE BSEG-DOCLN,
       BUKRS LIKE BSEG-BUKRS,
       HKONT LIKE BSEG-HKONT,
       PRCTR LIKE BSEG-PRCTR,
       PROJK LIKE BSEG-PROJK,
       KOSTL LIKE BSEG-KOSTL,
       WRBTR LIKE BSEG-WRBTR,
       DMBTR LIKE BSEG-DMBTR,
       BSCHL LIKE BSEG-BSCHL,
       MWSKZ LIKE BSEG-MWSKZ,
       VBUND LIKE BSEG-VBUND,
       PSWSL LIKE BSEG-PSWSL,
       SGTXT LIKE BSEG-SGTXT,
       BSTAT LIKE BKPF-BSTAT,
       XREVERSAL LIKE BKPF-XREVERSAL,
       BELNR LIKE BKPF-BELNR,
       BLDAT LIKE BKPF-BLDAT,
       BUDAT LIKE BKPF-BUDAT,
       BKTXT LIKE BKPF-BKTXT,
       BVORG LIKE BKPF-BVORG,
       BLART LIKE BKPF-BLART,
       TCODE LIKE BKPF-TCODE,
       USNAM LIKE BKPF-USNAM,
       PPNAM LIKE BKPF-PPNAM,
END OF I_FINTAB.
DATA : V_TOP TYPE C,
       V_TEMP TYPE C VALUE 'X'.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_BUKRS LIKE BKPF-BUKRS.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
*PERFORM GET_DATA.
PERFORM OPEN_FORM.
PERFORM WRITE_FORM.
PERFORM CLOSE_FORM.
*& FORM GET_DATA
*FORM GET_DATA.
FORM SUB_FORM1 TABLES INTAB STRUCTURE ITCSY OUTTAB STRUCTURE ITCSY.
*SELECT BUKRS
      BELNR
      GJAHR
      FROM BKPF INTO TABLE I_BKPF  WHERE BSTAT =
*SELECT SINGLE BELNR FROM BKPF INTO G_BELNR
                     WHERE BLART = G_BLART
                     AND   BLDAT = G_BLDAT
                     AND   TCODE = G_TCODE
                     AND   BUDAT = G_BUDAT
                     AND   USNAM = G_USNAM
                     AND   BKTXT = G_BKTXT
                     AND   PPNAM = G_PPNAM
                     AND   BVORG = G_BVORG.
DATA: G_BELNR LIKE BKPF-BELNR,
        G_BLDAT LIKE BKPF-BLDAT,
        G_BUDAT LIKE BKPF-BUDAT,
        G_BLART LIKE BKPF-BLART,
        G_BVORG LIKE BKPF-BVORG,
        G_BKTXT LIKE BKPF-BKTXT,
        G_TCODE LIKE BKPF-TCODE,
        G_USNAM LIKE BKPF-USNAM,
        G_PPNAM LIKE BKPF-PPNAM.
SELECT   BELNR
         BLDAT
         BUDAT
         BKTXT
         BVORG
         BLART
         TCODE
         USNAM
         PPNAM INTO I_BKPF FROM BKPF WHERE BELNR = G_BELNR.
ENDSELECT.
ENDFORM.
FORM SUB_FORM2 TABLES INTAB STRUCTURE ITCSY OUTTAB STRUCTURE ITCSY.
DATA: G_BELNR LIKE BSEG-BELNR,
      G_DOCLN LIKE BSEG-DOCLN,
      G_BUKRS LIKE BSEG-BUKRS,
      G_HKONT LIKE BSEG-HKONT,
      G_PRCTR LIKE BSEG-PRCTR,
      G_PROJK LIKE BSEG-PROJK,
      G_KOSTL LIKE BSEG-KOSTL,
      G_WRBTR LIKE BSEG-WRBTR,
      G_DMBTR LIKE BSEG-DMBTR,
      G_BSCHL LIKE BSEG-BSCHL,
      G_MWSKZ LIKE BSEG-MWSKZ,
      G_VBUND LIKE BSEG-VBUND,
      G_PSWSL LIKE BSEG-PSWSL.
SELECT DOCLN
       BUKRS
       HKONT
       PRCTR
       PROJK
       KOSTL
       WRBTR
       DMBTR
       BSCHL
       MWSKZ
       VBUND
       PSWSL INTO I_BSEG FROM BSEG WHERE BELNR = G_BELNR.
  ENDSELECT.
  ENDFORM.
*ENDFORM. "GET DATA
*& FORM OPEN_FORM
FORM OPEN_FORM.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
   APPLICATION                       = 'TX'
  ARCHIVE_INDEX                     =
  ARCHIVE_PARAMS                    =
   DEVICE                            = 'PRINTER'
   DIALOG                            = 'X'
   FORM                              = 'ZZ_FIGL_JOURNAL'
   LANGUAGE                          = SY-LANGU
  OPTIONS                           =
  MAIL_SENDER                       =
  MAIL_RECIPIENT                    =
  MAIL_APPL_OBJECT                  =
  RAW_DATA_INTERFACE                = '*'
  SPONUMIV                          =
IMPORTING
  LANGUAGE                          =
  NEW_ARCHIVE_PARAMS                =
  RESULT                            =
EXCEPTIONS
   CANCELED                          = 1
   DEVICE                            = 2
   FORM                              = 3
   OPTIONS                           = 4
   UNCLOSED                          = 5
   MAIL_OPTIONS                      = 6
   ARCHIVE_ERROR                     = 7
   INVALID_FAX_NUMBER                = 8
   MORE_PARAMS_NEEDED_IN_BATCH       = 9
   SPOOL_ERROR                       = 10
   CODEPAGE                          = 11
   OTHERS                            = 12
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.  "OPEN_FORM
*& WRITE_FORM
FORM WRITE_FORM.
LOOP AT I_FINTAB.
V_TOP = 'Y'.
AT NEW BELNR.
V_TOP = 'X'.
ENDAT.
READ TABLE I_FINTAB WITH KEY BELNR = I_FINTAB-BELNR.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
   ELEMENT                        = 'ITEM'
   FUNCTION                       = 'SET'
   TYPE                           = 'BODY'
   WINDOW                         = 'MAIN'
IMPORTING
  PENDING_LINES                  =
EXCEPTIONS
   ELEMENT                        = 1
   FUNCTION                       = 2
   TYPE                           = 3
   UNOPENED                       = 4
   UNSTARTED                      = 5
   WINDOW                         = 6
   BAD_PAGEFORMAT_FOR_PRINT       = 7
   SPOOL_ERROR                    = 8
   CODEPAGE                       = 9
   OTHERS                         = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
ENDFORM. "WRITE_FORM
*& FORM CLOSE_FORM
FORM CLOSE_FORM.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
  RESULT                         =
  RDI_RESULT                     =
TABLES
  OTFDATA                        =
EXCEPTIONS
   UNOPENED                       = 1
   BAD_PAGEFORMAT_FOR_PRINT       = 2
   SEND_ERROR                     = 3
   SPOOL_ERROR                    = 4
   CODEPAGE                       = 5
   OTHERS                         = 6
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.
*END-OF-SELECTION.
regards,
hridhayanjili.

hi sushil this is the code i have written in line edotor.
could u plz check why my program is not displaying the form.
perform sub_form2 in program zsap_driver
using &bkpf-belnr&
changing &g_docln&
changing &g_bukrs&
changing &g_hkont&
changing &g_prctr&
changing &g_progk&
changing &g_kostl&
changing &g_wrbtr&
changing &g_dmbtr&
changing &g_bschl&
changing &g_mwskz&
changing &g_vbund&
changing &g_pswsl&
end perform.
regards,
hridhayanjili.

Similar Messages

  • Problem with SmartForms driver program

    Hello,
    I have the following problem:
    I have created a Smarform that uses a standard text element. In my program, the text in this element is changed depending on the language the user has selected.
    The form is then created and converted to PDF and displayed to the user. The problem I have is that the first time, the PDF is displayed in the correct language. However, when another language is selected the second time, the displayed PDF will still show the first language. After some testing, I found out that the problem most likely lies with the Smartforms function module. It seems that a certain variable is not being reset when it is called the second time, resulting in the same language being shown. Perhaps there's some variable in the control_parameters that I didn't set?
    In any case, this is the code of the driver program:
    DATA: fm_name TYPE rs38l_fnam.
      DATA: output_options TYPE ssfcompop,
            control_parameters TYPE ssfctrlop,
            job_output_info TYPE ssfcrescl.
    * Get function module name for SmartForm
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname = 'ZHR_ADVERTISEMENT'
        IMPORTING
          fm_name  = fm_name.
    * SmartForm settings
      control_parameters-getotf = 'X'.
      control_parameters-no_dialog = 'X'.
      output_options-tdnoprev = 'X'.
    * Execute SmartForm
      CALL FUNCTION fm_name
        EXPORTING
          control_parameters = control_parameters
          output_options     = output_options
        IMPORTING
          job_output_info    = job_output_info
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
    * Display PDF
      CALL FUNCTION 'HR_EFI_SHOW_PDF_FORM'
        TABLES
          otf_table = job_output_info-otfdata.
    Thanks in advance!
    Dave

    Hi,
    Check the below code and see if ur missing something
    DATA: form_name TYPE rs38l_fnam,      " Used to get the function module of Smartform
          wa_ctrlop TYPE ssfctrlop,       " Smart Forms: Control structure
          wa_outopt TYPE ssfcompop,       " SAP Smart Forms: Smart Composer (transfer) options
          t_otfdata TYPE ssfcrescl.       " Smart Forms: Return value at end of form printing
    Data: t_pdf_tab type table of tline,  " SAPscript: Text Lines
          t_otf TYPE table of itcoo.      " OTF Structure
    Variables used to pass to GUI_DOWNLOAD
    DATA: w_filesize TYPE i,
          w_bin_filesize TYPE i.
    Variables used for Save Dialog Box
    DATA : file_name TYPE string,
           file_path TYPE string,
           full_path TYPE string.
    START-OF-SELECTION.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = 'ZPDF_G'      "p_name
        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_outopt-tdnoprev = 'X'.
      CALL FUNCTION form_name
        EXPORTING
          control_parameters = wa_ctrlop
          output_options     = wa_outopt
          user_settings      = 'X'
        IMPORTING
          job_output_info    = t_otfdata
        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.
    END-OF-SELECTION.
      t_otf[] = t_otfdata-otfdata[].
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 132
        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.
    ----TAKING THE DOWNLOAD FILE PATH AS USER INPUT*
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        CHANGING
          filename             = file_name
          path                 = file_path
          fullpath             = full_path
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 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.
    Download the file to the selected path
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize            = w_bin_filesize
          filename                = full_path                   "fname1
          filetype                = 'BIN'
        IMPORTING
          filelength              = w_filesize
        TABLES
          data_tab                = t_pdf_tab
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc <> 0.
        MESSAGE i000(zpdf).      "File not downloaded
      ELSE.
        MESSAGE i001(zpdf).      "File downloaded
      ENDIF.

  • Problem in smart forms &Driver program..urgent....

    Hi friends ,
              I am having 4 windows  in a page ,
              I am having 4 wa as wa1, wa2, wa3, wa4 in my driver program of SF.
    for ex my itab is hving 10 lines , i am passing first line of my itab to wa1 and print in First window of  page 1, second line to wa2 and second  window /page1....
    4 line of itab to wa4 dispaly in 4 th wind/pag1.
    5,6,7,8, lines of itab in again wa1,wa2, wa3 ,wa4 into window 1,2,3,4 of page 2 and
    9,10 lines of itab in wa1,wa2 into win1 , win 2 of page 3. For ex my itab can hve 'n' lines....this is the scenerio...
    my question is .........
    1. how can i always take 4 line pass in wa1 , wa2 3 & 4 , then go for next four , then rest ........in my driver program....
    2. In Sf after complition of 1st four in page 1 , how it will move next four to page 2, rest in page 3.....
    can any one help me ...it is very urgent....advance thanks,
    Reagrds
    LAkshmi..)....

    Hi ,
    Goto Global Settings -> Form Attributes
    In the Form Attributes,click the General attributes tab you will find the package name of the smartform.
    Regards
    DV

  • Printing Line Items in Script without using driver program

    How to print the line items of a internal table in sap script without using driver program? I am not supposed to edit anything in the driver program. Pls help me to solve this problem...

    Hi,
    You can try by creating a new driver program and a new FORM ENDFORM inside that for this purpose.
    Regards,
    Gaurav

  • Calling a driver program by submit in user exit for PGI

    Hi Gurus,
    I have a question regarding post goods issue (PGI) for transaction vl01n,vl02n and vl06g.
    earlier i have created a smartofrm and a driver program for sending the form output attachment in a mail after delivery posting manually.
    for this i have created a smartform and driver program in which all the logic to attach and mail send is written on delivery posting.
    but now customer want this fucntionality on Post goods issue (PGI), when user go to trasaction vl01n ,vl02n and vlo6g and pressing PGI button,
    then mail should be sent automatically with for output attachment.
    i have found a user exit which is being triggerd on PGI press MV50AFZ1 in which implemented the implecit enhancement in perform
    user_exit_save_document_prepeare with below code.
    ENHANCEMENT 1  ZPGI_MAIL_SEND.    "active version
    DATA c_zlf TYPE likp-lfart.
    IF sy-ucomm = 'WABU_T' and xlikp-lfart = c_zlf.
    SUBMIT ZSD_DECLARATION_CONFORMITY AND RETURN.
    ENDIF.
    ENDENHANCEMENT.
    After going to transaction vl02n i am putting unposted delivery number and clicking on PGI button.
    in debugging its going to condition check for ucomm for PGI buttion and delivery type.
    if condtion is fullfiled and curser going further on submit statement, but without executing the driver program ZSD_DECLARATION_CONFORMITY it coming out of enhancement.
    its not performing the task which is develped in the driver program.
    Please help me with the submit statement structure if i am missing any or other solution for my problem.
    Br,
    Surya

    Hi Team,
    I have used the perform.
    ENHANCEMENT 1  ZPGI_MAIL_SEND.    "active version
    DATA c_zlf TYPE likp-lfart.
    IF sy-ucomm = 'WABU_T' and xlikp-lfart = c_zlf.
    Perform entry( ZSD_DECLARATION_CONFORMITY )using return screen.
    ENDIF.
    ENDENHANCEMENT.
    Now i am able to communicate with my program.
    Thanks,
    surya

  • Dump in smartform driver program for purchase order

    i created one smartform with driver program for purchase order.
    in smartfrom i gave
    form interface: p_ebeln as import,   
                        tables as it_ekpo like ekpo.
    global definitions are
    wa_ekko type ekko for printing the  ekko data in one window,
                                           wa_ekpo type ekpo .
    in main window i took  the  one table and loop the ekpo table for  printing the item details.
    no errors is there.but ; when i call this generated function module to my driver program it goes to dump.
    in driver program i declare structures,internal tables,work areas, and parameter as p_ebeln .
    and also select statements for my table all are good.but its not work.
    in function module i pass the details as export p_ebeln = p_ebeln and table it_ekpo  = it_ekpo.
    and also i done debugging in this data come to the internal table and work areas.
    but it goes to dump.
    if u dont mind plz solve my problem.
    Thanks
    Navya.
    Moderator message: empty lines removed, subject corrected, please use meaningful subject lines when posting!
    Edited by: Thomas Zloch on Mar 24, 2011 10:10 AM

    Hi Navya,
    Your smartform is correct. But, as per my understanding, the dump comes when you call the smartform from the driver program. If that is the case, please check the input parameters and all th parameters in the program should be same as used in samrtform. Any deviation would lead to a dump.
    Analyse and resolve!!!
    Regards
    Atul Sachdeva

  • U00BFCan I use a function module as a driver program for sapscript?

    Hi,
    I have to use a function module as driver program for sapscript and there is no any value in the form (the data are not transferred)...
    but if I call the sapcript from a report with the same code as in my function module all the data are transferred OK.
    please, can you tell me if there is any problem in use of a function module in this case? is it impossible at all or is there any tip to apply?
    thank you all in advance.

    Hi,
    first of all it is possible to use a function module to process a SapScript form.
    The mistake on your side is probably the definition of the variables that you want to pass to the form. Please make sure they are defined as global (via SE37 --> Goto --> Global Data) then it should be working.
    In addition you could take a look at e.g. function module "PRINT_DUNNING_NOTICE". This is SAP standard and they are using it to print a SapScript form.
    Best regards
    Arno Speitkamp

  • Call function in driver program

    Hi all,
    I created one smartform and trying to assign it to a driver program and when I call the function module second time in SE38 and give the FM(number) generated then its throwing an error saying that' FM ''  '' has been called'.
    when I called the function module giving the number generated then I remove it and put 'fm_name'.
    For all other forms I have done the same then what will be the problem wih this
    Please answer
    Thx

    Have a look on this
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'ZSALESFORM'
      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.
    ENDIF.
    CALL FUNCTION fm_name                          "'/1BCDWB/SF00000228'
      EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
        VBELN                      = VBELN
    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.

  • Purchase order driver program and configuration for nace

    i have copied the medruck in script and i need to write the driver program for that and need to configure to nace can any one tell me how to do this.

    Hi Rocky,
    Below are steps to configure:
    1. Go to transaction NACE
    2. Select EF application, click on output types
    3. Select Output type NEU and double click on processing routines
    4. Here you can give ur driver program name and script name
    Hope it will solve the problem.
    Regards
    Krishnendu

  • Purchase Order Driver Program Not loading SMARTFORM

    Hi,
    I have developed Z smartform by copying from standard form and tried to call from standard program only but here I am not able to call my Z smartform and I am able to call only Z SAPSCRIPT from this standard program.
    I have done all the necessary changes in NACE transaction but then also only when I keep the script name its working fine but when I replace this by smartform name the driver program is not calling smartform .!! why?
    Please do let me know why is it like this?
    Thanks
    Sudharshan

    Hi,
    PO driver program is written to support only SAPSCRIPT. So if you want to assign smartform in NACE, you should take a Zcopy of the driver program SAPFM06P with its include FM06PE02 as ZFM06PE02. And give the zprogram against the driver program field in NACE.
    Then you need to replace the entry_nue subroutine in ZFM06PE02 with the below code.
    form entry_neu using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print.
    * Data Declaration for PO smartform Modification
    DATA: fname TYPE rs38l_fnam,
            xkomk TYPE TABLE OF komk,
            gs_output TYPE ssfcompop,
            gs_dialog TYPE ssfctrlop.
      clear ent_retco.
      if nast-aende eq space.
        l_druvo = '1'.
      else.
        l_druvo = '2'.
      endif.
      call function 'ME_READ_PO_FOR_PRINTING'
           exporting
                ix_nast        = nast
                ix_screen      = ent_screen
           importing
                ex_retco       = ent_retco
                ex_nast        = l_nast
                doc            = l_doc
           changing
                cx_druvo       = l_druvo
                cx_from_memory = l_from_memory.
      check ent_retco eq 0.
       IF tnapr-sform NE ' '.
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = tnapr-sform
          IMPORTING
            fm_name            = fname
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        IF sy-subrc EQ 0.
            gs_dialog-no_dialog = 'X'.
            gs_dialog-preview = 'X'.
            gs_output-tddest = 'LP01'.
            gs_output-tdnoprev = ' '.
            gs_output-tdnoprint = ' '.
            gs_output-tdimmed = 'X'.
            gs_output-tdnewid = 'X'.
         CALL FUNCTION fname  " modify the interface as per your needs
            EXPORTING
              control_parameters = gs_dialog
              output_options     = gs_output
              user_settings      = ' '
              zxekko             = l_doc-xekko
              zxpekko            = l_doc-xpekko
            TABLES
              l_xekpo            = l_doc-xekpo
              l_xekpa            = l_doc-xekpa
              l_xpekpo           = l_doc-xpekpo
              l_xeket            = l_doc-xeket
              l_xtkomv           = l_doc-xtkomv
              l_xekkn            = l_doc-xekkn
              l_xekek            = l_doc-xekek
              l_xkomk            = xkomk
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
        ELSE.
          CALL FUNCTION 'ME_PRINT_PO'
            EXPORTING
              ix_nast        = l_nast
              ix_druvo       = l_druvo
              doc            = l_doc
              ix_screen      = ent_screen
              ix_from_memory = l_from_memory
              ix_toa_dara    = toa_dara
              ix_arc_params  = arc_params
              ix_fonam       = tnapr-fonam                      "HW 214570
            IMPORTING
              ex_retco       = ent_retco.
        ENDIF.
      ELSE.
        CALL FUNCTION 'ME_PRINT_PO'
          EXPORTING
            ix_nast        = l_nast
            ix_druvo       = l_druvo
            doc            = l_doc
            ix_screen      = ent_screen
            ix_from_memory = l_from_memory
            ix_toa_dara    = toa_dara
            ix_arc_params  = arc_params
            ix_fonam       = tnapr-fonam                        "HW 214570
          IMPORTING
            ex_retco       = ent_retco.
      ENDIF.
    endform.
    While calling the smartform modify the fm interface to your needs.
    This will solve your problem.
    Regards
    Karthik D

  • How can i change the sequence of text element in standard driver program ?

    Hi,
    can u tell me how can i change the sequence of text element in standard  sapscript driver program.. without making a zcopy of standard driver program.
    My problem is when MEDRUCK form is getting printed for PO print , header text is coming before item. But the requirement is to come it after item.So how cani do that without making the zcopy of  SAPLMEDRUCK program..Is there any enhancement point in SAPLMEDRUCK driver program..where i can put my customise code for changing the sequence of text element ?

    Hi,
        Just copy the MEDRUCK to ZMEDRUCK. No need to copy the driver program.
    1) SE71Menu > Utilities > COpy from Client
    MEDRUCK ->>Client 000
    New formname ZMEDRUCK
    2) Now open the ZMEDRUCK in DE language in SE71
    3) Menu > Utilities > Convert original Language
    Change DE  to EN, save and activate
    4) Now open the ZMEDRUCK in EN language
    5) Goto Pagewindows > Main window,
    Look for the HEADER text Text element, copy the whole code under this Text element just after the ITEM text Text element, and comment the HEADER text above.
    Now the Header text Text element will be below ITEM text only. This will full fill your requirment.
    Now goto NACE transaction and add the copied ZMEDRUCK to the EF application.
    Regards
    Bala Krishna

  • How to call driver program internal table in a form

    how to call driver program internal table in a form? Given below is my code
    TABLES: VBRK,VBAK,ADRC,KNA1,VBRP,VBAP,J_1IMOCOMP.
    DATA: BEGIN OF IT_CUST_ADD OCCURS 0,
    STREET LIKE ADRC-STREET,
    NAME LIKE ADRC-NAME1,
    POST_CODE LIKE ADRC-PSTCD1,
    CITY LIKE ADRC-CITY1,
    CUST_TIN LIKE KNA1-STCD1,
    END OF IT_CUST_ADD.
    DATA: BEGIN OF IT_IN_DA OCCURS 0,
    VBELN LIKE VBRK-VBELN,
    FKDAT LIKE VBRK-FKDAT,
    END OF IT_IN_DA.
    now suppose these are my internal table. what should i write in FORM INTERFACE (associated type)

    Hi Sashi, this will solve ur problem.
    Check the below link.
    REG:PEFORM IN SCRIPT
    kindly reward if found helpful.
    cheers,
    Hema.

  • Debugging driver program for SAP SCrIPT

    Hi,
    I am using a z report for creating handling units.As soon as the handling units are created the spool is genearted for all the handling units and the spool requests are visible in SP01.However the print ouput is having some error.I want to debug the driver program.Fronm nace I found out the driver program and have placed break-point in the form routine Entry sapscript and also activated thhe debugger for te concerned SCript,but the debugger is not stopping .
    Also I have checked the script name from the spool.
    Kindly guide where is the problem and how to proceed.Any help will be acknowledged.
    Regards,
    Abhishek

    HI,
    Write  a infinite loop  in the diver program before u call the open form or before the statement from where you want to debug.
    set the infinite loop by this code.
    data no type i value 1.
    while no eq 1.
    endwhile.
    break-point.
    Then after inserting this code activate and run the program, then run the transaction after runing the transaction ,
    goto TCODE ->SM50 u will see list of program select the driver program then select program/session from menu then select program->debugging, then your debug will start from the infinite loop , then change to 2 , then u can debug the program.
    Hope this helps.
    Regards,
    Madhukar Shetty

  • Need to debug PTRV_EXPENSE_FORM.  Have to find Driver Program

    Hi experts
    I have created a custom copy of PTRV_EXPENSE_FORM (ZPTRV_EXPENSE_FORM), which is working absolutely as required, except that manager is not able to view the entire information entered by the user.  I want to debug it, but don't know how to find the driver program. 
    Everything except the Adobe Form is still SAP standard.  I Would also appreciate if anybody can let me know if there could be issues other than technical with this problem!
    Kind regards

    Hi,
    The driver program for the PTRV_EXPENSE_FORM Is 'SAPMP56T' which has an include 'PTRM_WEB_FORMS' that has a function
    module call (line 547 ) for the the Adobe Form.
    Regards,
    Sagar

  • E-Recruitment - Driver Program of Standard SmartForm

    Hi All,
    Can anyone tell, how to find the driver programs of standard smartforms which are attached in view V77RCF_ACT2FORM.
    Pls help!

    Hi,
    I am not quite sure what you mean by 'driver program', but maybe the following explanation will help solving your problem:
    The system generates a function module for each smartform. You can find the function module names easily using backend transaction 'smartforms'. Type in the form name (e.g. HRRCF_DATA_SUMMARY_REQUISITION) in the corresponding input field and press F8.
    The function modules are called (e.g. via the recruiters' frontend scenario) from BSP applications. The BSP applications are responsible to gather all relevant data and to supply the function module interfaces. The BSP applications are listed in the IMG documentation (IMG path 'E-Recruiting -> Technical Settings -> User Interfaces -> Assign Parameters to Parameter Types', Section 'Parameter Types SF* (Smart Forms)'). There you can find e.g. the BSP application 'HRRCF_REQ_DOVR', which is used for displaying of smartform 'HRRCF_DATA_SUMMARY_REQUISITION'.
    Best Regards, Michael

Maybe you are looking for

  • How to design a chat applet?

    Hello, I have to design a chat applet in such a way that two users on different systems should be able to chat to each other after they login into a site. The applet should be able to save the transcript after the chat gets over (and that is consider

  • Supplier Blocking code

    Hi, Where is the Supplier blocking code maintained in Customization? Thanks, Chintan.

  • Content canvas to stacked canvas for scroll bars

    I have a form which has more items. Initially I developed the form with content canvas(this has vertical scroll bar). now I changed this canvas to stacked canvas to get horizontal + vertical scroll bar. But I am not able to do it. Can any one please

  • Ubuntu 9.10 and Lenovo G550 problem

    Hello, I have one Lenovo G550 recently purchased. I've tried to install Ubuntu 9.04 and 9.10, but both OS wouldn't boot. I'm not sure where the problem lies, as I'm Linux newbie and all I get is a dark screen. I haven't tried to install it into a par

  • Oracle Fusion Middleware - Oracle Reports - remote client

    Hello, Our setup involves an Oracle Reports server running on a farm. There is a Oracle Forms application that is used to call the reports and generate the reports. There is a plan to have a batch functionality to generate the reports. Is it possible