ERROR HRFORMS011 : PRINT PROGRAM LINE 161

Hi Gurus,
I am trying to activate a copied HR FORM, using HRFORMS transaction. I get following error whenever I try to activate.
Generated print program contains a syntax error
Message no. HRFORMS011
Diagnosis
Generated print program /1PYXXFO/ZHRPY_BULLETIN_PRNT contains a syntax error in line 161 of include /1PYXXFO/ZHRPY_BULLETIN_PRNT.
In this include SAP says that field P_IPVIEW is unknown
I am unable to execute the form. Can someone help me on this?
Thanks in advance,
K

Hi K,
Go through SAP Note 878168.
You cannot fix this with an HR SP; use the database utility instead.
Start transaction SE11 for view V_HRF_SELFIELDS and then go to Utilities
-> Database Object -> Database Utility.
After applying the note, please go trough the following steps to
regenerate the forms:
1) Start transaction HRFORMS
2) Select menu Utilities - activate forms
3) Input the names of your forms
4) Press F8
Regards,
Carlos.

Similar Messages

  • HP printer2504 error message Printer off line?

    My printer has suddenly stoped working  error message/  Printer off line? how do I rectify this?

    Is the printer connected wirelessly?
    Have you given it a fixed IP address, or is it receiving it via DHCP?

  • Runtime error in print program of a smartform

    Hi,
    While trying to execute the print program of a smartform I am getting the following runtime error.
    The reason for the exception is:
    The call to the function module "/1BCDWB/SF00000288" is incorrect:
    In the function module interface, you can specify only
    fields of a specific type and length under "IT_BOOKINGS".
    Although the currently specified field
    "IT_BOOKINGS" is the correct type, its length is incorrect.
    In the form interface of the smartform under tables parameters I have declared like this.
    IT_BOOKINGS      LIKE      SBOOK
    IT_SCHEDULE      LIKE      SPFLI
    Can anyone tell me why do we get this error?
    Regards,
    Hema

    Hello,
    program to call smartform is really simple :
    -> function SSF_FUNCTION_MODULE_NAME give you the name of the function link to your sapscript.
    -> function WFMC_PREPARE_SMART_FORM help your to prepare your options to your smartform.
    -> function xxx  to call your smartform (find with the first function).
    Sometimes you have to play with values of NAST (for ex) to find the language (set in control_parameters) or for example if you want to print without display (when it ask you for print / print preview  and the name of the print device) .....
    Frédéric

  • Error in print program

    Hi guys,
             I am  trying to change to  new tds format for form 16. After applying snote 1486147 ,there is an error in driver program.
    The field "H_ECESSTYPE_TAB1" is unknown, but there is a field with the  similar name "ECESSTYPE_TAB1.
    can any one guide me how to rectify this error.
    thanks in advance.
    regards,
    suresh.

    Hi suresh,
    Try this way
    in the include J_1IEWT_CERT_F01 of your driver program
    under FORM process_dp.
    just add this
      DATA : surchtype_tab1 type standard table of rate_type with header line,
             h_ecesstype_tab1 type standard table of rate_type with header line, " Note 1097621 *this is must*
             ecesstype_tab1 type standard table of rate_type with header line.
    Hope your purpose will be solved.
    Regards,
    koolspy.

  • HRFORMS - print program error

    Hi all,
    I have developed a HR FORM for printing the employee remuneration statement. In that, i have designed the layout using Adobe form and activated this form. But when i try to activate the HR FORM, it returns the following error.
    "Print program contains a syntax error."
    Can anyone tell me the reason for this error and how to solve it?
    Regards,
    Shanthi

    Hi,
    try doub clicking on the error message and red the complete description.
    or refer the link
    Link:[http://help.sap.com/saphelp_nw04s/helpdata/en/c2/42c437004b4d74bd74100d327a3354/frameset.htm]
    thanks
    ravi

  • Error when exexuting a smart form from print program

    Hi,
    I have created a Print Program & Layout Set [Smart Form].
    Now when i executed Print program it is throwing following error.
    As internal table that we are passing to F.M is not having any data i have appended some data in debug mode.
    After htting Print Immediaely Button Following EXIT Error is coming.
    No table is currently processed, switching lines is not possible.
    Message no. SSFCOMPOSER 183
    Diagnosis
    You tried to switch to the next table line, but currently no table is open for output.
    System Response
    The system issues an error message.
    Procedure
    This is probably an internal error. Please contact the SAP hotline and report the problem.
    Can anybody solve this issue!
    Thanks in advance.
    Thanks,
    Deep.

    Make sure that you have proper definations of internal table in program and smartform.
    Regards,
    Amey

  • Purchase order print program error

    hi experts!
    am facing a problem in my purchase order print program. the problem is that when i am trying to see the print preview the following dump error is throughing, which am not able to understand.
    the P.O total amount should be change into words( like one million then thousand thirty three kuwait dinars)
    but the total amount is not converting into as mentioned, instead the dump is encountered.
    please give me solution,
    thnaks
    *DUMP*
    Runtime Errors         CONVT_NO_NUMBER                                                             
    Exception                CX_SY_CONVERSION_NO_NUMBER                                                  
    Date and Time          05.05.2008 19:04:43                                                         
    Short text                                                                               
    Unable to interpret "1760,778.71 " as a number.                                               
    What happened?                                                                               
    Error in the ABAP Application Program                                                                               
    The current ABAP program "ZMM_SUBROUTINES" had to be terminated because it has                
        come across a statement that unfortunately cannot be executed.                                
    What can you do?                                                                               
    Note down which actions and inputs caused the error.                                                                               
    To process the problem further, contact you SAP system                                        
        administrator.                                                                               
    Using Transaction ST22 for ABAP Dump Analysis, you can look                                   
        at and manage termination messages, and you can also                                          
        keep them for a long time.                                                                    
    Error analysis                                                                               
    An exception occurred that is explained in detail below.                                      
        The exception, which is assigned to class 'CX_SY_CONVERSION_NO_NUMBER', was not               
         caught in                                                                               
    procedure "GET_AMT_IN_WORDS" "(FORM)", nor was it propagated by a RAISING                     
         clause.                                                                               
    Since the caller of the procedure could not have anticipated that the                         
        exception would occur, the current program is terminated.                                     
        The reason for the exception is:                                                              
        The program attempted to interpret the value "1760,778.71 " as a number, but                  
        since the value contravenes the rules for correct number formats,                             
        this was not possible.                                                                        
    How to correct the error                                                                               
    Whole numbers are represented in ABAP as a sequence of numbers, possibly                      
         with an algebraic sign.                                                                      
        The following are the possibilities for the representation of floating                        
        point numbers:                                                                               
    [algebraic sign][mantissa]E[algebraic sign][exponent]                                       
          [algebraic sign][whole number part].[fraction part]                                         
        For example, -12E+34, +12E-34, 12E34, 12.34                                                   
        If the error occurred in your own ABAP program or in an SAP                                   
        program you modified, try to remove the error.                                                                               
    If the error occures in a non-modified SAP program, you may be able to                        
        find an interim solution in an SAP Note.                                                      
        If you have access to SAP Notes, carry out a search with the following                        
        keywords:                                                                               
    "CONVT_NO_NUMBER" "CX_SY_CONVERSION_NO_NUMBER"                                                
        "ZMM_SUBROUTINES" or "ZMM_SUBROUTINES"                                                        
        "GET_AMT_IN_WORDS"                                                                               
    If you cannot solve the problem yourself and want to send an error                            
        notification to SAP, include the following information:                                                                               
    1. The description of the current problem (short dump)                                                                               
    To save the description, choose "System->List->Save->Local File                            
        (Unconverted)".                                                                               
    2. Corresponding system log                                                                               
    Display the system log by calling transaction SM21.                                        
           Restrict the time interval to 10 minutes before and five minutes                           
        after the short dump. Then choose "System->List->Save->Local File                             
        (Unconverted)".                                                                               
    3. If the problem occurs in a problem of your own or a modified SAP                           
        program: The source code of the program                                                       
           In the editor, choose "Utilities->More                                                     
        Utilities->Upload/Download->Download".                                                                               
    4. Details about the conditions under which the error occurred or which                       
        actions and input led to the error.                                                                               
    The exception must either be prevented, caught within proedure                                
        "GET_AMT_IN_WORDS" "(FORM)", or its possible occurrence must be declared in the               
        RAISING clause of the procedure.                                                              
        To prevent the exception, note the following:                                                 
    System environment                                                                               
    SAP-Release 700                                                                               
    Application server... "EHPAP1"                                                                
        Network address...... "10.100.150.103"                                                        
        Operating system..... "AIX"                                                                   
        Release.............. "5.3"                                                                   
        Hardware type........ "00C3B3F04C00"                                                          
        Character length.... 16 Bits                                                                  
        Pointer length....... 64 Bits                                                                 
        Work process number.. 1                                                                       
        Shortdump setting.... "full"                                                                               
    Database server... "EHPDB"                                                                    
        Database type..... "DB6"                                                                      
        Database name..... "EHP"                                                                      
        Database user ID.. "SAPEHP"                                                                               
    Char.set.... "C"                                                                               
    SAP kernel....... 700                                                                         
        created (date)... "Mar 19 2007 20:40:49"                                                      
        create on........ "AIX 2 5 005DD9CD4C00"                                                      
        Database version. "DB6_81 "                                                                               
    Patch level. 102                                                                               
    Patch text.. " "                                                                               
    Database............. "DB6 08.02., DB6 09."                                                 
        SAP database version. 700                                                                     
        Operating system..... "AIX 1 5, AIX 2 5, AIX 3 5"                                                                               
    Memory consumption                                                                               
    Roll.... 16192                                                                               
    EM...... 29328936                                                                               
    Heap.... 0                                                                               
    Page.... 1359872                                                                               
    MM Used. 19180992                                                                               
    MM Free. 1764848                                                                               
    User and Transaction                                                                               
    Client.............. 400                                                                      
        User................ "FADISULAIMAN"                                                           
        Language key........ "E"                                                                      
        Transaction......... "ME22N "                                                                 
        Program............. "ZMM_SUBROUTINES"                                                        
        Screen.............. "SAPLMEGUI 0014"                                                         
        Screen line......... 22                                                                       
    Information on where terminated                                                                   
        Termination occurred in the ABAP program "ZMM_SUBROUTINES" - in                               
         "GET_AMT_IN_WORDS".                                                                               
    The main program was "RM_MEPO_GUI ".                                                                               
    In the source code you have the termination point in line 398                                 
        of the (Include) program "ZMM_SUBROUTINES".                                                   
        The termination is caused because exception "CX_SY_CONVERSION_NO_NUMBER"                      
         occurred in                                                                               
    procedure "GET_AMT_IN_WORDS" "(FORM)", but it was neither handled locally nor                 
         declared                                                                               
    in the RAISING clause of its signature.                                                                               
    The procedure is in program "ZMM_SUBROUTINES "; its source code begins in line                
        358 of the (Include program "ZMM_SUBROUTINES ".                                               
    Source Code Extract                                                                               
    Line  SourceCde                                                                               
    368   DATA: lt_spell LIKE spell.                                                                
      369                                                                               
    370   READ TABLE in_tab WITH KEY 'CURR'.                                                        
      371   IF sy-subrc = 0.                                                                          
      372     lf_curr = in_tab-value.                                                                 
      373   ENDIF.                                                                               
    374                                                                               
    375   READ TABLE in_tab WITH KEY 'NETWR'.                                                       
      376   IF sy-subrc = 0.                                                                          
      377     lf_netpr_01 = in_tab-value.                                                             
      378     REPLACE ',' IN lf_netpr_01 WITH ' '.                                                    
      379     CONDENSE lf_netpr_01 NO-GAPS.                                                           
      380                                                                               
    381     IF lf_curr = 'KWD'.                                                                     
      382       lf_netpr_kwd = lf_netpr_01.                                                           
      383                                                                               
    384       CALL FUNCTION 'SPELL_AMOUNT'                                                          
      385         EXPORTING                                                                           
      386           amount    = lf_netpr_kwd                                                          
      387           currency  = lf_curr                                                               
      388           filler    = ''                                                                    
      389           language  = sy-langu                                                              
      390         IMPORTING                                                                           
      391           in_words  = lt_spell                                                              
      392         EXCEPTIONS                                                                          
      393           not_found = 1                                                                     
      394           too_large = 2                                                                     
      395           OTHERS    = 3.                                                                    
      396                                                                               
    397     ELSE.                                                                               
    >>>>>       lf_netpr = lf_netpr_01.                                                               
      399       CALL FUNCTION 'SPELL_AMOUNT'                                                          
      400         EXPORTING                                                                           
      401           amount    = lf_netpr                                                              
      402           currency  = lf_curr                                                               
      403           filler    = ''                                                                    
      404           language  = sy-langu                                                              
      405         IMPORTING                                                                           
      406           in_words  = lt_spell                                                              
      407         EXCEPTIONS                                                                          
      408           not_found = 1                                                                     
      409           too_large = 2                                                                     
      410           OTHERS    = 3.                                                                    
      411     ENDIF.                                                                               
    412     IF sy-subrc <> 0.                                                                       
      413 *          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO                                
      414 *          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.                                        
      415                                                                               
    416     ELSE.                                                                               
    417                                                                               
    Contents of system fields                                                                         
    Name     Val.                                                                               
    SY-SUBRC 0                                                                               
    SY-INDEX 17                                                                               
    SY-TABIX 1                                                                               
    SY-DBCNT 18                                                                               
    SY-FDPOS 1                                                                               
    SY-LSIND 0                                                                               
    SY-PAGNO 0                                                                               
    SY-LINNO 1                                                                               
    SY-COLNO 1                                                                               
    SY-PFKEY NORMAL                                                                               
    SY-UCOMM PREVOUTPUT                                                                               
    SY-TITLE Held Imp. Pur. O r - ESG 5000000021 Created by Fadi Sulaiman                             
    SY-MSGTY A                                                                               
    SY-MSGID TD                                                                               
    SY-MSGNO 426                                                                               
    SY-MSGV1 NEXTPAGE                                                                               
    SY-MSGV2 ZMEDRUCK_PO                                                                               
    SY-MSGV3                                                                               
    SY-MSGV4                                                                               
    SY-MODNO 0                                                                               
    SY-DATUM 20080505                                                                               
    SY-UZEIT 190441                                                                               
    SY-XPROG SAPCNVE                                                                               
    SY-XFORM CONVERSION_EXIT

    Hi Prasad,
    Check the FM's
    SPELL_AMOUNT --> for display in millions
    HR_IN_CHG_INR_WRDS --> for display in lakhs and crores

  • Error in customization of smartform ,print program in OPK8

    Hello All,
    I am ABAP consultant .i created a new smartform in original language in FR and a print Zprogram.
    while doing customization for smartform in the transaction OPK8 , the system is throwin an error saying that
    the form is not availble in french .but form is there and in active state .
    if i execute my program manually i am able to generate spool .
    can any one please solve the problem or can any one sent the customization steps .
    looking forward for good answers .
    thanks
    Ane

    Hi Shah,
    Are you using any include texts in the smartform. You have to check the check box  No error if no error exits.
    If you are not using the texts,Put a hard code break point in program lines at different steps and see till which part of the code is executed successfully.
    Thanks,
    Vamshi.

  • Syntax Error when generate print program in HRFORMS

    Dear All,
    I created form for payslip using HRFORMS, the name form is ZPS_TPI_01. When I activate the form, the error raised: Generated print program contains a syntax error
    Diagnosis
      Generated print program /PYXXFO/ZPS_TPI_01_PRNT conains a syntax error in line 9 of include /PYXXFO?ZPS_TPI_01_PAYR.
    I have already apply note 878168 but it is not work.
    Please advise me.
    Thank you,

    hi,
    can you let me know for which country  are you trying to generate the HR form for payslip?
    There are certain countries for which payslip isnt supported.
    For such countries you get a similar error.
    Thank you,
    Jose

  • Update terminate error in va02 Z print program

    Hi All,
    I have an update terminate error in va02 Z print program when it encounters information message statement while printing the sales order.
    I have changed it to status message then no error
    This is happening only in precessing status 4(send immediately) in edit message in va02
    Regards,
    Venkat

    Hi venkat,
    Go to SM13 . there it gives the line no. where the termination has occured. You can debug the program from there and make relavent changes.
    Amar

  • RFFOAVIS_FPAYM: Is this print program will support multiple PO line items

    Hi, I am using the print program:<b>RFFOAVIS_FPAYM</b> and customized layout of: <b>F110_IN_AVIS</b>. I am able to get multiple Document numbers but I am not getting the multiple PO line items for each Document no. I had called the perform statement in text element : <b>625</b> in Main window.
    Can you suggest how to modify the standard print program to our requirement. Where we need to
    [code][code][code]<b>declare the text element</b>
    [/code][/code][/code], Where we will declare the <u><b>internal table for getting the PO line items.</b></u>
    Thanks & Regards
    Madhu

    Amar,
    You can create a PO with multiple line item, but you can not create the PO with multiple currency.
    Regards,
    Manish

  • Runtime error:ABAP program lines are longer than the internal table

    Hi all,
    Below is the code I have written,when Iam running it Iam getting
    'ABAP program lines are longer than the internal table' runtime error.How can I resolve it.
    REPORT  ZTEST1  NO STANDARD PAGE HEADING LINE-SIZE 255.
    TABLES:MARC,CDHDR,CDPOS.
    TYPE-POOLS:SLIS.
    DATA:HEADER TYPE SLIS_T_FIELDCAT_ALV,
         WA TYPE SLIS_FIELDCAT_ALV,
         LAYOUT TYPE SLIS_LAYOUT_ALV.
    TYPES:BEGIN OF MARC_TY,
            MATNR LIKE MARC-MATNR,
            WERKS LIKE MARC-WERKS,
            EKGRP LIKE MARC-EKGRP,
            MINBE LIKE MARC-MINBE,
            EISBE LIKE MARC-EISBE,
            MABST LIKE MARC-MABST,
           END OF MARC_TY.
    TYPES:BEGIN OF MATNR1_TY,
            MATNR1 LIKE CDHDR-OBJECTID,
          END OF MATNR1_TY.
    TYPES:BEGIN OF CDHDR_TY,
             OBJECTCLAS LIKE CDHDR-OBJECTCLAS,
             OBJECTID   LIKE CDHDR-OBJECTID,
             CHANGENR   LIKE CDHDR-CHANGENR,
             USERNAME   LIKE CDHDR-USERNAME,
             UDATE      LIKE CDHDR-UDATE,
            END OF CDHDR_TY.
    TYPES:BEGIN OF CDPOS_TY,
             OBJECTCLAS LIKE CDPOS-OBJECTCLAS,
             OBJECTID   LIKE CDPOS-OBJECTID,
             CHANGENR   LIKE CDPOS-CHANGENR,
             TABNAME    LIKE CDPOS-TABNAME,
             FNAME      LIKE CDPOS-FNAME,
             CHNGIND    LIKE CDPOS-CHNGIND,
             VALUE_NEW  LIKE CDPOS-VALUE_NEW,
             VALUE_OLD  LIKE CDPOS-VALUE_OLD,
            END OF CDPOS_TY.
    **************TABLE TYPES********************************************
    TYPES: MARC_TAB   TYPE TABLE OF MARC_TY,
           MATNR1_TAB TYPE TABLE OF MATNR1_TY,
           CDHDR_TAB  TYPE TABLE OF CDHDR_TY,
           CDPOS_TAB  TYPE TABLE OF CDPOS_TY.
    *******************INTERNAL TABLES************************************
    DATA:MARC_ITAB   TYPE MARC_TAB,
         MATNR1_ITAB TYPE MATNR1_TAB,
         CDHDR_ITAB  TYPE CDHDR_TAB,
         CDPOS_ITAB  TYPE CDPOS_TAB.
    ****************WORK AREAS********************************************
    DATA:MARC_WA   TYPE MARC_TY,
         MATNR1_WA TYPE MATNR1_TY,
         CDHDR_WA  TYPE CDHDR_TY,
         CDPOS_WA  TYPE CDPOS_TY.
    *******************SELECTION-SCREEN***********************************
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
      PARAMETERS:PLANT LIKE MARC-WERKS.
      SELECT-OPTIONS:MATERIAL FOR MARC-MATNR.
      SELECT-OPTIONS:DATE FOR CDHDR-UDATE.
    SELECTION-SCREEN END OF BLOCK B1.
    START-OF-SELECTION.
    SELECT MATNR
            WERKS
            EKGRP
            MINBE
            EISBE
            MABST
            FROM MARC INTO TABLE MARC_ITAB
            WHERE MATNR IN MATERIAL
            AND WERKS = PLANT.
      CHECK MARC_ITAB[] IS NOT INITIAL.
      LOOP AT MARC_ITAB INTO MARC_WA.
       MATNR1_WA-MATNR1 = MARC_WA-MATNR.
       APPEND MATNR1_WA TO MATNR1_ITAB.
       CLEAR MATNR1_WA.
    ENDLOOP.
    CHECK MATNR1_ITAB[] IS NOT INITIAL.
    SELECT OBJECTCLAS
            OBJECTID
            CHANGENR
            USERNAME
            UDATE
            FROM CDHDR INTO TABLE CDHDR_ITAB
            FOR ALL ENTRIES IN MATNR1_ITAB
            WHERE OBJECTCLAS = 'MATERIAL'
            AND OBJECTID = MATNR1_ITAB-MATNR1
            AND UDATE IN DATE.
    CHECK CDHDR_ITAB[] IS NOT INITIAL.
    SORT CDHDR_ITAB[]  DESCENDING BY OBJECTID  CHANGENR.
    DELETE ADJACENT DUPLICATES FROM CDHDR_ITAB[] COMPARING OBJECTID.
    SELECT OBJECTCLAS
           OBJECTID
           CHANGENR
           TABNAME
           FNAME
           CHNGIND
           VALUE_NEW
           VALUE_OLD
           FROM CDPOS INTO CORRESPONDING FIELDS OF TABLE CDPOS_ITAB
           FOR ALL ENTRIES IN CDHDR_ITAB
           WHERE OBJECTCLAS = CDHDR_ITAB-OBJECTCLAS
           AND OBJECTID = CDHDR_ITAB-OBJECTID
           AND CHANGENR = CDHDR_ITAB-CHANGENR
           AND TABNAME  = 'MARC'
           AND FNAME    IN ('MINBE','EISBE','MABST','LVORM')
           AND CHNGIND  = 'U'.
    CHECK CDPOS_ITAB[] IS NOT INITIAL.
    *LOOP AT CDPOS_ITAB INTO CDPOS_WA.
    WRITE: / CDPOS_WA-OBJECTCLAS,
             CDPOS_WA-OBJECTID,
             CDPOS_WA-CHANGENR,
             CDPOS_WA-TABNAME,
             CDPOS_WA-FNAME,
             CDPOS_WA-CHNGIND,
             CDPOS_WA-VALUE_NEW,
             CDPOS_WA-VALUE_OLD.
    *ENDLOOP.
    WA-SELTEXT_L = 'OBJECTCLAS'.
    WA-COL_POS   = '1'.
    WA-FIELDNAME = 'OBJECTCLAS'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '15'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'OBJECTID'.
    WA-COL_POS   = '2'.
    WA-FIELDNAME = 'OBJECTID'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '20'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'CHANGENR'.
    WA-COL_POS   = '3'.
    WA-FIELDNAME = 'CHANGENR'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '8'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'TABNAME'.
    WA-COL_POS   = '4'.
    WA-FIELDNAME = 'TABNAME'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '5'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'FNAME'.
    WA-COL_POS   = '5'.
    WA-FIELDNAME = 'FNAME'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '7'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'CHANGING'.
    WA-COL_POS   = '6'.
    WA-FIELDNAME = 'CHANGING'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '1'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'VALUE_NEW'.
    WA-COL_POS   = '7'.
    WA-FIELDNAME = 'VALUE_NEW'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '5'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'VALUE_OLD'.
    WA-COL_POS   = '8'.
    WA-FIELDNAME = 'VALUE_OLD'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '5'.
    APPEND WA TO HEADER.
    CLEAR WA.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
        I_PROGRAM_NAME               = SY-REPID
        I_INTERNAL_TABNAME           = 'CDPOS_ITAB'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_INCLNAME                   = SY-REPID
      CHANGING
        CT_FIELDCAT                  = HEADER[]
    EXCEPTIONS
    IF SY-SUBRC <> 0.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        I_CALLBACK_PROGRAM                = SY-REPID
        IT_FIELDCAT                       = HEADER[]
      TABLES
        T_OUTTAB                          = CDPOS_ITAB[]
    IF SY-SUBRC <> 0.
    ENDIF.

    Your select querry on MARC is not matching with MARC_TY.
    The field in the MARC table and MARC_TY should be same.
    and also, when you are making select querry on CDPOS table
    with all entries.
    When ever you are using all entries select statement, you should check whether the internal table is having value.
    you should check
    if CDPOS_IT[] is not initial.
    SELECT OBJECTCLAS
    OBJECTID
    CHANGENR
    TABNAME
    FNAME
    CHNGIND
    VALUE_NEW
    VALUE_OLD
    FROM CDPOS INTO CORRESPONDING FIELDS OF TABLE CDPOS_ITAB
    FOR ALL ENTRIES IN CDHDR_ITAB
    WHERE OBJECTCLAS = CDHDR_ITAB-OBJECTCLAS
    AND OBJECTID = CDHDR_ITAB-OBJECTID
    AND CHANGENR = CDHDR_ITAB-CHANGENR
    AND TABNAME = 'MARC'
    AND FNAME IN ('MINBE','EISBE','MABST','LVORM')
    AND CHNGIND = 'U'.
    endif.
    Regards
    Madhan D

  • Explain flow of standard cheque print program

    Hi All,
    Can anybody explain the flow of standard cheque print program RFFOUS_C.
    The standard cheque print program will use Z form layout to print cheque and remittance advice.I have to add few form routines for RFFOUS_C. Also explain the functions of below mentioned form routines.
    Form routines:
    FM_CHQ_AMT
    Move protective u201C*u201D from field REGUD-SWNES and load value into AMOUNT_CHEQUE.
    FM_REMOVE_STAR
    Move protective u201C*u201D from field REGUD-SWNES and load value into AMOUNT_FIXED.
    Append the currency to the end of the value in AMOUNT_FIXED (if Currency = ZAR u2013 append the value R)
    FM_CHQ_AMT_WORDS
    u2022 Remove extra spaces from the amount in words
    u2022 If currency = ZAR insert the word RANDS after the Rands amount else insert the value in field REGUD-WAERS
    u2022 Combine Rands value and the cents value with the text -AND- (i.e. Rands value u2013AND- cents value)
    u2022 End the cents value with the text CENTS
    u2022 End the amount in words with the text u201C-ONLYu201D.
    u2022 If the amount text is longer than 52 characters split the text into two lines (line 1 (AMOUNT_WORD_1) may hold 52 characters and line 2 (AMOUNT_WORD_2) may hold 62 characters u2013 maximum capacity for writing cheques).
    u2022 Overlay any spaces with the character u201C|u201D

    International Payment Medium - Check (with check management)
    Description
    This program prints prenumbered check forms or non-prenumbered checks whose number is to be assigned from a predefined number range, and links the check number to SAP payment document number or the check number to the settlement result.
    In addition to the checks, you can print their payment advice notes and payment summaries in one program run.
    Requirements
    Check lots
    The checks which are ready for printing are divided up into lots. The user can freely define the criteria by which lots are formed (for example, location of check storage, accounting clerk or printer). The check numbers of a lot must be consecutive.
    A lot is assigned to the checks to be printed via a parameter whose number you define via the corresponding check lot management in the system.
    After entering the lot number, the print program independently searches for the first free check number (even if this is in the next lot rather than in the lot specified).
    Payment Program Configuration
    The parameters that control the way in which the payment medium programs function are configured in Customizing. For more information on configuring the payment program, refer to the Implementation Guide.
    1. Here you need to make specifications for the paying company code. To do this, select the relevant paying company code by choosing Paying Company Codes ->.
    If payment advices are to be printed, define a SAPscript payment advice form for use with all company code payment methods. You will find the form F110_D_AVIS as an example in the standard system.
    You need to create and enter text modules in which the texts for the header, footer, signature and sender are stored. These modules can be included in the forms when they are used. To do this, choose Sender Details, from where you can also branch into text maintenance by selecting the modules. The names of the text can be defined by the user, for example F_0001_HEADER for the letter header in company code 0001.
    2. Here you need to allocate the name of the payment medium program RFFOUS_C to the payment method to avoid incorrect payment media being issued with another program by mistake.
    Furthermore, you can enter a short name (or 'print dataset', for example LIST1S) which makes it easier to find the generated forms in the print manager.
    To do this, first choose Payment methods in country, then select the country of your paying company code and the payment method you require, and then maintain the data necessary for printing the form.
    3. Here you need to make company code specifications for the payment method. To do this, choose Payment Methods In Company Code, then select the paying company code and the payment method. In this menu maintain the following data by choosing Form data or Payment Advice Control:
    The SAPscript form for payment media (F110_PRENUM_CHCK in the standard system).
    The issuer data.
    Sorting the correspondence.
    Sorting the line items.
    The number of note to payee lines on the form and the payment advice note output in accordance with the specified number of lines
    If you specify as many as required note to payee lines on the form then Payment Advice Output According to Number of Lines controls whether in addition a payment advice is always created or not.
    Note: The issuer details are used on the payment medium for city and signature in the standard system:
    Line 1 Name 1 of issuer
    Line 2 Name 2 of issuer
    Line 3 Blank
    Line 4 City.
    Setting up and changing the SAPscript forms (layout sets)
    The following describes the layout of the SAPscript forms in brief. If the forms available in the standard system are sufficient for your requirements, you can skip this part of the documentation.
    You can find further information on forms and the SAPscript editor in the guides on styles and form maintenance and word-processing in the SAPscript editor: Select the menu path Help -> SAP Library.
    1. When setting up SAPscript forms (layout sets), symbols are included in the text; these are then replaced by actual values when the payment medium programs are run. The fields which can be used for this are defined in the Repository and contained in the following structures:
    REGUH Settlement data from the payment program
    REGUP Edited invoice items from the payment program
    REGUD Formatted data for printing the forms
    SPELL Amounts and digits in words.
    FSABE Data on accounting clerk.
    Note that check forms can be issued in foreign currency only if the currency key is also printed on them. If forms are only to be filled out for local currency checks (on which no space is defined for the currency key) then you should remove the symbol for the currency key &REGUD-WAERS& from the check window. The program then prevents you from printing foreign currency checks.
    2. If you want the document long text for an accounting invoice document to be printed on the payment advice form, you must make the following enhancement in element "Long text for invoice document" (specially designed for this purpose):
    /: DEFINE &TXT& := '&REGUP-BUKRS()&&REGUP-BELNR(RF0)&&REGUP-GJAHR&'
    /: INCLUDE &TXT& OBJECT BELEG ID xyz
    The text ID that you must enter for this text (xyz) is defined in the configuration menu and can be read from there. In the standard system, text ID 0003 is predefined for the payment advice information.
    Periodic processing
    Before the payment medium programs can be started, the payment program run must have been successfully completed. Check the status of the payment run, or schedule the payment medium programs by specifying one or more variants.
    Note: If you want to use th 'Payment document update' option, the payment documents must be updated between the time of the payment program run and the time of the payment medium program run.
    Output
    Forms and lists
    Printout files are created per company code and house bank. These can either be printed via the print manager or immediately. Depending on the parameter you select, you can print out one or more of the following:
    Payment medium
    Payment advice notes (if the information cannot be sent via EDI)
    Payment summary
    Error log
    The number of output files is specified in the flow trace; this makes finding and allocating them within the print manager easier.
    Note: If the program was started online, then you reach the print manager from the list by selecting one of the output files displayed.
    Payment Advice Notes
    In addition to being able to print payment advice notes, you can also send these via EDI, fax or email.
    1. To send a business partner a payment advice note via EDI, you need to select the indicator Payment advice note per EDI and maintain the partner agreement on screen "Payment Transactions Accounting" in the master record.
    Using an external converter, the IDoc created by the program can be converted into the EDI format you require (REMADV for example) and then sent.
    2. To send a business partner a payment advice note by fax or email, you must use the process interface 00002040 (Business Transaction Events) to define the selection of the message type (printout, fax or email). Before you can do this, however, you must have carried out the necessary technical (Basis) settings for faxing or sending emails.
    Process interface 00002050 can also be used to change or configure the print parameters and the parameters for optical archiving for payment advice notes.
    Check management
    You can access information about the issued checks via check management, line item display for sub-ledger or bank accounts, or invoice and payment document display. A check register list can also be created for the respective payment run. Errors occurring during check number and document number allocation can also be rectified using check management. You can find check management within Accounts Receivable or Accounts Payable, both parts of Financial Accounting, as well as under the "Environment" menu option in the payment program.
    For more information on check management, esp. about detailed solutions to possible error situations, refer to the FI Accounts Payable manual under Help->R/3 Library.
    Error messages and error log
    Termination of processing
    You can find out the reason why processing was terminated (for example, production run not yet carried out, form does not exist or is not active) by looking at the error message or the related long text.
    Internal SAPscript error
    Check the layout of the forms. It must fulfil the above-mentioned conditions. You cannot, for example, create a bank transfer with the check print program, since bank transfers and checks have a completely different layout structure.
    Error log
    If errors which do not terminate the payment medium program occur when creating the output, the system lists them in the error log. If such a log is created, you must look it over because only you can decide whether the payment medium or payment advices are useless due to the errors the system finds, and decide whether they must be recreated after the errors have been rectified.
    During background processing, the system outputs the error log twice, in the flow trace for the job and in a printout file. The flow trace contains information on how to rectify the errors (from the error message long texts).
    You can display the long text online by choosing the error log from the list of generated output files and then the error message in question.
    Close the thread once your question is answered.
    Rgds,
    SaiRam

  • Develop a form and print program using VBAP, VBAK, MRKT.

    I have 2 tables VBAK [fields: VBELN, ERDAT, ERNAM, AUDAT, VBTYP, VKORG] and VBAP [Fields: POSNR, MATNR, CHARG, WAERK] and In output(form) i need the following fields,
    Output table:
    -VBELN
    -ERDAT
    -VKORG
    -POSNR
    -MATNR
    -MAKTX <- this field is from table MAKT. (I need the Material descriptions too for all the materials.)
    Form Layout should have Header, Logo (SAP ENJOY), Main, Footer.
    Problem is that i need footer only after the End of Complete data in Main Window, thats is footer should be placed only in last window. How should i do that ?
    Logic which i thot to make the print program is : First declare an internal table itab1 with VBAP, VBAP using the above fields from two tables and fetch the product based on matnr.
    declare one internal table itab2 and select the records from the table makt by checking the condition itab1 is not initial.
    sample code.
    IF ITAB1 IS NOT INITIAL.
    SELECT FIELD LIST FROM MAKT INTO TABLE ITAB2 WHERE MATNR EQ ITAB1-MATNR.
    ENDIF.
    hope this shuld work. ?????

    Hi
    see the sample script program and do accordingly
    *& Report  ZTEST12121
    *& SAPScripts Example 1
    REPORT  ztest12121.
    *DATABASE TABLES
    TABLES: ekko,ekpo,lfa1.
    *INTERNAL TABLES AND STRUCTURES
    DATA i_ekko LIKE ekko.
    DATA i_ekpo LIKE ekpo OCCURS 0 WITH HEADER LINE.
    DATA i_lfa1 LIKE lfa1.
    *PARAMETERS
    PARAMETERS: p_ebeln LIKE ekko-ebeln.
    *VARIABLES
    DATA MAT TYPE STRING VALUE 'MAT NO'.
    DATA iTe TYPE STRING VALUE 'ITEM NO'.
    DATA QTY TYPE STRING VALUE 'QTY'.
    DATA UOM TYPE STRING VALUE 'UOM'.
    DATA NET TYPE STRING VALUE 'NET PRICE'.
    Data var type integer value 0.
    *DATABASE SELECTS
    *Header data
    SELECT SINGLE * FROM ekko INTO i_ekko WHERE ekko~ebeln = p_ebeln.
    IF sy-subrc = 0.
    *Item Data
      SELECT * FROM ekpo INTO  TABLE i_ekpo WHERE ekpo~ebeln = p_ebeln.
      IF sy-subrc NE 0.
        WRITE 'PURCHASE DOCUMENT ITEM DATA ERROR'.
      ELSE.
    *Vendor Details
        SELECT SINGLE * FROM lfa1 INTO i_lfa1 WHERE lfa1~lifnr = i_ekko-lifnr.
        IF sy-subrc NE 0.
          WRITE 'VENDOR DOCUMENT ITEM DATA ERROR'.
        ENDIF.
      ENDIF.
    ELSE.
      WRITE 'THIS PURCHASE DOCUMENT NUMBER DOESNOT EXISTS'.
    ENDIF.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
        form                              = 'ZSCRIPT_1'
        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.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'OFFICEAD'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'OFFICEAD'
    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 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'PODET'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'PODET'
    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 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'TOP'
       FUNCTION                       = 'SET'
       TYPE                           = 'TOP'
       WINDOW                         = 'MAIN'
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT I_EKPO.
    var = i_ekpo-netpr * i_ekpo-menge.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'BODY'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'
    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.
    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.
    Structure of a print program
    OPEN_FORM function
    CLOSE_FORM function
    WRITE_FORM
    START_FORM function
    END_FORM function
    CONTROL_FORM function
    The print program is used to print forms. The program retieves the necesary data from datbase tables, defines the order of in which text elements are printed, chooses a form for printing and selects an output device and print options.
    Function modules in a printprogram:
    • When you print a form you must used the staments OPEN_FORM and CLOSE_FORM. To combine forms into a single spool request use START_FORM and END_FORM.
    • To print textelements in a form use WRITE_FORM. The order in which the textelements are printed, is determined by the order of the WRITE_FORM statements. Note: for printing lines in the body, you can also use the WRITE_FORM_LINES function module.
    • To transfer control command to a form use CONTROL_FORM.
    Structure of a print program
    Read data
    Tables: xxx.
    SELECT *
    FROM xxx.
    Open form printing - Must be called before working with any of the other form function modules.
    Must be ended with function module CLOSE FORM
    call function 'OPEN_FORM'.....
    To begin several indentical forms containing different data within a single spool request, begin each form using START_FORM, and end it using END_FORM
    call funtion 'START_FORM'.....
    Write text elements to a window of the form
    call function 'WRITE_FORM'.....
    Ends spool request started with START_FORM
    call funtion 'END_FORM'.....
    Closes form printing
    call function 'CLOSE_FORM'...
    OPEN_FORM function
    Syntax:
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    APPLICATION = 'TX'
    ARCHIVE_INDEX =
    ARCHIVE_PARAMS =
    DEVICE = 'PRINTER'
    DIALOG = 'X'
    FORM = ' '
    LANGUAGE = SY-LANGU
    OPTIONS =
    MAIL_SENDER =
    MAIL_RECIPIENT =
    MAIL_APPL_OBJECT =
    RAW_DATA_INTERFACE = '*'
    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
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Some important parameters:
    FORM Name of the form
    DEVICE • PRINTER : Print output using spool
    • TELEFAX: Fax output
    • SCREEN: Output to screen
    OPTIONS Used to control attrubutes for printing or faxing (Number of copies, immediate output....
    The input for the parameter is structure ITCPO.
    CLOSE_FORM function
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT =
    RDI_RESULT =
    TABLES
    OTFDATA =
    EXCEPTIONS
    UNOPENED = 1
    BAD_PAGEFORMAT_FOR_PRINT = 2
    SEND_ERROR = 3
    SPOOL_ERROR = 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.
    Paramerters:
    RESULT Returns status information and print/fax parameters after the form has been printed. RESULT is of structure ITCPP.
    WRITE_FORM function
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = ' '
    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
    OTHERS = 9
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Some important parameters:
    ELEMENT Specifies which textelement is printed
    WINDOW Specifies which window is printed
    TYPE Specifies the output area of the main window. This can be:
    • TOP - Used for headers
    • BODY
    • BOTTOM - Used for footers
    FUNCTION Specifies whether text is to be appended, replaced or added
    Example of how to use the WRITE_FORM function module together with a script.
    Form layout of the MAIN window
    /E INTRODUCTION
    Dear Customer
    /E ITEM_HEADER
    IH Carrier, Departure
    /E ITEM_LINE
    IL &SBOOK-CARRID&, &SPFLI-DEPTIME&
    /E CLOSING_REMARK
    The print program
    Writing INTRODUCTION
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'INTRODUCTION'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8
    Writing ITEM_HEADER
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'ITEM_HEADER'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8
    Set ITEM_HEADER into TOP area of main window for subsequent pages
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'ITEM_HEADER'
    FUNCTION = 'SET'
    TYPE = 'TOP'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8
    Write ITEM_LINE
    LOOP AT .....
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'ITEM_LINE'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8.
    ENDLOOP.
    Delete ITEM_HEADER from TOP area of main window
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'ITEM_HEADER'
    FUNCTION = 'DELETE'
    TYPE = 'TOP'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8
    Print CLOSING_REMARK
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'CLOSING_REMARK'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8
    START_FORM function
    CALL FUNCTION 'START_FORM'
    EXPORTING
    ARCHIVE_INDEX =
    FORM = ' '
    LANGUAGE = ' '
    STARTPAGE = ' '
    PROGRAM = ' '
    MAIL_APPL_OBJECT =
    IMPORTING
    LANGUAGE =
    EXCEPTIONS
    FORM = 1
    FORMAT = 2
    UNENDED = 3
    UNOPENED = 4
    UNUSED = 5
    SPOOL_ERROR = 6
    OTHERS = 7
    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_FORM function
    CALL FUNCTION 'END_FORM'
    IMPORTING
    RESULT =
    EXCEPTIONS
    UNOPENED = 1
    BAD_PAGEFORMAT_FOR_PRINT = 2
    SPOOL_ERROR = 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.
    CONTROL_FORM function
    The CONTROL_FORM function module alows you to create SapScript control statements from within an APAB program.
    Syntax:
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    command =
    EXCEPTIONS
    UNOPENED = 1
    UNSTARTED = 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.
    Example:
    Protecting the text element ITEM_LINE
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    COMMAND = 'PROTECT'.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    TEXELEMENT = 'ITEM_LINE'.
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    COMMAND = 'ENDPROTECT'.
    Regards
    Anji

  • How to write print program for smartforms

    Hi all
    I need to develop new smartform and its print program.
    But Im not experience in writing print program for smartform.
    Ive gone through the simple print program sample that use only one table as input and one table for output.
    But my smartforms require few tables for input and output.
    How should I define the Data?
    Can anyone guide me on how to write it.
    Thanks & Regards
    az

    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP 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
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    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.
    Reward points...

Maybe you are looking for

  • Tiger to Snow Leopard upgrade fails  with buffer overflow

    I'm not sure where to proceed with the following situation: I have a 17" MB pro with 1GB memory and 22GB free hard drive space. I booted into the installer from the CD and stepped through the prompts without changing any options to the point where th

  • How do I find the iCal backed up data in Time Machine?

    I've recently erased a calendar group that wasn't supposed to be erased. I tried using Time Machine to restore the data lost but can't seem to find it's location. Does anyone know where I can find iCal data in the hard drive so I can use Time Machine

  • Design view of jspx not rendering : Error exercising tag : afh:head

    I'm using JDeveloper 10.1.3.4 and I have an intermittent problem where by the jspx does not render correctly in design view - it just shows a whole load of nested boxes. By following a suggestion from another website I turned on "Design time messages

  • Lightroom 2.4 Is Too Slow To Use As A Professional Product

    Hello - I would like to know how to get Lightroom to respond in less than 4-8 seconds for almost any task. From returning to Grid mode (4.5 seconds) to adjusting a routine crop and angle (5-7 seconds per move, 60-90 seconds total) to simply shift-sel

  • ITunes Match network connection time out error

    I have just signed up to itunes match but at the end of step 1 I get a network connection error at the 'Waiting for apple to deliver your results' stage every time. I have tried everything suggested on forums regaring unticking proxy server settings