‎2008 Feb 04 8:38 AM
Hi to all,
I need to draw a table in my script requirement.iam unable to get.pls help me that the table should consists of 1 row and 10 columns.
if use full full points..........urgent...
Thanks and regards,
loki
‎2008 Feb 04 8:43 AM
Hi,
in script you have to use BOX command to draw table..
that is draw vertical N horizontal line to do so..
BOX XPOS 0 MM YPOS 0 LN WIDTH 172 MM HEIGHT 80 MM FRAME 5 TW
BOX XPOS 0 MM YPOS 0 LN WIDTH 172 MM HEIGHT 10 MM FRAME 5 TW
BOX XPOS 30 MM YPOS 0 LN WIDTH 0 MM HEIGHT 80 MM FRAME 5 TW
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
Reward if helpful..
Gaurav J.
Edited by: GAURAV on Feb 4, 2008 9:53 AM
‎2008 Feb 04 8:41 AM
In Script select windows and go to edit ---> create element -
> window name and description. And in the page window created go for create element and enter the fields you require to print &<internaltablename>-<fieldname>&
and in the print program: (following program accepts kunnr and prints address)
REPORT ZP.
TABLES: KNA1.
SELECT-OPTIONS: S_CUSTNO FOR KNA1-KUNNR.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZPFORM1'
LANGUAGE = SY-LANGU.
SELECT * FROM KNA1 WHERE KUNNR IN S_CUSTNO.
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZPFORM1'
LANGUAGE = SY-LANGU
STARTPAGE = 'PAGE1 '
PROGRAM = 'ZP'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'XYZ'
WINDOW = 'ADDRESS'.
CALL FUNCTION 'END_FORM'.
ENDSELECT.
CALL FUNCTION 'CLOSE_FORM'.
‎2008 Feb 04 8:43 AM
Hi,
in script you have to use BOX command to draw table..
that is draw vertical N horizontal line to do so..
BOX XPOS 0 MM YPOS 0 LN WIDTH 172 MM HEIGHT 80 MM FRAME 5 TW
BOX XPOS 0 MM YPOS 0 LN WIDTH 172 MM HEIGHT 10 MM FRAME 5 TW
BOX XPOS 30 MM YPOS 0 LN WIDTH 0 MM HEIGHT 80 MM FRAME 5 TW
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
Reward if helpful..
Gaurav J.
Edited by: GAURAV on Feb 4, 2008 9:53 AM
‎2008 Feb 04 8:52 AM
hi,
I am unable to get a table pls provide me the table with values...
Thanks
loki
‎2008 Feb 04 9:01 AM
See do it like this
go to se 71----> create your form
goto layout------>main window
then do this...
/: BOX XPOS 0 MM YPOS 0 MM WIDTH 176 MM HEIGHT 128 MM FRAME 5 TW
/: BOX XPOS 0 MM YPOS 0 MM WIDTH 176 MM HEIGHT 10 MM FRAME 5 TW
/: BOX XPOS 10 MM YPOS 0 LN WIDTH 0 MM HEIGHT 128 MM FRAME 5 TW
/: BOX XPOS 35 MM YPOS 0 LN WIDTH 0 MM HEIGHT 128 MM FRAME 5 TW
/: BOX XPOS 45 MM YPOS 0 LN WIDTH 0 MM HEIGHT 128 MM FRAME 5 TW
/: BOX XPOS 99 MM YPOS 0 LN WIDTH 0 MM HEIGHT 128 MM FRAME 5 TW
/: BOX XPOS 119 MM YPOS 0 LN WIDTH 0 MM HEIGHT 128 MM FRAME 5 TW
/: BOX XPOS 144 MM YPOS 0 LN WIDTH 0 MM HEIGHT 128 MM FRAME 5 TW
/E DETAIL_TXT
P8 ,,Item,,Quantity,,Unit,,Description,,unit price,,
= Delivered,,Amount
P8 ,,no,,ordered,,,,,,,,quantity,,<C4>(&wa_header-stwae&)
= </>
P8
/E DETAIL_DATA
/: PROTECT
P9 ,,&wa_Temp-posnr(Z)&,,&wa_temp-fkimg(C)&,,&wa_temp-meins&,,
= &wa_temp-matnr&,,,,&wa_temp-fkimg(C)&,,&wa_temp-netwr(C)&
PP ,,&wa_temp-arktx(25)&
/: IF NOT V_ARKTX IS INITIAL
PP ,,&v_arktx&
/: ENDIF
PP ,,Delivery no:&wa_header-Vbeln_dilv(C)&
PP ,,Sale order no:&wa_temp-aubel(C)&
PP ,,PO number:&wa_temp-bstnk_vf(C)&
PP ,,Commodity code:
PP ,,Country of origin:&wa_header-landx(C)&
PP ,,Preference:
/: ENDPROTECT
/E DETAIL_TOTAL
/: BOTTOM
/: PROTECT
/: &ULINE&
PT ,,GOODS TOTAL,,&V_total(C)&
in your calling prog do this
END-OF-SELECTION.
sort it_header by vbeln.
sort it_detail by vbeln posnr.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'Z11GAURAV_INVO2'
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 IT_DETAIL INTO WA_DETAIL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'DETAIL_BOX'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
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.
v_total = v_total + wa_detail-netwr.
WA_TEMP = WA_DETAIL.
AT NEW VBELN.
READ TABLE IT_header INTO WA_header WITH KEY VBELN = WA_DETAIL-VBELN
BINARY SEARCH.
ENDAT.
Move wa_detail-arktx+25(15) to V_arktx.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'DETAIL_TXT'
FUNCTION = 'SET'
TYPE = 'TOP'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
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.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'DETAIL_DATA'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
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.
AT END OF VBELN.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'DETAIL_TOTAL'
FUNCTION = 'SET'
TYPE = 'BOTTOM'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
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.
clear v_total.
ENDAT.
ENDLOOP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
************************************************************************
&----
*& Form IT_TAB_POPULATE
&----
text
----
--> p1 text
<-- p2 text
----
form IT_TAB_POPULATE .
*populating header internal table....
select vbeln
zterm
inco1
land1
regio
counc
cityc
bukrs
ernam
erdat
kunrg
kunag
stceg
bstnk_vf
xblnr
zuonr
stwae into table it_header
from Vbrk
where vbeln in s_vbeln.
if sy-subrc = 0.
sort it_header by vbeln.
endif.
if not it_header is initial.
Loop at it_header into wa_header.
select single kunnr
LAND1
name1
name2
ort01
stras
adrnr
pstlz into (wa_header-kunag, wa_header-Land,
wa_header-name1, wa_header-name2, wa_header-ort01, wa_header-stras,
wa_header-adrnr, wa_header-pstlz)
from Kna1
where kunnr = wa_header-kunag.
select EXPVZ
BEZEI into (wa_header-expvz, wa_header-bezei)
up to 1 rows from T618T
where spras = sy-langu
and land1 = wa_header-land.
endselect.
select single butxt into wa_header-butxt from T001 where bukrs =
wa_header-bukrs.
select single Vbeln into wa_header-Vbeln_dilv from VBFA where
Vbelv = wa_header-xblnr
and vbtyp_n = CC_J.
Select single Landx into wa_header-Landx from T005T where
Spras = sy-langu
and Land1 = wa_header-land1.
MODIFY it_header from wa_header.
endloop.
endif.
sort it_header by vbeln.
if not it_header[] is initial.
data: v_posnr type posnr value '10'.
select vbeln
posnr
fkimg
meins
netwr
matnr
arktx
charg
aubel into table it_detail
from Vbrp
FOR ALL ENTRIES IN IT_HEADER
WHERE VBELN = IT_HEADER-VBELN.
if sy-subrc = 0.
sort it_detail by vbeln posnr.
do 3 times.
wa_detail-vbeln = wa_header-vbeln.
v_posnr = v_posnr + 10.
wa_detail-posnr = v_posnr .
append wa_detail to it_detail.
enddo.
endif.
endif.
endform. " IT_TAB_POPULATE
REWARD IF USEFUL
GAURAV J>
‎2008 Feb 04 8:51 AM
hi lokanadhan k
for one row and 10 column use this code
STEP 1) see the box width and height and then code accordingly
FOR BOX FRAME
BOX WIDTH '189' mm height '133' mm Frame 10 Tw
FOR VERTICAL LINE
BOX XPOS '11 mm' width 0 TW Height '7.2' mm FRAME 5 TW
FOR HORTIZONTAL LINE
BOX XPOS '11 mm' width '7.2' mm Height 0 TW FRAME 5 TW
now code accordingly as per your requirement changing the dimensions as per your need.
reward points if useful
rohan