Sap script-without element

Hi Friends,
                 I have a doubt in SAP SCRIPT..pls Clarify it..
i Got two times one and only first record while execute my Script... i don't know..
i i have done this without text element suppose if i am passing value with text element  getting first record only ont time..
May i Know difference passing value with text element and without text element..
i have post my code also...
data: begin of itab occurs 1,
      mandt like mara-mandt,
      matnr like mara-matnr,
      end of itab.
CLEAR ITAB.
select mandt matnr up to 7 rows from mara
into corresponding fields of table itab.
clear itab.
call function 'OPEN_FORM'
EXPORTING
  APPLICATION                       = 'TX'
  ARCHIVE_INDEX                     =
  ARCHIVE_PARAMS                    =
  DEVICE                            = 'PRINTER'
  DIALOG                            = 'X'
   FORM                              = 'ZS_SAP'
   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.
loop at itab.
call function 'WRITE_FORM'
EXPORTING
  ELEMENT                        = 'NAME '
   FUNCTION                       = 'SET'
   TYPE                           = 'BODY'
   WINDOW                         = 'MAIN'
IMPORTING
  PENDING_LINES                  = ITAB
EXCEPTIONS
   ELEMENT                        = 1
   FUNCTION                       = 2
   TYPE                           = 3
   UNOPENED                       = 4
   UNSTARTED                      = 5
   WINDOW                         = 6
   BAD_PAGEFORMAT_FOR_PRINT       = 7
   SPOOL_ERROR                    = 8
   CODEPAGE                       = 9
   OTHERS                         = 10
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endloop.
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.

Your question can't be read. Please reformat your post, use PREVIEW before posting again. 2500 characters maxi.
Thx

