Thursday, May 27, 2010

ABAP .. SELECT Statements

Select statements are used to fetch data from the database.
A simple statement can be written as

SELECT SINGLE * FROM MARA .

(MARA - Material Master Table)

If we need to give some condition, we can alter the query as

SELECT SINGLE * FROM MARA WHERE MATNR EQ ‘T-SHIRT’.

In case if you need to select more than one row, we should write the select statement

In SELECT …. END SELECT block


SELECT * FROM MARA INTO ITAB
WHERE MATNR LIKE ‘T-SHIRT%’.

* Here we should do the processing of the records fetched.
* Eg : APPEND ITAB

END SELECT.

ITAB Is the table declared of type MARA. Please note it should be with header line.

DATA : itab TYPE STANDARD TABLE OF mara WITH HEADER LINE.

So the program can be written as

*************************************************************
REPORT ZABAPTEST.

DATA : itab TYPE STANDARD TABLE OF mara WITH HEADER LINE.

SELECT * FROM mara INTO itab
WHERE matnr LIKE 'LN%'.
APPEND itab.
ENDSELECT.

LOOP AT itab.
WRITE : 'Matnr ', itab-matnr.
ENDLOOP.
*************************************************************

Now there is a second method of fetching via ARRAY FETCH. Which means that
All the database records will be fetched all together

SELECT * FROM MARA
INTO TABLE ITAB
WHERE MATNR LIKE ‘LN%’.

Note that there is no END SELECT block.

And the program can be written as

*************************************************************
REPORT ZABAPTEST.

DATA : itab TYPE STANDARD TABLE OF mara WITH HEADER LINE.

SELECT * FROM mara INTO TABLE itab
WHERE matnr LIKE 'LN%'.
LOOP AT itab.
WRITE : 'Matnr ', itab-matnr.
ENDLOOP.
*************************************************************

Of these two select statements, always try to use the second select statement. The first select statement will keep the database cursor open for a longer time till all the records are fetched from the database. The second select statement will do a single call to the database and in one stretch fetches all the records.

Thursday, May 13, 2010

Hasso On Hasso

A very interesting video where Hasso interviews Hasso

http://sapphirenow.com/video/hasso.html

Monday, January 11, 2010

SOA

Video which gives an introduction to SOA



SAP TV :What is Enterprise Service-Oriented Architecture?

Tuesday, August 5, 2008

Enterprise SOA

SOA

ABAP OO (ABAP Objects)

ABAP OO
=======

Object oriented programming can be implemented in ABAP also. All the concepts of OO is supported in ABAP.

Classes, Objects, Interfaces, Inheritance, Encapsulation, Polymorphism etc etc are some. Below mentioned links give information about these in details.


help.sap.com link for ABAP OO

http://help.sap.com/saphelp_nw70/helpdata/en/c3/225b5654f411d194a60000e8353423/frameset.htm


Some info from SDN

1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291

2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt

3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf

4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf

5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt

6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf

7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8

8) http://www.erpgenie.com/sap/abap/OO/index.htm

9) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm

ABAP Programming

Write about ABAP programming and some main features

SAP Apparel and Footwear

Fashion is one thing that will never stop changing, there are designs being churned out just about everyday, a new design needs to go through the entire cycle from design to development to delivery at the shortest time possible to make sure the market is still there for it, that’s how fast paced this industry is.

What more, with the complexity of having different customer demands from different regions and to match and satisfy this, it just makes the whole process more cumbersome and to say the least, close to creating a chaotic situation.

The many demands of the AFS industry places a crushing strain on the IT system that is to support it, which is why it is very important that the right IT System that can withstand this pressure is selected for the job.

With the general perception that any IT system that would cater to this requirement is likely to be complex too, let look at what SAP has to offer with its unique Apparel & Footwear solution.
First of all, we need to understand that SAP AFS Solutions in itself is a new addition comparatively to the other SAP Industry Solutions available. However, it is one of those solutions that have come through leaps and bound to cater to the requirement of an industry that demands a lot.

Take for example a NIKE T-Shirt which has 3 different fabrics, more than 3 colors, many NIKE swooshes (by the way this initially cost the NIKE Founders $35 to get it done) with an excellent finish to it, a cool hang tag, a stunning heat seal and of course, the price tag attached to it.

Remember, all these items in the Nike T-Shirts were miles apart from each other, perhaps in different continents to say the least, just maybe a few days before it arrived at the store.
Now imagine the amount of coordination and commitment that would have gone into producing this finished good, that’s where SAPs AFS Solution comes into the picture.

The SAP AFS Solution provides the right tools to manage your entire supply chain from the initial purchasing of raw material to the final delivery of the finished product.

It supports the large amount of transaction processing in the system that is only normal in this industry. The Bill of Material would have at least a 6 level hierarchy for a simple one piece garment with no designs or maybe even no buttons, I’ll let it to your imagination to guess the structure of a BOM for the Nike T-Shirt mentioned above.

SAP’s AFS Solution helps in maintaining the right on time coordination with suppliers and customers, the different agreements laid out with them and the most effective purchasing and payment integration methods.

It is also of utmost importance that the right planning tool is made available in this environment so that production and procurement are done right on time to meet the deadlines, using SAP AFS PP, MM and SD, with the flexible master data structure it is simply a matter of defining dimensional matrices with an unlimited number of dimension combinations for purchasing, production, and sales.

Inventory & Warehouse Management are other 2 very important areas in which the SAP AFS Solution stands out, given the nature of the industry where a low value item such as a plain white button could be eating up a high amount of overhead and holding costs, it is only obvious to make sure that these items are brought in only when they are needed, if this is just for buttons, how important would it be to track 100s of layers of fabrics brought in for production, that’s precisely where you would want a system to keep you on the dot !!!

With world famous brands such as Adidas, Reebok, Fornari and Triumph in their customer lists, it just goes to show how highly the SAP AFS Solution is regarded.

You can learn more about this solution at

http://www.sap.com/industries/consumer/large/businessprocesses/afs/npdi.epx

help.sap.com link

http://help.sap.com/saphelp_afs63/helpdata/en/b2/53ae56cda511d2aca20000e829fbfe/frameset.htm