Skip to main content

YCLASSICAL_JOINING

*&---------------------------------------------------------------------* *& Report  YCLASSICAL_JOINING *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT   yclassical_joining  NO   STANDARD   PAGE  HEADING                               LINE - SIZE   110                               LINE - COUNT   255                               MESSAGE - ID  z...

YINTERACTIVE_REPORT

*&---------------------------------------------------------------------*
*& Report  YINTERACTIVE_REPORT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  yinteractive_report1 NO STANDARD PAGE HEADING
                             
LINE-SIZE 60
                             
LINE-COUNT 255
                             
MESSAGE-ID zsan.

** T Y P E    D E C L A R A T I O N **
TYPES : BEGIN OF ty_mara,
         matnr 
TYPE matnr,
         ernam 
TYPE ernam,
         pstat 
TYPE pstat_d,
        
END OF ty_mara,

        
BEGIN OF ty_makt,
         matnr 
TYPE matnr,
         spras 
TYPE spras,
         maktx 
TYPE maktx,
        
END OF ty_makt.

** D A T A     D E C L A R A T I O N **
DATA : it_mara  TYPE STANDARD TABLE OF ty_mara,
       it_makt  
TYPE STANDARD TABLE OF ty_makt,
       wa_mara  
TYPE ty_mara,
       wa_makt  
TYPE ty_makt,
       gv_matnr 
TYPE mara-matnr.

** C O N S T A N T     D E C L A R A T I O N **
CONSTANTS : c_23  TYPE matnr VALUE '23',
            c_100 
TYPE matnr VALUE '100',
            c_eng 
TYPE spras VALUE 'E'.

** S E L E C T I O N    S C R E E N **
SELECTION-
SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-006.
SELECT-OPTIONS   : s_matnr FOR gv_matnr.
SELECTION-
SCREEN : END OF BLOCK b1.

INITIALIZATION.
  s_matnr-low  = c_23.                                      
"'23'.
  s_matnr-high = c_100.                                     
"'100'.
  
APPEND s_matnr.

START-
OF-SELECTION.
  
SELECT matnr   " Material Number
         ernam   
" Name of Person who Created the Object
         pstat   
" Maintenance status
  
FROM mara INTO TABLE it_mara
  
WHERE matnr IN s_matnr.
  
IF sy-subrc EQ 0.
    
SORT it_mara BY matnr.
    
SELECT matnr
           spras
           maktx
    
FROM makt INTO TABLE it_makt
    
FOR ALL ENTRIES IN it_mara
    
WHERE matnr = it_mara-matnr
    
AND   spras = c_eng.
    
IF sy-subrc NE 0.
      
MESSAGE s001(zsan). " No values found
      
LEAVE LIST-PROCESSING.
    
ENDIF.
  
ELSE.
    
MESSAGE s001(zsan). " No values found
    
LEAVE LIST-PROCESSING.
  
ENDIF.

END-OF-SELECTION.

* Now proceed for output.
  
LOOP AT it_mara INTO wa_mara.
    
AT FIRST.
      
ULINE.
      
WRITE:/1'|',  'Material Number'(001)     COLOR 1,  19'|',
                    
'Created By'(002)          COLOR 1,  32'|',
                    
'Maintenance status'(003)  COLOR 1,  60'|'.
      
ULINE.
    
ENDAT.
    
HIDE : wa_mara-matnr.
    
WRITE:/1'|', wa_mara-matnr,  19'|',
                 wa_mara-ernam,  32
'|',
                 wa_mara-pstat,  60
'|'.
    
ULINE.

    
AT LAST.
      
WRITE: 1'|''This is the end of report'(004), 60'|'.
      
ULINE.
    
ENDAT.

  
ENDLOOP.

AT LINE-SELECTION.   " Intaractive Events

* Now proceed for output of MAKT.
  
READ TABLE it_makt INTO wa_makt WITH KEY matnr = wa_mara-matnr.
  
ULINE.
  
WRITE:/1'|',  'Material Number'(001)     COLOR 3,  19'|',
                
'Material Desc'(003)       COLOR 3,  60'|'.
  
ULINE.
  
WRITE:/1'|', wa_makt-matnr,  19'|',
               wa_makt-maktx,  60
'|'.
  
ULINE.



BASHAR RABBANI

Comments

Popular posts from this blog

What is ABAP Workbench?

What is ABAP Workbench? ABAP Workbench is a collection of tools you use to develop, test and run ABAP programs.In SAP ,we are using ABAP Workbench to develop standard and custom applications and also within the ABAP Workbench ,we are creating reports ,printing forms ,data entry and general programming .Workbench has the following tools . All tools in the ABAP Workbench are integrated. When you work with the ABAP Workbench, you work with development objects and packages. Development objects are the individual parts of an ABAP application. Development objects are: Programs: reports, transactions, and function modules Program components: events, screens, menus, and function modules Objects that programs can share: database fields, field definitions, and program messages. The SAP system stores development objects in the Repository, which is a part of the database. When you complete your work on a development object, you generate a run time version of the object. In a sta...

ALV Field Catalog in SAP ABAP

ALV Field Catalog in SAP ABAP Field Catalog Field catalog is an internal table which is used to pass a list of fields to display in ALV report, we can set different properties to fields that will be display in ALV output. Type Group It is a data dictionary object which contains all the reusable user-defined types. Example for a type group is SLIS, which contains all the user-defined types for developing ALV reports. TYPE-POOLS is a keyword which is used to assign the type-group to a ALV report . Syntax : TYPE-POOLS SLIS . DATA : <IT_FCAT> TYPE SLIS_T_FIELDCAT_ALV . "INTERNAL TABLE FOR FIELD CATALOG DATA : <WA_FCAT> TYPE SLIS_FIELDCAT_ALV . " WORK AREA FOR FIELD CATLOG Field catalog types Field catalog: Field catalog is a format description of the display area. There are three procedures to build a FIELD CATALOG. 1. Automatic field catalog. 2. Semi-automatic field catalog. 3. Manual field catalog. Automatic field catalog. If the list structure has ...

How to Create SAP ABAP Query Using SQ01 Step by Step Guide

How to Create SAP ABAP Query Using SQ01 Step by Step. You can create ABAP query objects ,if they are not exist in the SAP system. You can create SAP query without  ABAP programming knowledge. ABAP Query provides users with a variety of ways to define and create different types of  reports , such as  Basic Lists ,  Stats , and  Sorted Lists . ABAP query consists of four elements: Queries InfoSets Groups Translation query Queries The query component is used by end users for Queries. You can create queries, change and queries executed. Transaction  SQ01. Trnslation component / QUERY Many texts to define queries, InfoSets and user groups are generated. These texts are displayed in the language we choose to access the SAP system. We can compare the text or languages ​​that use this component. InfoSets InfoSets are the views of the Special Data Sources. An InfoSet Describes the fields of a data source that can be reported in the q...