Similar Messages

  • Why do we use include in sap script text element

    Hi SDNers,
    Why do we use include statement or what does that stands for in an text element of a sap script.
    Details with examples and explanation please
    Thanks & Regards,
    Ranjith N

    Hi Ranjith,
    Please go through this.
    &VBDPL-ARKTX&
    /: INCLUDE &VBDPL-TDNAME& OBJECT VBBP ID 0001
    If your include contains
    = arflebarflegloop
    and vbdpl-arktx contains 'myarticletext'.
    Then the output document will contain a line:
    myarticletext arflebarflegloop
    If the include contains
    arfelbarflegloop
    then the output document will contain the lines:
    myarticletext
    arflebarflegloop
    (Subject to whatever the prevailing paragraph format is - * means use current format).
    Think about what would happen if instead of having an include, you hardcoded the text of the include in your sapscript.
    I found this at http://www.sapfans.com/sapfans/forum/devel/messages/31158.html
    Regards,
    Sharat.

  • Need logic in sap script text elements.

    Hi experts
    I need a logic for the below requirement in text elements.
    I am giving IF condition for some tax codes against to C - Form., But my condition given in second line is getting failed  .
    my condition logic
    /:       IF &EKPO-MWSKZ& = 'CA' OR &EKPO-MWSKZ& = 'CC' OR &EKPO-MWSKZ& = 'CD'
    /:        &EKPO-MWSKZ& = 'DA' OR &EKPO-MWSKZ& = 'DE'.
    T2     ,,SALES TAX/VAT&V_VAT_PER& u201CAGAINST C FORM",,,,,,,,,,&V_VAT_sum(C)&
    /:        ELSE
    T2       ,,SALES TAX/VAT&V_VAT_PER&,,,,,,,,,,&V_VAT_sum(C)&
    Please let me know what is to be given TAG COLUMN  for second line in IF condition .
    and i am getting correct output for tax codes CA CC CD which are given in first line, But no getting the correct out for tax codes DA and DE.
    Thanks & Regards
    Suresh
    Edited by: suribabu124 on Apr 21, 2010 5:19 PM

    Hi,
    in the below i feel that you forgot to mention the OR condition.
    /: &EKPO-MWSKZ& = 'DA' OR &EKPO-MWSKZ& = 'DE'.
    soultion like.
    /: IF &EKPO-MWSKZ& = 'CA' OR &EKPO-MWSKZ& = 'CC' OR &EKPO-MWSKZ& = 'CD' OR
    /: &EKPO-MWSKZ& = 'DA' OR &EKPO-MWSKZ& = 'DE'.

  • Printing Line Items in Script without using driver program

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

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

  • How to generate a Spool based on output type in SAP Script

    Hi all,
    Is it possible to generate a spool based on output type for a SAP Script (without explicitly trigger in Tcode VF02 and selecting output type from there )
    Actually a background job will be scheduled to process output types selected in VF01 / VF02
    When output type is ZABC in the background a work flow is called pdf is generated

    Any suggestions please

  • Change sap script ?

    Hi All,
    I have a requiremnt to change the standard sap script(MEDRUCK).
    Can anybody help me out by giving me the steps how to change a
    standard SAP Script without copying it into y or z namespace.
    Thanks & Regards,
    Santosh

    As Robert said, do NOT modify the SAP standard MEDRUCK. Create a copy and modify that. Then change NACE to use the new SAPScript. It's not difficult.
    In transaction NACE choose Application EF and the Output types button. Select each output type, double-click on Processing routines and change the form to the new copy (i.e. MEDRUCK to ZMEDRUCK).

  • Dump error when clicked on text elements in SAP Script window

    Hi All,
    There is an inclusion in SAP Script. I have written the code in driver program. I need to pass the value to SAP Script in the requested position. But when I go to SE71 > Form Name > Change or Display > MAIN Window > Text Elements > I get a dump error.
    Category               ABAP Programming Error
    Runtime Errors         DATA_LENGTH_TOO_LARGE
    Except.                CX_SY_RANGE_OUT_OF_BOUNDS
    ABAP Program           SAPLSTXK
    Application Component  BC-SRV-SCR
    Date and Time          30.04.2014 20:00:08
    Short text
         Invalid partial field access: Length is too large
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "SAPLSTXK" 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_RANGE_OUT_OF_BOUNDS', was not
          caught in
         procedure "TOKEN_COMMENT" "(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:
        In the executed program "SAPLSTXK", the system attempted to access the field
        "ITF_TOKEN" of the type "C" and with the length 255 using the length 272.
        However, a partial field access with a length specification that is
        larger than the field length is not allowed.
    How to correct the error
        Reduce the length used to access the field.
        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:
        "DATA_LENGTH_TOO_LARGE" "CX_SY_RANGE_OUT_OF_BOUNDS"
        "SAPLSTXK" or "LSTXKFRN"
        "TOKEN_COMMENT"
        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
    2937 * todo empty comment ???
    2938       if g_tm_open    eq true or     " Section
    2939          g_tm_b_close eq true.
    2940         l_token = '\chcbpat0'.
    2941         l_len = strlen( l_token ).
    2942         token_control = true.
    2943         assign l_token to <itf1>.
    2944         perform put_itf1_new using l_len.
    2945         perform token_line_begin changing l_next_token.
    2946       else.                          " without section
    2947         concatenate '\chcbpat0\line' g_cf_string l_cbpat_token into l_token.
    2948         l_len = strlen( l_token ).
    2949         token_control = true.
    2950         assign l_token to <itf1>.
    2951         perform put_itf1_new using l_len.
    2952       endif.
    2953     elseif l_next_token-code eq ')L'.         " \par
    2954       l_token = '\par'.
    2955       l_len = strlen( l_token ).
    2956       token_control = true.
    2957       assign l_token to <itf1>.
    2958       perform put_itf1_new using l_len.
    2959     elseif l_next_token-code eq '(C' or       " \par + format
    2960            l_next_token-code eq ')C' or
    2961            l_next_token-code eq '(&' or
    2962            l_next_token-code eq 'TA' or
    2963            l_next_token-code eq 'SC' or
    2964            l_next_token-code eq 'ST'.
    2965       concatenate '\chcbpat0\par' g_pf_string g_cf_string l_cbpat_token into l_token.
    2966       l_len = strlen( l_token ).
    >>>>>       itf_token(l_len) = l_token.
    2968       token_control = true.
    2969       assign l_token to <itf1>.
    2970       perform put_itf1_new using l_len.
    2971     endif.
    2972
    2973 * Step 7: (L to disarm
    2974   if g_compose eq true and
    2975      l_next_token-code eq '(L'.
    2976     perform read_next_itf_token(rstxscan) using p_token.
    2977   endif.
    2978
    2979 ENDFORM.                    " token_comment
    2980 *&---------------------------------------------------------------------*
    2981 *&      Form  create_lang_info
    2982 *&---------------------------------------------------------------------*
    2983 *       add default language to rtf
    2984 *----------------------------------------------------------------------*
    2985 *      -->P_HEADER  text
    2986 *      <--P_RESULT  text
    How do I open the text elements? I need to pass the variable inside SAP Script.
    Please Help. The requirement is pending from very long. Not able to rectify this issue.
    Regards,
    Rekha

    Hi,
    There is a SAP Note about this problem
    566794 - Runtime error: STRING_OFFSET_TOO_LARGE during conversion
    Correction Instructions
    Correction Instructions
    Software Component
    Valid from
    Valid to
    Number
    SAP_BASIS
    46B
    46D
    473267
    SAP_BASIS
    610
    620
    473185
    Support Packages & Patches
    Support Packages
    Software Component
    Release
    Support Package
    SAP_BASIS
    46B
    SAPKB46B48
    46C
    SAPKB46C39
    46D
    SAPKB46D28
    610
    SAPKB61027
    620
    SAPKB62014
    Regards
    Miguel

  • Text Element in SAP-Script and Box

    Hi Gurus
    Q1.what is the meaning of text element's in sap-script.e.g.
    /E INSPECTION_STATION_INFO
    /E SAMPLE_INFO
    /E PHYS_SAMPLES_HEADLINE..
    I have to use these elements in my script.i am not able to understand what does it mean?
    Q2.how we can draw a Tabular format in Script?
    Q3.How we can draw Box?
    Thanks in advance

    Hi,
    Text Elements
    You can define text elements (window texts) for each window. On the Form: Request screen, choose Edit ® Text elements.
    The print program accesses text elements by name, formats them and prints them in the respective window. That is, the program can decide which text elements should be printed in a particular window. It calls these text elements by name to print them. You must therefore change text element names in the print program if you make any changes to text element names in a form.
    In the layout of a text element, you can use only the paragraph and character formats defined in the form.
    Example of a text element in an order confirmation:
    /E ITEM_LINE
    IL &VBDPA-POSNR&,,&VBDPA-MATNR&,,&VBDPA-ARKTX&
    / &'Customerarticlenumber 'VBDPA-IDNKD' '&&'Position
    / 'VBDPA-POSEX&
    This example shows a section of a main window of a form, with an item line of an order confirmation. The /E in the tag column is used to identify the text as a text element, ITEM_LINE is the name of the text element.
    Default Text Element
    At the start of a window, you can define a text element without the /E command in the paragraph format column. This text is always printed at the start of the window. It is not necessary to insert this text explicitly via a print program.
    For more go to this link: Character formats and attributes
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/80318f454211d189710000e8322d00/frameset.htm
    Boxes:
    Use the following code
    /: BOX XPOS 1 MM YPOS 2 MM WIDTH 20 MM HEIGHT 40 MM FRAME 10 TW.
    Box is the command used for printing box in script.
    XPOS - x- axis position
    ypos - y axis position
    http://help.sap.com/saphelp_470/helpdata/en/d1/802ec5454211d189710000e8322d00/content.htm
    Regards,
    Omkaram.

  • Text Element error in SAP script

    Hi All,
    I have modified a sap script and now getting print perfectly without any flaws.
    But system is raising an error log in spool (Tcode: SP01) as below..
    In form ZFFIAP_PMNT_RMTT / window MAIN , the element 610-C (Text-C) is missing.
    When i checked the MAIN window of sap script, there is a text element with name 610-C.
    How to resolve this error..????
    Please Help me...
    Regards
    Pavan

    Thanks for your inputs.
    I have checked the Driver Program. There  is no text element '610-C' used in WRITE_FORM statements in the driver code.
    There is no such element in the MAIN Window of sap script.
    Still i m facing same error.....
    "In form ZFFIAP_PMNT_RMTT / window MAIN , the element 610-C (Text-C) is missing"...
    What might be the reason..????
    I have checked other window too for such text element...
    If i create a text element "610-C" in the MAIN window of sap script, still same error is being created as log file in Spool (SP01). INterestingly this error is not creating any impact on script printing...!!!
    Can anyone help me.....????
    Regards
    Pavan

  • How to define default element in SAP-Script?

    Hi Guys,
    How to define default element in SAP-Script?
    Can you tell me to do this...is it possible in all the windows or only in main window?
    Regards,
    GURU

    Hi,
    Welcome to SDN
    You can't post ur questions in other's threads .Open a new thread.
    click on post new thread and open new thread.
    Regards

  • How to end text element in sap script

    how to end an text element in sap script
    this is the format.
    /E text element name
    &tablename-fieldname&
    text-text-text-text
    now if i do not end that text element it is not displayiny my below text , so what to do in this case

    Go through the links mentioned below.
    http://www.****************/Tutorials/Smartforms/SFMain.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    http://www.sapmaterial.com/smartform_example.html
    Re: Hands on SAP Smart Forms
    smartforms
    Reward points if useful.

  • How do I Hide the text printed from a standard Text Element in SAP Script?

    Hi,
    I have created one SAP Script which gets printed from IW33 using a standard print program.
    In config the standrad SAP script is replaced by the zsap script.
    Since the Zscript is printed from a Standard print program, I had to keep all the text elements used by the original(standard) SAP script.
    I only kept the text elemets and commented out the printing part.
    But still some values are printing. How do I hide these text element values?
    I want to delete whatever its printing from these text element. Icant delete the standard text elemetns , otherwise the standard print program will give error.

    Hi,
    I am not printing any text under these text element in my zscript.
    I had to include these standard text elemets as they are called from the standard print program using which my zscript is getting printed.
    for example:
    /E OPERATION
    Under operation i didnot print anything. Still some values which are passed in text element Operation by the print program is being printed in the form. i want to hide/delete these values.
    how do I do that?

  • Can anybody tell me how many text elements are there in sap scripts?

    hi all,
    can anybody tell me how many text elements are there in sap scripts?

    Hi,
    Do you mean that you want to know how many Text-elements are there in a specific Script or you want to know how many max Text-Elements a script can have?
    I believe there is no limit on this......
    To know all the Text Elements in a Script......goto SE71....press F4 Help on Script Name....Choose Last option for Custom developed Scripts.....and you can open the complete Script details & Code in a Line Editor...After that you can serach/look for the text elements

  • Text element in sap script

    Hi All
    Y do we need Text element in SAP SCRIPT ?

    yes you can.
    are you using your own print program or a standard?
    Each window will be called by the code so if you have no elements in there all the data is output in the order they appear in the form.

  • SAP Script : Can"t create / Display / Copy Elements in EN language... Urgen

    Dear All,
    I am working in a Script, I copied a standard Script and tried to Create a new Window but it is not allowing me.
    I realised that, I can"t create a new window in English Version, I can do that only in German version.
    I feel it is cubersome that every time I have to log into German to do any editing. So Can you guys kidly let me know how can I do editing in English version.
    I have tried to Change Original Language into English from utilities -> Convert original language but that Field is Grey (Blanked out. So could not do that.
    I even tried to create new window in DE language, but when I tried to logon to English, it say form in English Language is Locked.
    Plese advice me .. this is urgent, without this information, I cann"t even start ... Should I contact with my Basis Consultant.
    Thanking you.
    Regards
    Venkat
    Thanking you.
    Regards
    Venkat.

    Hi there,
    the alst answer you got in your previous thread
    SAP Script : Editing in EN Version / DE version : Urgent pls
    was correct. But you really have to login in language DE first. If you do that, the translation option is enabled. After that follow the instructions again.
    try...it wil work
    chrs
    Hayo

Maybe you are looking for

  • Unable to get Field Names from Archived File

    Hi All, We have a ECC 6 Ehp4 system. When i retrieve Idocs archived using SARA, the data only contains application data. There is no field names available - eg: posting date, tax code etc. Please find below the background on this issue. I configured

  • FAQ: I found a bug. How do I write a useful bug report? Or send bug files to Adobe?

    If you think you've found a bug in Photoshop CS6, please post your findings here on the forums. Here is a list of the information we'll want for you to gather at a minimum: Clear and concise steps so that someone who isn't in front of your comptuer c

  • CLBUS1007.created event triggered by an ABAP OO event?

    Hello gurus, I have noticed, that when the customer master is created in ECC 5.0, the CLBUS1007.created event is triggered (SWEL). However; CLBUS1007 object does not exist in the BOR directory. It must be ABAP OO event than, right? If so, how can I f

  • Printing too low

    All my PDF's just started printing 2 inches down the page and run off. I have a MAC, HP Photosmart, Reader 11.0.10

  • How to enable a user to change his own password at EP7?

    I want to give the EP7 users the ability to change their own password at EP. Can we do that thru any role assignment or some development is needed? Any detailed help would be appreciated . I'll give points. Thanks!