2016 Feb 11 3:38 PM
Hello Gurus,
¿Do you know what is the meaning of the content in the red rectanble?, how does it Works?
Thanks
2016 Feb 12 4:34 AM
Hi Enrique,
* As in like Reports,We cannot use LOOP Statements in Script forms.So,Instead we use Text Elements to loop the data from internal table which is being passed from Driver program.
* /E is the SAP Script form TAG Columns..It is used to Represent Text Elements.
For Example:
/E ELE
&wa-f1& &wa-f2& ....
/E ELE2
&wa2-f1& &wa2-f2&
* Here ELE , ELE2 are Text Elements...
* After This ,we need to pass the text elements to WRITE_FORM Function module in the driver program
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ELE'
function = 'SET'
type = 'BODY'
window = 'MAIN'
* IMPORTING
* PENDING_LINES =
* 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.
* Implement suitable error handling here
ENDIF.
*******************************************************
NOTE : If you want to access internal table values in the script form you have to call WRITE_FORM
With in LOOP of that particular internal table.
Hope you understand...
Regards,
Rohan
Hello Gurus,
¿Do you know what is the meaning of the content in the red rectanble?, how does it Works?
Thanks
2016 Feb 11 3:44 PM
2016 Feb 11 4:25 PM
Is text element. You can call it in program driver for example with the follow instruction: PERFORM w_f USING 'WERVSMAT' 'SET' 'MAIN'. "main is window
2016 Feb 12 2:39 AM
Elements are used to group a related information to print in the script. Sample code in your driver program to call the specified element:
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'NEXTPAGE'
WINDOW = 'NEXTPAGE'
EXCEPTIONS
OTHERS = 01.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'REFERENCE'
WINDOW = 'REFERENC'
EXCEPTIONS
OTHERS = 01.
2016 Feb 12 4:34 AM
Hi Enrique,
* As in like Reports,We cannot use LOOP Statements in Script forms.So,Instead we use Text Elements to loop the data from internal table which is being passed from Driver program.
* /E is the SAP Script form TAG Columns..It is used to Represent Text Elements.
For Example:
/E ELE
&wa-f1& &wa-f2& ....
/E ELE2
&wa2-f1& &wa2-f2&
* Here ELE , ELE2 are Text Elements...
* After This ,we need to pass the text elements to WRITE_FORM Function module in the driver program
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ELE'
function = 'SET'
type = 'BODY'
window = 'MAIN'
* IMPORTING
* PENDING_LINES =
* 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.
* Implement suitable error handling here
ENDIF.
*******************************************************
NOTE : If you want to access internal table values in the script form you have to call WRITE_FORM
With in LOOP of that particular internal table.
Hope you understand...
Regards,
Rohan
2016 Feb 16 2:52 PM
Thanks for answer, I understand your reply, but I dont understand the sapscript I haven been given, all start at MB90 to print MIGO, I fill the required fields finally run the report and it jumps to a text element, I dont know how it jumps. I attach the images.
2016 Feb 16 3:02 PM
already answered it before! Sapscript elements are called with a specific order expressed in the printing program which retrieve data and manage the sapscript itself.
Check out My first SAP Script step by step - ABAP Development - SCN Wiki
or
2016 Feb 16 11:10 PM
Thanks for all the answer, I did this:
1) Went to table TNAPR and got the program driver SAPM07DR,
2) I debug the program and I found the text element WE3VERBRMAT I was looking for, it's in hardcode
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |