cancel
Showing results for 
Search instead for 
Did you mean: 

script form not showing data ????

Former Member
0 Kudos

hi experts,

i am working on sap scripts . i have created my own table zemp with suitable fields.

my problem is that i am not been able to fatch the data from that particular table to my address window on script form ....

all other text is showing on tha script...

but not the data in address window.

address window show like this

&zemp-zid&

&zemp-zname&....

not the values from internal table while the values are available and table is in active state...

program is given below......

REPORT ZSCRIPT_PROGRAM1.

TABLES : ZEMP.

SELECT-OPTIONS : CUSTNO FOR ZEMP-ZID.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

  • APPLICATION = 'TX'

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMS =

  • DEVICE = 'PRINTER'

  • DIALOG = 'X'

FORM = 'ZSCRIPT_1'

LANGUAGE = SY-LANGU.

SELECT * FROM ZEMP WHERE ZID IN CUSTNO .

CALL FUNCTION 'START_FORM'

EXPORTING

  • ARCHIVE_INDEX =

FORM = 'ZSCRIPT_1'

LANGUAGE = SY-LANGU

STARTPAGE = 'PAGE1'

PROGRAM = 'ZSCRIPT_PROGRAM1'.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

  • ELEMENT = ' '

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

WINDOW = 'ADDRESS'.

CALL FUNCTION 'END_FORM'

  • IMPORTING

  • RESULT =

  • EXCEPTIONS

  • UNOPENED = 1

  • BAD_PAGEFORMAT_FOR_PRINT = 2

  • SPOOL_ERROR = 3

  • OTHERS = 4

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDSELECT.

CALL FUNCTION 'CLOSE_FORM'

  • IMPORTING

  • RESULT =

  • RDI_RESULT =

  • TABLES

  • OTFDATA =

  • EXCEPTIONS

  • UNOPENED = 1

  • BAD_PAGEFORMAT_FOR_PRINT = 2

  • SEND_ERROR = 3

  • SPOOL_ERROR = 4

  • OTHERS = 5

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

use address endaddres..

/: ADDRESS [DELIVERY] [TYPE t] [PARAGRAPH a][ PRIORITY p] [LINES l]

/: TITLE form of address

/: NAME name1[, name2[, name3[,name4]]]

/: PERSON name of natural person [TITLE form of address]

/: PERSONNUMBER number of the person

/: DEPARTMENT department

/: STREET strno HOUSE house number

/: POBOX pobox [CODE code]

/: POSTCODE postal code

/: CITY city1[,city2]

/: REGION district

/: COUNTRY recipient country

/: FORMCOUNTRY sender country

/: ENDADDRESS

Parameter PRIORITY defines which address lines may be omitted, if necessary. The possible values are as follows :

A Form of address

B Mandatory blank line 1

C Mandatory blank line 2

2 Name2

3 Name3

4 Name4

L Country name

S Street line

O City line

The parameter LINES are available for formatting the address. Possible values are from 1 to n. If it is not possible to format all address data due to a lack of lines, the data which is entered in the parameter PRIORITY is omitted.

Mohamed_Mukhtar
Active Contributor
0 Kudos

hi,

Debug ur srcipt .......