Friday, August 7, 2015

Client Specified Select

Client specified clause switches off the automatic client handling by open SQL. If we select the MANDT (client) field then we have to use client specified clause like follows:
  SELECT mandt field1 field2 ... fieldn
    INTO TABLE internal_table FROM database_table
    CLIENT SPECIFIED  "MANDT has been selected
                      "hence client specified is must
    WHERE mandt = '800'
      AND field1 IN select_option.

This statement is always mentioned after the FROM clause. If the addition CLIENT SPECIFIED is specified, but the client ID in the WHERE condition is not mentioned, the SELECT statement circumvents the SAP buffering.

REPORT  zabap_gui.

TABLES: kna1.

* Local structure for local internal table
* and work area
TYPES:
       BEGIN OF ty_kna1,
         mandt TYPE kna1-mandt,
         kunnr TYPE kna1-kunnr,
         land1 TYPE kna1-land1,
         name1 TYPE kna1-name1,
         ort01 TYPE kna1-ort01,
         pstlz TYPE kna1-pstlz,
         regio TYPE kna1-regio,
       END OF ty_kna1.

* Local internal table & work area
DATA:
      it_kna1 TYPE TABLE OF ty_kna1,
      wa_kna1 TYPE ty_kna1.

* Selection range by select option internal table
SELECT-OPTIONS: s_kunnr FOR kna1-kunnr.

START-OF-SELECTION.

* Selection of the specific fields
  SELECT mandt kunnr land1 name1 ort01 pstlz regio
    INTO TABLE it_kna1 FROM kna1
    CLIENT SPECIFIED  "MANDT has been selected
                      "hence client specified is must
    WHERE mandt = '800'
      AND kunnr IN s_kunnr.

  IF sy-subrc = 0.
    WRITE:/   'Clnt',
            5 'Customer No',
           14 'Country',
           24 'Name',
           60 'City',
          100 'Postal',
          112 'Region'.
    ULINE.
    SKIP.

    LOOP AT it_kna1 INTO wa_kna1.
      WRITE:/    wa_kna1-mandt,
               5 wa_kna1-kunnr,
              14 wa_kna1-land1,
              24 wa_kna1-name1,
              60 wa_kna1-ort01,
             100 wa_kna1-pstlz,
             112 wa_kna1-regio.
    ENDLOOP.
  ENDIF.

Here is the output.













13 comments:

Đẩu Anh said...

Đơn vị chuyên nhận order đặt mua hàng phụ kiện thời trang
Công ty chuyên nhận order đặt mua hàng thời trang ở Quảng Châu
Công ty chuyên nhận order đặt mua hàng quần áo ở Quảng Châu

Rahul said...

It was very nice blog to learn about Selenium.Thanks for sharing new things.selenium training in chennai

Bhavya Kumar said...

Best blog.Got to learn new things.Thanks for this Blog SAP Success Factors Training in Chennai

Shalini said...


Hi, This is shalini from Chennai learned SAP Training in Chennai from mr.karthick. The training really was good and i got selected in leading mnc company as SAP Consultant.

You can contact 8122241286 for Best SAP Training in Chennai or reach www.thecreatingexperts.com

sushma said...

SAP Success Factors Real Time Hands on Training in Chennai...

Don't always Depend on Training Institute Alone and so please aware of Best Trainers too..

http://thecreatingexperts.com/sap-successfactors-training-in-chennai/

If You need a Best Trainer over SAP Success Factors Means??? Please ready for an DEMO From the Trainer MR.Karthick
CONTACT:8122241286

Both Classroom/Online Training is Available!!!!!!

Shruti Ramalingam said...


From My search…Creating Experts provides Best SAP Training with real time projects assistance.

Most of the modules are equipped with advance level topics which the student can learn from the basics to the advance level stage.

They also provide placement assistance in leading MNC companies across the globe according to the current requirements.

http://thecreatingexperts.com/sap-successfactors-training-in-chennai/

And these are the Best SAP training institute which provides Real Time Hands on Training…

codedion Technologies-9003085882

creating Experts-8122241286

http://thecreatingexperts.com/sap-mm-training-in-chennai/

Shalini said...

SAP Success Factors Real Time Hands on Training in Chennai…

Don’t always Depend on Training Institute alone.Please aware of Best Trainers too..

http://thecreatingexperts.com/sap-successfactors-training-in-chennai/

If You need a Best Trainer in SAP Success Factors??? Then be ready for a DEMO From the Trainer MR.Karthick
CONTACT:8122241286
http://thecreatingexperts.com/sap-mm-training-in-chennai/

Both Classroom/Online Training is Available!!!!!!

kavi kalyan said...

Best SAP Success Factor Training in Chennai

http://thecreatingexperts.com/sap-training-in-chennai/
http://thecreatingexperts.com/sap-successfactors-training-in-chennai/
http://thecreatingexperts.com/sap-mm-training-in-chennai/
http://thecreatingexperts.com/sap-fico-training-in-chennai/

suganya said...

SAP Success Factors Real Time Hands on Training in Chennai…

Don’t always Depend on Training Institute alone.Please aware of Best Trainers too..

http://thecreatingexperts.com/sap-successfactors-training-in-chennai/

If You need a Best Trainer in SAP Success Factors??? Then be ready for a DEMO From the Trainer MR.Karthick
CONTACT:8122241286
http://thecreatingexperts.com/sap-mm-training-in-chennai/

Both Classroom/Online Training is Available!!!!!!

Unknown said...


Best SAP MM Material Managemnt Real time hands on Training in chennai

http://thecreatingexperts.com/sap-mm-training-in-chennai/

sushma said...

Informative Blog...For a long time I was craving for a career growth in programming and then I came to know that THE CREATING EXPERTS is the one who provide training with hands on training and real time scenarios

http://thecreatingexperts.com/sap-abap-training-in-chennai/

contact 8122241286

ragu varan said...

Best SAP HANA Training in Chennai by leading HANA Consultant.
Reach at 9003085882
http://thecreatingexperts.com/category/sap-hana-training-in-chennai/

gilledashivani said...

Great information. the information provided is of great use as i got to learn new things. If you are looking for real time training in SAP ABAP, kindly contact sieve software
Sieve software offers real time training by industry experts with live projects and placement support.
SAP ABAP TRAINING IN HYDERABAD