> Submit FBL5N (RFITEMAR) <
DATA: LT_TRANGE TYPE RSDS_TRANGE,
LS_RANGE TYPE RSDS_RANGE,
LS_FRANGE TYPE RSDS_FRANGE,
LS_SELOPT TYPE RSDSSELOPT,
LT_TEXPR TYPE RSDS_TEXPR.
*--<< LS_RANGE : Table.
LS_RANGE-TABLENAME = 'BSID'.
*--<< LS_FRANGE : Field. <-- Table에 종속 (LS_RANGE의 Table 필드에 Append)
LS_FRANGE-FIELDNAME = 'HKONT'.
*--<< LS_SELOPT : Field의 조건 <-- Field에 종속 (LS_FRANGE의 Table 필드에 Append)
LS_SELOPT-SIGN = 'I'.
LS_SELOPT-OPTION = 'BT'.
LS_SELOPT-LOW = '0010000000'.
LS_SELOPT-HIGH = '0019999999'.
APPEND LS_SELOPT TO LS_FRANGE-SELOPT_T. " <-- SELOPT를 Field Structure에 Append.
CLEAR LS_SELOPT.
*-->> LS_SELOPT.
APPEND LS_FRANGE TO LS_RANGE-FRANGE_T. " <-- Field를 Table Structure에 Append.
*-->> LS_FRANGE.
*--<< LS_FRANGE (2번째 Field) : 동일 Table의 다른 Field는 LS_FRANGE만 다시 설정.
CLEAR LS_FRANGE.
LS_FRANGE-FIELDNAME = 'AUGDT'.
*--<< LS_SELOPT (1번째 조건).
LS_SELOPT-SIGN = 'I'.
LS_SELOPT-OPTION = 'BT'.
LS_SELOPT-LOW = '20200101'.
LS_SELOPT-HIGH = '20200131'.
APPEND LS_SELOPT TO LS_FRANGE-SELOPT_T. " <-- SELOPT를 Field Structure에 Append.
CLEAR LS_SELOPT.
*-->> LS_SELOPT (1번째 조건).
*--<< LS_SELOPT (2번째 조건).
LS_SELOPT-SIGN = 'I'.
LS_SELOPT-OPTION = 'EQ'.
LS_SELOPT-LOW = '00000000'.
LS_SELOPT-HIGH = '00000000'.
APPEND LS_SELOPT TO LS_FRANGE-SELOPT_T. " <-- SELOPT를 Field Structure에 Append.
CLEAR LS_SELOPT.
*-->> LS_SELOPT (2번째 조건).
APPEND LS_FRANGE TO LS_RANGE-FRANGE_T. " <-- Field를 Table Structure에 Append.
*-->> LS_FRANGE (2번째 Field).
APPEND LS_RANGE TO LT_TRANGE. " <-- Table을 Append. (다른 Table에 대한 조건이 있을땐 위의 로직 반복)
*-->> LS_RANGE : Table.
*-- Free Selection 조건 변환 (Submit 형식으로).
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
FIELD_RANGES = LT_TRANGE
IMPORTING
EXPRESSIONS = LT_TEXPR.
*-- Report 호출.
SUBMIT RFITEMAR
WITH DD_KUNNR-LOW = PV_KUNNR "- 고객번호.
WITH DD_BUKRS-LOW = P_BUKRS "- 회사코드.
WITH X_OPSEL = 'X' "- 라디오버튼 : 미결항목.
WITH PA_STIDA = '20200131' "- 주요일자의 미결항목.
WITH X_CLSEL = '' "- 라디오버튼 : 반제항목.
* WITH SO_AUGDT IN LR_AUGDT "- 반제일.
* WITH PA_STID2 = '20200131' "- 주요일자의 미결항목.
WITH X_AISEL = '' "- 라디오버튼 : 모든항목.
* WITH SO_BUDAT IN LR_BUDAT "- 전기일.
WITH X_SHBV = 'X' "- 특별G/L거래.
WITH X_MERK = '' "- 비망항목.
WITH X_PARK = '' "- 임시저장항목.
WITH X_APAR = '' "- 공급업체항목.
WITH FREE SELECTIONS LT_TEXPR "- 동적선택.
AND RETURN.
끝.