Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Output problem in SAPScript

$
0
0

Dear gurus

 

I have created a SAPScript form  for PO.

 

I have created two windows as

 

HEADER

 

MAIN

 

Output of main is coming correct but HEADER window output is not coming correct .

In HEADER window , only last record which i used to fill in selection screen is coming.

in this window, only PO number 52 is displayed ,but i have entered range from 50 to 52.

 

Here's the code for the WRITE FM.

 

form write_form.

   CALL FUNCTION 'WRITE_FORM'
     EXPORTING
       ELEMENT  = 'HEADER'
*     FUNCTION = 'SET'
*     TYPE     = 'BODY'
       WINDOW   = 'HEADER'.
   IF SY-SUBRC <> 0.

   ENDIF.



   CALL FUNCTION 'WRITE_FORM'
     EXPORTING
       ELEMENT  = 'ITEM HEADER '
*     FUNCTION = 'SET'
*     TYPE     = 'BODY'
       WINDOW   = 'MAIN'.
   IF SY-SUBRC <> 0.

   ENDIF.


   loop at it_final into wa_final.
     CALL FUNCTION 'WRITE_FORM'
       EXPORTING
         ELEMENT  = 'ITEM LINE '
*       FUNCTION = 'SET'
*       TYPE     = 'BODY'
         WINDOW   = 'MAIN'.
     IF SY-SUBRC <> 0.

     ENDIF.
   endloop.

endform.                    "write_form

In this loop to MAIN window is working fine . But loop to HEADER window is not working correct.


Can anyone help me why this is happening to output of HEADER window.

Help?


Thanks


Regards

karan


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>