How to create table in the sap script

Hi,
How to create a table in the  sap script layout, i Have to use table in the main window with  7 columns. can any one send sample code.
How to calculate the number of line items which are displaying in the main window, if the number of line items are exceed in the main window then the amount has to be calculate and print as "BALANCE FORWARD" and the next page had to be displayed as "CARRY FORWARD" that amount. if this is the last page not subsequent page the amount had to be calculated the carry forward amount and total amount and print as "TOTAL AMOUNT". i am creating the new layout and the program is the standrad driver program i have to use and i have to use the standard Text elements only, can any one help me on this issue

hi
good
there is no "pattern" option in SAPscript. All you have at your disposal are the following SAPscript commands: BOX, POSITION and SIZE. Not only are these commands both confusing and tedious to implement, they also are limited in what they can achieve. For instance, although you can suppress a box during printout (by making it conditional), there is no simple way to adjust it dynamically instead. Thus, to divide sequential line items, you may wish to use an underline (ULINE) or simply white space.
thanks
mrutyun

Similar Messages

  • Sap script '' how to create table frame in sap script"""

    i have some problem in sap script''  how to create table frame in sap script"""

    Hi,
    you can use BOX command..
    Syntax
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    Effect: draws a box of the specified size at the specified position.
    Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT and FRAME both a measurement and a unit of measurement must be specified. The INTENSITY parameter should be specified as a percentage between 0 and 100.
    1. XPOS, YPOS: Upper left corner of the box, relative to the values of the POSITION command.
    Default: Values specified in the POSITION command.
    The following calculation is performed internally to determine the absolute output position of a box on the page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
    2. WIDTH: Width of the box. Default: WIDTH value of the SIZE command.
    3. HEIGHT: Height of the box. Default: HEIGHT value of the SIZE command.
    4. FRAME: Thickness of frame.
    Default: 0 (no frame).
    5. INTENSITY: Grayscale of box contents as % .
    Default: 100 (full black)
    Measurements: Decimal numbers must be specified as literal values (like ABAP numeric constants) by being enclosed in inverted commas. The period should be used as the decimal point character. See also the examples listed below.
    Units of measurement: The following units of measurement may be used:
    • TW (twip)
    • PT (point)
    • IN (inch)
    • MM (millimeter)
    • CM (centimeter)
    • LN (line)
    • CH (character).
    The following conversion factors apply:
    • 1 TW = 1/20 PT
    • 1 PT = 1/72 IN
    • 1 IN = 2.54 CM
    • 1 CM = 10 MM
    • 1 CH = height of a character relative to the CPI specification in the layout set header
    • 1 LN = height of a line relative to the LPI specification in the layout set header
    /: BOX FRAME 10 TW
    Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
    /: BOX INTENSITY 10
    Fills the window background with shadowing having a gray scale of 10 %.
    /: BOX HEIGHT 0 TW FRAME 10 TW
    Draws a horizontal line across the complete top edge of the window.
    /: BOX WIDTH 0 TW FRAME 10 TW
    Draws a vertical line along the complete height of the left hand edge of the window.
    /: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
    /: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
    check the fallowing link also
    http://help.sap.com/saphelp_40b/helpdata/en/d1/803293454211d189710000e8322d00/content.htm
    Mark the points if u find it useful...
    Regards,
    Omkar.

  • How to create box in the sap script.

    I have a address like
    SAP America,
    Pala alto,Ca
    USA
    I want to put the above address in the box in sap scritp.
    How to do it .
    Please let me know.
    Any help would be highly appreciated.
    Thanks
    Edited by: mark_yellow mark on Jul 8, 2008 1:54 AM

    Hi Mark,
    If u you what to display the window with a box thw u can simply write this way
    /: BOX FRAME 10 TW
    You can use the POSITION and SIZE commands to set default parmeters for a box.
    You can write:
    /: POSITION XORIGIN '11.21' YORIGIN '5.31' MM
    /: SIZE HEIGHT '2' MM WIDTH '76' MM
    /: BOX FRAME 10 TW INTENSITY 10
    This can be usefull if you gave several boxes that share the same parameters.
    If you want to set the position realtively to the window use POSITION WINDOW
    to set the position to the top/left start of the window. Then use POSITION
    to set the current position relatively to the start of the Window.
    Note that you uses "+" or "-" in the ORIGIN position to the set the position relatively.
    /: POSITION WINDOW
    /: POSITION XORIGIN '+5' MM YORIGIN '+10' MM
    the position is now 5 MM from the left and 10 MM from the top of the window
    Drawing a line. You can draw a line by setting the Height or Weidth to 0
    and add a frane. E.g. a horizontal line:
    /: SIZE HEIGHT '0' MM WIDTH '200' MM
    Best regards,
    raam

  • HOW TO CREATE A VARIABLE IN SAP SCRIPT

    HI ALL,
    CAN ANYONE TELL ME HOW TO CREATE A VARIABLE IN SAP SCRIPT.
    THANK YOU,
    BYE
    TAKE CARE.

    Hi Ravi,
    You can use like this
    A text in the editor contains the following DEFINE commands:
    /: DEFINE &mysymbol& = 'xxx xxx xxxxx xxxx'
    &mysymbol&
    /: DEFINE &mysymbol& = 'yyyyy yyy yyyy'
    / &mysymbol&
    The printed text appears

  • How to create a hypertext in SAP script

    Hi All,
    I want to create a hypertext in SAP script.I read 'Creating hypertext in SAP script' posted on www.sdn.sap.com, but I am not able to get desired output.Kindly suggest the soloution.
    Regards,
    Pranjali Silimkar

    Hi,
    I read the document 'Creating hypertext in SAP script' posted on the link 'http://wiki.sdn.sap.com/wiki/display/ABAP/CreatingHypertextinSAPScripts', but I am not able to get the desired output.It is displaying the same text again on the same page which is not the desired output.Kindly suggest me some solution.
    Regards,
    Pranjali Silimkar

  • How to pass tables data from SAP script to the routine.

    Hi,
    I have standard program RPCTEAL0_01 which calls a SAP script form(Custom) to print the form.
    Now I have to add some additional functionality to change the values in the form. Since it is custom form I can add ROUTINE and then pass the values to the custom program to modify the variables.
    My concern here, I would like to pass the tables like RT,CRT to the custom program via form.
    Is this possible?  RT and CRT filled by standard progam.
    Regarsd
    Eswar
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jan 20, 2009 9:06 AM

    Hi, The suggested option is not working.
    Actually I am using the below code in SCRIPT
    /:   PERFORM CAL_2008 IN PROGRAM ZHR_TEST1
    /:   USING &PER_NO&
    /:   CHANGING &W12&
    /:   ENDPERFORM
    and calling form in ZHR_TEST1. But this will pass only variables. Now my requirement is to pass tables also.

  • How to create new page in SAP Script?

    Moved to correct forum by moderator.  Duplicate deleted.  Do NOT post the same question in two forums.
    Hello friends,
    I am modifying one SAP script.
    It is already contains 2 pages. FIRST and NEXT.
    All I have to do is to create one more page which should be display as last page.
    And this last page should display some data.
    I tried and created a new page in SE71 but when i execute the program, it doesn't show newly created (LAST) page.
    Please guide me.
    REgards,
    RH
    Edited by: Matt on Nov 7, 2008 4:26 PM

    Hi
    U need to force the call of this new page.
    I suppose your sapscript is arrange with 2 page: FIRST and NEXT, where FIRST has NEXT as next page.
    So the system automatically print the pages FIRST and NEXT: u need to insert the statament:
    /: NEW-PAGE LAST
    in the MAIN window.
    U can create a text element NEW_PAGE and you'll call it as soon as you've finished to print the main data:
    /E NEW_PAGE
    /: NEW-PAGE LAST
    U can use the fm CONTROL_FORM
    Max

  • How to create a box in sap script n footer

    Hi,
    I am working on a Sap Script in which i have to display a box having the decision of crt profile and i don't know how to display it. It is clear that it is to be displayed in the footer of it and the code for that decision is coming from the program.
    plzz provide me guidelines as how to solve this problem.

    To draw a box, try this syntax.
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    example:
    /: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.18' MM INTENSITY 100.
    /: POSITION XORIGIN '11.21' MM YORIGIN '5.13' MM.
    /: SIZE HEIGHT '120' MM WIDTH '90' MM.
    Regards,
    Joan

  • How To use barcode in the sap scripts

    I have to put two windows in a form ,both windows should contain BARCODE
    so how i can proceed plz provide me solutions for same and possible few example code which can guide me .

    There is no change required to the print program the bar code conversion is handled by the SAPScript form.  What you do need to do is create a special character string.
    Simply click on the Character Formats button and then in standard attributes, select Bar Code in the appropriate field (it is labled Bar Code)  you probably need to talk to someone regarding which Bar Code format to use, since there is a quite a few  of them.
    Hope this helps.

  • How to create table control in script

    hi expects,
      how can i create table control in script?

    Hi,
      It is not possible to create Table Control in Sap-Scripts n u can create it by using se51 that is screen painter only...
    if useful reward with points,
    regards,
    Madhuri.

  • Create new window in SAP Script

    Dear All
       how to create new window in sap script
    Regards
    Suresh
    Edited by: Alvaro Tejada Galindo on Apr 9, 2008 11:58 AM

    Hi,
    To create a new window in scripts.
    1.  After opening the form in SE71   Click on Windows push button.
        it will gives a screen  list of windows in a page
    2. Click on Edit option in menu bar  in Edit-->Create Element click it will gives a popup window in the window give Name of the window and short description press enter  like that you can create windows in  a page
    3.  Click on Page windows it will gives a screen where that window you want to place in that page.    Click on Edit option on menu bar Edit-->Create Element
    it will gives a list of windows which your created in a page   here you have to select which window you want to place.  Double click on that window it will adds on the page and give the bottom of the screen you can find  standard attributes block
    there you have to give the position of the window in a page. 
    or
    Click on setting option on menu bar  settings-->form painter
    it will gives a GUI editor here you can drag the window position it is easy to use.
    then you can see the layout.
    Thanks
    Ganesh

  • How to create the Sap script & Layout Set (wants sample code)

    Hi All ,
    Can you please provide me the step by step procedure
    to create the Sap script & Layout Set .(please provide sample
    code/links /docs for layout & print program).
    Regards
    Rahul

    hi,
    go through the following links  what i found to create sap script.
    http://www.thespot4sap.com/Articles/SAPscript_Introduction.asp
    http://abapliveinfo.blogspot.com/2008/01/free-sapscript-made-easy-46-book.html
    http://www.thespot4sap.com/articles/SAPscript_example_code.asp
    http://idocs.de/www3/cookbooks/sapscript/sapscript_1/docu.htm
    http://idocguru.com/www5/cookbooks/sapscript/sapscript_1/example.htm
    www.geocities.com/wardaguilar25/sapscript-tutorial.html
    http://logosworld.de/www3/cookbooks/sapscript/sapscript_8/docu.htm
    how to create a  scripts?give steps?
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=2969311
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=2902391
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=3205653
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=3111402
    http://www.sap-img.com/sapscripts.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm
    http://www.sap-basis-abap.com/sapabap01.htm
    http://www.sap-img.com/sapscripts.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci943419,00.html
    http://sap.ittoolbox.com/topics/t.asp?t=303&p=452&h2=452&h1=303
    http://www.sapgenie.com/phpBB2/viewtopic.php?t=14007&sid=09eec5147a0dbeee1b5edd21af8ebc6a
    Other Links

  • How to add a page in the SAP Scripts

    Hi All,
    I want to know how to add a page in the sap scripts. there is already sap script developed by some other person.
    Now I have to add a page in front of that and have to add some more data.I added a page in page windows but thats not at all working.
    Please help me out in this.
    Thanks,
    Praveen

    new page will create in sap scripts using new page command.
    you have to set condition like after some number of records displayed in page new page has to be trigger.
    ex:YOU HAVE SO MANY RECORDS FOR PRINTING BUT YOU WANT TO DISPLAY 100 RECORDS IN FIRST PAGE REMAINING IN SECOND PAGE LIKE THAT.
    Here you can use NEW PAGE COMMAND .
    IT IS OPPOSITE PURPOSE OF PROTECT AND ENDPOTECT.
    Reward if useful.

  • How to add a report into the SAP-SCRIPT .using PERFORM ......ENDPERFORM

    My question is that How to add a report into the SAP-SCRIPT .
    by using PERFORM ......ENDPERFORM
    I don't know how to used it .

    Hi Sandeep,
    Please check this link
    http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
    http://www.allinterview.com/showanswers/37425.html
    Calling ABAP Subroutines: PERFORM
    You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.
    The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.
    From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (u2018First pageu2019, u2018Next pageu2019, u2018Last pageu2019) is printed as local variable symbol.
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY u2018PAGEu2019.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018NEXTPAGEu2019.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018BARCODEu2019.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = u2018|u2019. "First page
    ELSE.
    OUT_PAR-VALUE = u2018||u2019. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = u2018Lu2019. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Best regards,
    raam

  • How to  include a report  into the  SAP-SCRIPT

    plz tell me 
    How to  include a report  into the  SAP-SCRIPT
    ASAP

    creat a z report like this....................
    REPORT  zmmgl_picklist1.
    TABLES : likp,ltap,ltak.
    data : lv_NUM1 type c .
    data : lv_NUM type c.
    *&      Form  get_data1
          text
         -->IN_DATA    text
         -->OUT_DATA   text
    FORM get_data1 TABLES in_data STRUCTURE  itcsy
                         out_data STRUCTURE itcsy.
    READ TABLE in_data WITH KEY name = 'LTAP-VBELN'.
    lv_NUM = lv_NUM1 + 1.
    out_data-name = 'lv_NUM'.
      out_data-value = lv_NUM .
    APPEND out_data.
    endform.
    *&      Form  get_data
          This form is to read  details from  LIKP    *
         -->IN_DATA    text
         -->OUT_DATA   text
    FORM get_data TABLES in_data STRUCTURE  itcsy
                         out_data STRUCTURE itcsy.
      READ TABLE in_data WITH KEY name = 'LTAK-VBELN'.
      Select single bldat from likp into likp-bldat where lgnum = ltap-lgnum.
      out_data-name = 'LIKP-BLDAT'.
      out_data-value = likp-bldat.
      APPEND out_data.
       READ TABLE in_data WITH KEY name = 'LTAK-VBELN'.
      Select single vstel from likp into likp-vstel where lgnum = ltak-lgnum .
      out_data-name = 'LIKP-VSTEL'.
      out_data-value = likp-vstel.
      APPEND out_data.
    READ TABLE in_data WITH KEY name = 'LTAK-VBELN'.
      Select single kunnr from likp into likp-kunnr where lgnum = ltap-lgnum.
      out_data-name = 'LIKP-KUNNR'.
      out_data-value = likp-kunnr.
      APPEND out_data.
    ENDFORM.                    "get_data.
    after this go to the script editor......
    /: perform get_data in program zmmgl_picklist1.
    /: using &ltap-vbeln&                 (Reference field.this field          should be there in both program and script.....)
    /:changing &likp-bldat&         
    /:changing &likp-vstel&
    /:changing &likp-kunnr&
    \[removed by moderator\]
    Regards
    Anbu
    Edited by: Jan Stallkamp on Jun 10, 2008 2:26 PM

Maybe you are looking for

  • Manage two invoice posting for one price condition in sales document

    Hello Experts, I am a new user in SD module especially for billing and pricing part, and i have a specific requirement from my client that i cannot find the solution. Could you please help if you have any idea to resolve the following situation: I ha

  • XI does not allow me to add new segment....?

    Hi, I created a message from XSD...The XSD allows one node to be repeated say 5 number of times. But when I create the Message out of this XSD, it has just one node for this .Now I want to create another similar node... Any idea how  to do that? Than

  • Nexus 7010 upgrade path

    We currently have two Nexus 7010 with 5.0(2a) as system images. We would need to know the correct upgrade path to 6.1(1). On the release notes it reads the path is from 4.2(8), 5.0(5) or 5.1(6) to 5.2(5) then to 6.1(1). Also if ISSU is possible or, b

  • Nokia 9500 - Bluetooth auto start!

    The bluetooth on my Nokia 9500 auto starts from time to time even though is switched off in the Settings menu.

  • CATW data disappear. Anyone can help please?

    Dear all, I actually use the standard CATW for the employee to record their overtime. It works fine until last Friday the check entries button in the portal seem like does not work. The scenario is where after the employee key in the overtime in the