11-28-2007 2:34 AM
As subject. Because when i used background job, the 'describe table' will not work. But in foreground it's wrok, why? Please help, thanks a lot.
11-28-2007 2:53 AM
replace this field symbol.
Without the specification of an addition, the statement DESCRIBE TABLE only sets the system fields <b>sy-tfill and sy-tleng.</b>
11-28-2007 3:10 AM
Thanks for your answers. But still not work in background job. My version is ECC 6.0, I don't know it's version problems or others. Very strange.
11-28-2007 3:10 AM
replace the describe statement with <b>lines( arg )</b> <b>arg</b> is u r internal table name.
Regards,
Venu.T
11-28-2007 3:33 AM
Hi Nicole,
In ECC 6.0, you need to add IN BYTE MODE or IN CHARACTER MODE as follows :-
DATA: FLD(8),
LEN TYPE I,
* DESCRIBE FIELD FLD LENGTH LEN. " This wont work
DESCRIBE FIELD FLD LENGTH LEN IN CHARACTER MODE.
Best regards,
Prashant
11-28-2007 3:46 AM
Thanks for your answer. But my requirement is to count internal table records. Before ECC 6.0 the 'DESCRIBE TABLE itab LINES line is OK in the foreground or background. But in the ECC 6.0 background is not work.
Actually, I can calculating internal table records by others way. I am jsut feel strange that why 'DESCRIBE TABLE' not work in the background.
11-28-2007 3:49 AM
Please try with this:
DATA: L_LEN TYPE I.
DESCRIBE TABLE ITAB LINES L_LEN.
WRITE: 'Total Lines', L_LEN.
regards,
Naimesh Patel
11-28-2007 3:55 AM
Thanks for your answer. I statement same with you. My code as below
DESCRIBE TABLE gt_balamt LINES gv_record.
IF gv_record IS INITIAL.
MESSAGE s007 WITH text-m01. "No data found.
LEAVE LIST-PROCESSING.
ENDIF.
Thease code in foreground is work. But in the <b>background job</b> is not work.
11-28-2007 4:29 AM
Hi Nicole,
Have you try below code?
gv_record = LINES( gt_balamt[] ).
IF gv_record IS INITIAL.
MESSAGE s007 WITH text-m01. "No data found.
LEAVE LIST-PROCESSING.
ENDIF.
Regards,
Teddy
11-28-2007 4:52 AM
Hi Teddy:
Thanks for your help. But in the background job still not work.
Best Regards,
Nicole
11-28-2007 5:19 AM
Hi Nicole,
i just ran this code on ECC 6.0 and it
executed successfully in foreground and
background.
DATA: lv_line TYPE I.
DATA:BEGIN OF IT_DUMMY OCCURS 0,
DUMMY(7) TYPE C,
END OF IT_DUMMY.
IT_DUMMY-DUMMY = 'one'.
append IT_DUMMY.
IT_DUMMY-DUMMY = 'two'.
append IT_DUMMY.
IT_DUMMY-DUMMY = 'three'.
append IT_DUMMY.
IT_DUMMY-DUMMY = 'four'.
append IT_DUMMY.
DESCRIBE TABLE IT_DUMMY LINES LV_LINE.
write 😕 LV_LINE.
Regards,
Samson Rodrigues.