Dynamic box in smartforms

hello gurus,
i have to populate  dynamic boxes this is the scenario  any ideas...i mean how can i put this in smartform way...
I
f gift order <> 1
Determine how many VALUES we have based on ship_charge, subtotal, promotion_amt and order_total.Think the max is 4
Based on this count this determines the number of boxes
This count will also determine which values are output
Need to consider if promotion amount is negative then need to put negative sign before '£' sign
Else.
No boxes/prices are shown
Endif.

HI ,
Use tables .
right Click->create->tabels
In data tab  , in loop to
give the name of the internal table  and work area
as  :  it_ekpo  into   is_ekpo
In tables tab click details button
Under line type 1 specify the size for each row of the table.
The toal size of all the columns should not exceed the total window width .
In the same line as details u can see the lines  and boxes .  using that u can fill the borders of the cell with lines .  Click on the cell and select the appropriate  line . When u display the line will be displayed as the border of the cell .
Save chek activate
Right click on main area and click tabline.
Under line type specify the line type created in table .
Then in each cell right click and create text  . and put variable as
&is_abc-ebeln&.
Regards

Similar Messages

  • Dynamic Box's

    Hi All,
        I have a one question , in SAP Scripts/Smartforms how can i draw a dynamic box's.  if there is one record one box (Like  Table with 3 Cells(rows & coloums))  has to appear, if it is 2 ,two box's has to appear depending up on the records.
    Please if any one having the code3 or path to slove this Problem, please give me the advice.
    Thanks very much in advance for your answer.
    Naren

    In print program, something like this
    data: ypos(5), ht(5).
    move '1.75' to ypos.
    move '3.00' to ht.
      call function 'WRITE_FORM'
           exporting
                element   = 'HEAD'
           exceptions
                element   = 01
                function  = 02
                type      = 03
                unopened  = 04
                unstarted = 05
                window    = 06.
      if sy-subrc ne 0.
        message e205 with 'WRITE_FORM failed.' sy-subrc element.
      endif.
    And in the SAPScript:
    /E   HEAD                                     
    /:   BOX YPOS &YPOS& LN HEIGHT &HT& LN INTENSITY 10
    Regards,
    SaiRam

  • Dynamic Box in script

    Hi,
    I have a script which currently prints a number of item details.
    Users want to change the layout so that the result is given in tabular format,i.e, the item details need to be displayed in rows and column format. As the number of items can vary, could you please help me with the logic of displaying this using script?
    Thanks in advance,
    Neethu

    Hi,
    Creating dynamic boxes in script is possible but formatting and getting proper allignment is very tedious job. I had similar requirement for creating dynamic boxes in SAP Script, but getting right allignment of those boxes was not possible and hence I switched to smartform. So I would advise you the same to use smartform for such type of requirement. In smartforms it becomes very easy.
    Still try the following syntax:
    /:POSITION XORIGIN '5' CM YORIGIN '5'CM
    /:SIZE HEIGHT '0' CM WIDTH '0' CM
    /:BOX FRAME 10 TW INTENSITY 10
    Hope this helps.
    Reragds,
    Abhijeet

  • SAPscript - Dynamic box position and height.

    Greetings...
    How to print dynamic box according to the Element. I have an element with looping condition when i used box the line only printed on the first loop, but and no line printed on the next looping even though its is  different element.. Below is the sneak peak of my code.
    /E 101
    /:   BOX WIDTH 0 MM HEIGHT '2' MM FRAME 20 TW
    /:   POSITION YORIGIN '+2' MM
    W2   <B>&text&</><B>,,&zvalue&</>
    Thank you

    Hi
    it is very hard to print a dynamic box with sapscript.
    It is more easy to develop a new-smartform then to develop a dynamic box.
    i know only 1 sapscript which is using dynamic boxes. I do not know the sapscript only the fucntional name we use. That is shopfloor papers (for a production order). It has a good combination of printprogram and sapscript which both has to be working together to get it done. Try to find it and study it. Then you will find out how it works.
      There is no way to get it done with only changes in your sapscript.
    an alternative is to use tab's and '|' and ulines to make something that look a bit like boxes.
    Hope this will help you out.
    Gr., Frank

  • How to print Check Box in smartform

    HI,
      How to print check box in smartforms. I am using Include Sap Symbol but in the print it is coming as #. Do we need to do any setting like we do for barcode?
    Thanks
    Raghavendra

    hi,
    u can print a check box in different ways.. by inserting symbols and making window as check box..
    once go through the thread u will get to k now differnt ways
    putting checkboxes in smartform?
    Please Close this thread.. when u r problem is solved. Reward all Helpful answers
    Regards
    Naresh Reddy K

  • How to display dynamic signature in Smartforms?

    Hi,
    Someone could help me in displaying dynamic signatures in SmartForms?. The signature is an attached file to the document. I already have the binary file but I don't know how to display this as an image in the Smartforms.
    Thanks in advance,
    Oliver
    Message was edited by: Oliver Vera
    Message was edited by: Oliver Vera

    Please give me the reply.
    I have an image content in one internal table.I want to display that image in the smartforms.
    plaese please.

  • How to create Dynamic Window in Smartforms

    Hi all,
    Could you please help me out on how to create Dynamic Window in smartforms excluding Main Window.
    Thanks in Advance.
    Vinay.

    hi,
    Hi,
    1.If you are creating the Different windows for the Countries,then In conditions tab of window specify the Condition i.e.
    company -code = '2201'.
    2.Then that window can trigger ofr that condition.
    3.Other wise, if you are using the different layouts ,then write the condition in Print program and call that form .
    reward me if helpful.

  • BOX in smartforms

    Hi,
    I need to put some text in a box in SMARTFORM. Can  any one please tell me ?
    thanks
    Dan

    Hi,
    1)
    Create a style in the smartforms transaction..
    IN that style create a character format..
    IN the character format..in the font tab..There is a check box for underlined.
    2)
    Now go to the smartforms
    Go to the text ..
    IN the output options give the style that you created..
    In the text use the character format that you created for underline.
    Example
    <Z4>UNDERLINE</>.
    Where Z4 is the character format.
    Hope this helps..
    Thanks,
    Naren

  • Dynamic Box Formatting in Scripts

    Hi,
    My requirement is ,
    This is regarding to SAPScripts.
    I should populate some data in a box.
    The box should adjust depending upon the data.( Whether the data is 2 lines or 10 lines).
    Help me out.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Jul 8, 2008 11:21 AM

    Hi Manjunath,  
    Here is the code which can help you get the dynamic box's from the script.
    Here the element is TAB.
    There is a loop for this element in the driver program.
    Here the code works this way the YORIGIN is incremented by 0.6CM each time it is in the loop thus drawing tables dynamically.
    /E TAB
    /: POSITION XORIGIN '0.9' CM YORIGIN '+0.6' CM
    /: SIZE WIDTH '3.0' CM HEIGHT '0.6' CM
    /: BOX FRAME 10 TW.
    /: POSITION XORIGIN '3.9' CM
    /: SIZE WIDTH '7.3' CM HEIGHT '0.6' CM
    /: BOX FRAME 10 TW.
    /: POSITION XORIGIN '11.2' CM
    /: SIZE WIDTH '2.8' CM HEIGHT '0.6' CM
    /: BOX FRAME 10 TW.
    /: POSITION XORIGIN '14' CM
    /: SIZE WIDTH '2.6' CM HEIGHT '0.6' CM
    /: BOX FRAME 10 TW.
    /: POSITION XORIGIN '16.6' CM
    /: SIZE WIDTH '3.2' CM HEIGHT '0.6' CM
    /: BOX FRAME 10 TW
    P4 &X_VBAP-KWMENG(C)&,,&X_VBAP- ARKTX&,,&V_TOTALa&,,&V_TOTALb&,,&V_TOTALc&
    Hope this Solves your Problem in dynamic Table drawings.
    <REMOVED BY MODERATOR>
    Thanks,
    Tej..
    Edited by: Alvaro Tejada Galindo on Jul 8, 2008 11:21 AM

  • Printing dynamic box in main window in scripts

    hi ,
    I want to print the dynamic box in main window of my script.
    Ex. Suppose the content of the main window is 5 lines so it should print box for 5 those lines only.

    Hi,
    Create a Main window with only 2 lines, Give a BOX command it will give u Border for entire Main window.
    /:BOX FRAME 10 TW
    For giving vertical lines Syntax is
    /:BOX XPOS 16 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    It gives u a vertical line at 16 character. so for ur requirment add another command at another XPOS.
    Try this below just below ur ITEM ELEMENT which has the display fields.
    Main Window
    /E ITEM_A
    A,,,,&ITAB-ABC&,,&ITAB-XXX&,,&ITAB-CDE&,,&ITAB-GEF&
    /:BOX FRAME 10 TW
    /:BOX XPOS 16 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 26 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 36 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 46 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    Change XPOS according to ur requirement.
    Now add another main window to the same page with changing UPPER margin, U can add upto 99 Main windows in one page.
    So add upto ur Page is full.
    For headings
    Create a Variable window same as Main window, in place of fields, give descriptions.
    Make sure that u give BOX command below the field declaration, if u give above, for last record it will not print box.
    Regards
    Bala Krishna

  • Dynamic BOX in sapscript

    Hi,
    I am using the BOX control command in SapScript.
    Is it possible to assign the values of Xpos and Ypos
    dynamicalliy.
    In BOX XPOS 16 CH WIDTH 0 MM HEIGHT 18 MM FRAME 10 TW,
    i want to assign the values at runtime, instead of
    xpos 16 , something like Xpos Var, where var contain the value of xposition.
    or any other method to print dynamic box in sap script

    Hi
    yes it is possible
    see this
    SAPScripts
    POSITION WINDOW
    SIZE WIDTH '160' MM HEIGHT '140' MM
    BOX FRAME 10 TW
    Box
    BOX HEIGHT '11' MM WIDTH '160' MM FRAME 10 TW INTENSITY 35
    linessssssss
    BOX XPOS '20' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '45' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '80' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '120' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    Boxes, Lines, Shading: BOX, POSITION, SIZE
    Use the BOX, POSITION, and SIZE commands for drawing boxes, lines, and shading to print particular windows within a form or passages of text within a window in a frame or with shading.
    The SAP printer drivers that are based on page-oriented printers (the HP LaserJet driver HPL2, the Postscript driver POST, the Kyocera Prescribe driver PRES) employ these commands when printing. Line printers and page-oriented printers not supported in the standard ignore these commands. You can view the resulting printer output in the SAPscript print preview.
    Syntax:
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    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, you must specify both a measurement and a unit of measurement. Specify the INTENSITY parameter as a percentage between 0 and 100.
    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
    WIDTH
    Width of the box. Default: WIDTH value of the SIZE command.
    HEIGHT
    Height of the box. Default: HEIGHT value of the SIZE command.
    FRAME
    Thickness of frame.
    Default: 0 (no frame).
    INTENSITY
    Grayscale of box contents as %.
    Default: 100 (full black)
    Measurements: You must specify decimal numbers as literal values (like ABAP numeric constants) by enclosing them in inverted commas. Use the period 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 form header
    1 LN = height of a line relative to the LPI specification in the form 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 shading 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.
    POSITION Command
    Syntax
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    Effect: Sets the origin for the coordinate system used by the XPOS and YPOS parameters of the BOX command. When a window is first started, the POSITION value is set to refer to the upper left corner of the window (default setting).
    Parameters: If a parameter value does not have a leading sign, then its value is interpreted as an absolute value, in other words, as a value that specifies an offset from the upper left corner of the output page. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. If one of the parameter specifications is missing, then no change is made to this parameter.
    XORIGIN, YORIGIN
    Origin of the coordinate system.
    WINDOW
    Sets the values for the left and upper edges to match those of the current window (default setting).
    PAGE
    Sets the values for the left and upper edges to match those of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm).
    /: POSITION WINDOW
    Sets the origin for the coordinate system to the upper left corner of the window.
    /: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'
    Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page.
    /: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM
    Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.
    SIZE Command
    Syntax
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    Effect: Sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a window is first started, the SIZE value is set to the same values as the window itself (default setting).
    Parameters: If one of the parameter specifications is missing, then no change is made to the current value of this parameter. If a parameter value does not have a leading sign, then its value is interpreted as an absolute value. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value.
    WIDTH, HEIGHT
    Dimensions of the rectangle or line.
    WINDOW
    Sets the values for the width and height to the values of the current window (default setting).
    PAGE
    Sets the values for the width and height to the values of the current output page.
    /: SIZE WINDOW
    Sets WIDTH and HEIGHT to the current window dimensions.
    /: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM
    Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.
    /: POSITION WINDOW
    /: POSITION XORIGIN -20 TW YORIGIN -20 TW
    /: SIZE WIDTH +40 TW HEIGHT +40 TW
    /: BOX FRAME 10 TW
    A frame is added to the current window. The edges of the frame extend beyond the edges of the window itself, so as to avoid obscuring the leading and trailing text characters.
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    Reward points for useful Answers
    Regards
    Anji

  • Putting tick mark into check box in smartform

    hi,
       can any one please let me know if i can put a tick mark in the check box of the smartform.
       for example: i need to select one among yes or no check box. how do i do it.
       should i have to upload a graphic of the tick mark and then display or is there any provision in smartforms to do that.

    Hi,
    Check threads like
    smartform- check box
    and
    what r the steps to display check box in smartform
    Eddy
    PS.
    Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
    Spread the wor(l)d!

  • Boxes in Smartforms

    Hi All,
    I have to create a box in smartform.
    I have used the the Box command but it is not working. Are there any parameters or conditions that need to be specified for using a box command?
    If we can not use a box command, then how can we create a box in smartforms?
    Please guide.
    Thnx in advance,
    Preeti

    hi Preeti,
    Go through the below links you will get a better idea,
    for Smartforms material
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    check most imp link
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Please check the tables TNAPR and TTXFP for Standard Smartforms.
    See the note 595812: it explain how to download the preconfigured smartforms.
    Detailed information can be accessed at the site:
    http://service.sap.com/preconfiguredforms OR
    http://service.sap.com/smb/development/preconfiguredforms.
    To download preconfigured smartform package, please:
    1. Go to http://service.sap.com/installations, select tab "download".
    2. On the right hand side screen, locate navigation tree node
    SAP Software Distribution Center->Download->Installations and Upgrades->
    Entry by Application Group.
    3. In the main window (right hand side), follow the path
    SAP Best Practices->Best Practices for mySAP All-in-One-> PRECONFIGURED
    SMART FORMS, you can find available preconfigured smartform versions.
    regards,
    Prabhu
    Reward if it is helpful.

  • Drawing a box in smartforms

    Hi,
    Is it possible to draw a box in smartforms in a non specific place on the page?
    Thanks
    Lindy

    Hi Andreas,
    The form I am trying to design is an instruction form for a driver.
    Basically it lists the drivers instructions for the day, then has boxes where the driver can fill in vehicle registration, start kilometers and end kilometers.
    There is also then a place where the customer can tick a box if he was happy with the service, or enter comments into a box if he was not happy with the service.
    The problem is that the driver instructions can be any length, so I cannot place these boxes at a specific place on the page. This is what I originally did, but the client does not want to see a big empty space if the instructions are really short.
    Thanks for your help. I would be interested to here of a solutions, but if it is quite complicated, don't worry about it as I am sure it can be done with a sapcript instead.
    Regards
    Lindy

  • Sap script creating dynamic box problem

    Hi all,
    I am unable to create dynamic box in sap script.
    Because the printing lines in the main window changing from one customer to another customer.
    So could you please guide me how to create a dynamic box in sap script and also how to know the printing line nunber in main window.
    Advance thanks for your suggestion
    Regards,
    Sudhakar.

    In script form u can write following code
        /:       DEFINE &MY_XPOS& = ' '
        /:       DEFINE &MY_YPOS& = ' '
        /:       DEFINE &MY_HEIGHT& = ' '
        /:       DEFINE &MY_WIDTH& = ' '
        /:       PERFORM GET_BOX_SIZE IN PROGRAM Z_MY_PROG
        /:       CHANGING &MY_XPOS&
        /:       CHANGING &MY_YPOS&
        /:       CHANGING &MY_HEIGHT&
        /:       CHANGING &MY_WIDTH&
        /:       BOX XPOS '&MY_XPOS' MM  YPOS '&MY_YPOS' MM  HEIGHT '&MY_HEIGHT' MM WIDTH '&MY_WIDTH' MM INTENSITY 10 FRAME 0 TW
    In report u can write following code
    Form Get_Box_Size TABLES IN_PAR  STRUCTURE ITCSY
                             OUT_PAR STRUCTURE ITCSY.
         Loop at Out_Par.
              Case Out_Par-Name.
                   When 'MY_XPOS'.
                         Out_Par-Value = 100.
                   When 'MY_YPOS'.
                         Out_Par-Value = 57.
                   When 'MY_HEIGHT'.
                         Out_Par-Value = 300.
                   When 'MY_WIDTH'.
                         Out_Par-Value = 'Does it matter?'.
              EndCase.
              Modify Out_Par.
         EndLoop.
    EndForm.

Maybe you are looking for