Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

sap scripts

Former Member
0 Kudos

hi mates...

iam getting an error while ececuting driver prob...

this is the error iam getting "elment main window main is not defined for the form xyz"...

here is my logic

DATA: BEGIN OF wa_lfa1,

lifnr TYPE lifnr,

name1 TYPE name1_gp,

land1 TYPE land1_gp,

ort01 TYPE ort01_gp,

END OF wa_lfa1.

DATA: t_lfa1 LIKE STANDARD TABLE OF wa_lfa1.

DATA: s_lifnr TYPE lifnr.

SELECT-OPTIONS: v_lifnr FOR s_lifnr.

SELECT lifnr

name1

land1

ort01 FROM lfa1 INTO TABLE t_lfa1

WHERE lifnr IN v_lifnr .

CALL FUNCTION 'OPEN_FORM'

EXPORTING

FORM = 'ZABHI_FORM1'

LANGUAGE = SY-LANGU.

LOOP AT T_LFA1 INTO WA_LFA1.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'MAIN'

WINDOW = 'MAIN'.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'ADDRESS'

WINDOW = 'ADDRESS'.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'LOGO'

WINDOW = 'LOGO'.

ENDLOOP.

CALL FUNCTION 'CLOSE_FORM'.

1 ACCEPTED SOLUTION

former_member585060
Active Contributor
0 Kudos

Have you defined Text element "MAIN" in the ZABHI_FORM1 form.

7 REPLIES 7

former_member585060
Active Contributor
0 Kudos

Have you defined Text element "MAIN" in the ZABHI_FORM1 form.

0 Kudos

elements main,logo n address is defined in the layout but still m getting "element address window address is not defined forform xyx"

0 Kudos

Hi,

Write the WRITE_FORM function modules for ADDRESS and LOGO windows outside loop and endloop.

regards

Bala Krishna

0 Kudos

AFETR EXECUTION LOGOIS DISPLAYED N ADDRESS IS DISPLAYED BUT IN MAIN WINDOW RECORDS ARE NOT DISPLAYED..BUT WHEN DEBUGGING M GETTING THE RECORDS IN TO TABLE..

0 Kudos

How you gave the variables in the Main window,

declare as below

/E MAIN

P1 &WA_LFA1-LIFNR&,,&WA_LFA1-NAME1_GP&,, .....

Regards

Bala Krishna

Edited by: Bala Krishna on Dec 22, 2008 1:26 PM

Former Member
0 Kudos

hi,

try using start form after open form

CALL FUNCTION 'OPEN_FORM'

EXPORTING

FORM = 'ZABHI_FORM1'

LANGUAGE = SY-LANGU.

CALL FUNCTION 'START_FORM'

EXPORTING

  • ARCHIVE_INDEX =

FORM = 'ZABHI_FORM1'

  • LANGUAGE = ' '

  • STARTPAGE = 'X'

PROGRAM = 'progname here' "write prg name here

.

IF SY-SUBRC <> 0.

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

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

ENDIF.

thanks

0 Kudos

SAME ERROR IAM GETTING