Thursday, April 10, 2014
Wednesday, April 9, 2014
BW - Open Hub
The open hub destination is the object that allows you to distribute data from a BI system to non-SAP data marts, analytical applications, and other applications. It ensures controlled distribution across multiple systems.
You can use the data transfer process to update data to the open hub destination. This involves transforming the data. Not all rule types are available in the transformation for an open hub destination: Reading master data, time conversion, currency translation, and unit conversion are not available.
ABAP - if sy-subrc = 0 and IF NOT < Fieldname> IS INITIAL
if sy-subrc = 0
Sy-subrc is a system variable. It will be indicate whether a particular ABAP is executed successfully or failed.
IF NOT < Fieldname> IS INITIAL
IF that fieldname has some value then the condition is true.
Sy-subrc is a system variable. It will be indicate whether a particular ABAP is executed successfully or failed.
IF NOT < Fieldname> IS INITIAL
IF that fieldname has some value then the condition is true.
ABAP - INTO CORRESPONDING FIELDS OF TABLE
PARAMETERS p_city TYPE spfli-cityfrom.
TYPES: BEGIN OF entry_tab_type,
carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
END OF entry_tab_type.
TYPES: BEGIN OF result_tab_type,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
fldate TYPE sflight-fldate,
END OF result_tab_type.
DATA: entry_tab TYPE TABLE OF entry_tab_type,
result_tab TYPE SORTED TABLE OF result_tab_type
WITH UNIQUE KEY carrid connid fldate.
SELECT carrid connid
FROM spfli
INTO CORRESPONDING FIELDS OF TABLE entry_tab
WHERE cityfrom = p_city.
IF entry_tab IS NOT INITIAL.
SELECT carrid connid fldate
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE result_tab
FOR ALL ENTRIES IN entry_tab
WHERE carrid = entry_tab-carrid AND
connid = entry_tab-connid.
ENDIF.
TYPES: BEGIN OF entry_tab_type,
carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
END OF entry_tab_type.
TYPES: BEGIN OF result_tab_type,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
fldate TYPE sflight-fldate,
END OF result_tab_type.
DATA: entry_tab TYPE TABLE OF entry_tab_type,
result_tab TYPE SORTED TABLE OF result_tab_type
WITH UNIQUE KEY carrid connid fldate.
SELECT carrid connid
FROM spfli
INTO CORRESPONDING FIELDS OF TABLE entry_tab
WHERE cityfrom = p_city.
IF entry_tab IS NOT INITIAL.
SELECT carrid connid fldate
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE result_tab
FOR ALL ENTRIES IN entry_tab
WHERE carrid = entry_tab-carrid AND
connid = entry_tab-connid.
ENDIF.
ABAP - User Exit
The SAP enhancement RSAP0001 is
available if you want to fill fields that you have added to the extraction
structure of a DataSource as an append structure.
This enhancement is made up of
the following enhancement components:
EXIT_SAPLRSAP_001 - Transactional Data
EXIT_SAPLRSAP_002 - Master Data (ATTR)EXIT_SAPLRSAP_003 - Master Data (TEXT)
EXIT_SAPLRSAP_004 - Hierarchies.
The User Exits get executed at the time that the InfoPackage is executed for extraction of data, after the standard content DataSource extraction has completed. Therefore, the process will fill the extraction structure for standard content first, then update the structure after that, before sending data over to BW.
The existing fields alongwith their values are stored in the internal table C_T_Data which is to be further modified to also include and populate values for the newly enhanced and added fields.
Tuesday, April 8, 2014
ABAP - Structure, Work Area and Internal Table
DATA : it_mara TYPE STANDARD TABLE OF mara.
DATA : wa_mara LIKE LINE OF it_mara.
OR
DATA : wa_mara TYPE mara.
Notes:
If you declare an internal table with "WITH HEADER LINE" clause the internal table itself acts as a work area. For example, your ITAB is a work area and ITAB[] is the internal table.
Whereas work area is a variable declared with the TYPE of an internal table or a database table. It can store only one record at a time. When you read an internal table (without header line) the line which you read must be moved somewhere, it is moved into a work area.
The area where this record is kept is called as work area for the internal table. The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line. Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
Internal table is a temporary two dimensional memory structure similar to database table. We can store multiple records in the internal table and also using record pointers we can do the activities such as reading, appending, deleting, modifying etc.
A structure (structured type) comprises components (fields). Types are defined for the components A component can refer to an elementary type (via a data element or by directly specifying the data type and length in the structure definition), another structure or a table type. A structure can therefore be nested to any depth.
There are Flat, nested and deep structures. A flat structure only references elementary types. A nested structure references at least one further structure, but not a table type. A deep structure references at least one table type.
Subscribe to:
Posts (Atom)