Thursday, July 2, 2009

ABAP SUBMIT, call other report.

this program is pass parameter GL account to transaction FBL3N report,

REPORT ZTGH_TEST.

TYPEs : begin of ty_saknr,
saknr TYPE saknr,
END OF ty_saknr.
"1. define structure for glaccount. this statement will create structure for saknr

data : t_saknr TYPE TABLE OF ty_saknr WITH HEADER LINE,
r_saknr TYPE RANGE OF saknr,
lr_saknr LIKE LINE OF r_saknr.
"2. define ranges, ranges line, for saknr structure.

SELECT saknr UP TO 10 ROWS from skat into TABLE t_saknr.
"3. get data saknr from database

LOOP AT t_saknr.
lr_saknr-low = t_saknr.
lr_saknr-sign = 'I'.
lr_saknr-option = 'EQ'.
APPEND lr_saknr to r_saknr.
ENDLOOP.
"4. insert value in t_saknr to ranges r_saknr

submit rfitemgl with SAK in r_saknr "get parameter-id for saknr (glaccount)
with BUK = '1000'."get paramater-id for companycode (bukrs)
"5.call program fbl3n (rfitemgl) with paraneter.




How to get program name of a transaction
1. go to tcode FBL3N.
2. go to system --> status. look at in "program" field.




how t0 get parameter-ID
1. put your cursor in select options GL account
2. press F1.
3. click technical setting