Skip to Content
author's profile photo Former Member
Former Member

sap scripts

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'.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 22, 2008 at 07:06 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 07:19 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.