cancel
Showing results for 
Search instead for 
Did you mean: 

Layout - not recognize the element when i call the function write_form

Former Member
0 Kudos

Hi experts,

I got a layout(se71) that not recognize the element that i add in the MAIN window when i call the layout from a program.

what could it be?

i add the element in se71.

any help will be appreciated.

Michal.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have you define the element as

/E test

???

Regards,

Ranjitha

Former Member
0 Kudos

Yes' i did define it as Element.

Answers (5)

Answers (5)

Former Member
0 Kudos

it my mistake - i pass the wrong request number in css1.

thank you very much for your help.

i really apreciate it.

Former Member
0 Kudos

Hi,

Kindly paste the code of both Print Program & in the Form where u r calling..

Rgds,

Pavan

former_member196280
Active Contributor
0 Kudos

Go through the below code, it has an element. It may help you to close the thread.

Here the code works this way the YORIGIN is incremented by 0.6CM each time it is in the loop thus drawing tables dynamically.

/E TAB
/: POSITION XORIGIN '0.9' CM YORIGIN '+0.6' CM
/: SIZE WIDTH '3.0' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '3.9' CM
/: SIZE WIDTH '7.3' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '11.2' CM
/: SIZE WIDTH '2.8' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '14' CM
/: SIZE WIDTH '2.6' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '16.6' CM
/: SIZE WIDTH '3.2' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW
P4 &X_VBAP-KWMENG(C)&,,&X_VBAP- ARKTX&,,&V_TOTALa&,,&V_TOTALb&,,&V_TOTALc&



the driver program's piece of code.



LOOP AT it_vbap INTO x_vbap.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TAB'
window = 'MAIN'
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.

ENDLOOP.

Regards,

SaiRam

Former Member
0 Kudos

Hi!

the write form that u are calling should be as below....


CALL FUNCTION 'WRITE_FORM'
   EXPORTING
      element                  = 'ELEMENT'
      window                   = 'MAIN'
    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 'MAIN window not called properly'(006) TYPE 'E'.
  ENDIF.                               " IF SY-SUBRC NE 0

in the layout see if the code there with data element is proper as...

/E ELEMENT

  • &var&

Also this write_form FUNCTION MODULE should be called b/w OPEN_FORM and CLOSE_FORM Function Modules.

Regards

Former Member
0 Kudos

quite unclear what exactly your problem is, or where the error happens.

Former Member
0 Kudos

it happend from the driver program - there i call to element that he said that its not found

and in the layout i did write this element.

and i dont know what to do?!

thank you .