Application Development and Automation 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: 
Read only

help regarding code

Former Member
0 Likes
464

hi, i have problem in coding for the below situation. please help me in this regard.

aravind.

_______________________________

Name Code name No

-


-- Master -


-- Master -


-- Visa -


-- Master -


-- Master -


___________________________________

Write code for Knowing how many master and visa records present in local file

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
430

Hi aravind,

loop at itab.

if itab-name = 'Master'.

masternum = masternum + 1.

elseif itab-name = 'Visa'.

visanum = visanum +1.

endif.

endloop.

hope this will be helpful to u.

regards,

keerthi.

2 REPLIES 2
Read only

Former Member
0 Likes
431

Hi aravind,

loop at itab.

if itab-name = 'Master'.

masternum = masternum + 1.

elseif itab-name = 'Visa'.

visanum = visanum +1.

endif.

endloop.

hope this will be helpful to u.

regards,

keerthi.

Read only

Former Member
0 Likes
430

Hai Aravind

Go through the following

DESCRIBE - return attributes of an internal table

Basic form

DESCRIBE TABLE itab.

Effect

Returns the attributes of the internal table itab . You must use at least one of the additions listed below.

Additions

1. ... LINES lin

2. ... OCCURS n

Addition 1

... LINES lin

Effect

Places the number of filled lines of the table t in the field lin .

Example

DATA: BEGIN OF TAB OCCURS 10,

X,

END OF TAB.

DATA: LIN TYPE P.

...

CLEAR TAB. REFRESH TAB.

MOVE '?' TO TAB-X.

APPEND TAB.

DESCRIBE TABLE TAB LINES LIN.

Result: LIN contains the value 1.

Addition 2

... OCCURS n

Effect

Transfers the size of the OCCURS parameter from the table definition to the variable n .

Example

DATA: BEGIN OF TAB OCCURS 10,

X,

END OF TAB.

OCC TYPE P.

DESCRIBE TABLE TAB OCCURS OCC.

Result: OCC contains the value 10.

Note

If the table is meant to accept more lines than specified by the OCCURS parameter, the parameter value is roughly doubled as long as the table size remains smaller than 8 KB; this table area is held in the roll area. If the table exceeds the maximum permitted size, the OCCURS parameter is not increased and the remaining part of the table is rolled out to the paging area (see DATA ).

For this reason, the OCCURS value determined by the DESCRIBE statement may differ from that in the DATA statement.

The runtime required to execute the DESCRIBE TABLE statement is approx. 4 msn (standardized microseconds).

Regards

Sreeni