2009 Sep 16 7:29 AM
Dear Experts,
TYPES : BEGIN OF t_afko,
aufnr LIKE afko-aufnr,
gstrp LIKE afko-gstrp,
gltrp LIKE afko-gltrp,
ftrmi LIKE afko-ftrmi,
getri LIKE afko-getri,
aufpl LIKE afko-aufpl,
rsnum LIKE afko-rsnum,
END OF t_afko.
DATA : i_afko TYPE STANDARD TABLE OF t_afko
INITIAL SIZE 0 WITH HEADER LINE.
SELECT-OPTIONS : s_aufnr FOR afko-aufnr ,
s_gstrp FOR afko-gstrp .
SELECT
aufnr
ftrmi " Release Date
gltrp " Actual Finish Date
gstrp " Actual Start Date
getri " Confirmed Order Finish Date
aufpl " Routing number of operations in the order
rsnum " Reservation Number
INTO CORRESPONDING FIELDS OF TABLE i_afko
FROM afko
WHERE aufnr IN s_aufnr.
But when i execute this code, nothing comes in internal table although data exist in afko.
Can anyone tell me whats wrong with the code.
Regards,
Maverick
not sure why data not coming but do some modifications and try..
TYPES : BEGIN OF t_afko,
"make this as the same order as in database table
aufnr TYPE afko-aufnr,
gstrp TYPE afko-gstrp,
gltrp TYPE afko-gltrp,
ftrmi TYPE afko-ftrmi,
getri TYPE afko-getri,
aufpl TYPE afko-aufpl,
rsnum TYPE afko-rsnum,
END OF t_afko.
DATA : i_afko TYPE STANDARD TABLE OF t_afko.
" INITIAL SIZE 0 WITH HEADER LINE.
SELECT-OPTIONS : s_aufnr FOR afko-aufnr ,
s_gstrp FOR afko-gstrp .
SELECT
"make this as the same order as in database table
aufnr
ftrmi " Release Date
gltrp " Actual Finish Date
gstrp " Actual Start Date
getri " Confirmed Order Finish Date
aufpl " Routing number of operations in the order
rsnum " Reservation Number
" INTO CORRESPONDING FIELDS OF TABLE i_afko
FROM afko
INTO TABLE i_afko
WHERE aufnr IN s_aufnr.maintain order as :
AUFNR
GLTRP
GSTRP
FTRMS
GETRI
GLTRI
accordingly..
Edited by: Soumyaprakash Mishra on Sep 16, 2009 12:05 PM
Edited by: Soumyaprakash Mishra on Sep 16, 2009 12:07 PM
2009 Sep 16 7:34 AM
not sure why data not coming but do some modifications and try..
TYPES : BEGIN OF t_afko,
"make this as the same order as in database table
aufnr TYPE afko-aufnr,
gstrp TYPE afko-gstrp,
gltrp TYPE afko-gltrp,
ftrmi TYPE afko-ftrmi,
getri TYPE afko-getri,
aufpl TYPE afko-aufpl,
rsnum TYPE afko-rsnum,
END OF t_afko.
DATA : i_afko TYPE STANDARD TABLE OF t_afko.
" INITIAL SIZE 0 WITH HEADER LINE.
SELECT-OPTIONS : s_aufnr FOR afko-aufnr ,
s_gstrp FOR afko-gstrp .
SELECT
"make this as the same order as in database table
aufnr
ftrmi " Release Date
gltrp " Actual Finish Date
gstrp " Actual Start Date
getri " Confirmed Order Finish Date
aufpl " Routing number of operations in the order
rsnum " Reservation Number
" INTO CORRESPONDING FIELDS OF TABLE i_afko
FROM afko
INTO TABLE i_afko
WHERE aufnr IN s_aufnr.maintain order as :
AUFNR
GLTRP
GSTRP
FTRMS
GETRI
GLTRI
accordingly..
Edited by: Soumyaprakash Mishra on Sep 16, 2009 12:05 PM
Edited by: Soumyaprakash Mishra on Sep 16, 2009 12:07 PM
2009 Sep 16 7:42 AM
Thanks for your reply
but could u please explain the reason.
Still no data is coming into internal table
Regards
Maverick
2009 Sep 16 7:45 AM
put a break point on select statement. and check the sy-subrc
by the way..
are you passing any thing to s_aufnr ??
2009 Sep 16 7:48 AM
Thanks dear
But i hv already checked is with break point.
And I m not passing anything to s_aufnr.
Regards,
Maverick
2009 Sep 16 8:17 AM
Hi Maverick,
<li>Try the below code. If you find records in i_afko, then some problem with where condition
Thanks
Venkat.O
REPORT ZTEST_NOTEPAD.
TABLES AFKO.
TYPES : BEGIN OF T_AFKO,
AUFNR LIKE AFKO-AUFNR,
GSTRP LIKE AFKO-GSTRP,
GLTRP LIKE AFKO-GLTRP,
FTRMI LIKE AFKO-FTRMI,
GETRI LIKE AFKO-GETRI,
AUFPL LIKE AFKO-AUFPL,
RSNUM LIKE AFKO-RSNUM,
END OF T_AFKO.
DATA: W_AFKO TYPE T_AFKO.
DATA : I_AFKO TYPE STANDARD TABLE OF T_AFKO.
* INITIAL SIZE 0 WITH HEADER LINE.
SELECT-OPTIONS : S_AUFNR FOR AFKO-AUFNR ,
S_GSTRP FOR AFKO-GSTRP .
START-OF-SELECTION.
SELECT
AUFNR
FTRMI " Release Date
GLTRP " Actual Finish Date
GSTRP " Actual Start Date
GETRI " Confirmed Order Finish Date
AUFPL " Routing number of operations in the order
RSNUM " Reservation Number
INTO CORRESPONDING FIELDS OF TABLE I_AFKO
FROM AFKO UP TO 10 ROWS.
"WHERE AUFNR IN S_AUFNR.
BREAK-POINT.
2009 Sep 16 7:36 AM
Hi Maverick, <li>Code seems to be pretty okay. Better to go SE16 and check data for AFKO whether table has data or not ? Thanks Venkat.O
2009 Sep 16 7:45 AM
Thanks Venkat.O
but i hv checked , data exist in the table.
any suggestion.
Regards
Maverick
2009 Sep 16 7:47 AM
Hi,
Check if any conversion exit is associated with the field afko-aufnr. For testing purpose append zeros and give the exact length of the field in the select option and check if the internal table is filled.
Regards,
Vikranth
2009 Sep 16 8:31 AM
pls check this code
tables : afko.
TYPES : BEGIN OF t_afko,
aufnr LIKE afko-aufnr,
gstrp LIKE afko-gstrp,
gltrp LIKE afko-gltrp,
ftrmi LIKE afko-ftrmi,
getri LIKE afko-getri,
aufpl LIKE afko-aufpl,
rsnum LIKE afko-rsnum,
END OF t_afko.
DATA : i_afko TYPE STANDARD TABLE OF t_afko
INITIAL SIZE 0 WITH HEADER LINE.
SELECT-OPTIONS : s_aufnr FOR afko-aufnr ,
s_gstrp FOR afko-gstrp .
SELECT
aufnr
ftrmi " Release Date
gltrp " Actual Finish Date
gstrp " Actual Start Date
getri " Confirmed Order Finish Date
aufpl " Routing number of operations in the order
rsnum " Reservation Number
INTO CORRESPONDING FIELDS OF TABLE i_afko
FROM afko
WHERE aufnr IN s_aufnr.
write : 'hi'.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |