cancel
Showing results for 
Search instead for 
Did you mean: 

Passing data into BOX of a script

Former Member
0 Kudos

Hi ,

I have designed one script and in that i have created a BOX .

In print the BOX is displaying . I want to pass some data ( some variable )into that BOX . How can i do that .

Regards

Sarmistha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can achive it by giving dynamically in SE71 screen.

eg:

ADDRESS

/: BOX FRAME '10' TW

/: ADDRESS

/: TITLE &ITAB-ANRED&

/: NAME &ITAB-NAME1&

/: STREET &ITAB-STRAS&

/: POBOX &ITAB-PFACH&

/: CITY &ITAB-ORT01&

/: POSTCODE &ITAB-PSTLZ&

/: COUNTRY &ITAB-LAND1&

/: REGION &ITAB-REGIO&

/: FROMCOUNTRY &ITAB-LAND1&

/: ENDADDRESS

FOOTER

/* footer

/: INCLUDE ZS_TEXT OBJECT TEXT ID ST LANGUAGE EN

/: BOX FRAME '10' TW

/: DEFINE &V_NAME1& = 'PRINT PROGRAM'

/: DEFINE &V_NAME2& = ' '

/: PERFORM SUB_NAME IN PROGRAM ZS_SCRIPT04

/: USING &V_NAME1&

/: CHANGING &V_NAME2&

/: ENDPERFORM

P2 &V_NAME2&

  • THIS IS <C1>&ITAB-KUNNR&</> INFORMATION

GRAPH1

/: BITMAP 'ENJOY' OBJECT GRAPHICS ID BMAP TYPE BCOL

MAIN

/* THIS IS CUSTOMER INFORMATION

/: BOX FRAME '10' TW

/: TOP

  • ,,SALES DOCUMENT,,CREATION DATE,,DOCUMENT TYPE,,NETVALUE RATE

/: ENDTOP

Element ITEM DATA

/: BOX XPOS '16.0' CH WIDTH '0' CH HEIGHT '50.0' LN FRAME '10' TW

/: BOX XPOS '30.0' CH WIDTH '0' CH HEIGHT '50.0' LN FRAME '10' TW

/: BOX XPOS '44.0' CH WIDTH '0' CH HEIGHT '50.0' LN FRAME '10' TW

  • ,,&ITAB-VBELN&,,&ITAB-ERDAT&,,&ITAB-AUART&,,&ITAB-NETWR&

Thanks and regards,

Sarada

Former Member
0 Kudos

Hi,

Thanks for replying.

I have one doubt ..which is the textelemet for the below mentioed example . I thnk ADDRESS is the window name .

eg : ADDRESS

/: BOX FRAME '10' TW

/: ADDRESS

/: TITLE &ITAB-ANRED&

/: NAME &ITAB-NAME1&

/: STREET &ITAB-STRAS&

/: POBOX &ITAB-PFACH&

/: CITY &ITAB-ORT01&

/: POSTCODE &ITAB-PSTLZ&

/: COUNTRY &ITAB-LAND1&

/: REGION &ITAB-REGIO&

/: FROMCOUNTRY &ITAB-LAND1&

/: ENDADDRESS

regards

sarmistha

Former Member
0 Kudos

Address is a command

It automatically formats the the address based on country rules

Former Member
0 Kudos

Hi,

i have data in 3 fileds of an internal table .. i want to pass those filelds of internal table into the box .

so that the data should be diplayed in the BOX .

regards

sarmistha

Former Member
0 Kudos

Make sure the X and Y co-ordinates of the box are equal to the window in which you are printing the the three variabes. You can then adjust the position of the box according to the data you are printing ..later

Former Member
0 Kudos

Still i am confused ...

i hav an internal table of the format .

types: begin of t_vbap,

posnr type posnr_va,

matnr type matnr,

arktx type arktx,

kwmeng type kwmeng,

vrkme type vrkme,

end of t_vbap.

data: it_vbap type standard table of t_vbap with header line.

i want to dislpa the data in the body of the main window in side a BOX .so i have craeted a text element named "BODY" and in side that i am passing the internal table fileds to dipalsy data .

now i want to pass these internal table fileds inside a BOX of that same textelement " BODY" which i am calling from the print programme.

can you please tell me some demo code for this ..

regards

sarmistha

Former Member
0 Kudos

Dont print your box inside main window

Put it in a separate window outside Main

sow

for eg

Window BOX

BOX YPOS '0.0' CM WIDTH '14.4' CM HEIGHT 10.7' CM FRAME 0 TW INTENSITY 10

try and keep the x and y positions of the box a little less than the Main Window

now you can loop at your BODY elemet to print the line items

inside main window

Former Member
0 Kudos

Thanks,

I did as per u said ....created one new window with name "BOX" there i wrote the command for BOX like this :/: BOX YPOS '0.0' CM WIDTH '14.4' CM HEIGHT 10.7' CM FRAME 0 TW INTENSITY 1

the window i make smaller than the main window also ..

in main window in the text element "BODY" i paased the intrnal table filed.

when i execited the print program only the internal table data is being displayed .box is not displayed in print .

regards

sarmistha

Former Member
0 Kudos

are you calling the window in your driver program?

Former Member
0 Kudos

I am only calling the main window in the driven programme , not the BOX window where i hav written command for creating box.

One thing if i hav to call the BOX window in the driven programme ,then as there is no text element in the BOX window so how can i call that window in the driver programme.

regards

sarmisatha

Former Member
0 Kudos

you dont need a text elemnt

it is an option field in WRITE_FORM

Call it atleast once pls

Former Member
0 Kudos

May be i am disturbing u much ..sorry for that ...

i have called the BOX window in the driven programme before calling the MAIN window .

still the box is not displayed.... am i missing some thing..

regards

sarmistha

che_eky
Active Contributor
0 Kudos

Hi,

Its better to print your box from the MAIN window not from a separate window. Therefore move your command to print the box to the top of the main window:

BOX YPOS '0.0' CM WIDTH '14.4' CM HEIGHT 10.7' CM FRAME 0 TW INTENSITY 10

Former Member
0 Kudos

Its my fault I apologise

use this box statemnt

i missed out a '

BOX YPOS '0.0' CM WIDTH '14.4' CM HEIGHT '10.7' CM FRAME 1 TW

Former Member
0 Kudos

If you print your box inside main window then

everytime data flows to a new page it will not print auotmatically

So i said to move it out of Main Window

Answers (1)

Answers (1)

Former Member
0 Kudos

The Box and your data are indpendent of each other.

Once you print the box, You have to align your data accordingly so that

they appear inside the box.

A good way is to have your box the size of the Main window, so everytime the data overflows into the next page that is where the box ends too

The Box shoudl be outside Main Window