2007 Apr 03 4:00 PM
hello frds i hav i doubt in internal table work area
TYPES: BEGIN OF tab,
retriving LIKE zdv_empgui-empid,
empname LIKE zdv_empgui-empname,
dept LIKE zdv_empgui-department_code,
sal LIKE zdv_empgui-salary,
sex LIKE zdv_empgui-sex,
END OF tab.
DATA: itab TYPE tab OCCURS 10,
ITAB_WA TYPE TAB.
*==============================================
SELECT empid empname department_code salary sex
FROM zdv_empgui
INTO ITAB_WA.
this is giving rit result.
*============================================
SELECT empid empname department_code salary sex
FROM zdv_empgui
INTO CORRESPONDING FIELDS OF ITAB_WA.
In this case value of dept is not retriving and sal is coming as value 0.
rest all value is ok.
is there any diff make by adding CORRESPONDING FIELDS OF ?
2007 Apr 03 4:13 PM
HI,
When using INTO CORRESPONDING FIELDS OF the field names of database table and internal table has to be same for correct results as said by Sudheer....
refer
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/select.htm
Regards,
Santosh
Message was edited by:
Santosh Kumar Patha
HI,
When using INTO CORRESPONDING FIELDS OF the field names of database table and internal table has to be same for correct results as said by Sudheer....
refer
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/select.htm
Regards,
Santosh
Message was edited by:
Santosh Kumar Patha
2007 Apr 03 4:09 PM
Hi,
When you write the INTO CORRESPONDING FIELDS statment, the field name of the Database table and the Internal table shoulb be same.
Regards
Sudheer
2007 Apr 03 4:13 PM
HI,
When using INTO CORRESPONDING FIELDS OF the field names of database table and internal table has to be same for correct results as said by Sudheer....
refer
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/select.htm
Regards,
Santosh
Message was edited by:
Santosh Kumar Patha
2007 Apr 03 4:30 PM
ya thanks a lot
i m getting rit result by both
but y dis is
is there any reason?
2007 Apr 03 4:18 PM
Along with the above suggestions, also make the highlighted change:
SELECT empid empname department_code salary sex
FROM zdv_empgui
INTO CORRESPONDING FIELDS OF <b>TABLE</b> ITAB_WA.
( If the names are same in the itab and the dbtab)
Regards,
Ravi
2007 Apr 03 4:35 PM
Hi,
Also please try this instead of using CORRESPONDING FIELDS OF .
SELECT empid empname department_code salary sex
FROM zdv_empgui
INTO TABLE ITAB_WA
WHERE <your condition>.
Regards,
Ferry Lianto
2007 Apr 04 3:43 AM
SELECT empid empname department_code salary sex
FROM zdv_empgui
INTO CORReSPONDING FIELDS OF ITAB_WA2
where salary = 123.
hi i tried the above exmple its working fine
y is there any <b>concept</b> of internal table?
2007 Apr 04 6:20 AM
Hi,
SELECT empid empname department_code salary sex
FROM zdv_empgui
INTO (ITAB_WA-retriving,itab_wa-empname,itab_wa-dept,itab_wa-sal,itab_wa-sex).
Then u will get the answer. plz try it.
Rgds,
P.Suryanagi Reddy
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |