Application Development and Automation 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: 
Read only

header text in main window

Former Member
0 Likes
676

Hi all,

I am doing a sap script in main window i have created the two text element one for header  and other for the line items data i dont know how to call in abap pgm write_form

In main window i have created the text elements two in main window

/E7 MAterial Desc matnr like that

E8

Line item tables

how to call this in main window

When i making calll

loop at it_final into wa_final

   CALL FUNCTION 'WRITE_FORM'

   EXPORTING

      ELEMENT                        = 'E7'

      WINDOW                         = 'MAIN'

ENdloop.



material  desc  is getting repeated

with that line item how to resolve this



With thanks ,

Maha.

Hi all,

I am doing a sap script in main window i have created the two text element one for header  and other for the line items data i dont know how to call in abap pgm write_form

In main window i have created the text elements two in main window

/E7 MAterial Desc matnr like that

E8

Line item tables

how to call this in main window

When i making calll

loop at it_final into wa_final

   CALL FUNCTION 'WRITE_FORM'

   EXPORTING

      ELEMENT                        = 'E7'

      WINDOW                         = 'MAIN'

ENdloop.



material  desc  is getting repeated

with that line item how to resolve this



With thanks ,

Maha.

3 REPLIES 3
Read only

VenkatRamesh_V
Active Contributor
0 Likes
634

Hi Mahalakshmi,

Hope it Helpful.

Check your itab entries containing Material Description Repeated or Not.

Eg:

two Internal table One containing Material and Description and another internal table containing Material and location.

loop at itab_mat into wa_mat.

   CALL FUNCTION 'WRITE_FORM'

   EXPORTING

      ELEMENT                        = 'E7'

      WINDOW                         = 'MAIN'


read table it_mat_loc into wa_mat_loc with key matnr EQ wa_mat-matnr.

if sy-subrc = 0.

   CALL FUNCTION 'WRITE_FORM'

   EXPORTING

      ELEMENT                        = 'E8'

      WINDOW                         = 'MAIN'

endif.

endloop.

Regards,

Venkat.

Read only

vamsilakshman_pendurti
Active Participant
0 Likes
634

Hi Mahalakshmi

If u want to print Header and item data using Main window in script we need to use text elements ...with a function module write_form

for each material we have multiple items ...

so we need to use control level statements...

Like AT NEW <Field1> use this statement in main loop and then loop the item table with each material doc number and print item data using FM

call function 'WRITE_FORM'

   exporting

      element    = 'E8'

      window     = 'MAIN'

Do this it will help you

Thanks ,

Vamsi.

Read only

0 Likes
634

I got it .