Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

What's the 'DESCRIBE TABLE' limit?

Former Member
0 Kudos

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.

10 REPLIES 10

Former Member
0 Kudos

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>

0 Kudos

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.

Former Member
0 Kudos

replace the describe statement with <b>lines( arg )</b> <b>arg</b> is u r internal table name.

Regards,

Venu.T

former_member223537
Active Contributor
0 Kudos

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

0 Kudos

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.

0 Kudos

Please try with this:

DATA: L_LEN TYPE I.

DESCRIBE TABLE ITAB LINES L_LEN.
WRITE: 'Total Lines', L_LEN.

regards,

Naimesh Patel

0 Kudos

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.

0 Kudos

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

0 Kudos

Hi Teddy:

Thanks for your help. But in the background job still not work.

Best Regards,

Nicole

Former Member
0 Kudos

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.