Sap Scripts 1. Program To Print The Material Detail For Given Material Number With Company and Customer Details. Creating Windows in Se71
Sap Scripts 1. Program To Print The Material Detail For Given Material Number With Company and Customer Details. Creating Windows in Se71
CODING:
REPORT ZSAP_SCRIPT_DEMO.
types: begin of ty_mara,
matnr type matnr,
mtart type mtart,
matkl type matkl,
meins type meins,
end of ty_mara.
data: it_mara type TABLE OF ty_mara,
wa_mara type ty_mara.
parameters:
select matnr mtart matkl meins from mara into CORRESPONDING FIELDS OF TABLE it
_mara
= 'X'
= 'ZSAP_SCRIPT_1 '
= SY-LANGU
=
=
=
=
=
=
=
=
=
=
=
=
1
2
3
4
5
6
7
8
9
10
11
12
=
=
=
=
'ELE1'
'SET'
'BODY'
'MAIN'
=
=
=
=
=
=
=
=
=
=
1
2
3
4
5
6
7
8
9
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.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT
=
RDI_RESULT
=
TABLES
OTFDATA
=
EXCEPTIONS
UNOPENED
= 1
BAD_PAGEFORMAT_FOR_PRINT
= 2
SEND_ERROR
= 3
SPOOL_ERROR
= 4
CODEPAGE
= 5
OTHERS
= 6
.
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.
ELSE.
WRITE: / 'DATA IS NOT ABLE TO PRINT'.
ENDIF.
ENDIF.
*
*
*
*
*
*
*
*
*
*
*
*
OUTPUT: