Exporting Sapscripts...

I have exported a number of Sapscript Russian forms a non-unicode SAP system using program RSTXSCRP. I would expect that when I import this file back into our unicode SAP system that I would be able to see the Russian text, but I can't the text is all shown as Hashes (#). The documentation for this export/import program mentions that you should use the Binary option when moving from a non-unicode system to a unicode system, which I have done.
I seem to be going round in circles, in that if I change the Hashed text and replace with Russian, manually within the Sapscript, we'll find that the script produces a spool file perfectly okay, with the Russian being displayed, but this spool will not either print or convert to PDF. The print comes out with Hash charcters where the Russian text should be and the PDF looks fine except for any Russian text being replaced with some kind of box type character. Standard Sapscript forms print and convert fine in Russian, so I can only assume it either the import process that's incorrect, or it's the non-uicode to unicode process that causing grief.
Can anyone be of help?.
Gary King

I have looked that the Sapscript on the Source system and it looks like the Russian text has just been entered as you would normally enter text. I have also compared this with a SAP standard Sapscript and the text looks like it has been entered in exactly the same way.
However, we are logged in the source system in English, and then exporting the Russian Form using program RSTXSCRP. The documentation for this program mentions that the language vector, which identifies which languages are supported, does play a big role in export/import process. I know that our destination system is setup for Russian and we assumed that as we had Russian Sapscripts in the source system that system was set to use the Russian language. However, a colleague of miine mentioned that he was unable to login as Russian on the source system, something that is controlled by the language vector, so maybe this is the key to the problem. I need to chase this up and confirm.
Your solution is sort of already being used, for example, most of the text in Russian uses the paragraph of H2, which has the COURCYR (Courier Cyrilic) font.  I assume that's more or less the same as you mentioned. However, I did create a new character format <RF> and tried wrapping this around the Russian text. The result was the same though.
Regards
Gary
Edited by: Gary  King on Jul 9, 2009 12:10 PM

Similar Messages

  • Apart from using RSTXSCRP is there any other way of exporting a Sapscript?.

    We've been using RSTXSCRP to export Sapscripts in Russian from a noon-unicode SAP system. However, the text file seems to have hashes (#) where the Russian text should be. I've tried this program when logged in both English and Russian, but the result is the same, and hence the question.
    Regards
    Gary

    This a Sapscript that I'm talking about, not a Smartform. Smartforms allow me to output/input in XML format, but I don't think such an option exists for Sapascripts. Or have I misunderstood what you were saying?.
    Also, while I'm on the subject, the RSTXSCRP program allows the user to EXPORT Sapscripts in both text and Binary mode, having just read the documentation it might be that the binary mode is probably what we should have used for the Russian text export.
    I believe that my colleague used the text mode previously, so I shall try the binary mode a little later and will update with the results.
    Regards
    Gary

  • How to export dynpros to files

    Hi,
    I have to export several sap objets (reports, smartforms, dynpros, alvs, etc.) to files (binary or text) in order to store it in a external database.
    For example, I use RSTXSCRP report to export sapscript and smartforms, but now I need to export in some way dynpros in order to be stored in my external database.
    It would be perfect if exists something that permits store in an unique file a report (or module-pool) and it's associated dynpros.
    How can I do this?

    Hi javier,
    1. somebody told me that it's possible to export all objets in the request to a file.
      It happens THIS way only on the app server.
    2. Whenerver we RELEASE a request,
    3. co files
       data files are created on the server.
    4. These files have the name same as the REQUEST NUMBER
    5. We can download these files from app server
      to front-end server.
    6. The data files contain all the data
      of the objects
      (ie object name, its contentts (source code , table fields, comments etc, --- everything ))
    7. These files contain data in ZIP/compressed/
       encoded format.
       so such files are of no use to us.
    8. only SAP can understand the format and contents
    regards,
    amit m.

  • Exporting Module pool with screen

    Hi,
    I want to export module pool that I created to a file and import it back later. I could find a SAP Program RSTXSCRP to export SAPscript but no success in exporting a function module. Please help.
    Regards,
    Nikhil

    Hi Nikhil!
    If you just want to do this once, you can use transaction SE80 and menu point Utilities - More utilities - download (for each include / component).
    Otherwise a special program is easier to use, take e.g. this one:
    http://www.members.tripod.com/abap4/Upload_and_Download_ABAP_Source_Code.html
    Regards,
    Christian
    P.S.: or these one:
    ... or this one:
    http://sap.ittoolbox.com/code/d.asp?d=1623&a=s
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/finding your code in bsp applications.article
    http://www.geocities.com/rmtiwari/Resources/Utilities/WebViewer.html
    Message was edited by: Christian Wohlfahrt

  • Runtime error in scripts :  CX_SY_DYN_CALL_PARAM_MISSING

    HI guys i am trying to print some values in sapscripts . 
    the thing is i am able to see the print preview and the values are showing up  but when i click on the back button the system throws the following dump :
    Runtime Errors         PERFORM_PARAMETER_MISSING
    Except.                CX_SY_DYN_CALL_PARAM_MISSING
    Short text
        Missing parameter with PERFORM.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "RSNAST00" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_MISSING', was
         not caught in
        procedure "PROGRAMM_AUFRUFEN" "(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:
        A PERFORM was used to call the routine "SHOW_VAL" of the program "Z_SHOWDATA".
        The current call contains 2 actual parameter(s),
        but the routine "SHOW_VAL" expects 4 parameters.
    in the script this is the perform i ve written :
    /:          PERFORM SHOW_VAL IN PROGRAM Z_SHOWDATA
    /:          USING &NAST-OBJKY&
    /:          CHANGING &VARIABLE4&
    /:          CHANGING &VARIABLE5&
    /:          CHANGING &VARIABLE6&
    /:          ENDPERFORM
    and my show_val goes as follows:
    PROGRAM  Z_SHOWDATA.
    data: var1 like NAST-OBJKY,
    var3 type P decimals 2, "string , "decimals 2, " decimals 2,
    var4 type p decimals 2, "string , "decimals 2, " decimals 2,
    var5 type P decimals 2, "string, " decimals 2, "decimals 2,
    var6 type p decimals 2.  "string .
    data: itab type ekpo occurs 0 with header line .
    form show_val tables intab structure itcsy
    outab structure itcsy .
    import sapscript parameters
    read table intab with key 'NAST-OBJKY'.
    check sy-subrc eq 0.
    var1 = intab-value.
    get Data
    select single * into itab
    from ekpo where EBELN eq var1.
    select single *
           from ekpo
           into  itab
           where ebeln eq var1.
    var3 = itab-netwr * 16 / 100.
    var4 = var3 * 2 / 100.
    var5 = var3 / 100.
    var6 = itab-netwr + var4 + var5.
    export sapscript parameters
    READ TABLE outab WITH KEY 'VARIABLE4'.
    CHECK sy-subrc EQ 0.
    MOVE var4 TO outab-value.
    condense outab-value.
    append outab .
    READ TABLE outab WITH KEY 'VARIABLE5'.
    CHECK sy-subrc EQ 0.
    MOVE var5 TO outab-value.
    condense outab-value.
    append outab .
    READ TABLE outab WITH KEY 'VARIABLE6'.
    CHECK sy-subrc EQ 0.
    MOVE var6 TO outab-value.
    condense outab-value.
    append outab .
    endform.
    I am not able to catch the error in the code as all the values that i ve passed in the perform are successfully entered in the tables that i ve passed in my form . and the values are coming on the layout too
    and the dump comes after i click on the back button after seeing the preview . Please help.
    Vikram.
    Please help

    try like this and let me know if dump still exists, later we can do further analysis.
    PROGRAM Z_SHOWDATA.
    <b>*data: var1 like NAST-OBJKY,
    *var3 type P decimals 2, "string , "decimals 2, " decimals 2,
    *var4 type p decimals 2, "string , "decimals 2, " decimals 2,
    *var5 type P decimals 2, "string, " decimals 2, "decimals 2,
    *var6 type p decimals 2. "string .
    data: var1(30),
    var3 (30),
    var4(30),
    var5(30),
    var6(30).</b>
    data: itab type ekpo occurs 0 with header line .
    form show_val tables intab structure itcsy
    outab structure itcsy .
    import sapscript parameters
    read table intab with key 'NAST-OBJKY'.
    check sy-subrc eq 0.
    var1 = intab-value.
    get Data
    select single * into itab
    from ekpo where EBELN eq var1.
    select single *
    from ekpo
    into itab
    where ebeln eq var1.
    var3 = itab-netwr * 16 / 100.
    var4 = var3 * 2 / 100.
    var5 = var3 / 100.
    var6 = itab-netwr + var4 + var5.
    export sapscript parameters
    READ TABLE outab WITH KEY 'VARIABLE4'.
    CHECK sy-subrc EQ 0.
    MOVE var4 TO outab-value.
    condense outab-value.
    append outab .
    READ TABLE outab WITH KEY 'VARIABLE5'.
    CHECK sy-subrc EQ 0.
    MOVE var5 TO outab-value.
    condense outab-value.
    append outab .
    READ TABLE outab WITH KEY 'VARIABLE6'.
    CHECK sy-subrc EQ 0.
    MOVE var6 TO outab-value.
    condense outab-value.
    append outab .
    endform.
    Regards,
    SaiRam

  • Smartform program

    RSTXSCRP is a program for importing/exporting SAPscripts. Can you tell me if there is any such program exists for importing/exporting smartforms?
    Thank you in advance. Shall definitely award points for helpful answers.

    HI,
    There is no such a program for Smartforms....
    but Smartform session, Utilities --> Download, then it will download to the given path as a XML file, then
    Utilities --> Upload, give the same path to upload.
    See the below link for a Program which downloads the Smartform as well as Smartstyles.
    http://sap4.com/wiki/index.php?title=ZSMART_FORM_UPLOAD_DOWNLOAD
    mark all the helpful answers
    Regards
    Sudheer

  • Hi i am uploding the following file data named as tixt.ITF through rstxr3tr

    hi i am uploding the following file  named as tixt.ITF through rstxr3tr
    but it is giving following error
    ERROR: Invalid start marker: /ELAB instead of TCOMM
    the data in file is as below for script
    /ELABEL
    / <STX><ESC>C0<ETX>
    / <STX><ESC>k<ETX>
    / <STX><60>SI<62>L500<ETX>
    / <STX><60>SI<62>S40<ETX>
    / <STX><60>SI<62>d0<ETX>
    / <STX><60>SI<62>h0,0;<ETX>
    / <STX><60>SI<62>l8<ETX>
    / <STX><60>SI<62>I3<ETX>
    / <STX><60>SI<62>F20<ETX>
    / <STX><60>SI<62>D0<ETX>
    / <STX><60>SI<62>t0<ETX>
    / <STX><60>SI<62>W801<ETX>
    / <STX><60>SI<62>g1,567<ETX>
    / <STX><ESC>P<ETX>
    / <STX>E;F;<ETX>
    / <STX>L1;<ETX>
    / <STX>D0;<ETX>
    / <STX>H0;o484,61;f3;c26;h16;w17;d3,SHIP TO:;<ETX>
    / <STX>D1;<ETX>
    / <STX>H1;o434,61;f3;c26;h13;w15;d0,42;<ETX>
    / <STX>H2;o387,64;f3;c26;h13;w15;d0,42;<ETX>
    / <STX>H3;o340,61;f3;c26;h13;w15;d0,42;<ETX>
    / <STX>H4;o287,61;f3;c26;h13;w15;d0,42;<ETX>
    / <STX>H5;o241,61;f3;c26;h13;w15;d0,42;<ETX>
    / <STX>H6;o193,61;f3;c26;h13;w15;d0,42;<ETX>
    / <STX>H7;o146,61;f3;c26;h13;w15;d0,42;<ETX>
    / <STX>H8;o98,61;f3;c26;h13;w15;d0,42;<ETX>
    / <STX>R<ETX>
    / <STX><ESC>E*<CAN><ETX>
    / <STX><ESC>F1<DEL>&Address-1&<ETX>
    / <STX><ESC>F2<DEL>&Address-2&<ETX>
    / <STX><ESC>F3<DEL>&Address-3&<ETX>
    / <STX><ESC>F4<DEL>&Address-4&<ETX>
    / <STX><ESC>F5<DEL>&Address-5&<ETX>
    / <STX><ESC>F6<DEL>&Address-6&<ETX>
    / <STX><ESC>F7<DEL>&Address-7&<ETX>
    / <STX><ESC>F8<DEL>&Address-8&<ETX>
    / <STX><60>RS<62>&ZERP-QTY&<60>US<62>1<ETB><60>FF<62><ETX>
    regards
    Arora

    Hi Arora.
    You can only import files that you exported with rstxr3tr before. So add your text or form to a transport request and export it. Then import the resulting file with rstxr3tr in the system of your choice.
    File should start like
    TCOMMR22K900031
    HFORMZ_TEST
    for an exported SAPscript-Form named Z_TEST.
    Regards,
    Timo

  • Need Material Description in SAPscript Export Packing list

    Hi Friends,
                    I copied standard SAPscript form SD_EXPORT_FUEP for Export packing list. I need a Material description in main window but not able to get. Please tell me how to get the material description.
    Thanks,
    Ziad

    Hi Surya,
                  Here is my subroutine,please check it. Still I am not getting description.
    PROGRAM  ZSD_EXPORT.
    tables: VBRP, VBRK, V55ENAFT.
    ********form routine to fetch the material description
    form GET_DESC tables in_par  structure itcsy
                         out_par structure itcsy.
    DATA: BEGIN OF S_MAT.
         VBELN TYPE VBRP-VBELN,
         POSNR type VBRP-POSNR,
         ARKTX  type VBRP-ARKTX,
           include structure vbrp.
    data:      END OF S_MAT.
    data: it_line like V55ENAFT-POSNR,
          inv_no  like V55ENAFT-VBELN.
    data: mat_desc  type VBRP-ARKTX.
    read table in_par with key 'ITLINE'.
    check sy-subrc = 0.
    it_line = in_par-value.
    read table in_par with key 'INV'.
    check sy-subrc = 0.
    INV_NO = in_par-value.
    *SELECT SINGLE VBELN POSNR ARKTX FROM VBRP INTO S_MAT where vbeln = inv_no and posnr = it_line.
    select single * from vbrk
    where vbeln = inv_no.
    SELECT SINGLE * FROM VBRP
    WHERE VBELN = vbrk-vbeln AND POSNR = IT_LINE.
    move vbrp-arktx to mat_desc.
    read table out_par with key 'DESC'.
    check sy-subrc = 0.
    out_par-value = mat_desc.
    modify out_par index sy-tabix.
    endform.               "get_desc
    Thanks,
    Ziad

  • SAPscript export to an external system.

    Dear all,
    I'm wondering if there are any ways to export a SAPscript which I would made in my company system to my client system. Knowing that those two systems have absolutely no physical links.
    Best regards.
    Nozome.

    You can use report RSTXSCRP to download from your system and same report to upload the file on customer system.
    Or put the form in a transport request with object
    R3TR FORM <SCRIPTNAME> and release the request.
    Ask the basis folks to get the data/ co files of this trnasport . Give these files to basis folks of customer system and ask them to import it into their system.
    Cheers

  • SE71, SAPScript export to other SAP system

    Hi All,
    Does anyone know how to extract and export form (SE71) from system A to system B?
    Scenario:
    SE71, form: ZF100_Check
    My friend needs to design and develop same cheque printing functionality, and therfore, I wonder how can I extract and export my designed / developed form (SE71) out and save it locally, and then send to my friend, though email, etc and may be upload to his SAP system.
    Does anyone have any idea on it?
    Thanks and regards,
    sbmel

    Hi,
    please search before asking your question. Your question has been answered multiple time her on SDN. Look for "SAP script download upload".
    Cheers

  • SAPScript: export print form and import with different name?

    Hi!
    I need to export print form from one system and import it with different name to other system.
    For this I run RSTXSCRP but the problem is that when I spefify different name for a form while importing, it gives an error...
    I tried to edit exported file before importing changing form name inside a file, but this not helped...
    Any ideas?
    Will reward,
    Mindaugas

    thanks for input, but I probably do not understand what you mean...
    here is what I need:
    for example: if I have ZNEWFORM in system1, then I need to export it from system1 and to import to system2 with form name ZNEWFORM_ZZ... is it possible?
    thanks again,
    M.

  • Send sapscript to customer

    Hi,
    could I use the function USE_SEND_OBJECT to send a sapscript (an invoice) to an external mail (customer email) ?
    Thanks!!!!

    Hi Juan
    Go through the follwoing Code
    DATA: ITCPO LIKE ITCPO,
    TAB_LINES LIKE SY-TABIX.
    * Variables for EMAIL functionality
    DATA: MAILDATA LIKE SODOCCHGI1.
    DATA: MAILPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
    DATA: MAILHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
    DATA: MAILBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: MAILTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: MAILREC LIKE SOMLREC90 OCCURS 0 WITH HEADER LINE.
    DATA: SOLISTI1 LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    PERFORM SEND_FORM_VIA_EMAIL.
    * FORM SEND_FORM_VIA_EMAIL *
    FORM SEND_FORM_VIA_EMAIL.
    CLEAR: MAILDATA, MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
    REFRESH: MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
    * Creation of the document to be sent File Name
    MAILDATA-OBJ_NAME = 'TEST'.
    * Mail Subject
    MAILDATA-OBJ_DESCR = 'Subject'.
    * Mail Contents
    MAILTXT-LINE = 'Here is your file'.
    APPEND MAILTXT.
    * Prepare Packing List
    PERFORM PREPARE_PACKING_LIST.
    * Set recipient - email address here!!!
    MAILREC-RECEIVER = '[email protected]'.
    MAILREC-REC_TYPE = 'U'.
    APPEND MAILREC.
    * Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = MAILDATA
    PUT_IN_OUTBOX = ' '
    TABLES
    PACKING_LIST = MAILPACK
    OBJECT_HEADER = MAILHEAD
    CONTENTS_BIN = MAILBIN
    CONTENTS_TXT = MAILTXT
    RECEIVERS = MAILREC
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    OPERATION_NO_AUTHORIZATION = 4
    OTHERS = 99.
    ENDFORM.
    * Form PREPARE_PACKING_LIST
    FORM PREPARE_PACKING_LIST.
    CLEAR: MAILPACK, MAILBIN, MAILHEAD.
    REFRESH: MAILPACK, MAILBIN, MAILHEAD.
    DESCRIBE TABLE MAILTXT LINES TAB_LINES.
    READ TABLE MAILTXT INDEX TAB_LINES.
    MAILDATA-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( MAILTXT ).
    * Creation of the entry for the compressed document
    CLEAR MAILPACK-TRANSF_BIN.
    MAILPACK-HEAD_START = 1.
    MAILPACK-HEAD_NUM = 0.
    MAILPACK-BODY_START = 1.
    MAILPACK-BODY_NUM = TAB_LINES.
    MAILPACK-DOC_TYPE = 'RAW'.
    APPEND MAILPACK.
    * Creation of the document attachment
    * This form gets the OTF code from the SAPscript form.
    * If you already have your OTF code, I believe that you may
    * be able to skip this form. just do the following code, looping thru
    * your SOLISTI1 and updating MAILBIN.
    PERFORM GET_OTF_CODE.
    LOOP AT SOLISTI1.
    MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
    APPEND MAILBIN.
    ENDLOOP.
    DESCRIBE TABLE MAILBIN LINES TAB_LINES.
    MAILHEAD = 'TEST.OTF'.
    APPEND MAILHEAD.
    ** Creation of the entry for the compressed attachment
    MAILPACK-TRANSF_BIN = 'X'.
    MAILPACK-HEAD_START = 1.
    MAILPACK-HEAD_NUM = 1.
    MAILPACK-BODY_START = 1.
    MAILPACK-BODY_NUM = TAB_LINES.
    MAILPACK-DOC_TYPE = 'OTF'.
    MAILPACK-OBJ_NAME = 'TEST'.
    MAILPACK-OBJ_DESCR = 'Subject'.
    MAILPACK-DOC_SIZE = TAB_LINES * 255.
    APPEND MAILPACK.
    ENDFORM.
    * Form GET_OTF_CODE
    FORM GET_OTF_CODE.
    DATA: BEGIN OF OTF OCCURS 0.
    INCLUDE STRUCTURE ITCOO .
    DATA: END OF OTF.
    DATA: ITCPO LIKE ITCPO.
    DATA: ITCPP LIKE ITCPP.
    CLEAR ITCPO.
    ITCPO-TDGETOTF = 'X'.
    * Start writing OTF code
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    FORM = 'ZTEST_FORM'
    LANGUAGE = SY-LANGU
    OPTIONS = ITCPO
    DIALOG = ' '
    EXCEPTIONS
    OTHERS = 1.
    CALL FUNCTION 'START_FORM'
    EXCEPTIONS
    ERROR_MESSAGE = 01
    OTHERS = 02.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    WINDOW = 'MAIN'
    EXCEPTIONS
    ERROR_MESSAGE = 01
    OTHERS = 02.
    * Close up Form and get OTF code
    CALL FUNCTION 'END_FORM'
    EXCEPTIONS
    ERROR_MESSAGE = 01
    OTHERS = 02.
    MOVE-CORRESPONDING ITCPO TO ITCPP.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT = ITCPP
    TABLES
    OTFDATA = OTF
    EXCEPTIONS
    OTHERS = 1.
    * Move OTF code to structure SOLI form email
    CLEAR SOLISTI1. REFRESH SOLISTI1.
    LOOP AT OTF.
    SOLISTI1-LINE = OTF.
    APPEND SOLISTI1.
    ENDLOOP.
    ENDFORM.
    Check this links
    SAPscript: Sending mail from Sapscript in 4.7
    Script- converting in PDF and sending by mail.
    Reward all helpfull answers
    regards
    Pavan

  • Creating a batch job for the sapscript

    Hi folks,
    I have a question of how schedule a batch job in the background for the sapscript? I have the print program and I am using  the following FM to read the output device which I pick up printer device from the pop up dialog box. How can i do that?
    Here is the FM that I using in the print program.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
      ARCHIVE_ID                   = C_CHAR_UNKNOWN
      ARCHIVE_INFO                 = C_CHAR_UNKNOWN
      ARCHIVE_MODE                 = C_CHAR_UNKNOWN
      ARCHIVE_TEXT                 = C_CHAR_UNKNOWN
      AR_OBJECT                    = C_CHAR_UNKNOWN
      ARCHIVE_REPORT               = C_CHAR_UNKNOWN
      AUTHORITY                    = C_CHAR_UNKNOWN
         COPIES                       = 1
         COVER_PAGE                   = SPACE
         DATA_SET                     = 'LIST8S'
      DEPARTMENT                   = C_CHAR_UNKNOWN
      DESTINATION                  = C_CHAR_UNKNOWN
      EXPIRATION                   = C_NUM1_UNKNOWN
      IMMEDIATELY                  = C_CHAR_UNKNOWN
      IN_ARCHIVE_PARAMETERS        = ' '
      IN_PARAMETERS                = ' '
      LAYOUT                       = C_CHAR_UNKNOWN
      LINE_COUNT                   = C_INT_UNKNOWN
      LINE_SIZE                    = C_INT_UNKNOWN
      LIST_NAME                    = C_CHAR_UNKNOWN
      LIST_TEXT                    = C_CHAR_UNKNOWN
      MODE                         = 'CURRENT'
         NEW_LIST_ID                  = 'X'
      NO_DIALOG                    = C_FALSE
      RECEIVER                     = C_CHAR_UNKNOWN
      RELEASE                      = C_CHAR_UNKNOWN
    REPORT                       = 'ZSAPFORM'
      SAP_COVER_PAGE               = C_CHAR_UNKNOWN
      HOST_COVER_PAGE              = C_CHAR_UNKNOWN
      PRIORITY                     = C_NUM1_UNKNOWN
      SAP_OBJECT                   = C_CHAR_UNKNOWN
      TYPE                         = C_CHAR_UNKNOWN
      USER                         = SY-UNAME
       IMPORTING
      OUT_ARCHIVE_PARAMETERS       =
          OUT_PARAMETERS               = i_pri_params
         VALID                        = w_valid
    EXCEPTIONS
      ARCHIVE_INFO_NOT_FOUND       = 1
      INVALID_PRINT_PARAMS         = 2
      INVALID_ARCHIVE_PARAMS       = 3
      OTHERS                       = 4
      IF SY-SUBRC = 0 and w_valid ne space.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
       write: / 'Pri params ', i_pri_params.
    Thanks,
    SK

    Hi folks,
    I have a question of how schedule a batch job in the background for the sapscript? I have the print program and I am using  the following FM to read the output device which I pick up printer device from the pop up dialog box. How can i do that?
    Here is the FM that I using in the print program.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
      ARCHIVE_ID                   = C_CHAR_UNKNOWN
      ARCHIVE_INFO                 = C_CHAR_UNKNOWN
      ARCHIVE_MODE                 = C_CHAR_UNKNOWN
      ARCHIVE_TEXT                 = C_CHAR_UNKNOWN
      AR_OBJECT                    = C_CHAR_UNKNOWN
      ARCHIVE_REPORT               = C_CHAR_UNKNOWN
      AUTHORITY                    = C_CHAR_UNKNOWN
         COPIES                       = 1
         COVER_PAGE                   = SPACE
         DATA_SET                     = 'LIST8S'
      DEPARTMENT                   = C_CHAR_UNKNOWN
      DESTINATION                  = C_CHAR_UNKNOWN
      EXPIRATION                   = C_NUM1_UNKNOWN
      IMMEDIATELY                  = C_CHAR_UNKNOWN
      IN_ARCHIVE_PARAMETERS        = ' '
      IN_PARAMETERS                = ' '
      LAYOUT                       = C_CHAR_UNKNOWN
      LINE_COUNT                   = C_INT_UNKNOWN
      LINE_SIZE                    = C_INT_UNKNOWN
      LIST_NAME                    = C_CHAR_UNKNOWN
      LIST_TEXT                    = C_CHAR_UNKNOWN
      MODE                         = 'CURRENT'
         NEW_LIST_ID                  = 'X'
      NO_DIALOG                    = C_FALSE
      RECEIVER                     = C_CHAR_UNKNOWN
      RELEASE                      = C_CHAR_UNKNOWN
    REPORT                       = 'ZSAPFORM'
      SAP_COVER_PAGE               = C_CHAR_UNKNOWN
      HOST_COVER_PAGE              = C_CHAR_UNKNOWN
      PRIORITY                     = C_NUM1_UNKNOWN
      SAP_OBJECT                   = C_CHAR_UNKNOWN
      TYPE                         = C_CHAR_UNKNOWN
      USER                         = SY-UNAME
       IMPORTING
      OUT_ARCHIVE_PARAMETERS       =
          OUT_PARAMETERS               = i_pri_params
         VALID                        = w_valid
    EXCEPTIONS
      ARCHIVE_INFO_NOT_FOUND       = 1
      INVALID_PRINT_PARAMS         = 2
      INVALID_ARCHIVE_PARAMS       = 3
      OTHERS                       = 4
      IF SY-SUBRC = 0 and w_valid ne space.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
       write: / 'Pri params ', i_pri_params.
    Thanks,
    SK

  • How to print multiple items in SAPScripts

    Hi gurus,
    I have a list of items to print out in SAPScript but I can implement it. I've searched this forum for over a day and I can't find the correct answer. I post my code here. Hope you can help me. Thanks in advance.
    __P/S:__ I found that someone here solved this by using index. Can you tell me how to implement it?
    DATA: BEGIN OF ITAB OCCURS 0,
           Elements here
          END OF ITAB.
    DATA: BEGIN OF XTAB OCCURS 0,
           Elements here
          END OF XTAB.
    DATA: WA_XTAB LIKE XTAB.
    DATA: ZOPTIONS LIKE ITCPO OCCURS 0 WITH HEADER LINE.
    DATA: ZPAGE TYPE I.
    START-OF-SELECTION.
      PERFORM PREPARE.
      PERFORM FORM_OPEN.
      PERFORM FORM_WRITE.
      PERFORM FORM_CLOSE.
    FORM PREPARE.
    Add data to itab & xtab.
    ENDFORM.
    FORM FORM_OPEN.
      CLEAR : ZOPTIONS.
      ZOPTIONS-TDDEST    = 'LOCLSVC'.
    ST_OPTIONS-TDPRINTER =
      ZOPTIONS-TDPREVIEW = 'X'.
      ZOPTIONS-TDIMMED   = 'X'.
      ZOPTIONS-TDDELETE  = 'X'.
      ZOPTIONS-TDPROGRAM = SY-REPID.
      ZOPTIONS-TDTELELAND = 'VN'.
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
                DEVICE   = 'PRINTER'
                FORM     = 'ZF_CC_CI'
                LANGUAGE = SY-LANGU
                OPTIONS  = ZOPTIONS
           EXCEPTIONS
                CANCELED = 1
                DEVICE   = 2
                FORM     = 3
                OPTIONS  = 4
                UNCLOSED = 5.
      IF SY-SUBRC <> 0.
        MESSAGE E001 WITH 'Output was cancelled'
                          'by the user.'.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " FORM_OPEN
    FORM FORM_WRITE.
      CLEAR ZPAGE.
      LOOP AT ITAB.
        ZPAGE = ZPAGE + 1.
        PERFORM FORM_START.
        PERFORM WRITE_TITLE.
        PERFORM END_FORM.
      ENDLOOP.
    ENDFORM.
    FORM FORM_START.
      CALL FUNCTION 'START_FORM'
           EXPORTING
                FORM     = 'ZF_CC_CI'
                LANGUAGE = SY-LANGU
               PROGRAM  = SY-REPID
           EXCEPTIONS
                FORM     = 1
                FORMAT   = 2
                UNENDED  = 3
                UNOPENED = 4
                UNUSED   = 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.
    FORM WRITE_TITLE.
    DATA: NCOUNT TYPE I,
          NI TYPE I.
        NI = 1.
        DESCRIBE TABLE XTAB LINES NCOUNT.
        DO NCOUNT TIMES.
          CLEAR WA_XTAB.
          READ TABLE XTAB INTO WA_XTAB INDEX NI .
          CALL FUNCTION 'WRITE_FORM'
           EXPORTING
                ELEMENT = 'ITEM'
                TYPE    = 'BODY'
                WINDOW  = 'ITEM'.
          NI = NI + 1.
        ENDDO.
    ENDFORM.                    " WRITE_TITLE
    FORM END_FORM.
      CALL FUNCTION 'END_FORM'
           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.
    ENDFORM.                    " END_FORM
    FORM FORM_CLOSE.
      CALL FUNCTION 'CLOSE_FORM'
           EXCEPTIONS
                UNOPENED                 = 1
                BAD_PAGEFORMAT_FOR_PRINT = 2
                SEND_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.
    ENDFORM.                    " FORM_CLOSE

    Hi Le Khanh Vinh ...
    In Script have You declare Two pages... Let say there is Two pages with names like ..FIRST and Second.
    In Standard Attributes of First Page give Next Page as Second.
    and for Second Page Standard Attributes give Next Page as Second only.. This will resolve for more Line Items thats it..
    Any Info need plz do reply ..
    Regards,
    Sg

  • Error while calling PERFORM in SAPSCRIPT

    Hi all,
    I am encoutering a error while calling a perform in sapscript.
    Does anyone know what is the main cause?
    The shortdump description is:
    Short text                            
        Missing parameter with PERFORM.   
    I do not know what is missing here.
    /: PERFORM GET_SPRAS IN PROGRAM ZPFI_F150_DUNN
    /: USING &MHNK-KUNNR&
    /: CHANGING &GV_SPRAS&
    /: CHANGING &GV_LAND1&
    /: ENDPERFORM
    *&      Form  GET_SPRAS
    FORM GET_SPRAS TABLES intable   STRUCTURE itcsy
                          outtable  STRUCTURE itcsy
                          outtable2 STRUCTURE itcsy.
      DATA: lv_kunnr LIKE kna1-kunnr.
      CLEAR: GV_SPRAS.
      lv_kunnr = intable-value.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = lv_kunnr
        IMPORTING
          output = lv_kunnr.
      SELECT SINGLE LAND1 SPRAS INTO (gv_land1, gv_spras) FROM KNA1
        WHERE KUNNR = lv_kunnr.
      IF sy-subrc = 0.
        READ TABLE outtable INDEX 1.
        outtable-value = gv_spras.
        MODIFY outtable INDEX 1.
        READ TABLE outtable2 INDEX 1.
        outtable2-value = gv_land1.
        MODIFY outtable INDEX 1.
      ENDIF.
      IF gv_land1 EQ 'DE'.
        CLEAR: GV_LAND1,
               GV_SPRAS.
      ENDIF.
    ENDFORM.

    Hi,
    Though there are a lot of importing parameters, you should give only one structure for outtable, and read as index 1 and index 2.
    FORM GET_SPRAS TABLES intable   STRUCTURE itcsy
                                              outtable  STRUCTURE itcsy.
      DATA: lv_kunnr LIKE kna1-kunnr.
      CLEAR: GV_SPRAS.
      lv_kunnr = intable-value.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = lv_kunnr
        IMPORTING
          output = lv_kunnr.
      SELECT SINGLE LAND1 SPRAS INTO (gv_land1, gv_spras) FROM KNA1
        WHERE KUNNR = lv_kunnr.
      IF sy-subrc = 0.
        READ TABLE outtable INDEX 1.
        outtable-value = gv_spras.
        MODIFY outtable INDEX 1.
        READ TABLE outtable INDEX 2.
        outtable-value = gv_land1.
        MODIFY outtable INDEX 2.
      ENDIF.
      IF gv_land1 EQ 'DE'.
        CLEAR: GV_LAND1,
               GV_SPRAS.
      ENDIF.
    ENDFORM.
    Edited by: Srinivas Kalluri on Mar 30, 2009 5:00 AM
    Edited by: Srinivas Kalluri on Mar 30, 2009 5:10 AM

Maybe you are looking for

  • HDCP problems

    Updated Apple TV software today and am having problems with HDCP. Now I'm constantly getting this message "This content requires HDCP for playback. HDCP isn't supported by your HDMI connection." I've followed all the advice here http://support.apple.

  • Function module to Calculate PO Price

    hi, can anybody tell me is there any function module to get PO Price for a corresponding PO

  • Problems submitting a clob

    Hello, I've a form with three fields that I'm trying to submit to a database table. The third field is displayed as a HTML Editor, and submits to a clob field on the table. Everything works fine when I submit some small amounts of test data, but when

  • Back 2 My Mac

    Hi Guys, just wondering if anybody managed to get back to my mac working over a BT Home Hub. many thanks James

  • Distribution Cycle - No valid receiver entries exist.

    Hi, I'm creating a distribution cycle wherein my receiver in the segment is an order. I tried to select a sample with an order type 9A00:Internal orders: Accrual cost accounting. Then I went to the receiving factor tab and it allowed me to enter a po