Skip to Content
0
Former Member
Jan 17, 2013 at 10:14 AM

how to combine no. of internal tables into final internal table and how to command with loop

58 Views

TABLES: t001, " Company Codes
bkpf, " Accounting document header
bseg, " Accounting document segment
bsis, " Accounting: Secondary index for G/L accounts
bsas, " Accounting: Secondary Index for G/L Accounts
" (Cleared items)
with_item, " Witholding tax info per W/tax type and FI
" line item
j_1iewtchln, " Table for Internal and external Challan
" nos-EWT india.
t059z, " Withholding tax code (enhanced functions)
lfb1 , " Vendor master ( Company Code)
lfa1 , " Vendor Master (General Section)
t001b , " Permitted Posting Periods
j_1bbranch , " Business Place
t059o , " Official withholding tax key - Descriptions
j_1iewtnumgr , " Number Groups For Internal Challan Numbers-
" EWT India.
lfbw, " Vendor master record (withholding tax types)
knbw, " Customer master record (withholding tax types)
knb1, " Customer Master (Company Code)
rbkp, " For MIRO invoices
seccode. " Section Code Note 639798

* ranges
RANGES : wt_acco FOR with_item-wt_acco .

* INTERNAL TABLE DECLARATIONS FOR THE PROGRAM
*Internal table for selecting documents
DATA: bkpftab LIKE bkpf OCCURS 100 WITH HEADER LINE.
DATA: bsegtab LIKE bseg OCCURS 100 WITH HEADER LINE.

DATA: BEGIN OF taxtab OCCURS 0.
INCLUDE STRUCTURE t059z .
DATA: END OF taxtab .

DATA: BEGIN OF with_item_tab OCCURS 100 .
INCLUDE STRUCTURE with_item .
DATA: budat LIKE bkpf-budat,
bupla LIKE bseg-bupla ,
qscod LIKE t059z-qscod,
j_1iextchln LIKE j_1iewtchln-j_1iextchln,
j_1iextchdt LIKE j_1iewtchln-j_1iextchdt,
valut LIKE bseg-valut,
name1 LIKE lfa1-name1,
chln_update TYPE c ,
box(1) TYPE c ,
symbol,
lights,
END OF with_item_tab,
e_monat TYPE bkpf-monat VALUE 00,
koart TYPE bseg-koart .

*Data element to capture recipient type for customers.
DATA: rec_type(2) TYPE c.


* **************DATA DECLARATIONS FOR ALV---------------*

DATA : BEGIN OF fld_header OCCURS 6 ,
symbol(4),
wt_acco LIKE with_item-wt_acco,
name1 LIKE lfa1-name1,
box(1) TYPE c,
lights,
END OF fld_header.
* For setting the PF status
TYPES: BEGIN OF func_tab,
fcode LIKE rsmpe-func,
END OF func_tab.

DATA: excl TYPE STANDARD TABLE OF func_tab WITH
NON-UNIQUE DEFAULT KEY INITIAL SIZE 10,
wa_excl TYPE func_tab.
* Constants
CONSTANTS :key VALUE 'X',
no_key VALUE space,
input VALUE 'X',
no_input VALUE space,
hot VALUE 'X',
no_hot VALUE space.


DATA : r_ucomm LIKE sy-ucomm,
rs_selfield TYPE slis_selfield.

DATA LIN TYPE I.

*Note - 1012848 .. start
DATA : NEW_BELNR(10) TYPE C.
*Note - 1012848 .. end